Parcourir la source

修改提示文案

yuanmingze il y a 3 mois
Parent
commit
2543b3d55d
1 fichiers modifiés avec 11 ajouts et 5 suppressions
  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>