diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue index 40acd9300..edac432ef 100644 --- a/uni-app/src/App.vue +++ b/uni-app/src/App.vue @@ -118,7 +118,20 @@ if (memberInfo && memberInfo.wx_openid) { uni.setStorageSync('openid', memberInfo.wx_openid) } else { - data.query.code ? login.updateOpenid(data.query.code) : login.getAuthCode({ scopes: 'snsapi_userinfo' }) + if (data.query.code) { + // 检测身份是否合法(当前登录的账号是不是我的),openid有效后才能更新登录 + login.updateOpenid(data.query.code, () => { + login.authLogin({ code: data.query.code }) + }) + } else { + if (loginConfig.is_force_access_user_info) { + // 强制获取用户信息 + login.getAuthCode({ scopes: 'snsapi_userinfo' }) + } else { + // 静默获取 + login.getAuthCode({ scopes: 'snsapi_base' }) + } + } } } // #endif @@ -160,12 +173,22 @@ if (uni.getStorageSync('autoLoginLock') && !uni.getStorageSync('wechat_login_back')) return; if (loginConfig.is_auth_register || uni.getStorageSync('wechat_login_back')) { uni.removeStorageSync('wechat_login_back') // 删除微信公众号手动授权登录回调标识 - data.query.code ? login.authLogin({ code: data.query.code }) : login.getAuthCode({ scopes: 'snsapi_userinfo' }) + if (data.query.code) { + login.authLogin({ code: data.query.code }) + } else { + if (loginConfig.is_force_access_user_info) { + // 强制获取用户信息 + login.getAuthCode({ scopes: 'snsapi_userinfo' }) + } else { + // 静默获取 + login.getAuthCode({ scopes: 'snsapi_base' }) + } + } } } // #endif } - }); + }) }) diff --git a/uni-app/src/addon/components/diy/group/index.vue b/uni-app/src/addon/components/diy/group/index.vue index dcde152f4..00ce92e25 100644 --- a/uni-app/src/addon/components/diy/group/index.vue +++ b/uni-app/src/addon/components/diy/group/index.vue @@ -49,6 +49,9 @@ + diff --git a/uni-app/src/components/top-tabbar/top-tabbar.vue b/uni-app/src/components/top-tabbar/top-tabbar.vue index d971c9320..c20b7a48a 100644 --- a/uni-app/src/components/top-tabbar/top-tabbar.vue +++ b/uni-app/src/components/top-tabbar/top-tabbar.vue @@ -17,7 +17,7 @@ {{ data.title }} - + @@ -29,29 +29,28 @@ - + - {{ currentPosition }} - + {{ systemStore.diyAddressInfo.community }} + {{ systemStore.defaultPositionAddress }} + - + - +