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-10 17:01:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ab37de7bd9efe5873cc519b9040b8c3c056e827
6ab37de7
1 parent
46a53c67
fix: 17133 功能缺陷-【uta】未登录-点击精品评论卡-点赞按钮,没有跳转到登录页面
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
6ab37de
import { commentInfo, CompDTO, ContentDTO, Params } from 'wdBean';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { HttpUtils } from 'wdNetwork/Index';
import { postInteractAccentionOperateParams } from 'wdBean';
import { PageRepository } from '../../repository/PageRepository';
import { DateTimeUtils } from 'wdKit/Index';
import { DateTimeUtils, SPHelper } from 'wdKit/Index';
import { ProcessUtils } from 'wdRouter';
import { SpConstants } from 'wdConstant/Index'
/**
* 精选评论卡
...
...
@@ -32,6 +30,20 @@ export struct ZhSingleRow06 {
@State compDTO: CompDTO = {} as CompDTO
@State likeBl: boolean = false;
async likeAction() {
const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
if (!user_id) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
if (this.likeBl) {
this.likeBl = false;
} else {
this.likeBl = true;
}
}
build() {
Column() {
//顶部
...
...
@@ -93,11 +105,7 @@ export struct ZhSingleRow06 {
.fontColor(0x999999)
}
.onClick(() => {
if (this.likeBl) {
this.likeBl = false;
} else {
this.likeBl = true;
}
this.likeAction()
})
}
.justifyContent(FlexAlign.SpaceBetween)
...
...
Please
register
or
login
to post a comment