From 9a6cd220224fd3a9a6c84b5bb37c6410a470969f Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 17 三月 2026 17:53:21 +0800
Subject: [PATCH] 考点核验
---
src/views/h5/login/index.vue | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/views/h5/login/index.vue b/src/views/h5/login/index.vue
index b9cd759..f434649 100644
--- a/src/views/h5/login/index.vue
+++ b/src/views/h5/login/index.vue
@@ -33,15 +33,16 @@
<script>
import { tokenUtils } from '@/utils/axios.js';
import { useLoginStore } from '@/stores/login.js'
+import { storeToRefs } from 'pinia';
import { isWeixin } from '@/utils/UA.js'
export default {
setup() {
- const { lastRouteInfo } = useLoginStore()
+ const { lastRouteInfo } = storeToRefs(useLoginStore())
return { lastRouteInfo }
},
data() {
return {
- loginType: '', //mobile銆亀eixin
+ loginType: '', //mobilePhone銆亀eixin
form: {
mobile: '',
code: '',
@@ -55,7 +56,10 @@
created() {
tokenUtils.clearTokens()
this.loginType = isWeixin ? 'weixin' : 'mobilePhone'
- this.loginType = 'mobile'
+ if (isWeixin) {
+ this.loginType = 'weixin'
+ this.$router.replace({ path: '/h5/redirect' })
+ }
},
computed: {
appId() {
@@ -114,8 +118,9 @@
const resData = res.data.data
tokenUtils.setTokens(resData.accessToken, resData.refreshToken)
this.$message.success('鐧诲綍鎴愬姛')
- if (this.lastRouteInfo.name) {
- this.$router.replace(this.lastRouteInfo)
+ const path = localStorage.getItem('verify_url')
+ if (path) {
+ this.$router.replace(path)
}
} else {
this.$message.error(res.data.msg || '鐧诲綍澶辫触')
@@ -124,12 +129,6 @@
this.loginLoading = false
})
},
- verify() {
- this.$router.push('/h5/verify')
- },
- signup() {
- this.$router.push('/h5/signup')
- }
}
}
</script>
--
Gitblit v1.8.0