no message

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

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

@ -659,28 +659,47 @@ export default {
},
initSelectedCityByAgencyInfo() {
let that = this;
let agencyInfo = uni.getStorageSync("agencyInfo");
return new Promise((resolve) => {
let agencyInfo = uni.getStorageSync("agencyInfo");
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;
resolve();
} else if (agencyInfo.fdbHomeCity == 0) {
that.getLocation().then(() => {
that.getCityNameByLatLng().then(() => {
if (that.currentCity) {
that.selectedCity = that.currentCity;
}
that.cityLoading = false;
resolve();
});
});
}
} else {
});
}
});
},
processAgencyInfo(agencyInfo, resolve) {
let that = this;
if (agencyInfo && agencyInfo.fdbHomeCity !== undefined) {
if (agencyInfo.fdbHomeCity == 1) {
that.cityLoading = false;
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() {
let that = this;

Loading…
Cancel
Save