gdpaoup
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<view class="userinfo">
|
||||
<view class="userinfo" @click="stopClick()">
|
||||
<view class="userhead">
|
||||
<image class="avatar" :src="item.member_avatar"></image>
|
||||
<text class="follow" @click="following(item.member_id)">{{ is_follow ? "✓" : "+" }}</text>
|
||||
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "✓" : "+" }}</text> -->
|
||||
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
|
||||
</view>
|
||||
<!-- 点赞 -->
|
||||
<view class="operat zan">
|
||||
@@ -62,16 +63,10 @@
|
||||
.follow {
|
||||
z-index: 100;
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
left: 40rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
font-size: 34rpx;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background-color: #FF780F;
|
||||
top: 80rpx;
|
||||
left: 30rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.operat {
|
||||
@@ -80,6 +75,7 @@
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.operat-span {
|
||||
@@ -110,7 +106,7 @@
|
||||
},
|
||||
watch: {
|
||||
list(newValue, old) {
|
||||
console.log(newValue);
|
||||
// console.log(newValue);
|
||||
this.item = newValue || {};
|
||||
this.is_follow = this.list.is_attention || false;
|
||||
this.is_like = this.list.is_like || false;
|
||||
@@ -152,6 +148,11 @@
|
||||
title: res.data.message,
|
||||
icon: "none"
|
||||
})
|
||||
} else if (res.data.errCode == 401) {
|
||||
uni.showToast({
|
||||
title: "您还没有登录,请先登录!",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -174,6 +175,11 @@
|
||||
// console.log(res);
|
||||
this.is_like = !this.is_like;
|
||||
this.list.like_num = res.data.data.num;
|
||||
} else if (res.data.errCode == 401) {
|
||||
uni.showToast({
|
||||
title: "您还没有登录,请先登录!",
|
||||
icon: "none"
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
@@ -200,6 +206,11 @@
|
||||
console.log(res.data.num);
|
||||
this.is_collect = !this.is_collect;
|
||||
this.list.collect_num = res.data.data.num;
|
||||
} else if (res.data.errCode == 401) {
|
||||
uni.showToast({
|
||||
title: "您还没有登录,请先登录!",
|
||||
icon: "none"
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
@@ -227,6 +238,9 @@
|
||||
cart: this.is_cart
|
||||
});
|
||||
},
|
||||
// 冒泡
|
||||
stopClick() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user