rewrite tab swiper 8.7
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@click="removeFavorite"
|
||||
@open="open"
|
||||
>
|
||||
<view class="item u-border-bottom">
|
||||
<view class="item u-border-bottom" @click="viewGoodsDetails(item)">
|
||||
<image :src="item.goods_image"></image>
|
||||
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
||||
<view class="title-wrap">
|
||||
@@ -45,6 +45,18 @@ export default {
|
||||
this.getGoodsFavoritesList();
|
||||
},
|
||||
methods: {
|
||||
viewGoodsDetails(item) {
|
||||
const list = this.list.filter(item => {
|
||||
return item.show;
|
||||
})
|
||||
if(list.length) return false;
|
||||
this.$u.route({
|
||||
url: 'pageB/sdetails/index',
|
||||
params: {
|
||||
id: item.fav_id,
|
||||
}
|
||||
})
|
||||
},
|
||||
getGoodsFavoritesList() {
|
||||
this.$u.api.getFavoritesList().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
@@ -75,6 +87,7 @@ export default {
|
||||
this.list.map((val, idx) => {
|
||||
if(index != idx) this.list[idx].show = false;
|
||||
})
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user