首页优化

master
wangxia 2 months ago
parent c6ad4d573b
commit 6de3529fa4

@ -215,21 +215,21 @@ export default {
uni.showShareMenu({
shareTypes: "normal",
});
this.getLocation().then(() => {
// console.log("that.currentInfo", that.currentInfo);
if (that.currentInfo.longitude) {
that.G.Get(that.api.getCityNameByLatLng, { lng: that.currentInfo.longitude, lat: that.currentInfo.latitude }, (res) => {
// console.log("res", res);
if (res) {
let currentCity = res.replace("市", "");
uni.setStorageSync("selectedCity", currentCity);
uni.$emit("setCity");
}
});
} else {
uni.$emit("setCity");
}
});
// this.getLocation().then(() => {
// // console.log("that.currentInfo", that.currentInfo);
// if (that.currentInfo.longitude) {
// that.G.Get(that.api.getCityNameByLatLng, { lng: that.currentInfo.longitude, lat: that.currentInfo.latitude }, (res) => {
// // console.log("res", res);
// if (res) {
// let currentCity = res.replace("", "");
// uni.setStorageSync("selectedCity", currentCity);
// uni.$emit("setCity");
// }
// });
// } else {
// uni.$emit("setCity");
// }
// });
// //
// uni.hideTabBar();
},

@ -256,32 +256,52 @@ export default {
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;
});
// 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";
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;
});
},
onShow() {
let that = this;

Loading…
Cancel
Save