|
|
@@ -75,7 +75,6 @@
|
|
|
if(this.$store.getters.get_socket_open){
|
|
|
let apiToken = this.$md5('customer-service' + window.location.origin)
|
|
|
if(this.account && this.password){
|
|
|
-
|
|
|
//进程加载条
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -84,11 +83,11 @@
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
|
|
|
- console.log(this.verifySystemId)
|
|
|
- console.log(this.verifySystem)
|
|
|
- console.log(this.securityCode)
|
|
|
+ // console.log(this.verifySystemId)
|
|
|
+ // console.log(this.verifySystem)
|
|
|
+ // console.log(this.securityCode)
|
|
|
let parmas;
|
|
|
- if(this.securityCode){
|
|
|
+ if(this.showSecurityCode){
|
|
|
parmas = {
|
|
|
username:this.account,
|
|
|
password:this.password,
|
|
|
@@ -103,21 +102,10 @@
|
|
|
}
|
|
|
}
|
|
|
this.$http.post(this.$ports.login, parmas).then((res)=>{
|
|
|
+
|
|
|
if(res.data.code == 1){
|
|
|
this.$store.dispatch("SET_USER",res.data.data.user);
|
|
|
this.$store.dispatch("SET_IS_INIT",true);
|
|
|
-
|
|
|
- // console.log({
|
|
|
- // type: 'init',
|
|
|
- // data: {
|
|
|
- // uid: 'KF' + res.data.data.user.id,
|
|
|
- // group: res.data.data.user.group_id,
|
|
|
- // token:res.data.data.user.token,
|
|
|
- // name: res.data.data.user.user_name,
|
|
|
- // avatar:res.data.data.user.user_avatar,
|
|
|
- // }
|
|
|
- // })
|
|
|
-
|
|
|
this.$websocket.send( JSON.stringify({
|
|
|
type: 'init',
|
|
|
data: {
|
|
|
@@ -128,11 +116,13 @@
|
|
|
avatar:res.data.data.user.user_avatar,
|
|
|
}
|
|
|
}))
|
|
|
-
|
|
|
this.$router.push({
|
|
|
path:'/',
|
|
|
query: { pid:escape("这就是一个编码没有什么用啊") }
|
|
|
})
|
|
|
+ }else if(res.data.code == 100){
|
|
|
+ this.$message.success(res.data.msg);
|
|
|
+ loading.close();
|
|
|
}else{
|
|
|
this.$notify({
|
|
|
title: "错误",
|
|
|
@@ -141,6 +131,7 @@
|
|
|
duration: 2000
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
loading.close();
|
|
|
})
|
|
|
}else{
|
|
|
@@ -175,8 +166,10 @@
|
|
|
this.showSecurityCode = true;
|
|
|
}else {
|
|
|
this.showSecurityCode = false;
|
|
|
- this.verifySystemId = SystemId
|
|
|
- this.verifySystem = System
|
|
|
+ this.verifySystemId = SystemId;
|
|
|
+ this.verifySystem = System;
|
|
|
+ localStorage.clear();
|
|
|
+ sessionStorage.clear();
|
|
|
}
|
|
|
|
|
|
this.$http.get(this.$ports.TIME).then(res => {
|