yearning
16 小时以前 63fea2990e587837ed3dde2b9ac8f2b4ef729672
src/views/h5/login/index.vue
@@ -35,6 +35,7 @@
import { useLoginStore } from '@/stores/login.js'
import { storeToRefs } from 'pinia';
import { isWeixin } from '@/utils/UA.js'
import cityItems from '@/assets/json/cityItems.json'
export default {
  setup() {
    const { lastRouteInfo } = storeToRefs(useLoginStore())
@@ -54,7 +55,6 @@
    }
  },
  created() {
    tokenUtils.clearTokens()
    this.loginType = isWeixin ? 'weixin' : 'mobilePhone'
    if (isWeixin) {
@@ -110,7 +110,7 @@
      }
    },
    login() {
      const data = {
      let data = {
        mobile: this.form.mobile,
        code: this.form.code,
      }
@@ -120,7 +120,7 @@
          const resData = res.data.data
          tokenUtils.setTokens(resData.accessToken, resData.refreshToken)
          this.$message.success('登录成功')
          const path = localStorage.getItem('verify_url')
          const path = localStorage.getItem('_enterUrl')
          if (path) {
            this.$router.replace(path)
          }