Commit 64d9eab1 by zhangzhen

细节优化

parent b2ebc0be
......@@ -317,36 +317,26 @@
uni.getLocation({
type: "gcj02",
success: (result) => {
if (result.errMsg == "getLocation:ok") {
this.latitude = result.latitude;
this.longitude = result.longitude;
uni.setStorageSync("latitude", result.latitude)
uni.setStorageSync("longitude", result.longitude)
} else {
uni.hideLoading()
complete: (res) => {
console.log(res,909090)
if(res.errMsg == 'getLocation:ok' ){
this.latitude = res.latitude;
this.longitude = res.longitude;
uni.setStorageSync("latitude", res.latitude)
uni.setStorageSync("longitude", res.longitude)
} else{
uni.showToast({
icon: "none",
title: "获取位置信息失败"
title: '获取位置信息失败'
})
this.$refs.popup.open()
}
},
fail: (err) => {
uni.showToast({
icon: "none",
title: '获取位置信息失败'
})
this.$refs.popup.open()
},
complete: () => {
uni.removeStorage({
key: 'storeId'
})
this.onGetListStore()
}
})
},
onGetListStore() {
getListStore({
......
......@@ -129,6 +129,7 @@
onLoad(option) {
this.orderNo = option.orderNo;
this.onLoading();
this.onMessagePush()
},
methods:{
onLoading(){
......@@ -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 @@
<text class="text-title">{{item.name}}:</text>
</view>
<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 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