Просмотр исходного кода

Merge branch 'master' of http://git.cc-lotus.info/new_train/train-student

guhongwei 5 лет назад
Родитель
Сommit
dd88a468f0
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/views/bind/bind.vue

+ 2 - 1
src/views/bind/bind.vue

@@ -16,6 +16,7 @@
 <script>
 import NavBar from '@/layout/common/topInfo.vue';
 import writeStu from '@/layout/common/writeStu.vue';
+import Vue from 'vue';
 import _ from 'lodash';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions } = createNamespacedHelpers('login');
@@ -47,7 +48,7 @@ export default {
       let res = await this.bind(form);
       if (this.$checkRes(res, `绑定成功`)) {
         sessionStorage.setItem('user', JSON.stringify(res.data));
-        this.$router.push({ path: '/' });
+        window.history.replaceState({}, '首页', `${Vue.config.weixin.baseUrl}/api/train/auth?redirect_uri=${Vue.config.weixin.target}/login&type=0`);
       }
     },
   },