wangliang_wd

feat:增加互动消息UI

@@ -83,6 +83,9 @@ export class WDRouterPage { @@ -83,6 +83,9 @@ export class WDRouterPage {
83 static browsingHistoryPage = new WDRouterPage("wdComponent", "ets/components/page/BrowsingHistoryPage"); 83 static browsingHistoryPage = new WDRouterPage("wdComponent", "ets/components/page/BrowsingHistoryPage");
84 //我的收藏 84 //我的收藏
85 static myCollectionListPagePage = new WDRouterPage("wdComponent", "ets/components/page/MyCollectionListPage"); 85 static myCollectionListPagePage = new WDRouterPage("wdComponent", "ets/components/page/MyCollectionListPage");
  86 + //互动消息
  87 + static interactMessagePage = new WDRouterPage("wdComponent", "ets/components/page/InteractMessagePage");
  88 +
86 static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); 89 static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
87 //我的主页 90 //我的主页
88 static mineHomePage = new WDRouterPage("wdComponent", "ets/pages/MineHomePage"); 91 static mineHomePage = new WDRouterPage("wdComponent", "ets/pages/MineHomePage");
  1 +
  2 +@Component
  3 +export struct InteractMComponent {
  4 + build() {
  5 + Row(){
  6 + Image('')
  7 + .backgroundColor(Color.Red)
  8 + .width(36)
  9 + .height(36)
  10 + .borderRadius(18)
  11 +
  12 + Column(){
  13 + Row(){
  14 + Text('用户名')
  15 + .fontSize('14fp').fontColor('#222222')
  16 +
  17 + Text('回复了你的评论')
  18 + .fontSize('14fp').fontColor('#999999')
  19 + .margin({left:5})
  20 + }.width('100%')
  21 +
  22 + Text('两天前')
  23 + .margin({top:2})
  24 + .fontSize('12fp').fontColor('#B0B0B0')
  25 +
  26 + Text('评论内容')
  27 + .margin({top:8,bottom:10})
  28 + .fontSize('16fp').fontColor('#222222')
  29 + .width('100%')
  30 + .constraintSize({maxHeight:500})
  31 +
  32 + Column(){
  33 + Text('[你的评论]乐事薯片,大家的最爱').fontSize('14fp').fontColor('#666666').constraintSize({maxHeight:500})
  34 + .margin({top:5,bottom:5})
  35 + .width('100%')
  36 +
  37 + Divider()
  38 + .color('#f5f5f5')
  39 + .backgroundColor('#f5f5f5')
  40 + .width('100%')
  41 + .height(1)
  42 +
  43 + Row(){
  44 + Text('乐事薯片,大家的最爱!!!!').fontSize('12fp').fontColor('#666666').constraintSize({maxHeight:500})
  45 +
  46 + Blank()
  47 +
  48 + Image($r('app.media.mine_user_edit'))
  49 + .width('12')
  50 + .height('12')
  51 + }.margin({top:5,bottom:5}).width('100%')
  52 + }.alignItems(HorizontalAlign.Start).backgroundColor('#f5f5f5').borderRadius(5)
  53 + }.padding({left:5}).alignItems(HorizontalAlign.Start)
  54 + }.padding({top:5,left:16,right:16}).width('100%').height(160).alignItems(VerticalAlign.Top).backgroundColor(Color.Red)
  55 + }
  56 +}
@@ -12,6 +12,7 @@ import { BigPicCardComponent } from '../view/BigPicCardComponent'; @@ -12,6 +12,7 @@ import { BigPicCardComponent } from '../view/BigPicCardComponent';
12 12
13 import { CustomTitleUI } from '../reusable/CustomTitleUI'; 13 import { CustomTitleUI } from '../reusable/CustomTitleUI';
14 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; 14 import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
  15 +import { InteractMComponent } from '../InteractMessage/InteractMComponent';
15 16
16 @Entry 17 @Entry
17 @Component 18 @Component
@@ -30,30 +31,28 @@ struct InteractMessagePage { @@ -30,30 +31,28 @@ struct InteractMessagePage {
30 build() { 31 build() {
31 Column(){ 32 Column(){
32 CustomTitleUI({titleName:'互动消息'}) 33 CustomTitleUI({titleName:'互动消息'})
33 -  
34 -  
35 -  
36 - if(this.browSingModel.viewType == ViewType.ERROR){  
37 - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})  
38 - }else if(this.browSingModel.viewType == ViewType.EMPTY){  
39 - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})  
40 - }else {  
41 - CustomPullToRefresh({  
42 - alldata:this.allDatas,  
43 - scroller:this.scroller,  
44 - customList:()=>{  
45 - this.ListLayout()  
46 - },  
47 - onRefresh:(resolve)=>{  
48 - this.browSingModel.currentPage = 0  
49 - this.getData(resolve)  
50 - },  
51 - onLoadMore:(resolve)=> {  
52 - this.browSingModel.currentPage++  
53 - this.getData()  
54 - }  
55 - })  
56 - } 34 + this.ListLayout()
  35 + // if(this.browSingModel.viewType == ViewType.ERROR){
  36 + // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NetworkFailed})
  37 + // }else if(this.browSingModel.viewType == ViewType.EMPTY){
  38 + // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoHistory})
  39 + // }else {
  40 + // CustomPullToRefresh({
  41 + // alldata:this.allDatas,
  42 + // scroller:this.scroller,
  43 + // customList:()=>{
  44 + // this.ListLayout()
  45 + // },
  46 + // onRefresh:(resolve)=>{
  47 + // this.browSingModel.currentPage = 0
  48 + // this.getData(resolve)
  49 + // },
  50 + // onLoadMore:(resolve)=> {
  51 + // this.browSingModel.currentPage++
  52 + // this.getData()
  53 + // }
  54 + // })
  55 + // }
57 56
58 } 57 }
59 .width(CommonConstants.FULL_WIDTH) 58 .width(CommonConstants.FULL_WIDTH)
@@ -69,7 +68,7 @@ struct InteractMessagePage { @@ -69,7 +68,7 @@ struct InteractMessagePage {
69 // 下拉刷新 68 // 下拉刷新
70 ForEach(this.allDatas, (compDTO: ContentDTO, compIndex: number) => { 69 ForEach(this.allDatas, (compDTO: ContentDTO, compIndex: number) => {
71 ListItem() { 70 ListItem() {
72 - this.newCompParser(compDTO,compIndex) 71 + InteractMComponent()
73 } 72 }
74 }) 73 })
75 // 加载更多 74 // 加载更多
@@ -112,25 +111,6 @@ struct InteractMessagePage { @@ -112,25 +111,6 @@ struct InteractMessagePage {
112 111
113 } 112 }
114 113
115 - @Builder  
116 - newCompParser(compDTO: ContentDTO, compIndex: number){  
117 - Row(){  
118 - if (this.isEditState){  
119 - CustomSelectUI({  
120 - isOn:compDTO.isSelect,  
121 - selectCallback:(isOn)=>{  
122 -  
123 - }  
124 - })  
125 - .margin({left:16})  
126 - }  
127 - Column() {  
128 - BigPicCardComponent({contentDTO:compDTO})  
129 - }  
130 - }  
131 - }  
132 -  
133 -  
134 async getData(resolve?: (value: string | PromiseLike<string>) => void){ 114 async getData(resolve?: (value: string | PromiseLike<string>) => void){
135 MyCollectionViewModel.fetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(collectionItem => { 115 MyCollectionViewModel.fetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(collectionItem => {
136 if(resolve) resolve('刷新成功') 116 if(resolve) resolve('刷新成功')
@@ -154,7 +154,7 @@ struct MineHomePage { @@ -154,7 +154,7 @@ struct MineHomePage {
154 //用户简介区域 154 //用户简介区域
155 Column() { 155 Column() {
156 Row() { 156 Row() {
157 - Text(this.isHasIntroduction?'简介:'+this.desc:this.desc) 157 + Text(this.desc)
158 .fontSize('27lpx') 158 .fontSize('27lpx')
159 .maxLines(3) 159 .maxLines(3)
160 .textOverflow({ overflow: TextOverflow.Ellipsis }) 160 .textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
23 "pages/VideoPlayPage", 23 "pages/VideoPlayPage",
24 "components/page/ThemeListPage", 24 "components/page/ThemeListPage",
25 "pages/ShowUserHeaderPage", 25 "pages/ShowUserHeaderPage",
26 - "pages/MineMessagePage" 26 + "pages/MineMessagePage",
  27 + "components/page/InteractMessagePage"
27 ] 28 ]
28 } 29 }