no message

cyl/job_im
jscyl13849007907 2 weeks ago
parent e8839dbf5c
commit d4394c825d

@ -297,33 +297,6 @@ export default {
that.query.page = 1;
this.isLogin = uni.getStorageSync("apply-userinfo") ? true : false;
this.query.size = this.isLogin ? 50 : 20;
// ,
// if (!sceneInfo.query.cityInfo) {
// uni.$on("setCity", () => {
// that.G.startAbort(1);
// that.loadSelectedCityFromCache();
// that.isCheckShare(() => {
// that.getList().then(() => {
// that.showNotic = "paused";
// console.log("that.showNotic1", that.showNotic);
// that.getJobNum();
// setTimeout(() => {
// if (uni.getStorageSync("miniApp-info").notice) {
// let notice = uni.getStorageSync("miniApp-info").notice;
// var reg = /[\r\n]/g;
// notice = notice.replace(reg, "");
// that.noticList = [];
// // that.noticList = notice;
// that.noticList.push(notice);
// that.showNotic = "play";
// }
// console.log("that.noticList", that.noticList);
// }, 100);
// });
// that.isShowTab = true;
// });
// });
// }
that.isCheckShare(() => {
that.getList().then(() => {
that.showNotic = "paused";
@ -345,15 +318,46 @@ export default {
},
onShow() {
let that = this;
that.cityLoading = true;
// isAgencyfalse
// that.checkShowApplyModal();
let locationUpdated = uni.getStorageSync("LOCATION_SETTING_UPDATED");
if (locationUpdated) {
uni.removeStorageSync("LOCATION_SETTING_UPDATED");
uni.showModal({
title: "",
content: "您已更新默认位置",
confirmText: "点击更新",
success: (res) => {
let agencyInfo = uni.getStorageSync("agencyInfo");
if (res.confirm) {
that.cityLoading = true;
if (agencyInfo && agencyInfo.fdbHomeCity == 1) {
uni.removeStorageSync("selectedCity");
}
that.initSelectedCityByAgencyInfo().then(() => {
that.loadSelectedCityFromCache().then(() => {
that.getList();
});
});
} else {
that.initSelectedCityByAgencyInfo().then(() => {
that.loadSelectedCityFromCache().then(() => {
that.getList();
});
});
}
}
});
} else {
that.initSelectedCityByAgencyInfo().then(() => {
that.loadSelectedCityFromCache().then(() => {
this.getList();
});
});
}
// miniApp-infoAPI
let miniAppInfo = uni.getStorageSync("miniApp-info");
@ -683,6 +687,7 @@ export default {
let that = this;
if (agencyInfo && agencyInfo.fdbHomeCity !== undefined) {
if (agencyInfo.fdbHomeCity == 1) {
that.selectedCity = "全国";
that.cityLoading = false;
resolve();
} else if (agencyInfo.fdbHomeCity == 0) {

@ -115,16 +115,30 @@ export default {
let that = this;
that.isSubmit = true;
if (that.type == "homeCity") {
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeCity", fieldValue: that.cityGroup.find(c => c.checked).value }, (res) => {
let newValue = that.cityGroup.find(c => c.checked).value;
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeCity", fieldValue: newValue }, (res) => {
that.updateAgencyInfoCache("fdbHomeCity", newValue);
that.isSubmit = false;
uni.setStorageSync("LOCATION_SETTING_UPDATED", true);
uni.removeStorageSync("selectedCity");
uni.navigateBack();
});
}if (that.type == "homeTab") {
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeTab", fieldValue: that.tabGroup.find(c => c.checked).value }, (res) => {
} else if (that.type == "homeTab") {
let newValue = that.tabGroup.find(c => c.checked).value;
this.G.Put(this.api.merchantManagement_updateField, { fieldName: "fdbHomeTab", fieldValue: newValue }, (res) => {
that.updateAgencyInfoCache("fdbHomeTab", newValue);
that.isSubmit = false;
uni.setStorageSync("LOCATION_SETTING_UPDATED", true);
uni.navigateBack();
});
}
},
updateAgencyInfoCache(fieldName, fieldValue) {
let agencyInfo = uni.getStorageSync("agencyInfo");
if (agencyInfo) {
agencyInfo[fieldName] = fieldValue;
uni.setStorageSync("agencyInfo", agencyInfo);
}
},
},
};

Loading…
Cancel
Save