| | |
| | | pointList: [], |
| | | ingOrder: null, |
| | | showLogin: false, |
| | | pendingNavigate: null |
| | | pendingNavigate: null, |
| | | lastLocationAuth: null |
| | | } |
| | | }, |
| | | async onLoad() { |
| | |
| | | onShow() { |
| | | this.ingOrder =null |
| | | this.getIngorder() |
| | | this.checkLocationAuth() |
| | | }, |
| | | watch: { |
| | | token(newToken) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | async checkLocationAuth() { |
| | | const _this = this |
| | | uni.getSetting({ |
| | | success(res) { |
| | | const authLocation = res.authSetting['scope.userLocation'] |
| | | if (_this.lastLocationAuth !== null && _this.lastLocationAuth !== authLocation) { |
| | | if (authLocation) { |
| | | _this.positioning() |
| | | } |
| | | } |
| | | _this.lastLocationAuth = authLocation |
| | | } |
| | | }) |
| | | }, |
| | | async getIngorder() { |
| | | var that =this |
| | | let res = await that.$u.api.getActiveOrderTip() |
| | | if (res && res.code === 200) { |
| | | this.ingOrder = res.data |
| | | } |
| | | }, |
| | | jumpBannerDetail(item) { |
| | | if(!item.content || item.content =='' || item.type==0){ |
| | | return |
| | |
| | | uni.navigateTo({ |
| | | url:'/pages/delivery-order-detail/delivery-order-detail?userType=0&id='+id |
| | | }) |
| | | }, |
| | | async getIngorder(){ |
| | | var that =this |
| | | let res = await that.$u.api.getActiveOrderTip() |
| | | if (res && res.code === 200) { |
| | | this.ingOrder = res.data |
| | | } |
| | | }, |
| | | jumpOrderList(status){ |
| | | if (!this.token) { |
| | |
| | | isHighAccuracy: true, |
| | | success: function (addr) { |
| | | const locParam = { latitude: addr.latitude, longitude: addr.longitude }; |
| | | var myAmapFun = new amapFile.AMapWX({ key: 'f2e6c0bfcac14c27b4f0d6d0d5b9d7d' }); |
| | | var myAmapFun = new amapFile.AMapWX({ key: that.$gaodeMapKey }); |
| | | myAmapFun.getRegeo({ |
| | | location: addr.longitude + ',' + addr.latitude, |
| | | success: async function(data) { |
| | |
| | | locParam.cityId = resCity.data.id |
| | | } |
| | | that.$store.commit('setPosition', locParam) |
| | | that.getNearbyShopList() |
| | | that.$isResolve() |
| | | }, |
| | | fail: (err) => { |