wangfei hace 6 años
padre
commit
baf1783e7a
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  1. 2
    1
      src/pages/user/bindMobile/bindMobile.vue
  2. 4
    5
      src/util/ajax.js

+ 2
- 1
src/pages/user/bindMobile/bindMobile.vue Ver fichero

@@ -171,7 +171,8 @@ export default {
171 171
       this.submitData(this.postData).then((res) => {
172 172
         this.$toast(res)
173 173
         setTimeout(function(){
174
-          _that.$router.push({name: 'userCenter'})
174
+          // _that.$router.push({name: 'userCenter'})
175
+          window.history.go(-1)
175 176
         },300)
176 177
       })
177 178
     }

+ 4
- 5
src/util/ajax.js Ver fichero

@@ -58,11 +58,10 @@ const ajax = (...args) => {
58 58
         // reject(code)
59 59
         toolClass.getCode(result.appid)
60 60
       } else if (code === 406) {
61
-        console.log(message)
62
-        // if (router.history.current.name == 'bindMobile'){
63
-        //   router.push({ name:'bindMobile' })
64
-        // }
65
-        resolve(code)
61
+        console.log(router.history.current.name)
62
+        if (router.history.current.name !== 'bindMobile'){
63
+          router.push({ name:'bindMobile' })
64
+        }
66 65
       } else {
67 66
         console.log(message)
68 67
         Toast.fail({