doum
2026-04-29 33c2164b1785a4b3c128f71ff577a989e2d91bdc
small-program/pages/index/index.vue
@@ -110,7 +110,8 @@
            pointList: [],
            ingOrder: null,
            showLogin: false,
            pendingNavigate: null
            pendingNavigate: null,
            lastLocationAuth: null
         }
      },
      async onLoad() {
@@ -123,6 +124,7 @@
      onShow() {
         this.ingOrder =null
         this.getIngorder()
         this.checkLocationAuth()
      },
      watch: {
         token(newToken) {
@@ -135,6 +137,27 @@
         }
      },
      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
@@ -153,13 +176,6 @@
            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) {
@@ -281,7 +297,7 @@
               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) {
@@ -298,6 +314,7 @@
                           locParam.cityId = resCity.data.id
                        }
                        that.$store.commit('setPosition', locParam)
                        that.getNearbyShopList()
                        that.$isResolve()
                     },
                     fail: (err) => {