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-08-21 18:26:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3cbc4b4c588ef778c4a48f09383f7b33715e8347
3cbc4b4c
1 parent
8b5495e8
fix: 兴趣卡关闭添加提示,关闭后列表删除数据
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
3cbc4b4
...
...
@@ -185,7 +185,7 @@ export struct CompParser {
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
// ZhSingleColumn05({ compDTO: compDTO })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName
, pageModel: this.pageModel, compIndex: this.compIndex
})
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleColumn09.ets
View file @
3cbc4b4
...
...
@@ -7,6 +7,9 @@ import { CommonConstants } from 'wdConstant/Index';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { Tracking, TrackingContent, TrackConstants, ParamType } from 'wdTracking';
import { TrackingUtils } from 'wdTracking/src/main/ets/common/TrackingUtils'
import { ToastUtils } from 'wdKit';
import PageModel from '../../viewmodel/PageModel';
/**
* 兴趣卡
* Zh_Single_Column-09
...
...
@@ -16,6 +19,7 @@ const TAG = 'Zh_Single_Column-09'
@Entry
@Component
export struct ZhSingleColumn09 {
@State private pageModel: PageModel = new PageModel();
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
...
...
@@ -23,6 +27,7 @@ export struct ZhSingleColumn09 {
@State operDataList: ContentDTO[] = this.compDTO?.operDataList || []
@State selfClosed: Boolean = false;
@State loadImg: boolean = false;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -116,6 +121,8 @@ export struct ZhSingleColumn09 {
.onClick(() => {
this.trackClick('interest_card_selecting_click')
if (this.activeIndexs.length > 0) {
ToastUtils.shortToast('已为您调整推荐内容')
this.pageModel.compList.deleteItem(this.compIndex)
this.selfClosed = true;
}
})
...
...
@@ -181,7 +188,9 @@ export struct ZhSingleColumn09 {
}
.onClick(() => {
if (this.compDTO?.operDataList.length > 8) {
this.operDataList = this.shuffleArray(this.operDataList)
if (this.pageModel){
this.pageModel.compList.deleteItem(this.compIndex)
}
this.activeIndexs = [];
}
})
...
...
@@ -191,6 +200,8 @@ export struct ZhSingleColumn09 {
.height(9)
.onClick(() => {
this.trackClick('close_interest_card_click')
ToastUtils.shortToast('已为您调整推荐内容')
this.pageModel.compList.deleteItem(this.compIndex)
this.selfClosed = true;
})
}
...
...
Please
register
or
login
to post a comment