mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
fix:参数修改
This commit is contained in:
@@ -90,11 +90,11 @@
|
||||
<span
|
||||
class="iconfont icon-shoucang"
|
||||
:style="{
|
||||
color: d.collectionInfo ? '#2478ff' : '#b3bdc4',
|
||||
color: d.collected ? '#2478ff' : '#b3bdc4',
|
||||
marginLeft: '19px',
|
||||
}"
|
||||
></span>
|
||||
<div class="count" :style="{color:d.collectionInfo ? '#2478ff' : '#b3bdc4'}">{{ d.collectionNum || 0 }}</div>
|
||||
<div class="count" :style="{color:d.collected ? '#2478ff' : '#b3bdc4'}">{{ d.collectionNum || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="thinline"></div>
|
||||
@@ -303,7 +303,7 @@ function like(d) {
|
||||
d.praised ? ((d.praiseNum) -= 1) : ((d.praiseNum) += 1);
|
||||
d.praised = !d.praised;
|
||||
console.log('我是点赞传递的参数', { targetId: d.id, type: 2 })
|
||||
request(PostPraise, { targetId: d.id, type: 2 }).then(res=>{
|
||||
request(PostPraise, { targetId: d.id, type: 3 }).then(res=>{
|
||||
console.log('我是点赞的操作',res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
@@ -311,10 +311,10 @@ function like(d) {
|
||||
}
|
||||
|
||||
function collection(d) {
|
||||
d.collectionInfo ? ((d.collectionNum) -= 1) : ((d.collectionNum) += 1);
|
||||
d.collectionInfo = !d.collectionInfo;
|
||||
d.collected ? ((d.collectionNum) -= 1) : ((d.collectionNum) += 1);
|
||||
d.collected = !d.collected;
|
||||
console.log('我是收藏传递的参数', { targetId: d.id, type: 2 })
|
||||
request(PostCollection, { targetId: d.id, type: 2 }).then(res=>{
|
||||
request(PostPraise, { targetId: d.id, type: 4 }).then(res=>{
|
||||
console.log('我是收藏的操作',res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
<span
|
||||
class="iconfont icon-shoucang"
|
||||
:style="{
|
||||
color: disDetail.collectionInfo ? '#2478ff' : '#b3bdc4',
|
||||
color: disDetail.collected ? '#2478ff' : '#b3bdc4',
|
||||
marginLeft: '19px',
|
||||
}"
|
||||
></span>
|
||||
<div class="count" :style="{color:disDetail.collectionInfo ? '#2478ff' : '#b3bdc4'}">{{ disDetail.collectionNum || 0 }}</div>
|
||||
<div class="count" :style="{color:disDetail.collected ? '#2478ff' : '#b3bdc4'}">{{ disDetail.collectionNum || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentmid">
|
||||
@@ -481,15 +481,15 @@ function like() {
|
||||
? (disDetail.value.praiseNum = Number(disDetail.value.praiseNum) - 1)
|
||||
: (disDetail.value.praiseNum = Number(disDetail.value.praiseNum) + 1);
|
||||
disDetail.value.praised = !disDetail.value.praised;
|
||||
request(COMMENT_PRAISE, { targetId: disDetail.value.id, type: 1 });
|
||||
request(PostPraise, { targetId: disDetail.value.id, type: 3 });
|
||||
}
|
||||
|
||||
function collection() {
|
||||
disDetail.value.collectionInfo
|
||||
disDetail.value.collected
|
||||
? (disDetail.value.collectionNum = Number(disDetail.value.collectionNum) - 1)
|
||||
: (disDetail.value.collectionNum = Number(disDetail.value.collectionNum) + 1);
|
||||
disDetail.value.collectionInfo = !disDetail.value.collectionInfo;
|
||||
request(COMMENT_PRAISE, { targetId: disDetail.value.id, type: 2 });
|
||||
disDetail.value.collected = !disDetail.value.collected;
|
||||
request(PostPraise, { targetId: disDetail.value.id, type: 4 });
|
||||
}
|
||||
|
||||
function commentLike(obj) {
|
||||
|
||||
Reference in New Issue
Block a user