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
wangliang_wd
2024-10-15 10:35:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
83bfa85d0e34c540a2ed3daac4476f48fe342d16
83bfa85d
1 parent
4031c4a8
feat:优化我的预约列表,状态变更逻辑
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListChildComponent.ets
View file @
83bfa85
...
...
@@ -9,11 +9,13 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog'
export struct AppointmentListChildComponent {
@ObjectLink item: MineAppointmentItem
@Prop loadImg: boolean = true;
@State isAppointment: boolean = true;
confirmCallback: (item: MineAppointmentItem) => void = () => {
}
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
this.isAppointment = this.item.isAppointment
}
dialogController: CustomDialogController = new CustomDialogController({
...
...
@@ -23,7 +25,7 @@ export struct AppointmentListChildComponent {
this.onAccept()
},
title: "提示",
tipValue:
'是否确认取消
预约'
tipValue:
this.isAppointment?'是否确认取消预约':'是否确认
预约'
}),
autoCancel: true,
alignment: DialogAlignment.Center,
...
...
@@ -215,8 +217,8 @@ export struct AppointmentListChildComponent {
MinePageDatasModel.getAppointmentOperation(item, getContext(this)).then((value) => {
if (value != null) {
if (value.code === 0 || value.code.toString() === "0") {
// this.item.isAppointment = !this.item.isAppointment
this.item.isAppointment = !this.item.isAppointment
this.isAppointment = this.item.isAppointment
this.confirmCallback(this.item)
if(!this.item.isAppointment){
TrackingButton.click("mySavedLivePageUnSubscribe",TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
View file @
83bfa85
...
...
@@ -102,9 +102,9 @@ export struct AppointmentListUI {
LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
ListItem() {
AppointmentListChildComponent({ item: item,confirmCallback:((deleteItem) =>{
ToastUtils.shortToast('取消预约成功')
this.data.deleteItem(this.data.getIndexOf(deleteItem))
this.count = this.data.totalCount()
ToastUtils.shortToast(deleteItem.isAppointment?'预约成功':'取消预约成功')
// this.data.deleteItem(this.data.getIndexOf(deleteItem))
// this.count = this.data.totalCount()
})})
}
.onClick(() => {
...
...
Please
register
or
login
to post a comment