Commit 383821af by zhangzhen

细节优化

parent 12b47549
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
uni.removeStorageSync("storeId") uni.removeStorageSync("storeId")
} }
if(uni.getStorageSync("storePopShow")){
uni.removeStorageSync("storePopShow")
}
uni.getSystemInfo({ uni.getSystemInfo({
success: (e) => { success: (e) => {
Vue.prototype.screenHeight = e.screenHeight; Vue.prototype.screenHeight = e.screenHeight;
......
...@@ -391,6 +391,9 @@ ...@@ -391,6 +391,9 @@
uni.setStorageSync("longitude", res.longitude) uni.setStorageSync("longitude", res.longitude)
setTimeout(() => { setTimeout(() => {
uni.removeStorageSync('storeId');
let aaa = uni.getStorageSync('storeId')? true:false;
console.log(aaa, "是否删除数据")
this.onGetListStore() this.onGetListStore()
}, 10) }, 10)
...@@ -411,9 +414,11 @@ ...@@ -411,9 +414,11 @@
if (res.data.code == 200 && res.data.data.length) { if (res.data.code == 200 && res.data.data.length) {
let obj = {} let obj = {}
if (uni.getStorageSync("storeId")) { if (uni.getStorageSync("storeId")) {
console.log(1)
obj = res.data.data.find(item => item.id === uni.getStorageSync("storeId")); obj = res.data.data.find(item => item.id === uni.getStorageSync("storeId"));
// uni.removeStorageSync('storeId') // uni.removeStorageSync('storeId')
} else { } else {
console.log(2)
obj = res.data.data[0]; obj = res.data.data[0];
uni.setStorageSync("storeId", obj.id); uni.setStorageSync("storeId", obj.id);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment