|
|
@@ -55,7 +55,8 @@ export default {
|
|
|
// 测试接口
|
|
|
getData() {
|
|
|
// 正常token
|
|
|
- // dXNlcklkPTEyMyZhY2NvdW50PWRmc2FmYWVyJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTY4NDYxMzkmc2lnbj1mOWUwNzJhZGUwODE4YjhhNzMzN2I0ZTMzMzU2OWJjOA==
|
|
|
+ // dXNlcklkPTEwMDEmYWNjb3VudD1MMDIxMF9NTSZmcm9tPXNpd2VpJnRpbWVzdGFtcD0xNjE4NTU2MTQ4JnNpZ249MWI3MmIwODkzNmZhNDdmMDU5MDRiNDc3N2FkOTdkMTI== //测试经销商TOKEN
|
|
|
+ // dXNlcklkPTE1NiZhY2NvdW50PUwwTTE0X01NJmZyb209c2l3ZWkmdGltZXN0YW1wPTE2MTg1NTYzMDAmc2lnbj1lNDZmM2Q3MmFiZDI3ODYwMDYyMmY2N2NmZjFiNjZmNw== //测试厂商TOKEN
|
|
|
let query = this.$route.query || {};
|
|
|
let token = query.token || '';
|
|
|
console.log('token:', token);
|
|
|
@@ -71,25 +72,20 @@ export default {
|
|
|
console.log(res);
|
|
|
if(res.data.code === 200) {
|
|
|
let userInfo = res.data.data;
|
|
|
+ this.userAccount = userInfo.userCode;
|
|
|
if (!userInfo.agentId) {
|
|
|
this.isManufacturer = 'manufacturer';
|
|
|
- console.log(this.$route.path,222)
|
|
|
- if (this.$route.path !== '/uploadInfor') {
|
|
|
- this.$router.replace({ path: "/uploadInfor" });
|
|
|
- }
|
|
|
- return
|
|
|
+ this.$router.replace({ path: "/uploadInfor" });
|
|
|
} else {
|
|
|
if (userInfo.userRole == '1' || userInfo.userRole == '2') {
|
|
|
this.isManufacturer = 'distributor';
|
|
|
+ this.$router.replace({ path: "/inforList" });
|
|
|
localStorage.setItem("userId", userInfo.agentId);
|
|
|
} else {
|
|
|
this.isManufacturer = 'manufacturer';
|
|
|
- if (this.$route.path !== '/uploadInfor') {
|
|
|
this.$router.replace({ path: "/uploadInfor" });
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
- this.userAccount = userInfo.userCode;
|
|
|
}else {
|
|
|
let message = res.data.message;
|
|
|
console.log('message', message);
|