Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-05-13 13:54:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e6230cc3cb5d80540ee1bf1d1ee647e4f8dffa6b
e6230cc3
1 parent
1c148143
fix: 信息流卡片互动 debug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
e6230cc
...
...
@@ -25,7 +25,7 @@ export struct RmhTitle {
/**
* 默认未关注 点击去关注
*/
@State followStatus:
S
tring = '0';
@State followStatus:
s
tring = '0';
/**
* 关注号主
...
...
@@ -45,7 +45,7 @@ export struct RmhTitle {
status: this.followStatus == '0' ? 1 : 0,
}
ContentDetailRequest.postInteractAccentionOperate(params2).then(res => {
console.log('
关注号主==
', JSON.stringify(res.data))
console.log('
rmhTitle-data
', JSON.stringify(res.data))
if (this.followStatus == '1') {
this.followStatus = '0'
} else {
...
...
@@ -63,7 +63,7 @@ export struct RmhTitle {
/**
* 查询当前登录用户是否关注作品号主
* */
private
async getBatchAttentionStatus() {
async getBatchAttentionStatus() {
try {
const params: postBatchAttentionStatusParams = {
creatorIds: [{ creatorId: this.rmhInfo?.rmhId ?? '' }]
...
...
@@ -72,17 +72,17 @@ export struct RmhTitle {
this.followStatus = data[0]?.status;
Logger.info(`rmhTitle-followStatus:${JSON.stringify(this.followStatus)}`)
} catch (exception) {
Logger.info(`rmhTitle-followStatus:${JSON.stringify(exception)}`)
}
}
aboutToAppear(): void {
this.getBatchAttentionStatus()
let page = router.getState();
if (page.path.includes('/page/PeopleShipHomePage') || page.path.includes('/pages/MainPage')) {
this.hideTime = true;
}
this.getBatchAttentionStatus()
}
getDaysBetweenDates(date: number) {
...
...
@@ -143,13 +143,13 @@ export struct RmhTitle {
Blank()
if (this.rmhInfo.cnIsAttention) {
Row() {
if (
this.followStatus === '0'
) {
if (
Number(this.followStatus) === 0
) {
Image($r('app.media.rmh_follow'))
.width(16)
.height(16)
}
Text(
this.followStatus === '0'
? '关注' : '已关注')
Text(
Number(this.followStatus) === 0
? '关注' : '已关注')
.fontSize($r('app.float.font_size_13'))
.fontColor($r('app.color.color_ED2800'))
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
e6230cc
...
...
@@ -22,7 +22,9 @@ const TAG = 'Zh_Single_Row-06'
@Component
export struct ZhSingleRow06 {
@State compDTO: CompDTO = {} as CompDTO
@State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult // 点赞、收藏状态
@State newsStatusOfUser: batchLikeAndCollectResult = {
likeStatus: '0'
} as batchLikeAndCollectResult // 点赞、收藏状态
aboutToAppear(): void {
this.getInteractDataStatus()
...
...
@@ -49,7 +51,7 @@ export struct ZhSingleRow06 {
}
// 已登录->查询用户对作品点赞、收藏状态
private
async getInteractDataStatus() {
async getInteractDataStatus() {
// 未登录,跳转登录
const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
if (!user_id) {
...
...
Please
register
or
login
to post a comment