rk
2025-10-13 3677915b5ff5cdcad24f35eff10a7a861f8508b7
small-program/App.vue
@@ -7,7 +7,6 @@
      },
      onLaunch: function() {  
         var that = this;
         that.getLocaltionBiz()
         if (!this.openid || this.openid =='') {
            uni.login({
               provider: 'weixin',
@@ -33,9 +32,15 @@
               }
            })
         }
         uni.showShareMenu({
           withShareTicket: true,
           menus: ['shareAppMessage', 'shareTimeline']
         })
      },
      onShow: function() {
         console.log('App Show')
         this.getLocaltionBiz()
      },
      onHide: function() {
         console.log('App Hide')
@@ -46,7 +51,8 @@
            uni.getLocation({
               type: 'wgs84',
               success: (addr) => {
                  const locParam = { latitude: addr.latitude, longitude: addr.longitude ,address:'获取地址失败'};
                  const locParam = { latitude: addr.latitude, longitude: addr.longitude };
                  uni.setStorageSync('address', locParam);
                  var address =null
                  const qqmapsdk = new QQMapWX({
                      key: '4PXBZ-JLBC7-LCLXG-P2SZX-C4HYE-LDBLQ' //腾讯地图申请的key(后续需要公司提供,个人开发者额度有限)