|
@@ -24,22 +24,22 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
goHome () {
|
|
goHome () {
|
|
|
|
+ this.loading = false
|
|
this.$router.replace(config('INDEX_URL'))
|
|
this.$router.replace(config('INDEX_URL'))
|
|
},
|
|
},
|
|
doLogin ({ code }) {
|
|
doLogin ({ code }) {
|
|
this.$request("/login").data({ wxCode: code }).success((r) => {
|
|
this.$request("/login").data({ wxCode: code }).success((r) => {
|
|
- this.loading = false
|
|
|
|
// 设置登录
|
|
// 设置登录
|
|
this.$store.dispatch('login', r.data);
|
|
this.$store.dispatch('login', r.data);
|
|
// 重新初始化系统
|
|
// 重新初始化系统
|
|
this.$request("/load").success((r) => {
|
|
this.$request("/load").success((r) => {
|
|
this.$store.dispatch('initialize', r.data)
|
|
this.$store.dispatch('initialize', r.data)
|
|
setTitle(this.$route)
|
|
setTitle(this.$route)
|
|
|
|
+ this.goHome()
|
|
}).error(() => {
|
|
}).error(() => {
|
|
this.$Notice.error({title: '系统初始化发送异常', desc: r.info, duration: 5})
|
|
this.$Notice.error({title: '系统初始化发送异常', desc: r.info, duration: 5})
|
|
this.$store.dispatch('logout');
|
|
this.$store.dispatch('logout');
|
|
}).get();
|
|
}).get();
|
|
- this.goHome()
|
|
|
|
}).error(() => {
|
|
}).error(() => {
|
|
this.$Message.error({content: '企业微信登录异常'})
|
|
this.$Message.error({content: '企业微信登录异常'})
|
|
this.goHome()
|
|
this.goHome()
|