Commit 64d9eab1 by zhangzhen

细节优化

parent b2ebc0be
...@@ -317,36 +317,26 @@ ...@@ -317,36 +317,26 @@
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
success: (result) => { complete: (res) => {
if (result.errMsg == "getLocation:ok") { console.log(res,909090)
this.latitude = result.latitude; if(res.errMsg == 'getLocation:ok' ){
this.longitude = result.longitude; this.latitude = res.latitude;
uni.setStorageSync("latitude", result.latitude) this.longitude = res.longitude;
uni.setStorageSync("longitude", result.longitude) uni.setStorageSync("latitude", res.latitude)
} else { uni.setStorageSync("longitude", res.longitude)
uni.hideLoading() } else{
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: "获取位置信息失败" title: '获取位置信息失败'
}) })
this.$refs.popup.open() this.$refs.popup.open()
} }
},
fail: (err) => {
uni.showToast({
icon: "none",
title: '获取位置信息失败'
})
this.$refs.popup.open()
},
complete: () => {
uni.removeStorage({ uni.removeStorage({
key: 'storeId' key: 'storeId'
}) })
this.onGetListStore() this.onGetListStore()
} }
}) })
}, },
onGetListStore() { onGetListStore() {
getListStore({ getListStore({
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
onLoad(option) { onLoad(option) {
this.orderNo = option.orderNo; this.orderNo = option.orderNo;
this.onLoading(); this.onLoading();
this.onMessagePush()
}, },
methods:{ methods:{
onLoading(){ onLoading(){
...@@ -205,6 +206,17 @@ ...@@ -205,6 +206,17 @@
}) })
} }
}) })
},
onMessagePush(){
if( !uni.getStorageSync("orderUseMessage")){
uni.requestSubscribeMessage({
tmplIds:['oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8'],
complete: (res) => {
console.log(res,909090)
uni.setStorageSync("orderUseMessage",true);
}
})
}
} }
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<text class="text-title">{{item.name}}:</text> <text class="text-title">{{item.name}}:</text>
</view> </view>
<view class="flex-row"> <view class="flex-row">
<text class="text-black text-bold text-lg">{{item.payPrice}}</text> <text class="text-black text-bold text-lg">{{item.price}}</text>
</view> </view>
</view> </view>
<view class="flex-between part-1"> <view class="flex-between part-1">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment