xuqiang 4 년 전
부모
커밋
7715b63f6c

+ 8 - 5
src/main/pc-space/src/views/user/Modifypad.vue

@@ -82,7 +82,7 @@
 <script>
 import eventBus from '../../eventBus';
 import phone from '../../mixins/phone';
-import { mapState } from 'vuex';
+import { mapState, mapMutations } from 'vuex';
 export default {
     mixins: [phone],
     data() {
@@ -118,6 +118,7 @@ export default {
         this.ruleForm.phone = this.userInfo.phone;
     },
     methods: {
+        ...mapMutations(['updateUserInfo']),
         // 验证码
         send() {
             this.sendMsg(this.form.phone);
@@ -131,14 +132,16 @@ export default {
                         code: this.ruleForm.code
                     })
                     .then(res => {
-                        this.$toast.success('修改成功');
+                        this.$message.success('修改成功');
                         setTimeout(() => {
-                            this.$router.back();
-                        }, 1500);
+                            localStorage.removeItem('webToken');
+                            this.updateUserInfo(null);
+                            this.$router.push('/');
+                        }, 1000);
                     })
                     .catch(e => {
                         if (e) {
-                            this.$toast(e.error);
+                            this.$message(e.error);
                         }
                     });
             });

+ 4 - 4
src/main/pc-space/src/views/user/SecuritySuccess.vue

@@ -16,7 +16,7 @@
                 <div class="fail">
                     <img class="text1" src="../../assets/user/icon-xiugaichengg@3x (1).png" alt="" />
                     <div class="text2">修改成功,下次登录请使用新账号!</div>
-                    <div class="botn" @click="Login">重新登录</div>
+                    <div class="botn" @click="all('accountdata')">返回</div>
                 </div>
             </div>
         </div>
@@ -33,9 +33,9 @@ export default {
     },
     computed: {},
     methods: {
-        Login() {
-            eventBus.$emit('login');
-        }
+        // Login() {
+        //     eventBus.$emit('login');
+        // }
     }
 };
 </script>

+ 5 - 5
src/main/pc-space/src/views/user/TransactionSuccess.vue

@@ -16,7 +16,7 @@
                 <div class="fail">
                     <img class="text1" src="../../assets/user/icon-xiugaichengg@3x (1).png" alt="" />
                     <div class="text2">修改成功,下次登录请使用新账号!</div>
-                    <div class="botn" @click="Login">重新登录</div>
+                    <div class="botn" @click="all('accountdata')">返回</div>
                 </div>
             </div>
         </div>
@@ -24,7 +24,7 @@
 </template>
 
 <script>
-import eventBus from '../../eventBus';
+// import eventBus from '../../eventBus';
 export default {
     data() {
         return {
@@ -33,9 +33,9 @@ export default {
     },
     computed: {},
     methods: {
-        Login() {
-            eventBus.$emit('login');
-        }
+        // Login() {
+        //     eventBus.$emit('login');
+        // }
     }
 };
 </script>