Showing
3 changed files
with
10 additions
and
3 deletions
| @@ -115,7 +115,6 @@ export struct WdWebLocalComponent { | @@ -115,7 +115,6 @@ export struct WdWebLocalComponent { | ||
| 115 | } | 115 | } |
| 116 | .width(this.positionWidth) | 116 | .width(this.positionWidth) |
| 117 | .height(this.positionHeight) | 117 | .height(this.positionHeight) |
| 118 | - .backgroundColor(Color.Red) | ||
| 119 | .alignRules({ | 118 | .alignRules({ |
| 120 | top: { anchor: "__container__", align: VerticalAlign.Top }, | 119 | top: { anchor: "__container__", align: VerticalAlign.Top }, |
| 121 | }) | 120 | }) |
| @@ -9,7 +9,9 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog' | @@ -9,7 +9,9 @@ import { MyCustomDialog } from '../../reusable/MyCustomDialog' | ||
| 9 | export struct AppointmentListChildComponent { | 9 | export struct AppointmentListChildComponent { |
| 10 | @ObjectLink item: MineAppointmentItem | 10 | @ObjectLink item: MineAppointmentItem |
| 11 | @State loadImg: boolean = false; | 11 | @State loadImg: boolean = false; |
| 12 | + confirmCallback: (item: MineAppointmentItem) => void = () => { | ||
| 12 | 13 | ||
| 14 | + } | ||
| 13 | async aboutToAppear(): Promise<void> { | 15 | async aboutToAppear(): Promise<void> { |
| 14 | this.loadImg = await onlyWifiLoadImg(); | 16 | this.loadImg = await onlyWifiLoadImg(); |
| 15 | } | 17 | } |
| @@ -29,6 +31,7 @@ export struct AppointmentListChildComponent { | @@ -29,6 +31,7 @@ export struct AppointmentListChildComponent { | ||
| 29 | }) | 31 | }) |
| 30 | 32 | ||
| 31 | build() { | 33 | build() { |
| 34 | + // if (this.item.isAppointment){ | ||
| 32 | Column() { | 35 | Column() { |
| 33 | Stack() { | 36 | Stack() { |
| 34 | Image(this.loadImg ? this.item?.imageUrl[0] : '') | 37 | Image(this.loadImg ? this.item?.imageUrl[0] : '') |
| @@ -184,6 +187,7 @@ export struct AppointmentListChildComponent { | @@ -184,6 +187,7 @@ export struct AppointmentListChildComponent { | ||
| 184 | }.margin({ left: 10, right: 10 }) | 187 | }.margin({ left: 10, right: 10 }) |
| 185 | .backgroundColor($r('app.color.white')) | 188 | .backgroundColor($r('app.color.white')) |
| 186 | .borderRadius('8lpx') | 189 | .borderRadius('8lpx') |
| 190 | + // } | ||
| 187 | } | 191 | } |
| 188 | 192 | ||
| 189 | onCancel() { | 193 | onCancel() { |
| @@ -200,8 +204,9 @@ export struct AppointmentListChildComponent { | @@ -200,8 +204,9 @@ export struct AppointmentListChildComponent { | ||
| 200 | MinePageDatasModel.getAppointmentOperation(item, getContext(this)).then((value) => { | 204 | MinePageDatasModel.getAppointmentOperation(item, getContext(this)).then((value) => { |
| 201 | if (value != null) { | 205 | if (value != null) { |
| 202 | if (value.code === 0 || value.code.toString() === "0") { | 206 | if (value.code === 0 || value.code.toString() === "0") { |
| 203 | - this.item.isAppointment = !this.item.isAppointment | 207 | + // this.item.isAppointment = !this.item.isAppointment |
| 204 | 208 | ||
| 209 | + this.confirmCallback(this.item) | ||
| 205 | if(!this.item.isAppointment){ | 210 | if(!this.item.isAppointment){ |
| 206 | TrackingButton.click("mySavedLivePageUnSubscribe",TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live) | 211 | TrackingButton.click("mySavedLivePageUnSubscribe",TrackConstants.PageName.My_Saved_Live,TrackConstants.PageName.My_Saved_Live) |
| 207 | } | 212 | } |
| @@ -101,7 +101,10 @@ export struct AppointmentListUI { | @@ -101,7 +101,10 @@ export struct AppointmentListUI { | ||
| 101 | List({ space:6,scroller: this.scroller }) { | 101 | List({ space:6,scroller: this.scroller }) { |
| 102 | LazyForEach(this.data, (item: MineAppointmentItem, index: number) => { | 102 | LazyForEach(this.data, (item: MineAppointmentItem, index: number) => { |
| 103 | ListItem() { | 103 | ListItem() { |
| 104 | - AppointmentListChildComponent({ item: item }) | 104 | + AppointmentListChildComponent({ item: item,confirmCallback:((deleteItem) =>{ |
| 105 | + this.data.deleteItem(this.data.getIndexOf(deleteItem)) | ||
| 106 | + this.count = this.data.totalCount() | ||
| 107 | + })}) | ||
| 105 | } | 108 | } |
| 106 | .onClick(() => { | 109 | .onClick(() => { |
| 107 | let contentDTO = getParams(item) | 110 | let contentDTO = getParams(item) |
-
Please register or login to post a comment