瀏覽代碼

feat: 登录手机号拦截

zhangyuhan 5 月之前
父節點
當前提交
a93af9a963
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      apps/mobile/src/views/ai-search/index.vue

+ 9 - 3
apps/mobile/src/views/ai-search/index.vue

@@ -36,13 +36,18 @@ const rightAction = ref({
 
 const canShowDoBackHome = ref(true)
 function doBackHome () {
+  trickClick(`退出页面-首页`)
   location.href = '/'
 }
 
 function doBack() {
   trickClick(`退出页面`)
   if (history.length === 1) {
-    location.href = '/'
+    if (needBindPhone.value) {
+      checkBindPhone(true)
+    } else {
+      doBackHome()
+    }
   } else {
     that.$router.back()
   }
@@ -753,8 +758,8 @@ async function getUserInfo() {
   }
 }
 // 绑定手机号
-function checkBindPhone() {
-  if (needLogin.value) {
+function checkBindPhone(skipLogin = false) {
+  if (!skipLogin && needLogin.value) {
     return openLinkOfOther(LINKS.APP登录页.app, {
       query: {
         to: 'back',
@@ -954,6 +959,7 @@ init()
           </span>
           </template>
         </Popover>
+        <div class='bind-phone-popup' v-if="needBindPhone" @click="checkBindPhone"></div>
       </div>
 
     </div>