tianyi 22 hours ago
parent
commit
aa0e6bb545
  1. 31
      pages/index/index.vue

31
pages/index/index.vue

@ -1268,21 +1268,24 @@
this.getDelivery(); this.getDelivery();
this.getShopArea(); this.getShopArea();
let that = this let that = this
that.tui.request("/worker/admin/add", "POST", { if(uni.getStorageSync('hiver_token')){
userId: uni.getStorageSync('id'), that.tui.request("/worker/admin/add", "POST", {
isChangeArea: 0, userId: uni.getStorageSync('id'),
region: item.id isChangeArea: 0,
}, false, true).then((res) => { region: item.id
if (res.code == 200) { }, false, true).then((res) => {
if (res.result != null) { if (res.code == 200) {
uni.setStorageSync('worker', res.result) if (res.result != null) {
uni.setStorageSync('worker', res.result)
}
} else {
that.tui.toast(res.message)
return
} }
} else { uni.hideLoading()
that.tui.toast(res.message) }).catch((res) => {})
return }
}
uni.hideLoading()
}).catch((res) => {})
this.$refs.areaPopup.close() this.$refs.areaPopup.close()
}, },
checkArea() { checkArea() {

Loading…
Cancel
Save