|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
// 正常token
|
|
|
// dXNlcklkPTEyMyZhY2NvdW50PWRmc2FmYWVyJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTY4NDYxMzkmc2lnbj1mOWUwNzJhZGUwODE4YjhhNzMzN2I0ZTMzMzU2OWJjOA==
|
|
|
let query = this.$route.query || {};
|
|
|
- let token = query.token || '';
|
|
|
+ let token = query.token || 'dXNlcklkPTEyMyZhY2NvdW50PWRmc2FmYWVyJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTY4NDYxMzkmc2lnbj1mOWUwNzJhZGUwODE4YjhhNzMzN2I0ZTMzMzU2OWJjOA';
|
|
|
console.log('token:', token);
|
|
|
if(!token) {
|
|
|
localStorage.setItem("userId", '');
|
|
|
@@ -66,21 +66,19 @@ export default {
|
|
|
this.$http({
|
|
|
method: 'post',
|
|
|
url: '/auth/checkSign',
|
|
|
- data: {
|
|
|
- token: token
|
|
|
- }
|
|
|
+ data:token
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
if(res.status === 200){
|
|
|
if(res.data.code === 200) {
|
|
|
let userInfo = res.data.data;
|
|
|
- if (userInfo.role == '1' || userInfo.role == '2') {
|
|
|
+ if (userInfo.userRole == '1' || userInfo.userRole == '2') {
|
|
|
this.isManufacturer = 'distributor';
|
|
|
} else {
|
|
|
this.isManufacturer = 'manufacturer';
|
|
|
}
|
|
|
- this.userAccount = userInfo.userAccount;
|
|
|
- localStorage.setItem("userId", userInfo.userAccount);
|
|
|
+ this.userAccount = userInfo.userCode;
|
|
|
+ localStorage.setItem("userId", userInfo.userAgentId);
|
|
|
}else {
|
|
|
let message = res.data.message;
|
|
|
console.log('message', message);
|