From aa0e6bb545caab7668eb26ad938a698b364e9550 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 18 Jun 2026 17:52:30 +0800 Subject: [PATCH] 1 --- pages/index/index.vue | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index fc6d518..fcb6a8a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1268,21 +1268,24 @@ this.getDelivery(); this.getShopArea(); let that = this - that.tui.request("/worker/admin/add", "POST", { - userId: uni.getStorageSync('id'), - isChangeArea: 0, - region: item.id - }, false, true).then((res) => { - if (res.code == 200) { - if (res.result != null) { - uni.setStorageSync('worker', res.result) + if(uni.getStorageSync('hiver_token')){ + that.tui.request("/worker/admin/add", "POST", { + userId: uni.getStorageSync('id'), + isChangeArea: 0, + region: item.id + }, false, true).then((res) => { + if (res.code == 200) { + if (res.result != null) { + uni.setStorageSync('worker', res.result) + } + } else { + that.tui.toast(res.message) + return } - } else { - that.tui.toast(res.message) - return - } - uni.hideLoading() - }).catch((res) => {}) + uni.hideLoading() + }).catch((res) => {}) + } + this.$refs.areaPopup.close() }, checkArea() {