移除本地生活商品返回上一页刷新页面的问题
This commit is contained in:
parent
84ac4f467e
commit
60d6528485
@ -432,9 +432,9 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.$emit('refresh_local_shop_list', true)
|
||||
},
|
||||
// onUnload() {
|
||||
// uni.$emit('refresh_local_shop_list', true)
|
||||
// },
|
||||
computed: {
|
||||
btnText() {
|
||||
if (this.state == 1) {
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<view>
|
||||
<tabs :current="active" @change="changeShow" bar-width="60" :is-scroll="false" :num="20">
|
||||
<tab v-for="(item, index) in menu" :key="index" :name="item.name" :num="item.num">
|
||||
<shop-list :order-type="item.type" :lstore-id="lstore_id" :i="index" :index="active" @setGoodsStateNum="setGoodsStateNum"></shop-list>
|
||||
<shop-list :order-type="item.type" :lstore-id="lstore_id" :scroll-to="scrollTo" :i="index" :index="active"
|
||||
@setGoodsStateNum="setGoodsStateNum"></shop-list>
|
||||
</tab>
|
||||
</tabs>
|
||||
</view>
|
||||
@ -12,7 +13,7 @@
|
||||
import shopList from './components/shop-list.vue'
|
||||
export default {
|
||||
components: {
|
||||
shopList,
|
||||
shopList,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -34,22 +35,30 @@
|
||||
type: 4,
|
||||
num: 0
|
||||
}],
|
||||
lstore_id: 0
|
||||
lstore_id: 0,
|
||||
scrollTo: 0
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.lstore_id = options?.lstore_id
|
||||
this.changeShow(0);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (uni.getStorageSync('mescrollScrollTop')) {
|
||||
this.scrollTo = uni.getStorageSync('mescrollScrollTop')
|
||||
console.log('getStorageSync=', uni.getStorageSync('mescrollScrollTop'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeShow(index) {
|
||||
if(index != -1) {
|
||||
if (index != -1) {
|
||||
this.$nextTick(() => {
|
||||
this.active = index
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setGoodsStateNum(data) {
|
||||
this.menu[2].num = data.stayGoodsCount
|
||||
this.menu[3].num = data.failGoodsCount
|
||||
@ -57,7 +66,6 @@
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user