wangliang_wd

feat:优化人民号主页展示UI,增加点赞提示

... ... @@ -137,7 +137,7 @@ struct PeopleShipHomePage {
// .height('calc(100% - 44vp)')
.onDidScroll(() => {
this.topOpacity = this.scroller.currentOffset().yOffset / 120
if (this.scroller.currentOffset().yOffset >= this.topHeight - 66) {
if (this.scroller.currentOffset().yOffset >= this.topHeight) {
this.attentionOpacity = true
} else {
this.attentionOpacity = false
... ...
... ... @@ -11,6 +11,7 @@ import {
batchLikeAndCollectParams,
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index';
import { promptAction } from '@kit.ArkUI';
const TAG = 'LikeComponent';
... ... @@ -437,6 +438,9 @@ export struct LikeComponent {
console.log(TAG, "点赞 params", JSON.stringify(params))
ContentDetailRequest.postExecuteLike(params).then((data) => {
if (data.code != 0) {
promptAction.showToast({ message: data.message })
}else {
console.log(TAG, '点赞接口调用成功', JSON.stringify(data))
// 直播点赞一直增加
... ... @@ -461,6 +465,8 @@ export struct LikeComponent {
}
this.enableBtn = true
}
}).catch(() => {
this.enableBtn = true
})
... ...