|
|
|
@ -14,7 +14,7 @@ |
|
|
|
<text class="verify-dot"></text> |
|
|
|
</view> |
|
|
|
<view class="school-row" hover-class="tap-soft" hover-stay-time="80" |
|
|
|
@tap.stop="navigatorTo('qiehuan')">{{schoolName}} ›</view> |
|
|
|
@tap.stop="navigatorTo('qiehuan')">{{schoolName1}} ›</view> |
|
|
|
<view class="identity-pill" @tap.stop="navigatorTo('qiehuan')">切换校区</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -220,6 +220,7 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
schoolName1:'', |
|
|
|
areaList: [], |
|
|
|
schoolShop: [], |
|
|
|
workerCounts: 0, |
|
|
|
@ -281,10 +282,6 @@ |
|
|
|
avatarText() { |
|
|
|
return (this.userName || '张').slice(0, 1) |
|
|
|
}, |
|
|
|
schoolName() { |
|
|
|
const area = this.getArea() |
|
|
|
return uni.getStorageSync('schoolName') || area.title || '沧州师范学院' |
|
|
|
}, |
|
|
|
milkTeaCount() { |
|
|
|
return Math.max(1, Math.round((Number(this.savedMoney) || 0) / 5)) |
|
|
|
}, |
|
|
|
@ -591,6 +588,8 @@ |
|
|
|
}, |
|
|
|
init() { |
|
|
|
this.applyCachedMyCenterImages() |
|
|
|
const area = this.getArea() |
|
|
|
this.schoolName1 = area.title |
|
|
|
this.schoolShop = this.normalizeShopList(uni.getStorageSync('schoolShop')) |
|
|
|
this.worker = uni.getStorageSync('worker') |
|
|
|
let shopId = uni.getStorageSync('shopId') |
|
|
|
@ -661,6 +660,22 @@ |
|
|
|
}, |
|
|
|
onClickArea(item) { |
|
|
|
uni.setStorageSync('area', JSON.stringify(item)) |
|
|
|
const area = this.getArea() |
|
|
|
this.schoolName1 = uni.getStorageSync('schoolName') || area.title || '沧州师范学院' |
|
|
|
this.tui.request("/worker/admin/add", "POST", { |
|
|
|
userId: uni.getStorageSync('id'), |
|
|
|
isChangeArea: 1, |
|
|
|
region: area.id |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.result != null) { |
|
|
|
uni.setStorageSync('worker', res.result) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}).catch((res) => {}) |
|
|
|
this.areaKeyword = '' |
|
|
|
this.tui.toast('切换成功') |
|
|
|
this.$refs.areaPopup.close() |
|
|
|
|