Merge pull request 'gdpao' (#233) from gyh into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/233
This commit was merged in pull request #233.
This commit is contained in:
gyh
2020-08-18 11:03:41 +08:00
3 changed files with 84 additions and 13 deletions

View File

@@ -24,7 +24,7 @@
<text class="operat-span">{{ comment_num }}</text>
</view>
<!-- 购物车 -->
<view class="operat gouwu">
<view class="operat gouwu" v-if="cart_num">
<image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' "
mode="" @click="carting()"></image>
</view>
@@ -100,18 +100,20 @@
is_collect: this.list.is_collect || false,
is_content: false,
is_cart: false,
cart_num: 0,
comment_num: this.list.comment_num || 0,
item: this.list || {}
item: this.list || {},
}
},
watch: {
list(newValue, old) {
// console.log(newValue);
// console.log(newValue.goods.length);
this.item = newValue || {};
this.is_follow = this.list.is_attention || false;
this.is_like = this.list.is_like || false;
this.is_collect = this.list.is_collect || false;
this.comment_num = this.list.comment_num || 0;
this.cart_num = newValue.goods.length;
},
cart(newValue, old) {
// console.log(newValue);