From d108e3b5de816b1494e4197c5671a96c904c5991 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Sun, 22 Sep 2024 10:37:38 +0800 Subject: [PATCH] 9.22 --- gasStation-uni/pages/index/index.vue | 10 +++++----- gasStation-uni/pages/refuel/refuel.vue | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 7c8852171..336897b14 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -281,17 +281,17 @@ storeId = item.split("=")[1] } else if (item.includes("staffId")) { staffId = item.split("=")[1] - } + } }) } else { storeId = str.split("=")[1] } - console.log(storeId,staffId,289); + console.log(storeId, staffId, 289); uni.setStorageSync("storeId", storeId) - + this.getUserAuthority(); uni.navigateTo({ - url: '/pages/refuel/refuel?staffId='+staffId + url: '/pages/refuel/refuel?storeId=' + storeId + '?staffId=' + staffId }) }, error: (res) => { @@ -1215,4 +1215,4 @@ justify-content: center; color: #fff; } - + \ No newline at end of file diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index 76f2a60ec..dfaca84db 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -519,20 +519,27 @@ this.staffId = uni.getStorageSync("inviteStaffId") if (uni.getStorageSync("storeId")) { this.getStore(uni.getStorageSync("storeId")); - // this.getStaffList(uni.getStorageSync("storeId")); + this.getStaffList(uni.getStorageSync("storeId")); } } } else { if (uni.getStorageSync("storeId")) { this.getStore(uni.getStorageSync("storeId")); - // this.getStaffList(uni.getStorageSync("storeId")); + this.getStaffList(uni.getStorageSync("storeId")); } else { this.getStoreIdBySn(uni.getStorageSync("sn")); } } - + if (query.staffId) { + uni.setStorageSync("inviteStaffId", query.staffId) + uni.setStorageSync("storeId", query.storeId) + this.staffId = query.staffId + this.storeId = query.storeId + this.getStore(uni.getStorageSync("storeId")); + this.getStaffList(uni.getStorageSync("storeId")); + } }, onShow() { @@ -693,7 +700,7 @@ isExistStoreId() { if (uni.getStorageSync("storeId") != "") { this.getStore(uni.getStorageSync("storeId")); - // this.getStaffList(uni.getStorageSync("storeId")); + this.getStaffList(uni.getStorageSync("storeId")); } else { this.getAddress(); } @@ -715,7 +722,7 @@ }, }).then((res) => { _this.getOilNumber(id); - // _this.getStaffList(id) + _this.getStaffList(id) _this.store = res.data _this.storeId = res.data.id; uni.setStorageSync("storeId", _this.store.id) @@ -755,7 +762,7 @@ _this.store = response.data.store; _this.storeId = response.data.store.id; _this.getOilNumber(_this.storeId); - // _this.getStaffList(_this.storeId) + _this.getStaffList(_this.storeId) if (response.data.store.welfare) { if (response.data.store.welfare.includes(",")) { _this.welfare = response.data.store.welfare.split(",");