点赞 聊天
This commit is contained in:
parent
fde458e48c
commit
7c702cd4c3
|
@ -208,6 +208,7 @@
|
|||
msg: 'Hello'
|
||||
}
|
||||
},
|
||||
// protocols: ['protocol1'],
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
<image @click="tozuozhe(list)" class="userAvatar" :src="list.artificerImg" mode="aspectFill"></image>
|
||||
<!-- 2.点赞 -->
|
||||
<view class="list-view" @click="cLike(list.sfdz);" style="opacity: 0.9; margin-top: 17px;">
|
||||
<image v-if="list.sfdz=='1'" src="@/static/img/index/xin.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<image v-if="list.sfdz=='0'" src="@/static/img/index/xin-2.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<image v-if="list.sfdz==1" src="@/static/img/index/xin.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<image v-if="list.sfdz==0" src="@/static/img/index/xin-2.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<text style="color: #FFFFFF; margin-top: 5px; font-size: 14px; text-align: center; margin-top: 40px; font-weight: bold;" :class="{'likeNumActive':list.sfdz}">{{list.dzs}}</text>
|
||||
</view>
|
||||
<!-- 3.评论 -->
|
||||
|
@ -125,6 +125,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
isLiked:false,
|
||||
dianzhan:0,
|
||||
showPopup:false,
|
||||
ccRef: null,
|
||||
|
@ -806,15 +807,12 @@
|
|||
shipinquanId:this.dataList[this.k].id,
|
||||
}
|
||||
// this.dataList[this.k].sfdz = !this.dataList[this.k].sfdz
|
||||
if(this.dataList[this.k].sfdz=='1'){
|
||||
if(this.dataList[this.k].sfdz=='0'){
|
||||
this.$Request.post("/app/shipinquan/addDianzan", data).then(res => {
|
||||
if (res.code == 0) {
|
||||
// this.dataList[this.k].dzs += 1;
|
||||
// this.dataList[this.k].sfdz = '0';
|
||||
const video = this.dataList[this.k].dzs;
|
||||
sss=video.dzs += 1;
|
||||
this.dataList[this.k].dzs += 1;
|
||||
this.dataList[this.k].sfdz = '1';
|
||||
} else {
|
||||
this.dataList[this.k].sfdz ='0'
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
|
@ -823,13 +821,11 @@
|
|||
});
|
||||
|
||||
}else{//取消点赞
|
||||
this.dataList[this.k].sfdz ='0'
|
||||
this.$Request.post("/app/shipinquan/delDianzan", data).then(res => {
|
||||
if (res.code == 0) {
|
||||
const video = this.dataList[this.k];
|
||||
sss=video.dzs -= 1;
|
||||
this.dataList[this.k].dzs -= 1;
|
||||
this.dataList[this.k].sfdz = '0';
|
||||
} else {
|
||||
this.dataList[this.k].sfdz ='0'
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
|
|
|
@ -587,7 +587,7 @@ export function uploadFileUrl(){
|
|||
}
|
||||
|
||||
export function getWsBaseUrl(){
|
||||
return config('WSHOST');
|
||||
return config('APIHOST');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue