Commit 5ea3c458 by 李嘉林

优化

parent aee5135c
<template> <template>
<div class="storeAddr flex"> <div class="storeAddr flex">
<div class="left flex"> <div class="left flex" v-if="openThousandsStoresFlag">
<div class="logo"> <div class="logo">
<image :src="logoUrl" alt=""></image> <image :src="logoUrl" alt=""></image>
</div> </div>
...@@ -46,15 +46,20 @@ export default { ...@@ -46,15 +46,20 @@ export default {
} }
if (this.openThousandsStoresFlag) { if (this.openThousandsStoresFlag) {
this.getLocationHandle(() => { this.getLocationHandle(() => {
this.getShopList(); this.$emit("toUpdate");
// this.getShopList();
}); });
} }
let { offlineShopName } = getStoreInfo(); this.reloadName();
this.name = offlineShopName || "";
}, },
computed: { computed: {
}, },
methods: { methods: {
reloadName() {
let { offlineShopName } = getStoreInfo();
this.name = offlineShopName || "";
console.log(this.name,'----name')
},
getLocationHandle(callback) { getLocationHandle(callback) {
let _this = this; let _this = this;
wx.getLocation({ wx.getLocation({
......
...@@ -81,10 +81,11 @@ Component({ ...@@ -81,10 +81,11 @@ Component({
if(res.data.code == '200'){ if(res.data.code == '200'){
let list = res.data.data let list = res.data.data
if(list == null || list.length == 0){ if(list == null || list.length == 0){
if(this.query.pageNum == 1){ if(this.data.query.pageNum == 1){
this.setData({ this.setData({
showList: false showList: false
}) })
console.log('------change1')
} }
}else{ }else{
list.forEach((item,index) => { list.forEach((item,index) => {
...@@ -140,7 +141,10 @@ Component({ ...@@ -140,7 +141,10 @@ Component({
} }
if (this.data.WaterfallFlowList.length <= 0) { if (this.data.WaterfallFlowList.length <= 0) {
this.showList = false; this.setData({
showList : false
})
console.log('------change2')
} }
} }
if (list == null || list.length < 10) { if (list == null || list.length < 10) {
...@@ -159,6 +163,7 @@ Component({ ...@@ -159,6 +163,7 @@ Component({
finished : true, finished : true,
showList : false showList : false
}) })
console.log('------change3')
} }
}) })
......
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