yuanmingze 3 mesiacov pred
rodič
commit
2543b3d55d
1 zmenil súbory, kde vykonal 11 pridanie a 5 odobranie
  1. 11 5
      src/views/login/index.vue

+ 11 - 5
src/views/login/index.vue

@@ -163,11 +163,15 @@ const login = async () => {
 // 项目名称
 const pubName = ref('')
 const getPubName = async () => {
-  const res = await getPubNameApi({
-    pushRecordId: sendEtsSms.pushRecordId,
-  })
-  if (res.code === 0) {
-    pubName.value = res.data.projectName
+  try {
+    const res = await getPubNameApi({
+      pushRecordId: sendEtsSms.pushRecordId,
+    })
+    if (res.code === 0) {
+      pubName.value = res.data.projectName
+    }
+  } catch (err) {
+    console.log('err', err)
   }
 }
 /* 协议跳转 */
@@ -184,6 +188,8 @@ onBeforeMount(() => {
     sendEtsSms.pushRecordId = pushRecordId as string
     userStore.setPushRecordId(pushRecordId as string)
     getPubName()
+  } else {
+    showToast('登录链接存在不完整或者输入错误,请重新复制链接登录')
   }
 })
 </script>