Showing
2 changed files
with
23 additions
and
1 deletions
| @@ -7,6 +7,8 @@ import { CustomTitleUI } from '../../../reusable/CustomTitleUI'; | @@ -7,6 +7,8 @@ import { CustomTitleUI } from '../../../reusable/CustomTitleUI'; | ||
| 7 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; | 7 | import { ListHasNoMoreDataUI } from '../../../reusable/ListHasNoMoreDataUI'; |
| 8 | import { EmptyComponent } from '../../../view/EmptyComponent'; | 8 | import { EmptyComponent } from '../../../view/EmptyComponent'; |
| 9 | import { SubscribeListChildComponent } from './SubscribeListChildComponent'; | 9 | import { SubscribeListChildComponent } from './SubscribeListChildComponent'; |
| 10 | +import { Action } from 'wdBean/Index'; | ||
| 11 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 10 | 12 | ||
| 11 | const TAG = "SubscribeMessageComponent" | 13 | const TAG = "SubscribeMessageComponent" |
| 12 | 14 | ||
| @@ -71,6 +73,19 @@ export struct SubscribeMessageComponent{ | @@ -71,6 +73,19 @@ export struct SubscribeMessageComponent{ | ||
| 71 | ListItem() { | 73 | ListItem() { |
| 72 | SubscribeListChildComponent({ item: item }) | 74 | SubscribeListChildComponent({ item: item }) |
| 73 | }.width('100%') | 75 | }.width('100%') |
| 76 | + .onClick(()=>{ | ||
| 77 | + let action = { | ||
| 78 | + type:item.contentType, | ||
| 79 | + params:{ | ||
| 80 | + extra:{ | ||
| 81 | + relId:item.relId, | ||
| 82 | + relType:item.relType | ||
| 83 | + }, | ||
| 84 | + contentID:item.contentId | ||
| 85 | + } | ||
| 86 | + } as Action | ||
| 87 | + WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action) | ||
| 88 | + }) | ||
| 74 | }) | 89 | }) |
| 75 | //没有更多数据 显示提示 | 90 | //没有更多数据 显示提示 |
| 76 | if (!this.hasMore) { | 91 | if (!this.hasMore) { |
| @@ -97,7 +112,11 @@ export struct SubscribeMessageComponent{ | @@ -97,7 +112,11 @@ export struct SubscribeMessageComponent{ | ||
| 97 | 112 | ||
| 98 | let remark = JSON.parse(value.remark) as Remark | 113 | let remark = JSON.parse(value.remark) as Remark |
| 99 | 114 | ||
| 100 | - this.data.push(new SubscribeMessageModel(dealTime,value.message,remark.coverImageUrl,value.title,dealTime2,value.contentId)) | 115 | + let bean = new SubscribeMessageModel(dealTime,value.message,remark.coverImageUrl,value.title,dealTime2,value.contentId) |
| 116 | + bean.relId = remark.relationId | ||
| 117 | + bean.relType = remark.relationType | ||
| 118 | + bean.contentType = value.contentType | ||
| 119 | + this.data.push(bean) | ||
| 101 | }) | 120 | }) |
| 102 | this.data.notifyDataReload() | 121 | this.data.notifyDataReload() |
| 103 | this.count = this.data.totalCount() | 122 | this.count = this.data.totalCount() |
| @@ -90,6 +90,9 @@ export class SubscribeMessageModel{ | @@ -90,6 +90,9 @@ export class SubscribeMessageModel{ | ||
| 90 | desc:string = "" | 90 | desc:string = "" |
| 91 | time:string = "" | 91 | time:string = "" |
| 92 | contentId:string = "" | 92 | contentId:string = "" |
| 93 | + contentType:string = "" | ||
| 94 | + relId :string = "" | ||
| 95 | + relType:string = "" | ||
| 93 | 96 | ||
| 94 | constructor(dealTime: string, title: string, imgUrl: string, desc: string , time: string, contentId: string) { | 97 | constructor(dealTime: string, title: string, imgUrl: string, desc: string , time: string, contentId: string) { |
| 95 | this.dealTime = dealTime | 98 | this.dealTime = dealTime |
-
Please register or login to post a comment