no message

cyl/job_im
jscyl13849007907 2 weeks ago
parent 7de3091780
commit e8839dbf5c

@ -318,7 +318,7 @@ export default {
new Promise((resolve) => { new Promise((resolve) => {
let status = true; let status = true;
if (uni.getStorageSync("agencyInfo")) { if (uni.getStorageSync("agencyInfo") && uni.getStorageSync("apply-token")) {
this.G.Get( this.G.Get(
this.api.get_supplier_info, this.api.get_supplier_info,
{ {

@ -659,28 +659,47 @@ export default {
}, },
initSelectedCityByAgencyInfo() { initSelectedCityByAgencyInfo() {
let that = this; let that = this;
let agencyInfo = uni.getStorageSync("agencyInfo");
return new Promise((resolve) => { return new Promise((resolve) => {
let agencyInfo = uni.getStorageSync("agencyInfo");
if (agencyInfo && agencyInfo.fdbHomeCity !== undefined) { if (agencyInfo && agencyInfo.fdbHomeCity !== undefined) {
if (agencyInfo.fdbHomeCity == 1) { that.processAgencyInfo(agencyInfo, resolve);
} else {
that.G.Get("/yishoudan/agency/getInfo", {}, (res) => {
if (res && res.agency) {
uni.setStorageSync("agencyInfo", res.agency);
that.processAgencyInfo(res.agency, resolve);
} else {
that.cityLoading = false;
resolve();
}
}, () => {
that.cityLoading = false; that.cityLoading = false;
resolve(); resolve();
} else if (agencyInfo.fdbHomeCity == 0) { });
that.getLocation().then(() => { }
that.getCityNameByLatLng().then(() => { });
if (that.currentCity) { },
that.selectedCity = that.currentCity; processAgencyInfo(agencyInfo, resolve) {
} let that = this;
that.cityLoading = false; if (agencyInfo && agencyInfo.fdbHomeCity !== undefined) {
resolve(); if (agencyInfo.fdbHomeCity == 1) {
});
});
}
} else {
that.cityLoading = false; that.cityLoading = false;
resolve(); resolve();
} else if (agencyInfo.fdbHomeCity == 0) {
that.getLocation().then(() => {
that.getCityNameByLatLng().then(() => {
if (that.currentCity) {
that.selectedCity = that.currentCity;
}
that.cityLoading = false;
resolve();
});
});
} }
}); } else {
that.cityLoading = false;
resolve();
}
}, },
checkScroll() { checkScroll() {
let that = this; let that = this;

Loading…
Cancel
Save