|
@@ -247,7 +247,8 @@ var _default = {
|
|
seconds: 0,
|
|
seconds: 0,
|
|
milliseconds: 0
|
|
milliseconds: 0
|
|
},
|
|
},
|
|
- loading: true
|
|
|
|
|
|
+ loading: true,
|
|
|
|
+ serList2: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onShow: function onShow() {
|
|
onShow: function onShow() {
|
|
@@ -258,9 +259,9 @@ var _default = {
|
|
while (1) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
case 0:
|
|
- // if (!uni.getStorageSync('switchs')) {
|
|
|
|
- uni.setStorageSync('switchs', [1, 0, 0]);
|
|
|
|
- // }
|
|
|
|
|
|
+ if (!uni.getStorageSync('switchs')) {
|
|
|
|
+ uni.setStorageSync('switchs', [1, 0, 0]);
|
|
|
|
+ }
|
|
// if (!uni.getStorageSync('priceConfig')) {
|
|
// if (!uni.getStorageSync('priceConfig')) {
|
|
uni.request({
|
|
uni.request({
|
|
url: _config.default.baseUrl + '/api/common/getPriceConfig',
|
|
url: _config.default.baseUrl + '/api/common/getPriceConfig',
|
|
@@ -274,7 +275,7 @@ var _default = {
|
|
});
|
|
});
|
|
// }
|
|
// }
|
|
if (!uni.getStorageSync('token')) {
|
|
if (!uni.getStorageSync('token')) {
|
|
- _context.next = 53;
|
|
|
|
|
|
+ _context.next = 54;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
_context.next = 5;
|
|
_context.next = 5;
|
|
@@ -282,11 +283,35 @@ var _default = {
|
|
case 5:
|
|
case 5:
|
|
res = _context.sent;
|
|
res = _context.sent;
|
|
if (!(res.code == 0)) {
|
|
if (!(res.code == 0)) {
|
|
- _context.next = 52;
|
|
|
|
|
|
+ _context.next = 53;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
_this2.userInfo = res.data;
|
|
_this2.userInfo = res.data;
|
|
-
|
|
|
|
|
|
+ // this.userInfo.role = 3
|
|
|
|
+
|
|
|
|
+ if (_this2.userInfo.role == 1) {
|
|
|
|
+ _this2.serList2 = [{
|
|
|
|
+ icon: _this2.$picUrl + '/static/my/tg.png',
|
|
|
|
+ name: '活动商品',
|
|
|
|
+ url: '/pages/my/actGoods/index'
|
|
|
|
+ }];
|
|
|
|
+ } else if (_this2.userInfo.role == 2) {
|
|
|
|
+ _this2.serList2 = [{
|
|
|
|
+ icon: _this2.$picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '售后',
|
|
|
|
+ url: '/pages/my/sellAfter/index'
|
|
|
|
+ }];
|
|
|
|
+ } else if (_this2.userInfo.role == 3) {
|
|
|
|
+ _this2.serList2 = [{
|
|
|
|
+ icon: _this2.$picUrl + '/static/my/tg.png',
|
|
|
|
+ name: '活动商品',
|
|
|
|
+ url: '/pages/my/actGoods/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: _this2.$picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '售后',
|
|
|
|
+ url: '/pages/my/sellAfter/index'
|
|
|
|
+ }];
|
|
|
|
+ }
|
|
// this.userInfo = {
|
|
// this.userInfo = {
|
|
// head: null,
|
|
// head: null,
|
|
// name: null,
|
|
// name: null,
|
|
@@ -306,70 +331,70 @@ var _default = {
|
|
// this.checkRole()
|
|
// this.checkRole()
|
|
// return
|
|
// return
|
|
if (!res.data.status) {
|
|
if (!res.data.status) {
|
|
- _context.next = 34;
|
|
|
|
|
|
+ _context.next = 35;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
_context.t0 = res.data.type;
|
|
_context.t0 = res.data.type;
|
|
- _context.next = _context.t0 === 0 ? 15 : _context.t0 === 1 ? 17 : _context.t0 === 2 ? 19 : _context.t0 === 3 ? 22 : _context.t0 === 4 ? 24 : _context.t0 === 5 ? 26 : _context.t0 === 6 ? 29 : 31;
|
|
|
|
|
|
+ _context.next = _context.t0 === 0 ? 16 : _context.t0 === 1 ? 18 : _context.t0 === 2 ? 20 : _context.t0 === 3 ? 23 : _context.t0 === 4 ? 25 : _context.t0 === 5 ? 27 : _context.t0 === 6 ? 30 : 32;
|
|
break;
|
|
break;
|
|
- case 15:
|
|
|
|
|
|
+ case 16:
|
|
_this2.role = 'yk';
|
|
_this2.role = 'yk';
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 17:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 18:
|
|
_this2.role = 'svip';
|
|
_this2.role = 'svip';
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 19:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 20:
|
|
_this2.role = 'lhy';
|
|
_this2.role = 'lhy';
|
|
uni.setStorageSync('switchs', [0, 1, 0]);
|
|
uni.setStorageSync('switchs', [0, 1, 0]);
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 22:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 23:
|
|
_this2.role = 'cydg';
|
|
_this2.role = 'cydg';
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 24:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 25:
|
|
_this2.role = 'hdyh';
|
|
_this2.role = 'hdyh';
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 26:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 27:
|
|
_this2.role = 'hy';
|
|
_this2.role = 'hy';
|
|
uni.setStorageSync('switchs', [0, 1, 0]);
|
|
uni.setStorageSync('switchs', [0, 1, 0]);
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 29:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 30:
|
|
_this2.role = 'gvip';
|
|
_this2.role = 'gvip';
|
|
- return _context.abrupt("break", 31);
|
|
|
|
- case 31:
|
|
|
|
|
|
+ return _context.abrupt("break", 32);
|
|
|
|
+ case 32:
|
|
console.log('当前用户角色', _this2.role);
|
|
console.log('当前用户角色', _this2.role);
|
|
- _context.next = 47;
|
|
|
|
|
|
+ _context.next = 48;
|
|
break;
|
|
break;
|
|
- case 34:
|
|
|
|
|
|
+ case 35:
|
|
_context.t1 = res.data.type;
|
|
_context.t1 = res.data.type;
|
|
- _context.next = _context.t1 === 0 ? 37 : _context.t1 === 1 ? 39 : _context.t1 === 2 ? 41 : _context.t1 === 3 ? 43 : _context.t1 === 4 ? 45 : 47;
|
|
|
|
|
|
+ _context.next = _context.t1 === 0 ? 38 : _context.t1 === 1 ? 40 : _context.t1 === 2 ? 42 : _context.t1 === 3 ? 44 : _context.t1 === 4 ? 46 : 48;
|
|
break;
|
|
break;
|
|
- case 37:
|
|
|
|
|
|
+ case 38:
|
|
_this2.role = 'nomal';
|
|
_this2.role = 'nomal';
|
|
- return _context.abrupt("break", 47);
|
|
|
|
- case 39:
|
|
|
|
|
|
+ return _context.abrupt("break", 48);
|
|
|
|
+ case 40:
|
|
_this2.role = 'superAdmin';
|
|
_this2.role = 'superAdmin';
|
|
- return _context.abrupt("break", 47);
|
|
|
|
- case 41:
|
|
|
|
|
|
+ return _context.abrupt("break", 48);
|
|
|
|
+ case 42:
|
|
_this2.role = 'sjkf';
|
|
_this2.role = 'sjkf';
|
|
- return _context.abrupt("break", 47);
|
|
|
|
- case 43:
|
|
|
|
|
|
+ return _context.abrupt("break", 48);
|
|
|
|
+ case 44:
|
|
_this2.role = 'shkf';
|
|
_this2.role = 'shkf';
|
|
- return _context.abrupt("break", 47);
|
|
|
|
- case 45:
|
|
|
|
|
|
+ return _context.abrupt("break", 48);
|
|
|
|
+ case 46:
|
|
_this2.role = 'yw';
|
|
_this2.role = 'yw';
|
|
- return _context.abrupt("break", 47);
|
|
|
|
- case 47:
|
|
|
|
|
|
+ return _context.abrupt("break", 48);
|
|
|
|
+ case 48:
|
|
console.log('当前员工角色', _this2.role);
|
|
console.log('当前员工角色', _this2.role);
|
|
_this2.checkRole();
|
|
_this2.checkRole();
|
|
_this2.loading = false;
|
|
_this2.loading = false;
|
|
- _context.next = 53;
|
|
|
|
|
|
+ _context.next = 54;
|
|
break;
|
|
break;
|
|
- case 52:
|
|
|
|
|
|
+ case 53:
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.message,
|
|
title: res.message,
|
|
icon: 'none'
|
|
icon: 'none'
|
|
});
|
|
});
|
|
- case 53:
|
|
|
|
|
|
+ case 54:
|
|
case "end":
|
|
case "end":
|
|
return _context.stop();
|
|
return _context.stop();
|
|
}
|
|
}
|
|
@@ -560,19 +585,6 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
} else if (this.role == 'svip') {
|
|
} else if (this.role == 'svip') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
@@ -601,19 +613,6 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
} else if (this.role == 'gvip') {
|
|
} else if (this.role == 'gvip') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
@@ -642,19 +641,6 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
} else if (this.role == 'lhy') {
|
|
} else if (this.role == 'lhy') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
@@ -679,19 +665,6 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
} else if (this.role == 'hy') {
|
|
} else if (this.role == 'hy') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
@@ -716,19 +689,6 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
} else if (this.role == 'cydg') {
|
|
} else if (this.role == 'cydg') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
@@ -766,34 +726,8 @@ var _default = {
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
}];
|
|
}];
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
// 活动用户附加于其他用户角色之上,不是一种角色,而是一种查看功能
|
|
// 活动用户附加于其他用户角色之上,不是一种角色,而是一种查看功能
|
|
} else if (this.role == 'hdyh') {
|
|
} else if (this.role == 'hdyh') {
|
|
- if (this.userInfo.role == 1) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '活动商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- });
|
|
|
|
- } else if (this.userInfo.role == 2) {
|
|
|
|
- this.serList.push({
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
return;
|
|
return;
|
|
this.serList = [
|
|
this.serList = [
|
|
// {
|
|
// {
|