gdpao
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<view class="userhead">
|
||||
<image :src="item.member_avatar"></image>
|
||||
<text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text>
|
||||
<u-icon v-else name="checkbox-mark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
|
||||
<u-icon v-else name="checkmark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
|
||||
</view>
|
||||
<!-- 点赞 -->
|
||||
<view class="operat zan">
|
||||
@@ -17,7 +17,7 @@
|
||||
</view>
|
||||
<!-- 评论 -->
|
||||
<view class="operat pinglun">
|
||||
<u-icon name="more-circle-fill" color="#ffffff" :size="50" @click="editing()"></u-icon>
|
||||
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
|
||||
<text>{{item.comment_num}}</text>
|
||||
</view>
|
||||
<!-- 购物车 -->
|
||||
@@ -74,25 +74,33 @@
|
||||
<script>
|
||||
export default {
|
||||
name:'userinfo',
|
||||
props:['list','cart'],
|
||||
props:['list','cart','comment'],
|
||||
data(){
|
||||
return {
|
||||
is_follow: this.list.is_attention || false,
|
||||
is_like: this.list.is_like || false,
|
||||
is_collect: this.list.is_collect || false,
|
||||
is_content: false,
|
||||
is_cart: this.cart || false,
|
||||
item: this.list || []
|
||||
is_cart: false,
|
||||
item: this.list || {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list(newValue,old) {
|
||||
console.log(newValue,old);
|
||||
// console.log(newValue,old);
|
||||
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;
|
||||
},
|
||||
cart(newValue,old) {
|
||||
// console.log(newValue,old);
|
||||
this.is_cart = newValue;
|
||||
},
|
||||
comment(newValue,old) {
|
||||
console.log(newValue,old);
|
||||
this.is_content = newValue;
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
methods: {
|
||||
@@ -131,12 +139,16 @@ export default {
|
||||
})
|
||||
},
|
||||
// 评论
|
||||
editing() {},
|
||||
editing() {
|
||||
this.is_content = !this.is_content;
|
||||
// console.log(this.is_content);
|
||||
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||
},
|
||||
// 购物车
|
||||
carting() {
|
||||
this.is_cart = !this.is_cart;
|
||||
// console.log(this.is_cart);
|
||||
this.$emit("openCart",this.is_cart);
|
||||
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user