浏览代码

自动跳出处理

zweizhao 7 年之前
父节点
当前提交
764e0ff8d4
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 2 1
      layouts/default.vue
  2. 2 0
      pages/setting/check/old_mobile.vue

+ 2 - 1
layouts/default.vue

@@ -25,8 +25,9 @@ export default {
   mounted() {
     this.checkTerminal()
     window.addEventListener('resize', this.checkInnerWidth)
+
     // 修改密码处理
-    if(this.$route.path === '/setting/check/change_mobile') {
+    if(this.$route.path.includes('/setting/check/change_mobile') || this.$route.path.includes('/setting/check/real_info')) {
       // 如果上页不是验证码页面,则认为是复制地址过来,强制踢出
       if(localStorage.getItem('proginn-history') !== '/setting/check/old_mobile') {
         this.$message('请验证旧手机号。')

+ 2 - 0
pages/setting/check/old_mobile.vue

@@ -77,6 +77,8 @@ export default {
     async doCheckReal() {
       let res = await this.$post(`/api/user/check_realname`)
       if(res.data.realname_verify_status) {
+        // 成功则保存history
+        localStorage.setItem('proginn-history', this.$route.path)
         this.$router.push('/setting/check/real_info')
       } else {
         this.$alert('请先实名认证', {