|
@@ -64,6 +64,17 @@
|
|
|
cancelText="返回继续登录"
|
|
cancelText="返回继续登录"
|
|
|
@cancel="onCancel"
|
|
@cancel="onCancel"
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 注册弹窗 -->
|
|
|
|
|
+ <ModernDialog
|
|
|
|
|
+ v-model:show="loginDialog"
|
|
|
|
|
+ title="提示"
|
|
|
|
|
+ :message="loginMessage"
|
|
|
|
|
+ cancelText="返回"
|
|
|
|
|
+ @cancel="loginCancel"
|
|
|
|
|
+ confirmText="立即注册"
|
|
|
|
|
+ @confirm="loginConfirm"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -168,6 +179,15 @@ const startCountDown = () => {
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const loginDialog = ref(false)
|
|
|
|
|
+const loginMessage = ref('')
|
|
|
|
|
+const loginCancel = () => {
|
|
|
|
|
+ loginDialog.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const loginConfirm = () => {
|
|
|
|
|
+ registerUrl()
|
|
|
|
|
+}
|
|
|
/* 登录逻辑 */
|
|
/* 登录逻辑 */
|
|
|
const loginBtn = useDebounceFn(async () => {
|
|
const loginBtn = useDebounceFn(async () => {
|
|
|
if (!formData.mobile) {
|
|
if (!formData.mobile) {
|
|
@@ -193,6 +213,9 @@ const loginBtn = useDebounceFn(async () => {
|
|
|
if (res?.access_token) {
|
|
if (res?.access_token) {
|
|
|
userStore.setAccessToken(res.access_token)
|
|
userStore.setAccessToken(res.access_token)
|
|
|
router.replace({ path: '/invoice-information' })
|
|
router.replace({ path: '/invoice-information' })
|
|
|
|
|
+ } else if (res.code == 401) {
|
|
|
|
|
+ loginMessage.value = res.msg
|
|
|
|
|
+ loginDialog.value = true
|
|
|
}
|
|
}
|
|
|
} catch (err: any) {
|
|
} catch (err: any) {
|
|
|
const { code, message } = err || {}
|
|
const { code, message } = err || {}
|