|
@@ -74,7 +74,7 @@ import {showAlertWin, showLoading, testHost} from '@/utils/cqcy'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Login",
|
|
name: "Login",
|
|
- inject:['WebSocket'],
|
|
|
|
|
|
+ inject:['getWebSocket'],
|
|
data() {
|
|
data() {
|
|
/** 表单验证判断:空格 */
|
|
/** 表单验证判断:空格 */
|
|
let testKeyBySpace = (rule, value, callback) => {
|
|
let testKeyBySpace = (rule, value, callback) => {
|
|
@@ -135,7 +135,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.WebSocket.initWebSocket()
|
|
|
|
this.getCode();
|
|
this.getCode();
|
|
this.getCookie();
|
|
this.getCookie();
|
|
this.applicationName = process.env.VUE_APP_SOFTWARENAME
|
|
this.applicationName = process.env.VUE_APP_SOFTWARENAME
|
|
@@ -185,6 +184,7 @@ export default {
|
|
}
|
|
}
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.$store.dispatch('user/Login', this.loginForm).then(() => {
|
|
this.$store.dispatch('user/Login', this.loginForm).then(() => {
|
|
|
|
+ this.getWebSocket.initWebSocket()
|
|
this.$router.push({path: this.redirect || '/', query: {}})
|
|
this.$router.push({path: this.redirect || '/', query: {}})
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch((e) => {
|
|
}).catch((e) => {
|