|
@@ -106,12 +106,12 @@ export default {
|
|
data = { wxtoken: wxtoken };
|
|
data = { wxtoken: wxtoken };
|
|
}
|
|
}
|
|
let result = await this.userOperation({ type: 'login', data: { loginType: loginType, info: data } });
|
|
let result = await this.userOperation({ type: 'login', data: { loginType: loginType, info: data } });
|
|
- console.log(result);
|
|
|
|
this.$message({
|
|
this.$message({
|
|
type: `${result.errcode}` === '0' ? 'success' : 'error',
|
|
type: `${result.errcode}` === '0' ? 'success' : 'error',
|
|
message: `${result.errcode}` === '0' ? '登录成功' : 'result.errmsg',
|
|
message: `${result.errcode}` === '0' ? '登录成功' : 'result.errmsg',
|
|
});
|
|
});
|
|
if (`${result.errcode}` === '0') {
|
|
if (`${result.errcode}` === '0') {
|
|
|
|
+ sessionStorage.setItem('token', result.data);
|
|
let info = jwt.decode(result.data);
|
|
let info = jwt.decode(result.data);
|
|
sessionStorage.setItem('user', JSON.stringify(info));
|
|
sessionStorage.setItem('user', JSON.stringify(info));
|
|
window.location.href = `${window.location.href}`;
|
|
window.location.href = `${window.location.href}`;
|