Commit 6d16ae0a by caoyanzhi

update: 调整userInfos字段

parent 0cd2bfd8
...@@ -529,7 +529,7 @@ export default { ...@@ -529,7 +529,7 @@ export default {
const that = this; const that = this;
let para = { let para = {
brandId: that.brandId, brandId: that.brandId,
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId
}; };
let url; let url;
if (type != 'showFlag') { if (type != 'showFlag') {
......
...@@ -61,8 +61,7 @@ export default { ...@@ -61,8 +61,7 @@ export default {
}, },
data() { data() {
return { return {
editPersion: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
dialogVisible: true, dialogVisible: true,
groupListData: [], groupListData: [],
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
staffName: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', staffName: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).staffName : '',
dialogVisible: true, dialogVisible: true,
unbindFlag: false, unbindFlag: false,
checked: false, // 手动 checked: false, // 手动
......
...@@ -77,8 +77,7 @@ export default { ...@@ -77,8 +77,7 @@ export default {
}, },
data() { data() {
return { return {
editPersion: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
loading: false, loading: false,
dialogVisible: true, dialogVisible: true,
tableData: [], tableData: [],
......
...@@ -77,8 +77,7 @@ export default { ...@@ -77,8 +77,7 @@ export default {
}, },
data() { data() {
return { return {
editPersion: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
loading: false, loading: false,
dialogVisible: this.setStoreShow, dialogVisible: this.setStoreShow,
formData: { formData: {
......
...@@ -63,8 +63,7 @@ export default { ...@@ -63,8 +63,7 @@ export default {
}, },
data() { data() {
return { return {
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfos')).userId,
selClassesData: JSON.parse(JSON.stringify(this.classesData)) || [], selClassesData: JSON.parse(JSON.stringify(this.classesData)) || [],
customDialog: false, customDialog: false,
tableData: [], tableData: [],
......
...@@ -67,8 +67,7 @@ export default { ...@@ -67,8 +67,7 @@ export default {
}, },
data() { data() {
return { return {
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfos')).userId,
selClassesId: this.classesId, selClassesId: this.classesId,
customDialog: false, customDialog: false,
tableData: [], tableData: [],
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
} }
}; };
return { return {
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
customDialog: false, // 弹框显示 customDialog: false, // 弹框显示
tableData: [], tableData: [],
conditionObj: { conditionObj: {
......
...@@ -83,8 +83,7 @@ export default { ...@@ -83,8 +83,7 @@ export default {
}, },
data() { data() {
return { return {
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfos')).userId,
selClassesId: this.attenceGroupId, selClassesId: this.attenceGroupId,
customDialog: false, customDialog: false,
tableData: [], tableData: [],
......
...@@ -60,8 +60,8 @@ export default { ...@@ -60,8 +60,8 @@ export default {
data() { data() {
return { return {
repProjectName: 'haoban-manage-web', // 项目名 repProjectName: 'haoban-manage-web', // 项目名
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfos')).userId, userId: JSON.parse(sessionStorage.getItem('userInfos')).wxUserId,
customDialog: false, // 弹框显示 customDialog: false, // 弹框显示
// 复选框数据 // 复选框数据
customData: [ customData: [
......
...@@ -68,8 +68,7 @@ export default { ...@@ -68,8 +68,7 @@ export default {
} }
}; };
return { return {
enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfos')).userId,
selClassesId: this.classesId, selClassesId: this.classesId,
customDialog: false, customDialog: false,
ruleForm: { ruleForm: {
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
dialogVisible: false, dialogVisible: false,
// 分页参数 // 分页参数
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
value: '4.0' value: '4.0'
} }
], ],
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
memberVisible: true, memberVisible: true,
partForm: { partForm: {
version: '3.0', version: '3.0',
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}; };
}, },
created() { created() {
this.params.wxEnterpriseId = JSON.parse(localStorage.getItem('userInfos') || '{}').wxEnterpriseId; this.params.wxEnterpriseId = JSON.parse(sessionStorage.getItem('userInfos') || '{}').wxEnterpriseId;
this.getMessage(); this.getMessage();
}, },
methods: { methods: {
......
...@@ -131,10 +131,9 @@ export default { ...@@ -131,10 +131,9 @@ export default {
*/ */
exportExcel(type) { exportExcel(type) {
this.loadingBtn = true; this.loadingBtn = true;
const userinfos = JSON.parse(sessionStorage.getItem('userInfos') || '{}');
let url = '/haoban-task-manage-web/market/clue/export/store-view-task-detail-comp-detail'; let url = '/haoban-task-manage-web/market/clue/export/store-view-task-detail-comp-detail';
let para = { let para = {
enterpriseId: userinfos.enterpriseId, enterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId,
dataType: type, dataType: type,
pageNum: this.pageParams.pageNum, pageNum: this.pageParams.pageNum,
pageSize: this.pageParams.pageSize, pageSize: this.pageParams.pageSize,
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
materialTitle: this.categoryId, materialTitle: this.categoryId,
materialType: 2, materialType: 2,
categoryId: this.categoryId, categoryId: this.categoryId,
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '' wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : ''
}, },
materialMediaList: this.imgList.map(item => { materialMediaList: this.imgList.map(item => {
return { mediaUrl: item.url, mediaName: item.mediaName }; return { mediaUrl: item.url, mediaName: item.mediaName };
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
data() { data() {
return { return {
width: '347px', width: '347px',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
dialogVisible: true, dialogVisible: true,
groupData: [], groupData: [],
ruleForm: { ruleForm: {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!-- href="javascript:void(0)" --> <!-- href="javascript:void(0)" -->
</ul> </ul>
<a class="nav-user-name" slot="reference"> <a class="nav-user-name" slot="reference">
<span class="font-12 color-606266">{{ userInfo.staffDTO.staffName || '--' }}</span> <i class="iconfont-hb3 iconxiala arrowico color-c0c4cc"></i> <span class="font-12 color-606266">{{ userInfo.staffName || '--' }}</span> <i class="iconfont-hb3 iconxiala arrowico color-c0c4cc"></i>
</a> </a>
</el-popover> </el-popover>
</div> </div>
...@@ -107,9 +107,7 @@ export default { ...@@ -107,9 +107,7 @@ export default {
name: '', name: '',
phoneNumber: '', phoneNumber: '',
headPic: '', headPic: '',
staffDTO: { staffName: ''
staffName: ''
}
} }
}; };
}, },
...@@ -321,7 +319,7 @@ export default { ...@@ -321,7 +319,7 @@ export default {
}); });
that.menuHead = that.treeData(resData.result); that.menuHead = that.treeData(resData.result);
that.$nextTick(() => { that.$nextTick(() => {
that.userInfo = JSON.parse(localStorage.getItem('userInfos')); that.userInfo = JSON.parse(sessionStorage.getItem('userInfos'));
if (!that.userInfo) { if (!that.userInfo) {
that.userInfo = { that.userInfo = {
name: '', name: '',
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
return { return {
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
activeId: '3', activeId: '3',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
selectCoupCard: {}, //已选卡券对象 selectCoupCard: {}, //已选卡券对象
loadingPage: true, loadingPage: true,
formData: { formData: {
......
...@@ -1024,7 +1024,6 @@ export default { ...@@ -1024,7 +1024,6 @@ export default {
that.loadingBtn = false; that.loadingBtn = false;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// 生成二维码需要的 url // 生成二维码需要的 url
let enterpriseId = JSON.parse(localStorage.getItem('userInfos')).enterpriseId;
let webUrl = `${window.location.origin}/office-mobile/#/defineTemplate?enterpriseId=${that.enterpriseId}&templateId=${resData.result}`; let webUrl = `${window.location.origin}/office-mobile/#/defineTemplate?enterpriseId=${that.enterpriseId}&templateId=${resData.result}`;
that.$refs.qrcodePreview.qrcode(webUrl, 'daily-preview'); that.$refs.qrcodePreview.qrcode(webUrl, 'daily-preview');
that.dialogVisible = true; that.dialogVisible = true;
......
...@@ -427,7 +427,6 @@ export default { ...@@ -427,7 +427,6 @@ export default {
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
that.loadingBtn = false; that.loadingBtn = false;
let enterpriseId = JSON.parse(localStorage.getItem('userInfos')).enterpriseId;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// 生成二维码需要的 url // 生成二维码需要的 url
let webUrl = `${window.location.origin}/office-mobile/#/systemTemplate?enterpriseId=${that.enterpriseId}&templateId=${resData.result}`; let webUrl = `${window.location.origin}/office-mobile/#/systemTemplate?enterpriseId=${that.enterpriseId}&templateId=${resData.result}`;
......
...@@ -97,8 +97,8 @@ export default { ...@@ -97,8 +97,8 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
editPerson: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', editPerson: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).staffName : '',
formData: { formData: {
templateId: '', templateId: '',
templateName: '', templateName: '',
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseRelatedId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
myCustomData: { myCustomData: {
wmOrderShow: 0, wmOrderShow: 0,
damoOrderShow: 0, damoOrderShow: 0,
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
activeName: 'first', activeName: 'first',
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
myCustomData: { myCustomData: {
searchFlag: false, searchFlag: false,
chatFlag: false, chatFlag: false,
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseRelatedId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
myCustomData: { myCustomData: {
searchFlag: false searchFlag: false
}, },
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
activeName: 'first', activeName: 'first',
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
wxEnterpriseRelatedId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseRelatedId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
myCustomData: { myCustomData: {
searchFlag: false, searchFlag: false,
chatFlag: false, chatFlag: false,
......
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
tagIds: [], tagIds: [],
search: '', search: '',
syncStatus: -1, syncStatus: -1,
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
pageSize: 20, pageSize: 20,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
departObj: {}, //选中的部门、门店 departObj: {}, //选中的部门、门店
gicData: [], // gic gicData: [], // gic
clerkId: '0', // 导购 clerkId: '0', // 导购
......
...@@ -81,8 +81,7 @@ export default { ...@@ -81,8 +81,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
editPerson: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '',
searchInput: '', searchInput: '',
tableData: [], tableData: [],
activeId: '1', activeId: '1',
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
tagSyncParam: {}, tagSyncParam: {},
tagSyncData: [], tagSyncData: [],
tagSyncSearch: '', tagSyncSearch: '',
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
taskType: -1, taskType: -1,
loading: false, loading: false,
failDialog: false, failDialog: false,
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
myCustomData: { myCustomData: {
guideReplyFlag: 0, guideReplyFlag: 0,
allOrderFlag: 0 allOrderFlag: 0
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
data() { data() {
return { return {
activeId: '2', activeId: '2',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
statusObj: { statusObj: {
'3': '待领取', '3': '待领取',
'4': '待核销', '4': '待核销',
......
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
data() { data() {
return { return {
activeId: '2', activeId: '2',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
loading: false, loading: false,
searchInput: '', searchInput: '',
tableData: [], tableData: [],
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
data() { data() {
return { return {
recordShow: false, recordShow: false,
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
statusObj: { statusObj: {
'3': '待领取', '3': '待领取',
'4': '待核销', '4': '待核销',
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
data() { data() {
return { return {
activeId: '2', activeId: '2',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
searchInput: '', searchInput: '',
loading: false, loading: false,
tableData: [], tableData: [],
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
data() { data() {
return { return {
activeId: '2', activeId: '2',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
searchInput: '', searchInput: '',
loading: false, loading: false,
tableData: [], tableData: [],
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
activeId: '3', activeId: '3',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
timeOptions: [ timeOptions: [
{ {
label: '15分钟后', label: '15分钟后',
......
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
activeId: '3', activeId: '3',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
formData: { formData: {
policyId: '', policyId: '',
......
...@@ -125,8 +125,8 @@ export default { ...@@ -125,8 +125,8 @@ export default {
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
activeGroup: this.activeGroupId, // 商户(品牌) groupId activeGroup: this.activeGroupId, // 商户(品牌) groupId
activeId: '3', activeId: '3',
commitName: !!localStorage.getItem('userInfos') && !!JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', commitName: !!sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).staffName : '',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
formData: { formData: {
templateId: '', templateId: '',
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
return { return {
tableH: window.screen.availHeight - 464 - 126, tableH: window.screen.availHeight - 464 - 126,
activeBrand: this.brandId, // 商户(品牌) id activeBrand: this.brandId, // 商户(品牌) id
operationStaffName: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).staffDTO['staffName'] : '', operationStaffName: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).staffName : '',
tableData: [], tableData: [],
performanceSum: '0.00', // 总指标 performanceSum: '0.00', // 总指标
clerkObj: { clerkObj: {
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
data() { data() {
return { return {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
wxEnterpriseRelatedId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseRelatedId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
myCustomData: { myCustomData: {
salesGoodsFlag: false, salesGoodsFlag: false,
notSalesGoodsFlag: false, notSalesGoodsFlag: false,
......
...@@ -42,7 +42,6 @@ export default { ...@@ -42,7 +42,6 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId,
memberVisible: true, memberVisible: true,
partForm: {}, partForm: {},
rules: { rules: {
......
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.enterpriseId, enterpriseId: that.enterpriseId,
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
version: '3.0', version: '3.0',
rangeType: '1', rangeType: '1',
memberOpenCardFlag: that.partForm.memberOpenCardFlag, memberOpenCardFlag: that.partForm.memberOpenCardFlag,
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
getCompanyName() { getCompanyName() {
let that = this; let that = this;
let para = { let para = {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '' wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : ''
}; };
getRequest('/haoban-manage3-web/wxEnterprise-detail', para) getRequest('/haoban-manage3-web/wxEnterprise-detail', para)
.then(res => { .then(res => {
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
that.enterpriseId = enterpriseId; that.enterpriseId = enterpriseId;
const para = { const para = {
enterpriseId, enterpriseId,
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
version: '3.0' version: '3.0'
}; };
postRequest(`/haoban-manage3-web/wx-enterprise-bind-detail`, para) postRequest(`/haoban-manage3-web/wx-enterprise-bind-detail`, para)
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
path: '' path: ''
} }
], ],
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId, wxEnterpriseId: JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId,
addShow: false, addShow: false,
enterpriseData: [], enterpriseData: [],
gicData: [], gicData: [],
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
roleList: [] roleList: []
}; };
......
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
checkShow: true, checkShow: true,
tipText: '请在企业密钥维护中输入对应的secret', tipText: '请在企业密钥维护中输入对应的secret',
tableH: window.screen.availHeight - 464 - 126, tableH: window.screen.availHeight - 464 - 126,
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
companyObj: { companyObj: {
smallVersion: '', smallVersion: '',
corpName: '', corpName: '',
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
searchInput: '', searchInput: '',
currentCategoryId: '-1', // 当前选中的分组 currentCategoryId: '-1', // 当前选中的分组
groupData: [], groupData: [],
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
// { label: 1, content: '发送【好办欢迎语】+【带导购参数的会员小程序卡片】' } // { label: 1, content: '发送【好办欢迎语】+【带导购参数的会员小程序卡片】' }
// ], // ],
title: '', title: '',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
// friendSettingType: '', // friendSettingType: '',
type: 1, type: 1,
friendSettingId: '', friendSettingId: '',
......
...@@ -279,8 +279,8 @@ export default { ...@@ -279,8 +279,8 @@ export default {
title: [{ required: true, message: '请输入欢迎语标题', trigger: 'blur' }], title: [{ required: true, message: '请输入欢迎语标题', trigger: 'blur' }],
welcomeContent: [{ required: true, message: '请输入欢迎语内容', trigger: 'blur' }] welcomeContent: [{ required: true, message: '请输入欢迎语内容', trigger: 'blur' }]
}, },
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: '',
enterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).enterpriseId : '', enterpriseId: '',
emojiList: emojiArr, emojiList: emojiArr,
addReplayDialog: false, addReplayDialog: false,
url: '', url: '',
...@@ -318,6 +318,9 @@ export default { ...@@ -318,6 +318,9 @@ export default {
} }
}, },
mounted() { mounted() {
const userInfos = JSON.parse(sessionStorage.getItem('userInfos'));
this.wxEnterpriseId = userInfos.wxEnterpriseId;
this.enterpriseId = userInfos.enterpriseId;
const { id } = this.$route.query; const { id } = this.$route.query;
if (id) { if (id) {
this.getData(); this.getData();
......
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
that.selectStartDay = dateFormat.timeStampToYmd(new Date().getTime() - 7 * 24 * 3600 * 1000); that.selectStartDay = dateFormat.timeStampToYmd(new Date().getTime() - 7 * 24 * 3600 * 1000);
that.selectEndDay = dateFormat.timeStampToYmd(new Date().getTime() - 24 * 3600 * 1000); that.selectEndDay = dateFormat.timeStampToYmd(new Date().getTime() - 24 * 3600 * 1000);
that.selectTendDay = dateFormat.timeStampToYmd(new Date().getTime() - 24 * 3600 * 1000); that.selectTendDay = dateFormat.timeStampToYmd(new Date().getTime() - 24 * 3600 * 1000);
this.activeBrand = JSON.parse(sessionStorage.getItem('userInfos') || '{}').enterpriseId; this.activeBrand = JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId;
that.getLoginData(); that.getLoginData();
that.getTendData(); that.getTendData();
that.getAreaLoginData(); that.getAreaLoginData();
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
showCustomDialog: false, // 自定义弹框显示标志 showCustomDialog: false, // 自定义弹框显示标志
customType: '', // 自定义弹框标志 customType: '', // 自定义弹框标志
customTitle: '', // 自定义弹框标题 customTitle: '', // 自定义弹框标题
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: '',
// 购买应用 // 购买应用
purchaseApp: [ purchaseApp: [
/* { /* {
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
postSwitch(item) { postSwitch(item) {
let that = this; let that = this;
let para = { let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: that.wxEnterpriseId,
applicationId: item.applicationId, applicationId: item.applicationId,
openFlag: item.openFlag == 1 ? 0 : 1 openFlag: item.openFlag == 1 ? 0 : 1
}; };
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
postAppSwitch(item) { postAppSwitch(item) {
const that = this; const that = this;
let para = { let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: that.wxEnterpriseId,
applicationId: item.applicationId, applicationId: item.applicationId,
openFlag: item.openFlag ? 1 : 0 openFlag: item.openFlag ? 1 : 0
}; };
...@@ -455,7 +455,7 @@ export default { ...@@ -455,7 +455,7 @@ export default {
getAppData(type) { getAppData(type) {
const that = this; const that = this;
let para = { let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: that.wxEnterpriseId,
type: type // 1已购买2未购买 type: type // 1已购买2未购买
}; };
getRequest('/haoban-manage3-web/application-open-close-list', para) getRequest('/haoban-manage3-web/application-open-close-list', para)
...@@ -529,38 +529,6 @@ export default { ...@@ -529,38 +529,6 @@ export default {
}); });
}, },
/** /**
* 登录 --- api
*/
toLogin() {
const that = this;
return new Promise((resolve, reject) => {
let para = {};
getRequest('/haoban-manage3-web/get-login-info', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
// localStorage.removeItem('userInfos');
localStorage.setItem('userInfos', JSON.stringify(resData.result));
resolve(resData.result.wxEnterpriseId);
return;
}
errMsg.errorMsg(resData);
resolve({
wxEnterpriseId: ''
});
})
.catch(function(error) {
resolve({
wxEnterpriseId: ''
});
that.$message.error({
duration: 1000,
message: error.message
});
});
});
},
/**
* 获取显示的提示 * 获取显示的提示
*/ */
getTipData() { getTipData() {
...@@ -609,8 +577,8 @@ export default { ...@@ -609,8 +577,8 @@ export default {
}, },
async mounted() { async mounted() {
const that = this; const that = this;
that.wxEnterpriseId = JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId;
that.getBindData(); that.getBindData();
that.wxEnterpriseId = await that.toLogin();
that.getAppData(1); that.getAppData(1);
that.getHelpData(); that.getHelpData();
// that.toTipTask(); // that.toTipTask();
......
...@@ -288,8 +288,8 @@ export default { ...@@ -288,8 +288,8 @@ export default {
that.getQrcode(); that.getQrcode();
} }
// that.toLogin(); // that.toLogin();
if (!!localStorage.getItem('userInfos')) { if (!!sessionStorage.getItem('userInfos')) {
localStorage.removeItem('userInfos'); sessionStorage.removeItem('userInfos');
} }
}, },
components: {} components: {}
......
...@@ -117,8 +117,8 @@ export default { ...@@ -117,8 +117,8 @@ export default {
if (this.$route.query.random) { if (this.$route.query.random) {
that.getList(); that.getList();
} }
if (!!localStorage.getItem('userInfos')) { if (!!sessionStorage.getItem('userInfos')) {
localStorage.removeItem('userInfos'); sessionStorage.removeItem('userInfos');
} }
}, },
components: {} components: {}
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
return { return {
storeSwitch: false, storeSwitch: false,
clerkChangeFlag: false, clerkChangeFlag: false,
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '' wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : ''
}; };
}, },
methods: { methods: {
......
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
data() { data() {
return { return {
tableH: window.screen.availHeight - 464 - 126 + 'px', tableH: window.screen.availHeight - 464 - 126 + 'px',
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
filterValue: '', filterValue: '',
filterBrand: '', filterBrand: '',
brandOptions: [], //品牌 brandOptions: [], //品牌
......
...@@ -155,8 +155,8 @@ export default { ...@@ -155,8 +155,8 @@ export default {
name: 'unreview', name: 'unreview',
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
auditName: localStorage.getItem('userInfos') && JSON.parse(localStorage.getItem('userInfos')).staffDTO ? JSON.parse(localStorage.getItem('userInfos')).staffDTO.staffName : '', auditName: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).staffName : '',
filterValue: '', filterValue: '',
filterBrand: '', filterBrand: '',
brandOptions: [], // 品牌 brandOptions: [], // 品牌
......
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
} }
this.loadingBtn = true; this.loadingBtn = true;
let url = '/haoban-task-manage-web/market/clue/export/store-view'; let url = '/haoban-task-manage-web/market/clue/export/store-view';
const userInfos = JSON.parse(sessionStorage.getItem('userInfos') || '{}'); const userInfos = JSON.parse(sessionStorage.getItem('userInfos'));
const { pageNum, pageSize, storeName } = this.pageParams; const { pageNum, pageSize, storeName } = this.pageParams;
let para = { let para = {
pageNum, pageNum,
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
getTableList(val) { getTableList(val) {
const that = this; const that = this;
that.loading = true; that.loading = true;
const userInfos = JSON.parse(sessionStorage.getItem('userInfos') || '{}'); const userInfos = JSON.parse(sessionStorage.getItem('userInfos'));
let para = { let para = {
...that.pageParams, ...that.pageParams,
enterpriseId: userInfos.enterpriseId, enterpriseId: userInfos.enterpriseId,
......
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.activeBrand = JSON.parse(sessionStorage.getItem('userInfos') || '{}').enterpriseId; this.activeBrand = JSON.parse(sessionStorage.getItem('userInfos')).enterpriseId;
if (this.activeBrand) this.getExpired(); // 到期通知 if (this.activeBrand) this.getExpired(); // 到期通知
}, },
components: { components: {
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
name: 'setting', name: 'setting',
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '', wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
clerkPhoneFlag: 0, clerkPhoneFlag: 0,
storeEditFlag: 0 storeEditFlag: 0
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment