|
|
|
|
@ -336,6 +336,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
|
|
// 判断是否需要弹出申请加入弹窗(isAgency为false,且每天只弹一次)
|
|
|
|
|
// that.checkShowApplyModal();
|
|
|
|
|
|
|
|
|
|
that.loadSelectedCityFromCache().then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
@ -548,6 +552,39 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 检查是否需要弹出申请加入弹窗(isAgency为false,每天只弹一次)
|
|
|
|
|
checkShowApplyModal() {
|
|
|
|
|
let that = this;
|
|
|
|
|
// 如果已经是代理,不需要弹窗
|
|
|
|
|
if (that.isAgency) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取上次弹窗日期
|
|
|
|
|
let lastShowDate = uni.getStorageSync("apply_modal_last_date");
|
|
|
|
|
let today = new Date().toDateString();
|
|
|
|
|
|
|
|
|
|
// 如果今天还没弹过,则弹出
|
|
|
|
|
if (lastShowDate !== today) {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "",
|
|
|
|
|
content: "申请加入",
|
|
|
|
|
confirmText: "去申请",
|
|
|
|
|
showCancel: false,
|
|
|
|
|
confirmColor: getApp().globalData.themeColor,
|
|
|
|
|
success(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
// 跳转到申请页面
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "/root/apply/index"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// 记录今天已弹窗
|
|
|
|
|
uni.setStorageSync("apply_modal_last_date", today);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
loadSelectedCityFromCache() {
|
|
|
|
|
// 假设缓存中的键名为 'selectedCity'
|
|
|
|
|
return new Promise((reso, rej) => {
|
|
|
|
|
|