diff --git a/src/login-sub/index.vue b/src/login-sub/index.vue index 4174950..65790fa 100644 --- a/src/login-sub/index.vue +++ b/src/login-sub/index.vue @@ -81,6 +81,8 @@ const show = ref(false) const checked = ref([]) // 是否同意条款 const getPhoneInfo = ref(null) +const scene = ref('') + const getPhoneNumber = async (e: any) => { if (e.detail.errMsg == 'getPhoneNumber:ok') { const detail = e.detail @@ -189,6 +191,8 @@ const getUserInfo = async (_code: string) => { // 个人信息初始化 if (infoData.userExtend && !infoData.userExtend.init) { uni.navigateTo({ url: '/login-sub/inviteCode' }) + } else if (scene.value !== '') { + uni.navigateTo({ url: `/pages/index/index?scene=${scene.value}` }) } else { uni.switchTab({ url: '/pages/home/index/index', @@ -205,6 +209,11 @@ const getUserInfo = async (_code: string) => { }) } } + +onLoad((options) => { + // 如果是授权登录页面回来,则要回去授权页面 + scene.value = options.scene || '' +})