|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
return {
|
|
|
navTitle1: ' > 数据管理',
|
|
|
navTitle2: '',
|
|
|
- isManufacturer: 'distributor', // distributor 经销商 manufacturer 厂商
|
|
|
+ isManufacturer: 'manufacturer', // distributor 经销商 manufacturer 厂商
|
|
|
userAccount: ''
|
|
|
}
|
|
|
},
|
|
|
@@ -66,19 +66,21 @@ export default {
|
|
|
this.$http({
|
|
|
method: 'post',
|
|
|
url: '/auth/checkSign',
|
|
|
- data:token
|
|
|
+ data: {
|
|
|
+ token: token
|
|
|
+ }
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
if(res.status === 200){
|
|
|
if(res.data.code === 200) {
|
|
|
let userInfo = res.data.data;
|
|
|
- if (userInfo.userRole == '1' || userInfo.userRole == '2') {
|
|
|
+ if (userInfo.role == '1' || userInfo.role == '2') {
|
|
|
this.isManufacturer = 'distributor';
|
|
|
} else {
|
|
|
this.isManufacturer = 'manufacturer';
|
|
|
}
|
|
|
- this.userAccount = userInfo.userCode;
|
|
|
- localStorage.setItem("userId", userInfo.agentId);
|
|
|
+ this.userAccount = userInfo.userAccount;
|
|
|
+ localStorage.setItem("userId", userInfo.userAccount);
|
|
|
}else {
|
|
|
let message = res.data.message;
|
|
|
console.log('message', message);
|