Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
56 changed files
with
3285 additions
and
501 deletions
Too many changes to show.
To preserve performance only 56 of 56+ files are displayed.
| @@ -4,7 +4,7 @@ import router from '@ohos.router'; | @@ -4,7 +4,7 @@ import router from '@ohos.router'; | ||
| 4 | @Entry | 4 | @Entry |
| 5 | @Component | 5 | @Component |
| 6 | struct OtherNormalUserHomePage { | 6 | struct OtherNormalUserHomePage { |
| 7 | - @State userId: string = "111111111"; | 7 | + @State userId: string = "-1"; |
| 8 | 8 | ||
| 9 | onPageShow() { | 9 | onPageShow() { |
| 10 | this.userId = router.getParams()?.["userId"] | 10 | this.userId = router.getParams()?.["userId"] |
| @@ -26,16 +26,16 @@ export default struct MinePageUserSimpleInfoUI { | @@ -26,16 +26,16 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 26 | .alt($r('app.media.default_head')) | 26 | .alt($r('app.media.default_head')) |
| 27 | .width('108lpx') | 27 | .width('108lpx') |
| 28 | .height('108lpx') | 28 | .height('108lpx') |
| 29 | - .objectFit(ImageFit.Cover) | 29 | + .objectFit(ImageFit.Auto) |
| 30 | .borderRadius(50) | 30 | .borderRadius(50) |
| 31 | 31 | ||
| 32 | Image(this.levelHead) | 32 | Image(this.levelHead) |
| 33 | - .width('120lpx') | ||
| 34 | - .height('120lpx') | ||
| 35 | - .objectFit(ImageFit.Cover) | 33 | + .width('130lpx') |
| 34 | + .height('130lpx') | ||
| 35 | + .objectFit(ImageFit.Auto) | ||
| 36 | .borderRadius(50) | 36 | .borderRadius(50) |
| 37 | - }.width('120lpx') | ||
| 38 | - .height('120lpx') | 37 | + }.width('130lpx') |
| 38 | + .height('130lpx') | ||
| 39 | .alignContent(Alignment.Center) | 39 | .alignContent(Alignment.Center) |
| 40 | .onClick(()=>{ | 40 | .onClick(()=>{ |
| 41 | if(!this.isLogin){ | 41 | if(!this.isLogin){ |
| @@ -14,10 +14,6 @@ export struct FollowFirstTabsComponent{ | @@ -14,10 +14,6 @@ export struct FollowFirstTabsComponent{ | ||
| 14 | selectedFontColor: string = '#000000' | 14 | selectedFontColor: string = '#000000' |
| 15 | 15 | ||
| 16 | aboutToAppear(){ | 16 | aboutToAppear(){ |
| 17 | - // let res = JSON.parse(`{"code":"0","data":[{"children":[],"directoryName":"阅读","directoryWeight":99,"id":165,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"三二","directoryWeight":2,"id":120,"isShow":1,"level":3,"parentId":118,"rootId":117},{"directoryName":"三级","directoryWeight":1,"id":119,"isShow":1,"level":3,"parentId":118,"rootId":117}],"directoryName":"二级","directoryWeight":1,"id":118,"isShow":1,"level":2,"parentId":117,"rootId":117}],"directoryName":"幽游白书","directoryWeight":33,"id":117,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"推荐","directoryWeight":9,"id":386,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"政务","directoryWeight":9,"id":379,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"推荐","directoryWeight":0,"id":335,"isShow":1,"level":2,"parentId":320,"rootId":320}],"directoryName":"推荐","directoryWeight":9,"id":320,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":390,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"媒体","directoryWeight":8,"id":323,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"自媒体","directoryWeight":7,"id":329,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"名人","directoryWeight":6,"id":389,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"测试","directoryWeight":0,"id":338,"isShow":1,"level":2,"parentId":324,"rootId":324}],"directoryName":"名人","directoryWeight":6,"id":324,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"2级目录","directoryWeight":0,"id":340,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"3级测试","directoryWeight":0,"id":368,"isShow":1,"level":3,"parentId":339,"rootId":312}],"directoryName":"二级目录","directoryWeight":0,"id":339,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"企业","directoryWeight":1,"id":348,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"部委","directoryWeight":0,"id":344,"isShow":1,"level":3,"parentId":336,"rootId":312},{"directoryName":"地方","directoryWeight":0,"id":341,"isShow":1,"level":3,"parentId":336,"rootId":312}],"directoryName":"类型","directoryWeight":0,"id":336,"isShow":1,"level":2,"parentId":312,"rootId":312},{"children":[{"directoryName":"贵州省","directoryWeight":0,"id":378,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"西藏自治区","directoryWeight":0,"id":377,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"四川省","directoryWeight":0,"id":376,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"重庆市","directoryWeight":0,"id":375,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖南省","directoryWeight":0,"id":374,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"云南省","directoryWeight":0,"id":373,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广西壮族自治区","directoryWeight":0,"id":372,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"宁夏回族自治区","directoryWeight":0,"id":371,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"湖北省","directoryWeight":0,"id":370,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"青海省","directoryWeight":0,"id":369,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"陕西省","directoryWeight":0,"id":367,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"甘肃省","directoryWeight":0,"id":366,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"吉林省","directoryWeight":0,"id":365,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"广东省","directoryWeight":0,"id":364,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"海南省","directoryWeight":0,"id":363,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"辽宁省","directoryWeight":0,"id":362,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江苏省","directoryWeight":0,"id":361,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"新疆维吾尔族自治区","directoryWeight":0,"id":360,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"福建省","directoryWeight":0,"id":359,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山东省","directoryWeight":0,"id":358,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河南省","directoryWeight":0,"id":357,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"浙江省","directoryWeight":0,"id":356,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"安徽省","directoryWeight":0,"id":355,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"上海市","directoryWeight":0,"id":354,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"河北省","directoryWeight":0,"id":353,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"黑龙江省","directoryWeight":0,"id":352,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"江西省","directoryWeight":0,"id":351,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"内蒙古自治区","directoryWeight":0,"id":350,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"北京市","directoryWeight":0,"id":349,"isShow":1,"level":3,"parentId":332,"rootId":312},{"directoryName":"山西省","directoryWeight":0,"id":346,"isShow":1,"level":3,"parentId":332,"rootId":312}],"directoryName":"地域","directoryWeight":0,"id":332,"isShow":1,"level":2,"parentId":312,"rootId":312}],"directoryName":"政务","directoryWeight":5,"id":312,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"学校","directoryWeight":4,"id":331,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"机构","directoryWeight":3,"id":330,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[{"directoryName":"新闻联播","directoryWeight":3,"id":79,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"第三季","directoryWeight":2,"id":78,"isShow":1,"level":3,"parentId":75,"rootId":74},{"directoryName":"三级","directoryWeight":1,"id":76,"isShow":1,"level":3,"parentId":75,"rootId":74}],"directoryName":"短视频","directoryWeight":1,"id":75,"isShow":1,"level":2,"parentId":74,"rootId":74}],"directoryName":"创作","directoryWeight":3,"id":74,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"教学","directoryWeight":2,"id":72,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"热门","directoryWeight":1,"id":73,"isShow":1,"level":2,"parentId":64,"rootId":64},{"children":[],"directoryName":"赛事","directoryWeight":1,"id":71,"isShow":1,"level":2,"parentId":64,"rootId":64}],"directoryName":"游戏","directoryWeight":2,"id":64,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"新闻","directoryWeight":1,"id":315,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"趣闻","directoryWeight":6,"id":70,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"时政","directoryWeight":5,"id":69,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"农业","directoryWeight":3,"id":68,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"娱乐","directoryWeight":3,"id":67,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"科技","directoryWeight":2,"id":66,"isShow":1,"level":2,"parentId":63,"rootId":63},{"children":[],"directoryName":"国际","directoryWeight":1,"id":65,"isShow":1,"level":2,"parentId":63,"rootId":63}],"directoryName":"新闻","directoryWeight":1,"id":63,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"公安","directoryWeight":0,"id":388,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":387,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":384,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"综合","directoryWeight":0,"id":328,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"房产","directoryWeight":0,"id":327,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"健康","directoryWeight":0,"id":318,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"历史","directoryWeight":0,"id":310,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[],"directoryName":"dddd","directoryWeight":0,"id":309,"isShow":1,"level":1,"parentId":0,"rootId":0},{"children":[{"children":[],"directoryName":"aaaa","directoryWeight":1,"id":333,"isShow":1,"level":2,"parentId":308,"rootId":308},{"children":[],"directoryName":"qqq","directoryWeight":0,"id":334,"isShow":1,"level":2,"parentId":308,"rootId":308}],"directoryName":"dddd","directoryWeight":0,"id":308,"isShow":1,"level":1,"parentId":0,"rootId":0}],"message":"Success","success":true,"timestamp":1710741803593}`) as ResponseDTO<FollowListItem[]> | ||
| 18 | - // res.data.forEach(element => { | ||
| 19 | - // this.data.push(element) | ||
| 20 | - // }); | ||
| 21 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ | 17 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ |
| 22 | this.data.push(new FollowListItem("我的")) | 18 | this.data.push(new FollowListItem("我的")) |
| 23 | value.forEach((element)=>{ | 19 | value.forEach((element)=>{ |
| @@ -85,7 +81,7 @@ export struct FollowFirstTabsComponent{ | @@ -85,7 +81,7 @@ export struct FollowFirstTabsComponent{ | ||
| 85 | this.currentIndex = index | 81 | this.currentIndex = index |
| 86 | }) | 82 | }) |
| 87 | .width('100%') | 83 | .width('100%') |
| 88 | - .height('100%') | 84 | + .layoutWeight(1) |
| 89 | }.width('100%') | 85 | }.width('100%') |
| 90 | } | 86 | } |
| 91 | } | 87 | } |
| @@ -70,7 +70,7 @@ export struct FollowListDetailUI{ | @@ -70,7 +70,7 @@ export struct FollowListDetailUI{ | ||
| 70 | //我的关注列表 | 70 | //我的关注列表 |
| 71 | if (this.creatorDirectoryId === -1){ | 71 | if (this.creatorDirectoryId === -1){ |
| 72 | if(this.hasMore){ | 72 | if(this.hasMore){ |
| 73 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 73 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) |
| 74 | 74 | ||
| 75 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ | 75 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ |
| 76 | if (!this.data || value.list.length == 0){ | 76 | if (!this.data || value.list.length == 0){ |
| @@ -23,14 +23,13 @@ export struct FollowSecondTabsComponent{ | @@ -23,14 +23,13 @@ export struct FollowSecondTabsComponent{ | ||
| 23 | 23 | ||
| 24 | if(this.data != null){ | 24 | if(this.data != null){ |
| 25 | if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){ | 25 | if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){ |
| 26 | - FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}) | 26 | + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}).layoutWeight(1) |
| 27 | }else{ | 27 | }else{ |
| 28 | this.FollowSecondUI() | 28 | this.FollowSecondUI() |
| 29 | } | 29 | } |
| 30 | } | 30 | } |
| 31 | - } | 31 | + }.layoutWeight(1) |
| 32 | .width('100%') | 32 | .width('100%') |
| 33 | - .height('100%') | ||
| 34 | } | 33 | } |
| 35 | 34 | ||
| 36 | @Builder FollowSecondUI(){ | 35 | @Builder FollowSecondUI(){ |
| 1 | -import { LazyDataSource, StringUtils } from 'wdKit'; | 1 | +import { DateTimeUtils, LazyDataSource, StringUtils } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../../model/MinePageDatasModel'; |
| 3 | import { HttpUrlUtils } from '../../../../network/HttpUrlUtils'; | 3 | import { HttpUrlUtils } from '../../../../network/HttpUrlUtils'; |
| 4 | import RouteManager from '../../../../utils/RouteManager'; | 4 | import RouteManager from '../../../../utils/RouteManager'; |
| @@ -33,8 +33,32 @@ export struct HomePageBottomComponent{ | @@ -33,8 +33,32 @@ export struct HomePageBottomComponent{ | ||
| 33 | .backgroundColor($r('app.color.color_EDEDED')) | 33 | .backgroundColor($r('app.color.color_EDEDED')) |
| 34 | 34 | ||
| 35 | if(this.count === 0){ | 35 | if(this.count === 0){ |
| 36 | + if(this.style === 1){ | ||
| 37 | + Row(){ | ||
| 38 | + Text("关注更多人民号") | ||
| 39 | + .fontWeight('400lpx') | ||
| 40 | + .fontColor($r('app.color.color_222222')) | ||
| 41 | + .lineHeight('38lpx') | ||
| 42 | + .fontSize('27lpx') | ||
| 43 | + .textAlign(TextAlign.Center) | ||
| 44 | + .margin({right:'4lpx'}) | ||
| 45 | + Image($r('app.media.arrow_icon_right')) | ||
| 46 | + .objectFit(ImageFit.Auto) | ||
| 47 | + .width('27lpx') | ||
| 48 | + .height('27lpx') | ||
| 49 | + }.height('69lpx') | ||
| 50 | + .width('659lpx') | ||
| 51 | + .alignItems(VerticalAlign.Center) | ||
| 52 | + .justifyContent(FlexAlign.Center) | ||
| 53 | + .backgroundColor($r('app.color.color_F5F5F5')) | ||
| 54 | + .margin({top:'31lpx',bottom:'4lpx'}) | ||
| 55 | + .onClick(()=>{ | ||
| 56 | + RouteManager.jumpNewPage("pages/FollowListPage",new RouterObject('',1)) | ||
| 57 | + }) | ||
| 58 | + }else{ | ||
| 36 | ListHasNoMoreDataUI({style:2}) | 59 | ListHasNoMoreDataUI({style:2}) |
| 37 | - .height('100%') | 60 | + .layoutWeight(1) |
| 61 | + } | ||
| 38 | }else{ | 62 | }else{ |
| 39 | if(this.style === 1){ | 63 | if(this.style === 1){ |
| 40 | List({ space: 3 }) { | 64 | List({ space: 3 }) { |
| @@ -129,6 +153,8 @@ export struct HomePageBottomComponent{ | @@ -129,6 +153,8 @@ export struct HomePageBottomComponent{ | ||
| 129 | } | 153 | } |
| 130 | } | 154 | } |
| 131 | .width('100%') | 155 | .width('100%') |
| 156 | + .height('100%') | ||
| 157 | + .justifyContent(FlexAlign.Start) | ||
| 132 | } | 158 | } |
| 133 | 159 | ||
| 134 | 160 | ||
| @@ -145,7 +171,7 @@ export struct HomePageBottomComponent{ | @@ -145,7 +171,7 @@ export struct HomePageBottomComponent{ | ||
| 145 | //我的关注列表 | 171 | //我的关注列表 |
| 146 | if (this.style === 1){ | 172 | if (this.style === 1){ |
| 147 | if(this.hasMore){ | 173 | if(this.hasMore){ |
| 148 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 174 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) |
| 149 | 175 | ||
| 150 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ | 176 | MinePageDatasModel.getMineFollowListData(object,getContext(this)).then((value)=>{ |
| 151 | if (!this.data_follow || value.list.length == 0){ | 177 | if (!this.data_follow || value.list.length == 0){ |
| @@ -170,9 +196,11 @@ export struct HomePageBottomComponent{ | @@ -170,9 +196,11 @@ export struct HomePageBottomComponent{ | ||
| 170 | } | 196 | } |
| 171 | }else if(this.style === 0){ | 197 | }else if(this.style === 0){ |
| 172 | if(this.hasMore){ | 198 | if(this.hasMore){ |
| 173 | - let object = new FollowListDetailRequestItem(20,this.curPageNum) | 199 | + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 200 | + let object = new FollowListDetailRequestItem(-1,20,this.curPageNum) | ||
| 201 | + | ||
| 174 | 202 | ||
| 175 | - MinePageDatasModel.getMineCommentListData(object,getContext(this)).then((value)=>{ | 203 | + MinePageDatasModel.getMineCommentListData(time,object,getContext(this)).then((value)=>{ |
| 176 | if (!this.data_comment || value.list.length == 0){ | 204 | if (!this.data_comment || value.list.length == 0){ |
| 177 | this.hasMore = false | 205 | this.hasMore = false |
| 178 | }else{ | 206 | }else{ |
| @@ -55,18 +55,20 @@ export struct MyHomeComponent { | @@ -55,18 +55,20 @@ export struct MyHomeComponent { | ||
| 55 | Stack(){ | 55 | Stack(){ |
| 56 | Image(this.headPhotoUrl) | 56 | Image(this.headPhotoUrl) |
| 57 | .alt($r('app.media.default_head')) | 57 | .alt($r('app.media.default_head')) |
| 58 | - .width('115lpx') | ||
| 59 | - .height('115lpx') | ||
| 60 | - .objectFit(ImageFit.Cover) | 58 | + .width('100lpx') |
| 59 | + .height('100lpx') | ||
| 60 | + .objectFit(ImageFit.Auto) | ||
| 61 | .borderRadius(50) | 61 | .borderRadius(50) |
| 62 | Image(this.levelHead) | 62 | Image(this.levelHead) |
| 63 | .width('130lpx') | 63 | .width('130lpx') |
| 64 | .height('130lpx') | 64 | .height('130lpx') |
| 65 | .objectFit(ImageFit.Cover) | 65 | .objectFit(ImageFit.Cover) |
| 66 | - .borderRadius(50) | ||
| 67 | }.onClick(()=>{ | 66 | }.onClick(()=>{ |
| 67 | + //531267787833221 | ||
| 68 | RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0)) | 68 | RouteManager.jumpNewPage("pages/OtherNormalUserHomePage",new RouterObject('512157124138245',0)) |
| 69 | - }) | 69 | + }).width('135lpx') |
| 70 | + .height('135lpx') | ||
| 71 | + | ||
| 70 | Column() { | 72 | Column() { |
| 71 | Row() { | 73 | Row() { |
| 72 | Text(`${this.userName}`) | 74 | Text(`${this.userName}`) |
| @@ -6,6 +6,7 @@ import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | @@ -6,6 +6,7 @@ import MinePageDatasModel from '../../../../model/MinePageDatasModel'; | ||
| 6 | import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem'; | 6 | import { MineCommentListDetailItem } from '../../../../viewmodel/MineCommentListDetailItem'; |
| 7 | import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; | 7 | import { OtherUserCommentLikeStatusRequestItem } from '../../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; |
| 8 | import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem'; | 8 | import { CommentLikeOperationRequestItem } from '../../../../viewmodel/CommentLikeOperationRequestItem'; |
| 9 | +import { HttpUrlUtils } from '../../../../network/HttpUrlUtils'; | ||
| 9 | 10 | ||
| 10 | const TAG = "HomePageBottomComponent" | 11 | const TAG = "HomePageBottomComponent" |
| 11 | @Component | 12 | @Component |
| @@ -17,6 +18,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -17,6 +18,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 17 | curPageNum:number = 1; | 18 | curPageNum:number = 1; |
| 18 | @State count:number = 0; | 19 | @State count:number = 0; |
| 19 | @Prop levelHead:string | 20 | @Prop levelHead:string |
| 21 | + @Link commentNum:number | ||
| 20 | 22 | ||
| 21 | aboutToAppear(){ | 23 | aboutToAppear(){ |
| 22 | this.getNewPageData() | 24 | this.getNewPageData() |
| @@ -122,6 +124,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -122,6 +124,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 122 | this.data_comment.notifyDataReload() | 124 | this.data_comment.notifyDataReload() |
| 123 | 125 | ||
| 124 | this.count = this.data_comment.totalCount() | 126 | this.count = this.data_comment.totalCount() |
| 127 | + this.commentNum = value.totalCount | ||
| 125 | if (this.data_comment.totalCount() < value.totalCount) { | 128 | if (this.data_comment.totalCount() < value.totalCount) { |
| 126 | this.curPageNum++ | 129 | this.curPageNum++ |
| 127 | }else { | 130 | }else { |
| @@ -104,7 +104,7 @@ export struct OtherHomePageBottomFollowComponent{ | @@ -104,7 +104,7 @@ export struct OtherHomePageBottomFollowComponent{ | ||
| 104 | 104 | ||
| 105 | getNewPageData(){ | 105 | getNewPageData(){ |
| 106 | this.isLoading = true | 106 | this.isLoading = true |
| 107 | - //我的关注列表 | 107 | + //关注列表 |
| 108 | if(this.hasMore){ | 108 | if(this.hasMore){ |
| 109 | let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") | 109 | let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") |
| 110 | 110 | ||
| @@ -164,47 +164,6 @@ struct ChildFollowComponent { | @@ -164,47 +164,6 @@ struct ChildFollowComponent { | ||
| 164 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 164 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 165 | }.layoutWeight(1) | 165 | }.layoutWeight(1) |
| 166 | .alignItems(HorizontalAlign.Start) | 166 | .alignItems(HorizontalAlign.Start) |
| 167 | - | ||
| 168 | - if(this.data.status == "1"){ | ||
| 169 | - Row(){ | ||
| 170 | - Text(`已关注`) | ||
| 171 | - .fontColor($r('app.color.color_CCCCCC')) | ||
| 172 | - .fontSize('23lpx') | ||
| 173 | - .fontWeight('500lpx') | ||
| 174 | - .lineHeight('35lpx') | ||
| 175 | - }.backgroundColor($r('app.color.color_F5F5F5')) | ||
| 176 | - .borderRadius('6lpx') | ||
| 177 | - .borderColor($r('app.color.color_F5F5F5')) | ||
| 178 | - .borderWidth('2lpx') | ||
| 179 | - .justifyContent(FlexAlign.Center) | ||
| 180 | - .width('100lpx') | ||
| 181 | - .height('46lpx') | ||
| 182 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 183 | - .onClick(()=>{ | ||
| 184 | - this.data.status = "0" | ||
| 185 | - }) | ||
| 186 | - }else{ | ||
| 187 | - Row(){ | ||
| 188 | - Image($r('app.media.follow_icon')) | ||
| 189 | - .margin({right:'4lpx'}) | ||
| 190 | - .width('23lpx') | ||
| 191 | - .height('23lpx') | ||
| 192 | - Text(`关注`) | ||
| 193 | - .fontColor($r('app.color.color_ED2800')) | ||
| 194 | - .fontSize('23lpx') | ||
| 195 | - .fontWeight('500lpx') | ||
| 196 | - .lineHeight('35lpx') | ||
| 197 | - }.borderColor($r('app.color.color_1AED2800')) | ||
| 198 | - .borderRadius('6lpx') | ||
| 199 | - .borderWidth('2lpx') | ||
| 200 | - .justifyContent(FlexAlign.Center) | ||
| 201 | - .width('100lpx') | ||
| 202 | - .height('46lpx') | ||
| 203 | - .margin({left:'4lpx',top:'23lpx'}) | ||
| 204 | - .onClick(()=>{ | ||
| 205 | - this.data.status = "1" | ||
| 206 | - }) | ||
| 207 | - } | ||
| 208 | }.alignItems(VerticalAlign.Top) | 167 | }.alignItems(VerticalAlign.Top) |
| 209 | .width('100%') | 168 | .width('100%') |
| 210 | .layoutWeight(1) | 169 | .layoutWeight(1) |
| @@ -9,7 +9,7 @@ const TAG = "OtherUserHomeComponent" | @@ -9,7 +9,7 @@ const TAG = "OtherUserHomeComponent" | ||
| 9 | 9 | ||
| 10 | @Component | 10 | @Component |
| 11 | export struct OtherUserHomeComponent { | 11 | export struct OtherUserHomeComponent { |
| 12 | - @Prop curUserId: string | 12 | + @Watch('change') @Prop curUserId: string |
| 13 | 13 | ||
| 14 | @State tileOpacity: number = 0; | 14 | @State tileOpacity: number = 0; |
| 15 | firstPositionY:number = 0; | 15 | firstPositionY:number = 0; |
| @@ -27,6 +27,12 @@ export struct OtherUserHomeComponent { | @@ -27,6 +27,12 @@ export struct OtherUserHomeComponent { | ||
| 27 | @State attentionNum:number = 0//关注数 | 27 | @State attentionNum:number = 0//关注数 |
| 28 | @State desc:string = "" | 28 | @State desc:string = "" |
| 29 | 29 | ||
| 30 | + change(){ | ||
| 31 | + this.getUserInfo() | ||
| 32 | + this.getUserLevel() | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + | ||
| 30 | aboutToAppear(){ | 36 | aboutToAppear(){ |
| 31 | this.getUserInfo() | 37 | this.getUserInfo() |
| 32 | this.getUserLevel() | 38 | this.getUserLevel() |
| @@ -52,8 +58,8 @@ export struct OtherUserHomeComponent { | @@ -52,8 +58,8 @@ export struct OtherUserHomeComponent { | ||
| 52 | Stack(){ | 58 | Stack(){ |
| 53 | Image(this.headPhotoUrl) | 59 | Image(this.headPhotoUrl) |
| 54 | .alt($r('app.media.default_head')) | 60 | .alt($r('app.media.default_head')) |
| 55 | - .width('115lpx') | ||
| 56 | - .height('115lpx') | 61 | + .width('100lpx') |
| 62 | + .height('100lpx') | ||
| 57 | .objectFit(ImageFit.Cover) | 63 | .objectFit(ImageFit.Cover) |
| 58 | .borderRadius(50) | 64 | .borderRadius(50) |
| 59 | Image(this.levelHead) | 65 | Image(this.levelHead) |
| @@ -165,7 +171,7 @@ export struct OtherUserHomeComponent { | @@ -165,7 +171,7 @@ export struct OtherUserHomeComponent { | ||
| 165 | //tab 页面 | 171 | //tab 页面 |
| 166 | Tabs({controller: this.controller}) { | 172 | Tabs({controller: this.controller}) { |
| 167 | TabContent() { | 173 | TabContent() { |
| 168 | - OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead}) | 174 | + OtherHomePageBottomCommentComponent({curUserId:this.curUserId,levelHead:this.levelHead,commentNum:$commentNum}) |
| 169 | }.tabBar(this.TabBuilder(0,"评论")) | 175 | }.tabBar(this.TabBuilder(0,"评论")) |
| 170 | TabContent() { | 176 | TabContent() { |
| 171 | OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) | 177 | OtherHomePageBottomFollowComponent({curUserId:this.curUserId}) |
| @@ -295,6 +301,9 @@ export struct OtherUserHomeComponent { | @@ -295,6 +301,9 @@ export struct OtherUserHomeComponent { | ||
| 295 | 301 | ||
| 296 | 302 | ||
| 297 | getUserInfo(){ | 303 | getUserInfo(){ |
| 304 | + if(this.curUserId === "-1" ){ | ||
| 305 | + return | ||
| 306 | + } | ||
| 298 | let item = new OtherUserDetailRequestItem("","1",this.curUserId) | 307 | let item = new OtherUserDetailRequestItem("","1",this.curUserId) |
| 299 | MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ | 308 | MinePageDatasModel.getOtherUserDetailData(item,getContext(this)).then((value)=>{ |
| 300 | if(value!=null){ | 309 | if(value!=null){ |
| @@ -312,6 +321,9 @@ export struct OtherUserHomeComponent { | @@ -312,6 +321,9 @@ export struct OtherUserHomeComponent { | ||
| 312 | }) | 321 | }) |
| 313 | } | 322 | } |
| 314 | getUserLevel(){ | 323 | getUserLevel(){ |
| 324 | + if(this.curUserId === "-1" ){ | ||
| 325 | + return | ||
| 326 | + } | ||
| 315 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ | 327 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ |
| 316 | if(value!=null){ | 328 | if(value!=null){ |
| 317 | this.levelHead = value[0].levelHead | 329 | this.levelHead = value[0].levelHead |
| @@ -324,10 +324,10 @@ class MinePageDatasModel{ | @@ -324,10 +324,10 @@ class MinePageDatasModel{ | ||
| 324 | * @param context | 324 | * @param context |
| 325 | * @returns | 325 | * @returns |
| 326 | */ | 326 | */ |
| 327 | - getMineCommentListData(params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { | 327 | + getMineCommentListData(time:string,params:FollowListDetailRequestItem,context: Context): Promise<MineCommentListDetailItem> { |
| 328 | return new Promise<MineCommentListDetailItem>((success, error) => { | 328 | return new Promise<MineCommentListDetailItem>((success, error) => { |
| 329 | Logger.info(TAG, `getAppointmentList start`); | 329 | Logger.info(TAG, `getAppointmentList start`); |
| 330 | - this.fetchMineCommentListData(params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { | 330 | + this.fetchMineCommentListData(time,params).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => { |
| 331 | if (!navResDTO || navResDTO.code != 0) { | 331 | if (!navResDTO || navResDTO.code != 0) { |
| 332 | success(this.getMineCommentListDataLocal(context)) | 332 | success(this.getMineCommentListDataLocal(context)) |
| 333 | return | 333 | return |
| @@ -342,8 +342,8 @@ class MinePageDatasModel{ | @@ -342,8 +342,8 @@ class MinePageDatasModel{ | ||
| 342 | }) | 342 | }) |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | - fetchMineCommentListData(object:FollowListDetailRequestItem) { | ||
| 346 | - let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}` | 345 | + fetchMineCommentListData(time:string,object:FollowListDetailRequestItem) { |
| 346 | + let url = HttpUrlUtils.getMineCommentListDataUrl()+`?pageSize=${object.pageSize}&pageNum=${object.pageNum}&time=${time}` | ||
| 347 | let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 347 | let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); |
| 348 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) | 348 | return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url, headers) |
| 349 | }; | 349 | }; |
| @@ -581,7 +581,7 @@ class MinePageDatasModel{ | @@ -581,7 +581,7 @@ class MinePageDatasModel{ | ||
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { | 583 | fetchOtherUserCommentLikeStatusData(object:OtherUserCommentLikeStatusRequestItem) { |
| 584 | - let url = HttpUrlUtils.getFollowListStatusDataUrl() | 584 | + let url = HttpUrlUtils.getCommentListStatusDataUrl() |
| 585 | let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); | 585 | let headers: HashMap<string, string> = HttpUrlUtils.getYcgCommonHeaders(); |
| 586 | return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) | 586 | return WDHttp.post<ResponseDTO<QueryCommentListIsLikedItem[]>>(url,object, headers) |
| 587 | }; | 587 | }; |
| @@ -74,6 +74,11 @@ export class HttpUrlUtils { | @@ -74,6 +74,11 @@ export class HttpUrlUtils { | ||
| 74 | static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; | 74 | static readonly FOLLOW_LIST_STATUS_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/batchAttention/status"; |
| 75 | 75 | ||
| 76 | /** | 76 | /** |
| 77 | + * 个人中心 启用用户 有没有被当前用户点赞状态 | ||
| 78 | + */ | ||
| 79 | + static readonly COMMENT_LIST_STATUS_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/batchCommentStatus"; | ||
| 80 | + | ||
| 81 | + /** | ||
| 77 | * 个人中心 我的评论列表 | 82 | * 个人中心 我的评论列表 |
| 78 | */ | 83 | */ |
| 79 | static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; | 84 | static readonly MINE_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/myCommentList"; |
| @@ -238,6 +243,11 @@ export class HttpUrlUtils { | @@ -238,6 +243,11 @@ export class HttpUrlUtils { | ||
| 238 | return url | 243 | return url |
| 239 | } | 244 | } |
| 240 | 245 | ||
| 246 | + static getCommentListStatusDataUrl() { | ||
| 247 | + let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH | ||
| 248 | + return url | ||
| 249 | + } | ||
| 250 | + | ||
| 241 | static getMineCommentListDataUrl() { | 251 | static getMineCommentListDataUrl() { |
| 242 | let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH | 252 | let url = HttpUrlUtils.HOST_SIT + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH |
| 243 | return url | 253 | return url |
| @@ -290,13 +300,13 @@ export class HttpUrlUtils { | @@ -290,13 +300,13 @@ export class HttpUrlUtils { | ||
| 290 | 300 | ||
| 291 | 301 | ||
| 292 | /** | 302 | /** |
| 293 | - * 预约操作 | 303 | + * 点赞操作 |
| 294 | */ | 304 | */ |
| 295 | static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; | 305 | static readonly COMMENT_LIKE_OPERATION_PATH: string = "/api/rmrb-comment/comment/zh/c/commentLike"; |
| 296 | /** | 306 | /** |
| 297 | * 关注操作 | 307 | * 关注操作 |
| 298 | */ | 308 | */ |
| 299 | - static readonly FOLLOW_OPERATION_PATH: string = "https://pd-apis-sit.pdnews.cn/api/rmrb-interact/interact/zh/c/attention/operation"; | 309 | + static readonly FOLLOW_OPERATION_PATH: string = "/api/rmrb-interact/interact/zh/c/attention/operation"; |
| 300 | 310 | ||
| 301 | static getYcgCommonHeaders(): HashMap<string, string> { | 311 | static getYcgCommonHeaders(): HashMap<string, string> { |
| 302 | let headers: HashMap<string, string> = new HashMap<string, string>() | 312 | let headers: HashMap<string, string> = new HashMap<string, string>() |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M6.29805,13.2927L19.701900000000002,20.8323C19.8353,20.9073,20,20.811,20,20.658L20,3.34197C20,3.189004,19.8353,3.0926614,19.701900000000002,3.167654L6.29805,10.70735C6.1647300000000005,10.78234,6,10.686,6,10.53303L6,3.2C6,3.0895431,5.9104600000000005,3,5.8,3L4.2,3C4.0895431,3,4,3.0895431,4,3.2L4,20.6764C4,20.8251,4.156463,20.9218,4.289443,20.8553L5.8894400000000005,20.0553C5.9572,20.0214,6,19.9521,6,19.8764L6,13.467C6,13.314,6.1647300000000005,13.2177,6.29805,13.2927" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712047709053" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11870" width="28" height="28" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M878.885769 568.138291c0 201.397023-163.248995 364.646017-364.646017 364.646017S149.485359 769.535314 149.485359 568.138291c0-192.076766 148.582234-349.076131 336.901997-363.309391 0-0.4335-0.252875-0.903126-0.252875-1.408876V147.353983h-112.168207c-15.497636 0-28.033021-12.535384-28.033021-28.105271 0-15.497636 12.535384-28.033021 28.033021-28.03302h280.51083c15.461511 0 28.105271 12.535384 28.105271 28.03302 0 15.569886-12.643759 28.105271-28.105271 28.105271h-112.168207V203.383899c0 0.541875-0.252875 0.975376-0.252875 1.408876 188.247513 14.269385 336.829747 171.26875 336.829747 363.345516zM514.239752 259.52219c-170.437875 0-308.616101 138.142101-308.616101 308.616101s138.142101 308.616101 308.616101 308.616101c170.365625 0 308.507726-138.142101 308.507726-308.616101s-138.142101-308.616101-308.507726-308.616101z m0 392.787413c-46.529034 0-84.171312-37.714528-84.171312-84.171312 0-36.558527 23.481267-67.445424 56.029916-79.005433V343.693502c0-15.497636 12.535384-28.033021 28.105271-28.033021 15.497636 0 28.033021 12.535384 28.03302 28.033021v145.439356c32.657024 11.560008 56.138291 42.446906 56.138291 79.005433 0 46.456784-37.714528 84.171312-84.135186 84.171312z" fill="#4D5258" p-id="11871"></path></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_13448_089636"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g style="opacity:0.20000000298023224;" clip-path="url(#master_svg0_13448_089636)"><g><path d="M10.67639,4L3.2,4C3.0895431,4,3,4.0895431,3,4.2L3,20.8C3,20.9105,3.0895431,21,3.2,21L20.8,21C20.9105,21,21,20.9105,21,20.8L21,5.12361C21,5.04785,20.9572,4.9786,20.8894,4.944721L19.2894,4.144721C19.1565,4.0782313,19,4.17493,19,4.323607L19,19L5,19L5,6L9.87639,6C9.95215,6,10.0214,5.9572,10.05528,5.8894400000000005L10.85528,4.289443C10.92177,4.156463,10.82507,4,10.67639,4" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M11.5,3.0706476L11.5,6.52935C11.5,6.56044,11.5339189,6.57965,11.5605798,6.56365L14.44283,4.8343C14.46873,4.81876,14.46873,4.78124,14.44283,4.7657L11.5605798,3.0363479C11.5339189,3.0203513,11.5,3.0395558,11.5,3.0706476" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M15,3.0706476L15,6.52935C15,6.56044,15.0339189,6.57965,15.0605798,6.56365L17.94283,4.8343C17.96873,4.81876,17.96873,4.78124,17.94283,4.7657L15.0605798,3.0363479C15.0339189,3.0203513,15,3.0395558,15,3.0706476" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M8.916,11.64L8.916,16L9.964,16L9.964,10.48L8.916,10.48L7.9879999999999995,11.176L7.9879999999999995,12.312000000000001L8.916,11.64ZM10.788,14.864L10.788,16L11.9,16L11.9,14.864L10.788,14.864ZM13.008,15.612C13.27725,15.9294,13.692,16.0881,14.251999999999999,16.088C14.812000000000001,16.088,15.22663,15.928,15.496,15.608C15.76525,15.2881,15.9,14.81338,15.9,14.184L15.9,12.232C15.9,11.623999999999999,15.76525,11.16537,15.496,10.856C15.22663,10.54675,14.812000000000001,10.392,14.251999999999999,10.392C13.71325,10.392,13.304,10.548,13.024000000000001,10.86C12.744,11.172,12.604,11.62937,12.604,12.232L12.604,14.184C12.604,14.81875,12.73863,15.2948,13.008,15.612ZM14.728,14.932C14.64525,15.0947,14.48663,15.176,14.251999999999999,15.176C14.02262,15.176,13.866620000000001,15.0947,13.783999999999999,14.932C13.70125,14.76937,13.66,14.49075,13.66,14.096L13.66,12.384C13.66,11.989370000000001,13.7,11.712,13.780000000000001,11.552C13.86,11.392,14.01725,11.312000000000001,14.251999999999999,11.312000000000001C14.48663,11.312000000000001,14.64525,11.392,14.728,11.552C14.81063,11.712,14.852,11.989370000000001,14.852,12.384L14.852,14.096C14.852,14.49075,14.81063,14.76937,14.728,14.932Z" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M17.701900000000002,13.2927L4.298053,20.8323C4.164731,20.9073,4,20.811,4,20.658L4,3.34197C4,3.189004,4.164731,3.0926614,4.298052,3.167654L17.701900000000002,10.70735C17.8353,10.78234,18,10.686,18,10.53303L18,3.2C18,3.0895431,18.0895,3,18.2,3L19.8,3C19.9105,3,20,3.0895431,20,3.2L20,20.6764C20,20.8251,19.8435,20.9218,19.7106,20.8553L18.110599999999998,20.0553C18.0428,20.0214,18,19.9521,18,19.8764L18,13.467C18,13.314,17.8353,13.2177,17.701900000000002,13.2927" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28" height="28" viewBox="0 0 28 28"><g style="opacity:0.20000000298023224;"><g><path d="M3.5,4.31780565625L3.5,6.18447265625Q3.5,6.2308826562499995,3.5177614,6.27376265625Q3.5355229,6.31664265625,3.5683417,6.34946265625Q3.601161,6.38228265625,3.644041,6.40004265625Q3.68692,6.41780265625,3.733333,6.41780265625L24.2667,6.41780265625Q24.3131,6.41780265625,24.356,6.40004265625Q24.3988,6.38228265625,24.4317,6.34946265625Q24.4645,6.31664265625,24.4822,6.27376265625Q24.5,6.2308826562499995,24.5,6.18447265625L24.5,4.31780565625Q24.5,4.27139265625,24.4822,4.22851365625Q24.4645,4.18563365625,24.4317,4.15281435625Q24.3988,4.11999555625,24.356,4.10223405625Q24.3131,4.08447265625,24.2667,4.08447265625L3.733333,4.08447265625Q3.68692,4.08447265625,3.644041,4.10223405625Q3.601161,4.11999555625,3.5683417,4.15281435625Q3.5355229,4.18563365625,3.5177614,4.22851365625Q3.5,4.27139265625,3.5,4.31780565625ZM10.20878,13.80699265625L3.862763,9.57631265625C3.707701,9.47294265625,3.5,9.58410265625,3.5,9.77046265625L3.5,18.23177265625C3.5,18.41817265625,3.707701,18.52937265625,3.862763,18.42597265625L10.20878,14.19527265625C10.34732,14.10297265625,10.34732,13.89935265625,10.20878,13.80699265625ZM24.2667,12.83349265625L13.5609,12.83349265625C13.47249,12.83349265625,13.3917,12.88343265625,13.35217,12.96248265625L12.41884,14.82917265625C12.34127,14.98427265625,12.45409,15.16687265625,12.62754,15.16687265625L24.2667,15.16687265625C24.3955,15.16687265625,24.5,15.06237265625,24.5,14.93347265625L24.5,13.06683265625C24.5,12.93796265625,24.3955,12.83349265625,24.2667,12.83349265625ZM3.5,21.81777265625L3.5,23.68447265625Q3.5,23.73087265625,3.5177614,23.77377265625Q3.5355229,23.81667265625,3.5683417,23.84947265625Q3.601161,23.88227265625,3.644041,23.90007265625Q3.68692,23.91777265625,3.733333,23.91777265625L24.2667,23.91777265625Q24.3131,23.91777265625,24.356,23.90007265625Q24.3988,23.88227265625,24.4317,23.84947265625Q24.4645,23.81667265625,24.4822,23.77377265625Q24.5,23.73087265625,24.5,23.68447265625L24.5,21.81777265625Q24.5,21.77137265625,24.4822,21.72847265625Q24.4645,21.68567265625,24.4317,21.65277265625Q24.3988,21.61997265625,24.356,21.60227265625Q24.3131,21.58447265625,24.2667,21.58447265625L3.733333,21.58447265625Q3.68692,21.58447265625,3.644041,21.60227265625Q3.601161,21.61997265625,3.5683417,21.65277265625Q3.5355229,21.68567265625,3.5177614,21.72847265625Q3.5,21.77137265625,3.5,21.81777265625Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="opacity:0.20000000298023224;"><g><path d="M16.61255231628418,0.6909312143875121L15.48135231628418,1.8221886143875121C15.40315231628418,1.9003386143875123,15.40325231628418,2.0270586143875122,15.48145231628418,2.105148614387512L16.87945231628418,3.5008286143875122L2.19995231628418,3.5008286143875122C2.0894953162841796,3.5008286143875122,1.9999523162841797,3.5903786143875123,1.9999523162841797,3.7008286143875124L1.9999523162841797,14.377268614387512C1.9999523162841797,14.452968614387512,2.0427528162841795,14.522268614387512,2.1105093162841797,14.556068614387513L3.7105123162841798,15.356068614387512C3.8434923162841796,15.422568614387512,3.9999523162841797,15.325868614387511,3.9999523162841797,15.177268614387513L3.9999523162841797,5.500828614387512L18.99995231628418,5.500828614387512L18.99995231628418,5.499258614387513L21.22095231628418,5.499258614387513C21.39905231628418,5.499258614387513,21.48835231628418,5.283828614387512,21.36235231628418,5.157838614387512L16.895452316284178,0.6909312143875121C16.81735231628418,0.6128262143875122,16.69065231628418,0.6128263143875122,16.61255231628418,0.6909312143875121ZM19.99995231628418,8.823458614387512L19.99995231628418,18.499868614387513L5.11660231628418,18.499868614387513L5.115252316284179,18.498468614387512L2.7755723162841797,18.498468614387512C2.5973913162841797,18.498468614387512,2.50815731628418,18.71396861438751,2.6341503162841797,18.839968614387512L7.101052316284179,23.30686861438751C7.17916231628418,23.384968614387514,7.30579231628418,23.384968614387514,7.383902316284179,23.30686861438751L8.51515231628418,22.17556861438751C8.59330231628418,22.097468614387513,8.593252316284179,21.970668614387513,8.51503231628418,21.89256861438751L7.11995231628418,20.499868614387513L21.79995231628418,20.499868614387513C21.91045231628418,20.499868614387513,21.99995231628418,20.410268614387512,21.99995231628418,20.299868614387513L21.99995231628418,9.623458614387513C21.99995231628418,9.547708614387512,21.95715231628418,9.478458614387511,21.889352316284178,9.444578614387511L20.28935231628418,8.644578614387513C20.15645231628418,8.578088614387513,19.99995231628418,8.674788614387513,19.99995231628418,8.823458614387512Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| 1 | -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg> | ||
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712048425819" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13530" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M893.035 463.821679C839.00765 429.699141 210.584253 28.759328 179.305261 8.854514 139.495634-16.737389 99.686007 17.385148 99.686007 57.194775v909.934329c0 45.496716 42.653172 68.245075 76.775709 48.340262 45.496716-28.435448 676.763657-429.375262 716.573284-454.967165 34.122537-22.748358 34.122537-76.775709 0-96.680522z" fill="#FFFFFF" p-id="13531"></path></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="32" viewBox="0 0 32 32"><g><g><path d="M6.915255046875,4.7314907592749025L11.848588046875001,5.964826319274902C11.937618046875,5.987086319274902,12.000078046875,6.067076319274903,12.000078046875,6.158856319274903L12.000078046875,28.413216319274902C12.000078046875,28.5433163192749,11.877808046875,28.638816319274902,11.751578046875,28.6072163192749L6.818241046875,27.3739163192749C6.729207546875,27.351616319274903,6.666748046875,27.2716163192749,6.666748046875,27.179916319274902L6.666748046875,4.925519319274902C6.666748046875,4.795405019274902,6.789026046875,4.6999334192749025,6.915255046875,4.7314907592749025M20.248548046875,4.7314907592749025L25.181848046875,5.964826319274902C25.270848046875,5.987086319274902,25.333348046875,6.067076319274903,25.333348046875,6.158856319274903L25.333348046875,28.413216319274902C25.333348046875,28.5433163192749,25.211048046875,28.638816319274902,25.084848046875,28.6072163192749L20.151448046875,27.3739163192749C20.062448046874998,27.351616319274903,20.000048046875,27.2716163192749,20.000048046875,27.179916319274902L20.000048046875,4.925519319274902C20.000048046875,4.795405019274902,20.122248046875,4.6999334192749025,20.248548046875,4.7314907592749025" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></g></g></svg> |
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="28.000001907348633" height="28.000001907348633" viewBox="0 0 28.000001907348633 28.000001907348633"><g style="opacity:0.20000000298023224;"><g></g><g><path d="M3.5,25.08349609375L3.5,2.91682909375Q3.5,2.85937609375,3.5112086,2.80302709375Q3.5224172,2.74667709375,3.5444036,2.6935970937500002Q3.56639,2.6405170937499998,3.5983094,2.59274709375Q3.630229,2.54497609375,3.670854,2.50435009375Q3.71148,2.46372509375,3.759251,2.43180549375Q3.8070209999999998,2.39988609375,3.8601010000000002,2.37789969375Q3.913181,2.35591329375,3.969531,2.34470469375Q4.02588,2.33349609375,4.083333,2.33349609375L23.9167,2.33349609375Q23.9741,2.33349609375,24.0305,2.34470469375Q24.0868,2.35591329375,24.1399,2.37789969375Q24.193,2.39988609375,24.2407,2.43180549375Q24.2885,2.46372509375,24.3291,2.50435009375Q24.3698,2.54497609375,24.4017,2.59274709375Q24.4336,2.6405170937499998,24.4556,2.6935970937500002Q24.4776,2.74667709375,24.4888,2.80302709375Q24.5,2.85937609375,24.5,2.91682909375L24.5,15.16649609375L22.1666,15.16649609375L22.1666,4.66650609375L5.83325,4.66650609375L5.83325,23.33319609375L14,23.33319609375L14,25.66679609375L4.083333,25.66679609375Q4.02588,25.66679609375,3.969531,25.65559609375Q3.913181,25.64439609375,3.8601010000000002,25.62239609375Q3.8070209999999998,25.60039609375,3.759251,25.56849609375Q3.71148,25.53659609375,3.670854,25.49599609375Q3.630229,25.45539609375,3.5983094,25.40759609375Q3.56639,25.35979609375,3.5444036,25.30669609375Q3.5224172,25.25369609375,3.5112086,25.19729609375Q3.5,25.14099609375,3.5,25.08349609375Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g><g><path d="M9.333251953125,11.43447265625C9.333251953125,11.56334265625,9.437718953125,11.66780265625,9.566584953125,11.66780265625L17.355711953125002,11.66780265625C17.444091953125,11.66780265625,17.524881953125,11.61787265625,17.564411953125,11.53882265625L18.497741953125,9.67215565625C18.575311953125002,9.51701265625,18.462501953125,9.33447265625,18.289041953125,9.33447265625L9.566584953125,9.33447265625C9.437718953125,9.33447265625,9.333251953125,9.43893965625,9.333251953125,9.56780565625L9.333251953125,11.43447265625Z" fill="#4D5258" fill-opacity="1"/></g><g><path d="M9.333251953125,16.68203125C9.333251953125,16.81090125,9.437718953125,16.91536125,9.566584953125,16.91536125L14.439041953124999,16.91536125C14.527421953125,16.91536125,14.608221953125,16.86543125,14.647741953125,16.786381249999998L15.581081953125,14.91971425C15.658651953125,14.76457125,15.545831953124999,14.58203125,15.372381953125,14.58203125L9.566584953125,14.58203125C9.437718953125,14.58203125,9.333251953125,14.68649825,9.333251953125,14.81536425L9.333251953125,16.68203125Z" fill="#4D5258" fill-opacity="1"/></g><g><path d="M17.588956390625,19.15734328125L20.566870390625,19.16774328125L20.548890390625,24.31857328125L19.458060390625,24.314763281250002L19.471360390625,20.50559328125C19.471810390625,20.37673328125,19.367710390625,20.27190328125,19.238840390625,20.27145328125L18.346340390625,20.26833328125C18.217470390625,20.26788328125,18.112640390625,20.37198328125,18.112190390625,20.50085328125L18.098890390625,24.31002328125L17.054726390625,24.30637328125C16.925861390625,24.30592328125,16.821030110625,24.410023281249998,16.820580290625,24.53889328125L16.817464871625,25.43139328125C16.817015045625,25.560263281250002,16.921116390625,25.66509328125,17.049982390625,25.66554328125L24.933730390625,25.693063281249998C25.062600390625,25.69351328125,25.167430390625,25.58941328125,25.167880390625,25.46054328125L25.171000390625,24.56804328125C25.171450390624997,24.43917328125,25.067340390625,24.33434328125,24.938480390625,24.33389328125L21.934310390625,24.323413281249998L21.941450390625,22.27882328125L24.105620390625,22.28638328125C24.234480390625002,22.28683328125,24.339310390625002,22.18272328125,24.339760390625,22.05386328125L24.342820390625,21.17886328125C24.343270390625,21.04999328125,24.239170390625,20.94516328125,24.110300390625,20.94471328125L21.946130390625,20.93716328125L21.952290390625002,19.17257328125L24.588960390625,19.18178328125C24.717820390625,19.18223328125,24.822660390625,19.07812328125,24.823100390625,18.94926328125L24.826220390625,18.05675828125C24.826670390625,17.92789328125,24.722570390625002,17.82306218125,24.593700390625,17.82261228125L17.593700390625,17.79817776225C17.464835390625,17.79772793625,17.360004390625,17.90182928125,17.359554390625,18.03069528125L17.356439390625,18.92320328125C17.355989390625,19.05206328125,17.460090390625,19.15689328125,17.588956390625,19.15734328125Z" fill-rule="evenodd" fill="#4D5258" fill-opacity="1"/></g></g></svg> |
| @@ -5,13 +5,13 @@ | @@ -5,13 +5,13 @@ | ||
| 5 | "name": "default", | 5 | "name": "default", |
| 6 | "type": "HarmonyOS", | 6 | "type": "HarmonyOS", |
| 7 | "material": { | 7 | "material": { |
| 8 | - "certpath": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.cer", | ||
| 9 | - "storePassword": "0000001B1B59DAB22B389A8BCD25A2C43C89DE581FD6AC3EEE1D3FC227D46727A7763AAE553A50B5E81310", | 8 | + "certpath": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.cer", |
| 9 | + "storePassword": "0000001AB256FAF47AA4D68E4841C95D357490DE9FBB26A3A9161AD3069E31B3623E25CB49409CCA9CF7", | ||
| 10 | "keyAlias": "debugKey", | 10 | "keyAlias": "debugKey", |
| 11 | - "keyPassword": "0000001B2B0EDD642E43906A1B9A6B72A79F40316E908829B79DD96467FE5C3A8D1DF9E40957DA733DF77F", | ||
| 12 | - "profile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p7b", | 11 | + "keyPassword": "0000001AFB06818C2BC8DC275326668AAC62B91EBF7D3F84E8BE0F156D02623AA0F4F8C6B73F362CB371", |
| 12 | + "profile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p7b", | ||
| 13 | "signAlg": "SHA256withECDSA", | 13 | "signAlg": "SHA256withECDSA", |
| 14 | - "storeFile": "/Users/jrl/.ohos/config/auto_debug_sight_harmony_com.wondertek.sight_2850086000431478878.p12" | 14 | + "storeFile": "C:\\Users\\pc\\.ohos\\config\\default_sight_harmony_l75MehGV9G3TUayEtL68-EIWqyYDqfVXfu9D-DPJ7I0=.p12" |
| 15 | } | 15 | } |
| 16 | } | 16 | } |
| 17 | ], | 17 | ], |
| @@ -33,3 +33,5 @@ export { SystemUtils } from './src/main/ets/utils/SystemUtils' | @@ -33,3 +33,5 @@ export { SystemUtils } from './src/main/ets/utils/SystemUtils' | ||
| 33 | export { PermissionUtil } from './src/main/ets/utils/PermissionUtil' | 33 | export { PermissionUtil } from './src/main/ets/utils/PermissionUtil' |
| 34 | 34 | ||
| 35 | export { UserDataLocal } from './src/main/ets/utils/UserDataLocal' | 35 | export { UserDataLocal } from './src/main/ets/utils/UserDataLocal' |
| 36 | + | ||
| 37 | +export { NumberFormatterUtils } from './src/main/ets/utils/NumberFormatterUtils' |
| 1 | import { StringUtils } from './StringUtils'; | 1 | import { StringUtils } from './StringUtils'; |
| 2 | - | 2 | +import getLunar from './GetLunar' |
| 3 | /** | 3 | /** |
| 4 | * 日期/时间工具 | 4 | * 日期/时间工具 |
| 5 | */ | 5 | */ |
| @@ -457,6 +457,15 @@ export class DateTimeUtils { | @@ -457,6 +457,15 @@ export class DateTimeUtils { | ||
| 457 | return timeStr; | 457 | return timeStr; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | + /** | ||
| 461 | + * 获取农历日期 | ||
| 462 | + * @param _date eg: '2024-02-01 12:12:12' or '2024-02-01' 如果不传,取当前时间 | ||
| 463 | + * @returns eg: '二月廿五' | ||
| 464 | + * 如果后面有其他农历需求,可以引入农历插件。这个引入的getLunar文件可以删除 | ||
| 465 | + */ | ||
| 466 | + static getLunar(_date?: string) { | ||
| 467 | + return getLunar(_date) | ||
| 468 | + } | ||
| 460 | } | 469 | } |
| 461 | 470 | ||
| 462 | // const dateTimeUtils = new DateTimeUtils() | 471 | // const dateTimeUtils = new DateTimeUtils() |
| 1 | +/** | ||
| 2 | + * 获取某个日期的农历 | ||
| 3 | + * @parmas {newDate} 日期 年-月-日 | ||
| 4 | + */ | ||
| 5 | +export default function getLunar(newDate){ | ||
| 6 | + var nyear; | ||
| 7 | + var nmonth; | ||
| 8 | + var nday = -1; | ||
| 9 | + var nwday; | ||
| 10 | + var nhrs; | ||
| 11 | + var nmin; | ||
| 12 | + var nsec; | ||
| 13 | + var newDate = newDate; | ||
| 14 | + | ||
| 15 | + var lmonth, lday, lleap; //农历参数 | ||
| 16 | + | ||
| 17 | + function Draw() { | ||
| 18 | + NewTick(); | ||
| 19 | + | ||
| 20 | + //显示时间 | ||
| 21 | + var s = nyear + '年' + nmonth + '月' + nday + '日 ' + '星期' + cweekday(nwday) + ' ' + shapetime(nhrs, nmin, nsec); | ||
| 22 | + s += " 农历" + lmonth + "月" + lday; //农历 | ||
| 23 | + var lunar_month_day=lmonth + "月" + lday; | ||
| 24 | + return lunar_month_day; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + function NewTick() { | ||
| 29 | + console.warn('noww---', newDate) | ||
| 30 | + var noww = newDate ? new Date(newDate) : new Date(); | ||
| 31 | + if (noww.getDate() != nday) { | ||
| 32 | + nyear = noww.getFullYear(); | ||
| 33 | + nmonth = noww.getMonth() + 1; | ||
| 34 | + nwday = noww.getDay(); | ||
| 35 | + nday = noww.getDate(); | ||
| 36 | + | ||
| 37 | + getlunar(); //获取农历 | ||
| 38 | + } | ||
| 39 | + nhrs = noww.getHours(); | ||
| 40 | + nmin = noww.getMinutes(); | ||
| 41 | + nsec = noww.getSeconds(); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + //辅助函数 | ||
| 46 | + var hzWeek = new Array("日", "一", "二", "三", "四", "五", "六", "日"); | ||
| 47 | + function cweekday(wday) { | ||
| 48 | + return hzWeek[wday]; | ||
| 49 | + } | ||
| 50 | + function shapetime(vhrs, vmin, vsec) { | ||
| 51 | + if (vsec <= 9) vsec = "0" + vsec; | ||
| 52 | + if (vmin <= 9) vmin = "0" + vmin; | ||
| 53 | + if (vhrs <= 9) vhrs = "0" + vhrs; | ||
| 54 | + return vhrs + ":" + vmin + ":" + vsec | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + //农历函数开始 | ||
| 58 | + var lunarInfo = new Array(0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, //1990 | ||
| 59 | + 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, 0x05aa0, 0x076a3, 0x096d0, 0x04bd7, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, 0x14b63); | ||
| 60 | + function lYearDays(y) { | ||
| 61 | + var i, sum = 348; | ||
| 62 | + for (i = 0x8000; i > 0x8; i >>= 1) sum += (lunarInfo[y - 1900] & i) ? 1 : 0; | ||
| 63 | + return (sum + leapDays(y)); | ||
| 64 | + } | ||
| 65 | + function leapDays(y) { | ||
| 66 | + if (leapMonth(y)) return ((lunarInfo[y - 1900] & 0x10000) ? 30 : 29); | ||
| 67 | + else return (0); | ||
| 68 | + } | ||
| 69 | + function leapMonth(y) { | ||
| 70 | + return (lunarInfo[y - 1900] & 0xf); | ||
| 71 | + } | ||
| 72 | + function monthDays(y, m) { | ||
| 73 | + return ((lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29); | ||
| 74 | + } | ||
| 75 | + function Lunar(y, m, d) { | ||
| 76 | + var i, leap = 0, | ||
| 77 | + temp = 0; | ||
| 78 | + var offset = (Date.UTC(y, m, d) - Date.UTC(1900, 0, 31)) / 86400000; | ||
| 79 | + for (i = 1900; i < 2050 && offset > 0; i++) { | ||
| 80 | + temp = lYearDays(i); | ||
| 81 | + offset -= temp; | ||
| 82 | + } | ||
| 83 | + if (offset < 0) { | ||
| 84 | + offset += temp; | ||
| 85 | + i--; | ||
| 86 | + } | ||
| 87 | + this.year = i; | ||
| 88 | + leap = leapMonth(i); | ||
| 89 | + this.isLeap = false; | ||
| 90 | + for (i = 1; i < 13 && offset > 0; i++) { | ||
| 91 | + if (leap > 0 && i == (leap + 1) && this.isLeap == false) {--i; | ||
| 92 | + this.isLeap = true; | ||
| 93 | + temp = leapDays(this.year); | ||
| 94 | + } else { | ||
| 95 | + temp = monthDays(this.year, i); | ||
| 96 | + } | ||
| 97 | + if (this.isLeap == true && i == (leap + 1)) this.isLeap = false; | ||
| 98 | + offset -= temp; | ||
| 99 | + } | ||
| 100 | + if (offset == 0 && leap > 0 && i == leap + 1) if (this.isLeap) { | ||
| 101 | + this.isLeap = false; | ||
| 102 | + } else { | ||
| 103 | + this.isLeap = true; --i; | ||
| 104 | + } | ||
| 105 | + if (offset < 0) { | ||
| 106 | + offset += temp; --i; | ||
| 107 | + } | ||
| 108 | + this.month = i; | ||
| 109 | + this.day = offset + 1; | ||
| 110 | + } | ||
| 111 | + var nStr1 = new Array('', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'); | ||
| 112 | + var nStr2 = new Array('初', '十', '廿', '卅', '□'); | ||
| 113 | + function GetcDay(d) { | ||
| 114 | + var s; | ||
| 115 | + switch (d) { | ||
| 116 | + case 10: | ||
| 117 | + s = '初十'; | ||
| 118 | + break; | ||
| 119 | + case 20: | ||
| 120 | + s = '二十'; | ||
| 121 | + break; | ||
| 122 | + case 30: | ||
| 123 | + s = '三十'; | ||
| 124 | + break; | ||
| 125 | + default: | ||
| 126 | + s = nStr2[Math.floor(d / 10)]; | ||
| 127 | + s += nStr1[d % 10]; | ||
| 128 | + break; | ||
| 129 | + } | ||
| 130 | + return (s); | ||
| 131 | + } | ||
| 132 | + function GetcMon(m) { | ||
| 133 | + if (m == 1) return '正'; | ||
| 134 | + else return nStr1[m]; | ||
| 135 | + } | ||
| 136 | + function getlunar() { | ||
| 137 | + var lObj = new Lunar(nyear, nmonth - 1, nday); | ||
| 138 | + lmonth = GetcMon(lObj.month); | ||
| 139 | + lday = GetcDay(lObj.day); | ||
| 140 | + lleap = lObj.isLeap; | ||
| 141 | + if (lleap == 1) { | ||
| 142 | + lmonth = "闰" + lmonth; | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + //农历函数结束 | ||
| 146 | + return Draw(); | ||
| 147 | +} |
| 1 | + | ||
| 2 | +export class NumberFormatterUtils { | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * 数据小于一万返回原数据,大于一万保留小数点后一位,加上万字 | ||
| 6 | + * @param num | ||
| 7 | + * @returns | ||
| 8 | + */ | ||
| 9 | + static formatNumberWithWan(inputNumber: number | String): string { | ||
| 10 | + const num = typeof inputNumber === 'number' ? inputNumber : Number(inputNumber); | ||
| 11 | + if (isNaN(num) || num < 10000) { | ||
| 12 | + return num.toString(); | ||
| 13 | + } else { | ||
| 14 | + const wanUnit = num / 10000; | ||
| 15 | + return `${wanUnit.toFixed(1)}万`; | ||
| 16 | + } | ||
| 17 | + } | ||
| 18 | +} |
| @@ -41,13 +41,33 @@ export class HttpUrlUtils { | @@ -41,13 +41,33 @@ export class HttpUrlUtils { | ||
| 41 | /** | 41 | /** |
| 42 | * 批查接口,查询互动相关数据,如收藏数、评论数等 | 42 | * 批查接口,查询互动相关数据,如收藏数、评论数等 |
| 43 | */ | 43 | */ |
| 44 | - static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/v2/content/interactData"; | 44 | + static readonly INTERACT_DATA_PATH: string = "/api/rmrb-contact/contact/zh/c/content/interactData"; |
| 45 | // 多图(图集)详情页 | 45 | // 多图(图集)详情页 |
| 46 | /** | 46 | /** |
| 47 | * 批量查询内容当前用户点赞、收藏状态 | 47 | * 批量查询内容当前用户点赞、收藏状态 |
| 48 | */ | 48 | */ |
| 49 | static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status"; | 49 | static readonly INTERACT_DATA_STATUS: string = "/api/rmrb-interact/interact/zh/c/batchLikeAndCollect/status"; |
| 50 | /** | 50 | /** |
| 51 | + * 点赞、取消点赞 | ||
| 52 | + */ | ||
| 53 | + static readonly INTERACT_EXECUTELIKE: string = "/api/rmrb-interact/interact/zh/c/like/executeLike"; | ||
| 54 | + /** | ||
| 55 | + * 收藏、取消收藏 | ||
| 56 | + */ | ||
| 57 | + static readonly INTERACT_EXECUTECOLLECTRECORD: string = "/api/rmrb-interact/interact/zh/c/collect/executeCollcetRecord"; | ||
| 58 | + /** | ||
| 59 | + * 关注号主 | ||
| 60 | + */ | ||
| 61 | + static readonly INTERACT_ACCENTION_OPERATION: string = "/api/rmrb-interact/interact/zh/c/attention/operation"; | ||
| 62 | + /** | ||
| 63 | + * 用户等级/积分-APP根据业务场景动态增减成长值(APP) | ||
| 64 | + */ | ||
| 65 | + static readonly USERPOINT_OPERATE: string = "/api/rmrb-user-point/auth/pointLevel/zh/operate"; | ||
| 66 | + /** | ||
| 67 | + * 评论发布 | ||
| 68 | + */ | ||
| 69 | + static readonly COMMENT_PUBLISH: string = "/api/rmrb-comment/comment/zh/c/publish"; | ||
| 70 | + /** | ||
| 51 | * 沉浸式視頻批量查詢20條數據 | 71 | * 沉浸式視頻批量查詢20條數據 |
| 52 | */ | 72 | */ |
| 53 | static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList"; | 73 | static readonly RECOMMEND_VIDEOLIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/videoList"; |
| @@ -76,6 +96,14 @@ export class HttpUrlUtils { | @@ -76,6 +96,14 @@ export class HttpUrlUtils { | ||
| 76 | */ | 96 | */ |
| 77 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; | 97 | static readonly APPOINTMENT_QueryUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/queryUserDetail"; |
| 78 | /** | 98 | /** |
| 99 | + * 资料编辑 更新普通用户信息 | ||
| 100 | + */ | ||
| 101 | + static readonly APPOINTMENT_editUserDetail_PATH: string = "/api/rmrb-user-center/user/zh/c/editUserDetail"; | ||
| 102 | + /** | ||
| 103 | + * 资料编辑 更新普通用户名 | ||
| 104 | + */ | ||
| 105 | + static readonly APPOINTMENT_editUserDetail1_PATH: string = "/api/rmrb-user-center/user/zh/c/completeUserInfo"; | ||
| 106 | + /** | ||
| 79 | /** | 107 | /** |
| 80 | * 个人中心 关注列表详情 | 108 | * 个人中心 关注列表详情 |
| 81 | */ | 109 | */ |
| @@ -128,12 +156,10 @@ export class HttpUrlUtils { | @@ -128,12 +156,10 @@ export class HttpUrlUtils { | ||
| 128 | * 个人中心 我的关注列表 | 156 | * 个人中心 我的关注列表 |
| 129 | */ | 157 | */ |
| 130 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; | 158 | static readonly OTHER_USER_FOLLOW_LIST_DATA_PATH: string = "/api/rmrb-interact/interact/zh/c/userAttention/list"; |
| 131 | - | ||
| 132 | /** | 159 | /** |
| 133 | * 预约操作 | 160 | * 预约操作 |
| 134 | */ | 161 | */ |
| 135 | static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; | 162 | static readonly APPOINTMENT_OPERATION_STATUS_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; |
| 136 | - | ||
| 137 | /** | 163 | /** |
| 138 | * 点赞操作 | 164 | * 点赞操作 |
| 139 | */ | 165 | */ |
| @@ -153,7 +179,12 @@ export class HttpUrlUtils { | @@ -153,7 +179,12 @@ export class HttpUrlUtils { | ||
| 153 | * */ | 179 | * */ |
| 154 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; | 180 | static readonly MORNING_EVENING_PAGE_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/pageInfo"; |
| 155 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; | 181 | static readonly MORNING_EVENING_COMP_INFO_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/compInfo"; |
| 156 | - private static hostUrl: string = HttpUrlUtils.HOST_PRODUCT; | 182 | + private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT; |
| 183 | + | ||
| 184 | + public static set hostUrl(value: string) { | ||
| 185 | + HttpUrlUtils._hostUrl = value; | ||
| 186 | + } | ||
| 187 | + | ||
| 157 | private static userId = '' | 188 | private static userId = '' |
| 158 | private static userType = '' | 189 | private static userType = '' |
| 159 | private static token = '' | 190 | private static token = '' |
| @@ -169,8 +200,8 @@ export class HttpUrlUtils { | @@ -169,8 +200,8 @@ export class HttpUrlUtils { | ||
| 169 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) | 200 | headers.set('timestamp', HttpUrlUtils.getTimestamp()) |
| 170 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) | 201 | headers.set('RMRB-X-TOKEN', HttpUrlUtils.getXToken()) |
| 171 | headers.set('device_id', HttpUrlUtils.getDeviceId()) | 202 | headers.set('device_id', HttpUrlUtils.getDeviceId()) |
| 172 | - if(HttpUrlUtils.getXToken()!=''){ | ||
| 173 | - headers.set('cookie', 'RMRB-X-TOKEN='+HttpUrlUtils.getXToken()) | 203 | + if (HttpUrlUtils.getXToken() != '') { |
| 204 | + headers.set('cookie', 'RMRB-X-TOKEN=' + HttpUrlUtils.getXToken()) | ||
| 174 | } | 205 | } |
| 175 | headers.set('build_version', HttpUrlUtils.getVersion()) | 206 | headers.set('build_version', HttpUrlUtils.getVersion()) |
| 176 | headers.set('adcode', HttpUrlUtils.getAdCode()) | 207 | headers.set('adcode', HttpUrlUtils.getAdCode()) |
| @@ -199,7 +230,7 @@ export class HttpUrlUtils { | @@ -199,7 +230,7 @@ export class HttpUrlUtils { | ||
| 199 | } | 230 | } |
| 200 | 231 | ||
| 201 | static addSpecialHeaders(headers: HashMap<string, string>) { | 232 | static addSpecialHeaders(headers: HashMap<string, string>) { |
| 202 | - switch (HttpUrlUtils.hostUrl) { | 233 | + switch (HttpUrlUtils._hostUrl) { |
| 203 | case HttpUrlUtils.HOST_UAT: | 234 | case HttpUrlUtils.HOST_UAT: |
| 204 | // TODO 待优化到常量类里 | 235 | // TODO 待优化到常量类里 |
| 205 | headers.set('X-Ca-Stage', 'PRE'); | 236 | headers.set('X-Ca-Stage', 'PRE'); |
| @@ -227,7 +258,7 @@ export class HttpUrlUtils { | @@ -227,7 +258,7 @@ export class HttpUrlUtils { | ||
| 227 | } | 258 | } |
| 228 | 259 | ||
| 229 | static getHost() { | 260 | static getHost() { |
| 230 | - return HttpUrlUtils.hostUrl; | 261 | + return HttpUrlUtils._hostUrl; |
| 231 | } | 262 | } |
| 232 | 263 | ||
| 233 | private static getCity() { | 264 | private static getCity() { |
| @@ -251,19 +282,19 @@ export class HttpUrlUtils { | @@ -251,19 +282,19 @@ export class HttpUrlUtils { | ||
| 251 | } | 282 | } |
| 252 | 283 | ||
| 253 | private static getXToken() { | 284 | private static getXToken() { |
| 254 | - if(StringUtils.isNotEmpty(HttpUrlUtils.token)){ | 285 | + if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { |
| 255 | return HttpUrlUtils.token | 286 | return HttpUrlUtils.token |
| 256 | } | 287 | } |
| 257 | - HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN,"") as string | ||
| 258 | - if(StringUtils.isNotEmpty(HttpUrlUtils.token)) { | 288 | + HttpUrlUtils.token = SPHelper.default.getSync(SpConstants.USER_JWT_TOKEN, "") as string |
| 289 | + if (StringUtils.isNotEmpty(HttpUrlUtils.token)) { | ||
| 259 | return HttpUrlUtils.token | 290 | return HttpUrlUtils.token |
| 260 | } | 291 | } |
| 261 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; | 292 | return 'eyJhbGciOiJIUzI1NiIsImtpZCI6ImQ4WkI2QkhxSEZrdjJ2U25BNlRwZEdKRjBHcjItVzBvS2FaYzdLOUUycmcifQ.eyJpc3MiOiJwZW9wbGVzLWRhaWx5LWZvdXJhIiwic3ViIjoicGVvcGxlcy1kYWlseS1mb3VyYSIsImV4cCI6MTcwMzY0OTYwNiwidXNlcklkIjo0NTk3NzYyOTc0NzQ5NDksInVzZXJWZXJzaW9uIjoiNDU5Nzc2Mjk3NDc0OTQ5XzIiLCJ1c2VyTmFtZSI6IkJ1bGlraWtpMTgxIiwidXNlclR5cGUiOjIsImNyZWF0b3JJZCI6NDI2NTM5MH0.jhQ9kylcm3FxWf0-lBMZuLkdtIQ6XpFnAi0AFZJNwfc'; |
| 262 | } | 293 | } |
| 263 | 294 | ||
| 264 | static getRefreshToken() { | 295 | static getRefreshToken() { |
| 265 | - let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN,"") | ||
| 266 | - if(StringUtils.isNotEmpty(refreshToken)) { | 296 | + let refreshToken = SPHelper.default.getSync(SpConstants.USER_REFRESH_TOKEN, "") |
| 297 | + if (StringUtils.isNotEmpty(refreshToken)) { | ||
| 267 | return refreshToken as string; | 298 | return refreshToken as string; |
| 268 | } | 299 | } |
| 269 | return ''; | 300 | return ''; |
| @@ -327,55 +358,55 @@ export class HttpUrlUtils { | @@ -327,55 +358,55 @@ export class HttpUrlUtils { | ||
| 327 | 358 | ||
| 328 | public static getUserId() { | 359 | public static getUserId() { |
| 329 | // TODO 对接登录 | 360 | // TODO 对接登录 |
| 330 | - if(StringUtils.isNotEmpty(HttpUrlUtils.userId)){ | 361 | + if (StringUtils.isNotEmpty(HttpUrlUtils.userId)) { |
| 331 | return HttpUrlUtils.userId | 362 | return HttpUrlUtils.userId |
| 332 | } | 363 | } |
| 333 | - HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID,"") as string | 364 | + HttpUrlUtils.userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string |
| 334 | return HttpUrlUtils.userId; | 365 | return HttpUrlUtils.userId; |
| 335 | } | 366 | } |
| 336 | 367 | ||
| 337 | public static getUserType() { | 368 | public static getUserType() { |
| 338 | - if(StringUtils.isNotEmpty(HttpUrlUtils.userType)){ | 369 | + if (StringUtils.isNotEmpty(HttpUrlUtils.userType)) { |
| 339 | return HttpUrlUtils.userType | 370 | return HttpUrlUtils.userType |
| 340 | } | 371 | } |
| 341 | - HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | 372 | + HttpUrlUtils.userType = SPHelper.default.getSync(SpConstants.USER_Type, "") as string |
| 342 | return HttpUrlUtils.userType; | 373 | return HttpUrlUtils.userType; |
| 343 | } | 374 | } |
| 344 | 375 | ||
| 345 | static getVerifyCodeUrl() { | 376 | static getVerifyCodeUrl() { |
| 346 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode"; | 377 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCode"; |
| 347 | return url; | 378 | return url; |
| 348 | } | 379 | } |
| 349 | 380 | ||
| 350 | static getVerifyCodeByTokenUrl() { | 381 | static getVerifyCodeByTokenUrl() { |
| 351 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCodeByToken"; | 382 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/sendVerifyCodeByToken"; |
| 352 | return url; | 383 | return url; |
| 353 | } | 384 | } |
| 354 | 385 | ||
| 355 | 386 | ||
| 356 | static getForgetPasswordUrl() { | 387 | static getForgetPasswordUrl() { |
| 357 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/forgotPassword"; | 388 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/forgotPassword"; |
| 358 | return url; | 389 | return url; |
| 359 | } | 390 | } |
| 360 | 391 | ||
| 361 | static getLogoutUrl() { | 392 | static getLogoutUrl() { |
| 362 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/logout"; | 393 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/logout"; |
| 363 | return url; | 394 | return url; |
| 364 | } | 395 | } |
| 365 | 396 | ||
| 366 | 397 | ||
| 367 | static getResetPassworddUrl() { | 398 | static getResetPassworddUrl() { |
| 368 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; | 399 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/resetPassword"; |
| 369 | return url; | 400 | return url; |
| 370 | } | 401 | } |
| 371 | 402 | ||
| 372 | static queryUserDetail() { | 403 | static queryUserDetail() { |
| 373 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/queryUserDetail"; | 404 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/queryUserDetail"; |
| 374 | return url; | 405 | return url; |
| 375 | } | 406 | } |
| 376 | 407 | ||
| 377 | static editUserDetail() { | 408 | static editUserDetail() { |
| 378 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail"; | 409 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/editUserDetail"; |
| 379 | return url; | 410 | return url; |
| 380 | } | 411 | } |
| 381 | 412 | ||
| @@ -385,17 +416,17 @@ export class HttpUrlUtils { | @@ -385,17 +416,17 @@ export class HttpUrlUtils { | ||
| 385 | } | 416 | } |
| 386 | 417 | ||
| 387 | static getCheckVerifyCodeUrl() { | 418 | static getCheckVerifyCodeUrl() { |
| 388 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode"; | 419 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCode"; |
| 389 | return url; | 420 | return url; |
| 390 | } | 421 | } |
| 391 | 422 | ||
| 392 | static getCheckVerifyByTokenCodeUrl() { | 423 | static getCheckVerifyByTokenCodeUrl() { |
| 393 | - let url = HttpUrlUtils.hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCodeByToken"; | 424 | + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/auth/zh/c/checkVerifyCodeByToken"; |
| 394 | return url; | 425 | return url; |
| 395 | } | 426 | } |
| 396 | 427 | ||
| 397 | static getAppointmentListDataUrl() { | 428 | static getAppointmentListDataUrl() { |
| 398 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH | 429 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH |
| 399 | return url | 430 | return url |
| 400 | } | 431 | } |
| 401 | 432 | ||
| @@ -405,77 +436,77 @@ export class HttpUrlUtils { | @@ -405,77 +436,77 @@ export class HttpUrlUtils { | ||
| 405 | } | 436 | } |
| 406 | 437 | ||
| 407 | static getFollowListDetailDataUrl() { | 438 | static getFollowListDetailDataUrl() { |
| 408 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH | 439 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_DETAIL_DATA_PATH |
| 409 | return url | 440 | return url |
| 410 | } | 441 | } |
| 411 | 442 | ||
| 412 | static getFollowListDataUrl() { | 443 | static getFollowListDataUrl() { |
| 413 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH | 444 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_DATA_PATH |
| 414 | return url | 445 | return url |
| 415 | } | 446 | } |
| 416 | 447 | ||
| 417 | static getMineFollowListDataUrl() { | 448 | static getMineFollowListDataUrl() { |
| 418 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH | 449 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_FOLLOW_LIST_DATA_PATH |
| 419 | return url | 450 | return url |
| 420 | } | 451 | } |
| 421 | 452 | ||
| 422 | static getFollowListStatusDataUrl() { | 453 | static getFollowListStatusDataUrl() { |
| 423 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH | 454 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_LIST_STATUS_DATA_PATH |
| 424 | return url | 455 | return url |
| 425 | } | 456 | } |
| 426 | 457 | ||
| 427 | static getCommentListStatusDataUrl() { | 458 | static getCommentListStatusDataUrl() { |
| 428 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH | 459 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.COMMENT_LIST_STATUS_DATA_PATH |
| 429 | return url | 460 | return url |
| 430 | } | 461 | } |
| 431 | 462 | ||
| 432 | static getMineCommentListDataUrl() { | 463 | static getMineCommentListDataUrl() { |
| 433 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH | 464 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_COMMENT_LIST_DATA_PATH |
| 434 | return url | 465 | return url |
| 435 | } | 466 | } |
| 436 | 467 | ||
| 437 | static getMineUserLevelDataUrl() { | 468 | static getMineUserLevelDataUrl() { |
| 438 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH | 469 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_USER_LEVEL_DATA_PATH |
| 439 | return url | 470 | return url |
| 440 | } | 471 | } |
| 441 | 472 | ||
| 442 | static getOtherUserLevelDataUrl() { | 473 | static getOtherUserLevelDataUrl() { |
| 443 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH | 474 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_LEVEL_DATA_PATH |
| 444 | return url | 475 | return url |
| 445 | } | 476 | } |
| 446 | 477 | ||
| 447 | static getMineUserDetailDataUrl() { | 478 | static getMineUserDetailDataUrl() { |
| 448 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH | 479 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.MINE_USER_DETAIL_DATA_PATH |
| 449 | return url | 480 | return url |
| 450 | } | 481 | } |
| 451 | 482 | ||
| 452 | static getOtherUserDetailDataUrl() { | 483 | static getOtherUserDetailDataUrl() { |
| 453 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH | 484 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_DETAIL_DATA_PATH |
| 454 | return url | 485 | return url |
| 455 | } | 486 | } |
| 456 | 487 | ||
| 457 | static getOtherCommentListDataUrl() { | 488 | static getOtherCommentListDataUrl() { |
| 458 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH | 489 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_COMMENT_LIST_DATA_PATH |
| 459 | return url | 490 | return url |
| 460 | } | 491 | } |
| 461 | 492 | ||
| 462 | static getOtherUserFollowListDataUrl() { | 493 | static getOtherUserFollowListDataUrl() { |
| 463 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH | 494 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.OTHER_USER_FOLLOW_LIST_DATA_PATH |
| 464 | return url | 495 | return url |
| 465 | } | 496 | } |
| 466 | 497 | ||
| 467 | static getAppointmentOperationUrl() { | 498 | static getAppointmentOperationUrl() { |
| 468 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH | 499 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_OPERATION_STATUS_PATH |
| 469 | return url | 500 | return url |
| 470 | } | 501 | } |
| 471 | 502 | ||
| 472 | static getCommentLikeOperationUrl() { | 503 | static getCommentLikeOperationUrl() { |
| 473 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH | 504 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.COMMENT_LIKE_OPERATION_PATH |
| 474 | return url | 505 | return url |
| 475 | } | 506 | } |
| 476 | 507 | ||
| 477 | static getFollowOperationUrl() { | 508 | static getFollowOperationUrl() { |
| 478 | - let url = HttpUrlUtils.hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH | 509 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.FOLLOW_OPERATION_PATH |
| 479 | return url | 510 | return url |
| 480 | } | 511 | } |
| 481 | 512 |
| @@ -73,6 +73,8 @@ export function registerRouter() { | @@ -73,6 +73,8 @@ export function registerRouter() { | ||
| 73 | return WDRouterPage.morningEveningPaperPage | 73 | return WDRouterPage.morningEveningPaperPage |
| 74 | } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") { | 74 | } else if (action.params?.pageID == "IMAGE_TEXT_DETAIL") { |
| 75 | return WDRouterPage.imageTextDetailPage | 75 | return WDRouterPage.imageTextDetailPage |
| 76 | + } else if (action.params?.pageID == "BroadcastPage") { | ||
| 77 | + return WDRouterPage.broadcastPage | ||
| 76 | } | 78 | } |
| 77 | return undefined | 79 | return undefined |
| 78 | }) | 80 | }) |
| @@ -83,4 +83,7 @@ export class WDRouterPage { | @@ -83,4 +83,7 @@ export class WDRouterPage { | ||
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); | 85 | // static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); |
| 86 | + | ||
| 87 | + //播报页面 | ||
| 88 | + static broadcastPage = new WDRouterPage("phone", "ets/pages/broadcast/BroadcastPage"); | ||
| 86 | } | 89 | } |
| @@ -23,7 +23,19 @@ export { Pic } from './src/main/ets/bean/content/Pic' | @@ -23,7 +23,19 @@ export { Pic } from './src/main/ets/bean/content/Pic' | ||
| 23 | 23 | ||
| 24 | export { InteractDataDTO } from './src/main/ets/bean/content/InteractDataDTO'; | 24 | export { InteractDataDTO } from './src/main/ets/bean/content/InteractDataDTO'; |
| 25 | 25 | ||
| 26 | -export { InteractDataStatusBean, PhotoListBean } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; | 26 | +export { |
| 27 | + PhotoListBean, | ||
| 28 | + InputMethodProperty, | ||
| 29 | + batchLikeAndCollectParams, | ||
| 30 | + postBatchAttentionStatusParams, | ||
| 31 | + postInteractBrowsOperateParams, | ||
| 32 | + postBatchAttentionStatusResult, | ||
| 33 | + batchLikeAndCollectResult, | ||
| 34 | + postExecuteLikeParams, | ||
| 35 | + postExecuteCollectRecordParams, | ||
| 36 | + contentListParams, | ||
| 37 | + postInteractAccentionOperateParams | ||
| 38 | +} from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; | ||
| 27 | 39 | ||
| 28 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; | 40 | export { InteractParam, ContentBean } from './src/main/ets/bean/content/InteractParam'; |
| 29 | 41 |
| @@ -28,5 +28,6 @@ export interface CompDTO { | @@ -28,5 +28,6 @@ export interface CompDTO { | ||
| 28 | sortValue: number; | 28 | sortValue: number; |
| 29 | subType: string; | 29 | subType: string; |
| 30 | imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2 | 30 | imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2 |
| 31 | - audioDataList: AudioDTO[] | 31 | + audioDataList: AudioDTO[]; |
| 32 | + isSelect: boolean; | ||
| 32 | } | 33 | } |
| @@ -2,11 +2,11 @@ | @@ -2,11 +2,11 @@ | ||
| 2 | * 批查接口查询互动相关数据,返回数据bean | 2 | * 批查接口查询互动相关数据,返回数据bean |
| 3 | */ | 3 | */ |
| 4 | export interface InteractDataDTO { | 4 | export interface InteractDataDTO { |
| 5 | - collectNum: number; | ||
| 6 | - commentNum: number; | 5 | + collectNum: number | String; |
| 6 | + commentNum: number | String; | ||
| 7 | contentId: string; | 7 | contentId: string; |
| 8 | contentType: number; | 8 | contentType: number; |
| 9 | - likeNum: number; | 9 | + likeNum: number | String; |
| 10 | readNum: number; | 10 | readNum: number; |
| 11 | shareNum: number; | 11 | shareNum: number; |
| 12 | } | 12 | } |
| 1 | /* | 1 | /* |
| 2 | * 多图(图集)详情 | 2 | * 多图(图集)详情 |
| 3 | * */ | 3 | * */ |
| 4 | -// 批量查询内容当前用户点赞、收藏状态 | ||
| 5 | -export interface InteractDataStatusBean { | ||
| 6 | - contentId: string; | ||
| 7 | - contentType: number; | ||
| 8 | - contentRelId: string; | ||
| 9 | - relType: number; | ||
| 10 | - likeStatus: number; | ||
| 11 | - collectStatus: number; | ||
| 12 | -} | ||
| 13 | 4 | ||
| 14 | // 【图文、图集稿件正文图片】图片信息数组 | 5 | // 【图文、图集稿件正文图片】图片信息数组 |
| 15 | export interface PhotoListBean { | 6 | export interface PhotoListBean { |
| @@ -18,3 +9,172 @@ export interface PhotoListBean { | @@ -18,3 +9,172 @@ export interface PhotoListBean { | ||
| 18 | picPath: string; | 9 | picPath: string; |
| 19 | picDesc: string; | 10 | picDesc: string; |
| 20 | } | 11 | } |
| 12 | + | ||
| 13 | +export interface InputMethodProperty { | ||
| 14 | + /** | ||
| 15 | + * The name of input method | ||
| 16 | + * | ||
| 17 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 18 | + * @since 8 | ||
| 19 | + * @deprecated since 9 | ||
| 20 | + * @useinstead inputMethod.InputMethodProperty#name | ||
| 21 | + */ | ||
| 22 | + readonly packageName: string; | ||
| 23 | + /** | ||
| 24 | + * The id of input method | ||
| 25 | + * | ||
| 26 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 27 | + * @since 8 | ||
| 28 | + * @deprecated since 9 | ||
| 29 | + * @useinstead inputMethod.InputMethodProperty#id | ||
| 30 | + */ | ||
| 31 | + readonly methodId: string; | ||
| 32 | + /** | ||
| 33 | + * The name of input method | ||
| 34 | + * | ||
| 35 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 36 | + * @since 9 | ||
| 37 | + */ | ||
| 38 | + readonly name: string; | ||
| 39 | + /** | ||
| 40 | + * The id of input method | ||
| 41 | + * | ||
| 42 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 43 | + * @since 9 | ||
| 44 | + */ | ||
| 45 | + readonly id: string; | ||
| 46 | + /** | ||
| 47 | + * The label of input method | ||
| 48 | + * | ||
| 49 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 50 | + * @since 9 | ||
| 51 | + */ | ||
| 52 | + readonly label?: string; | ||
| 53 | + /** | ||
| 54 | + * The label id of input method | ||
| 55 | + * | ||
| 56 | + * @type { ?number } | ||
| 57 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 58 | + * @since 10 | ||
| 59 | + */ | ||
| 60 | + readonly labelId?: number; | ||
| 61 | + /** | ||
| 62 | + * The icon of input method | ||
| 63 | + * | ||
| 64 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 65 | + * @since 9 | ||
| 66 | + */ | ||
| 67 | + readonly icon?: string; | ||
| 68 | + /** | ||
| 69 | + * The icon id of input method | ||
| 70 | + * | ||
| 71 | + * @type { ?number } | ||
| 72 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 73 | + * @since 9 | ||
| 74 | + */ | ||
| 75 | + readonly iconId?: number; | ||
| 76 | + /** | ||
| 77 | + * The extra info of input method | ||
| 78 | + * | ||
| 79 | + * @type { object } | ||
| 80 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 81 | + * @since 9 | ||
| 82 | + */ | ||
| 83 | + /** | ||
| 84 | + * The extra info of input method | ||
| 85 | + * | ||
| 86 | + * @type { ?object } | ||
| 87 | + * @syscap SystemCapability.MiscServices.InputMethodFramework | ||
| 88 | + * @since 10 | ||
| 89 | + */ | ||
| 90 | + extra?: object; | ||
| 91 | +} | ||
| 92 | + | ||
| 93 | +export interface IStatusContentList { | ||
| 94 | + contentId: string; | ||
| 95 | + | ||
| 96 | + // relType: string; | ||
| 97 | + contentType: string; | ||
| 98 | + // contentRelId: string; | ||
| 99 | +} | ||
| 100 | +export interface batchLikeAndCollectParams { | ||
| 101 | + // userType: number; | ||
| 102 | + // userId: string; | ||
| 103 | + contentList: IStatusContentList[] | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +export interface postBatchAttentionStatusParamsItem { | ||
| 107 | + creatorId: string; | ||
| 108 | +} | ||
| 109 | + | ||
| 110 | +export interface postBatchAttentionStatusParams { | ||
| 111 | + creatorIds: postBatchAttentionStatusParamsItem[] | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +export interface postInteractBrowsOperateParamsContent { | ||
| 115 | + browseTime: string; | ||
| 116 | + contentId: string; | ||
| 117 | + contentType: number; | ||
| 118 | +} | ||
| 119 | + | ||
| 120 | +export interface postInteractBrowsOperateParams { | ||
| 121 | + delStatus: number; | ||
| 122 | + contentList: postInteractBrowsOperateParamsContent[] | ||
| 123 | +} | ||
| 124 | + | ||
| 125 | +export interface postBatchAttentionStatusResult { | ||
| 126 | + creatorId: string; | ||
| 127 | + status: string; | ||
| 128 | + userId: string; | ||
| 129 | +} | ||
| 130 | + | ||
| 131 | +export interface batchLikeAndCollectResult { | ||
| 132 | + collectStatus: number; | ||
| 133 | + contentType: string; | ||
| 134 | + likeStatus: string; | ||
| 135 | + relType: string; | ||
| 136 | + contentId: string; | ||
| 137 | + contentRelId: string; | ||
| 138 | +} | ||
| 139 | + | ||
| 140 | +export interface postExecuteLikeParams { | ||
| 141 | + status: string; | ||
| 142 | + contentId: string; | ||
| 143 | + contentType: string; | ||
| 144 | + relType?: string; | ||
| 145 | + userName?: string; | ||
| 146 | + title?: string; | ||
| 147 | + contentRelId?: string; | ||
| 148 | + userHeaderUrl?: string; | ||
| 149 | + channelId?: string; | ||
| 150 | +} | ||
| 151 | +export interface postExecuteCollectRecordParamsItem { | ||
| 152 | + contentId: string; | ||
| 153 | + contentType: string; | ||
| 154 | + relType?: string; | ||
| 155 | + contentRelId?: string; | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +export interface postExecuteCollectRecordParams { | ||
| 159 | + status: string; | ||
| 160 | + contentList: postExecuteCollectRecordParamsItem[] | ||
| 161 | +} | ||
| 162 | + | ||
| 163 | +interface contentListItem { | ||
| 164 | + contentId: string; | ||
| 165 | + contentType: number; | ||
| 166 | +} | ||
| 167 | + | ||
| 168 | +export interface contentListParams { | ||
| 169 | + contentList: contentListItem[]; | ||
| 170 | +} | ||
| 171 | + | ||
| 172 | +export interface postInteractAccentionOperateParams { | ||
| 173 | + attentionUserType: string; | ||
| 174 | + attentionUserId: string; | ||
| 175 | + attentionCreatorId: string; | ||
| 176 | + | ||
| 177 | + // userType: number; | ||
| 178 | + // userId: string; | ||
| 179 | + status: number; | ||
| 180 | +} |
| 1 | import { Group } from './Group'; | 1 | import { Group } from './Group'; |
| 2 | import { TopicInfo } from './TopicInfo'; | 2 | import { TopicInfo } from './TopicInfo'; |
| 3 | - | 3 | +import { ChannelInfo } from './ChannelInfo' |
| 4 | export interface PageInfoBean { | 4 | export interface PageInfoBean { |
| 5 | backIconUrl: string; | 5 | backIconUrl: string; |
| 6 | backgroundColor: string; | 6 | backgroundColor: string; |
| @@ -8,7 +8,7 @@ export interface PageInfoBean { | @@ -8,7 +8,7 @@ export interface PageInfoBean { | ||
| 8 | baselineColor: string; | 8 | baselineColor: string; |
| 9 | baselineCopywriting: string; | 9 | baselineCopywriting: string; |
| 10 | baselineShow: number; | 10 | baselineShow: number; |
| 11 | - // channelInfo?: any; | 11 | + channelInfo?: ChannelInfo; |
| 12 | // cornersAdv?: any; | 12 | // cornersAdv?: any; |
| 13 | // cornersAdv2: any[]; | 13 | // cornersAdv2: any[]; |
| 14 | description: string; | 14 | description: string; |
| @@ -53,3 +53,8 @@ export { HeadPictureCardComponent } from "./src/main/ets/components/view/HeadPic | @@ -53,3 +53,8 @@ export { HeadPictureCardComponent } from "./src/main/ets/components/view/HeadPic | ||
| 53 | export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayoutComponent" | 53 | export { ZhGridLayoutComponent } from "./src/main/ets/components/view/ZhGridLayoutComponent" |
| 54 | 54 | ||
| 55 | export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent" | 55 | export { MultiPictureDetailPageComponent } from "./src/main/ets/components/MultiPictureDetailPageComponent" |
| 56 | + | ||
| 57 | +export { AudioDetailComponent } from "./src/main/ets/components/AudioDetailComponent" | ||
| 58 | + | ||
| 59 | +export { BroadcastPageComponent } from "./src/main/ets/components/broadcast/BroadcastPageComponent" | ||
| 60 | + |
| 1 | +import { Logger } from 'wdKit'; | ||
| 2 | +import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | ||
| 3 | +import { ContentDetailDTO } from 'wdBean'; | ||
| 4 | +import media from '@ohos.multimedia.media'; | ||
| 5 | +import { OperRowListView } from './view/OperRowListView'; | ||
| 6 | +import { WDPlayerController } from 'wdPlayer/Index'; | ||
| 7 | + | ||
| 8 | +const TAG = 'AudioDetailComponent' | ||
| 9 | +interface Arr{ | ||
| 10 | + image:string, | ||
| 11 | + title:string | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +@Component | ||
| 15 | +export struct AudioDetailComponent { | ||
| 16 | + private relId: string = '' | ||
| 17 | + private contentId: string = '' | ||
| 18 | + private relType: string = '' | ||
| 19 | + private avPlayer?: media.AVPlayer; | ||
| 20 | + @State playerController: WDPlayerController = new WDPlayerController(); | ||
| 21 | + | ||
| 22 | + private arr:Arr[]=[ | ||
| 23 | + {image:'clock',title:'定时'}, | ||
| 24 | + {image:'theOriginal',title:'原文'}, | ||
| 25 | + {image:'list',title:'列表'}, | ||
| 26 | + ] | ||
| 27 | + | ||
| 28 | + @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[]//详情 | ||
| 29 | + @State coverImage:string = '' //封面图 | ||
| 30 | + @State newsTitle:string = '' //标题 | ||
| 31 | + @State audioUrl:string = '' //音频路径 | ||
| 32 | + @State duration:number = 0 //时长 | ||
| 33 | + @State outSetValueOne:number = 40 //播放进度 | ||
| 34 | + | ||
| 35 | + @State isPlay: boolean = false | ||
| 36 | + async aboutToAppear() { | ||
| 37 | + await this.getContentDetailData() | ||
| 38 | + this.playerController.firstPlay(this.audioUrl); | ||
| 39 | + this.playerController.onCanplay = () => { | ||
| 40 | + this.playerController.play() | ||
| 41 | + this.isPlay = true | ||
| 42 | + } | ||
| 43 | + this.playerController.onTimeUpdate = (nowSeconds, totalSeconds) =>{ | ||
| 44 | + console.log('现在时间',nowSeconds) | ||
| 45 | + console.log('总时间',totalSeconds) | ||
| 46 | + this.outSetValueOne = nowSeconds | ||
| 47 | + this.duration = totalSeconds | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + onPageHide() { | ||
| 51 | + this.playerController?.pause(); | ||
| 52 | + } | ||
| 53 | + build() { | ||
| 54 | + Row() { | ||
| 55 | + Column() { | ||
| 56 | + // 封面 | ||
| 57 | + Row() { | ||
| 58 | + Image(this.coverImage) | ||
| 59 | + .width(240) | ||
| 60 | + .height(160) | ||
| 61 | + .borderRadius('0') | ||
| 62 | + } | ||
| 63 | + .justifyContent(FlexAlign.Center) | ||
| 64 | + .width('100%') | ||
| 65 | + .margin({ top: 64 }) | ||
| 66 | + // 标题 | ||
| 67 | + Row() { | ||
| 68 | + Text(this.newsTitle) | ||
| 69 | + .fontSize(20) | ||
| 70 | + .fontWeight(FontWeight.Bold) | ||
| 71 | + .fontColor('#ffffff') | ||
| 72 | + .textAlign(TextAlign.Center) | ||
| 73 | + .lineHeight(28) | ||
| 74 | + .fontFamily('PingFang SC, PingFang SC') | ||
| 75 | + } | ||
| 76 | + .padding({ left: 34, right: 34 }) | ||
| 77 | + .margin({ top: 32 }) | ||
| 78 | + // 操作矩阵 | ||
| 79 | + Row() { | ||
| 80 | + ForEach(this.arr,(item:Arr)=>{ | ||
| 81 | + Column() { | ||
| 82 | + Image(item.image=='clock'?$r('app.media.clock_close'):item.image=='theOriginal'?$r('app.media.theOriginal_close'):item.image=='list'?$r('app.media.list_close'):'') | ||
| 83 | + .width(28) | ||
| 84 | + .height(28) | ||
| 85 | + Text(item.title) | ||
| 86 | + .fontColor('#4D5258') | ||
| 87 | + .fontSize(12) | ||
| 88 | + .lineHeight(16) | ||
| 89 | + .margin(2) | ||
| 90 | + } | ||
| 91 | + }) | ||
| 92 | + | ||
| 93 | + } | ||
| 94 | + .width('100%') | ||
| 95 | + .padding({ left: 49, right: 49 }) | ||
| 96 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 97 | + .margin({ top: 60 }) | ||
| 98 | + | ||
| 99 | + Column(){ | ||
| 100 | + // 进度条 | ||
| 101 | + Row(){ | ||
| 102 | + Slider({ | ||
| 103 | + value: this.outSetValueOne, | ||
| 104 | + step: 1 | ||
| 105 | + }) | ||
| 106 | + .showTips(true) | ||
| 107 | + .trackColor('rgba(0,0,0,0.5)') | ||
| 108 | + .selectedColor('#ED2800') | ||
| 109 | + .onChange((value: number, mode: SliderChangeMode) => { | ||
| 110 | + console.log('滑块长度',value) | ||
| 111 | + this.playerController?.setSeekTime(value, mode); | ||
| 112 | + }) | ||
| 113 | + } | ||
| 114 | + .width('100%') | ||
| 115 | + .padding({left:24,right:24}) | ||
| 116 | + .margin({top:110}) | ||
| 117 | + // 播放按钮 | ||
| 118 | + Row(){ | ||
| 119 | + Column(){ | ||
| 120 | + Image($r('app.media.loop_close')) | ||
| 121 | + .width(24) | ||
| 122 | + .height(24) | ||
| 123 | + Text('循环') | ||
| 124 | + .fontColor('#4D5258') | ||
| 125 | + .fontSize(12) | ||
| 126 | + .lineHeight(16) | ||
| 127 | + .margin(2) | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + Image($r('app.media.Backward_close')) | ||
| 131 | + .width(24) | ||
| 132 | + .height(24) | ||
| 133 | + Stack({ alignContent: Alignment.Center }){ | ||
| 134 | + Image(this.isPlay?$r('app.media.suspend'):$r('app.media.playicon')) | ||
| 135 | + .width(32) | ||
| 136 | + .height(32) | ||
| 137 | + } | ||
| 138 | + .padding(28) | ||
| 139 | + .backgroundColor('#4D5258') | ||
| 140 | + .borderRadius(50) | ||
| 141 | + .onClick(()=>{ | ||
| 142 | + if(this.isPlay){ | ||
| 143 | + this.playerController.pause() | ||
| 144 | + }else{ | ||
| 145 | + this.playerController.play() | ||
| 146 | + } | ||
| 147 | + this.isPlay = !this.isPlay | ||
| 148 | + }) | ||
| 149 | + Image($r('app.media.fastForward_close')) | ||
| 150 | + .width(24) | ||
| 151 | + .height(24) | ||
| 152 | + Column(){ | ||
| 153 | + Image($r('app.media.doubleSpeed_close')) | ||
| 154 | + .width(24) | ||
| 155 | + .height(24) | ||
| 156 | + Text('倍速') | ||
| 157 | + .fontColor('#4D5258') | ||
| 158 | + .fontSize(12) | ||
| 159 | + .lineHeight(16) | ||
| 160 | + .margin(2) | ||
| 161 | + } | ||
| 162 | + } | ||
| 163 | + .width('100%') | ||
| 164 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 165 | + .margin({top:56}) | ||
| 166 | + .padding({left:32,right:32}) | ||
| 167 | + } | ||
| 168 | + .layoutWeight(1) | ||
| 169 | + OperRowListView() | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + } | ||
| 174 | + private async getContentDetailData() { | ||
| 175 | + try { | ||
| 176 | + let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) | ||
| 177 | + this.contentDetailData = data; | ||
| 178 | + console.log('音乐详情',JSON.stringify(this.contentDetailData)) | ||
| 179 | + this.newsTitle = this.contentDetailData[0].newsTitle | ||
| 180 | + console.log('标题',JSON.stringify(this.newsTitle)) | ||
| 181 | + this.coverImage = this.contentDetailData[0].fullColumnImgUrls[0].url | ||
| 182 | + console.log('封面图',JSON.stringify(this.coverImage)) | ||
| 183 | + this.duration = this.contentDetailData[0].audioList[0].duration | ||
| 184 | + console.log('音频时长',JSON.stringify(this.duration)) | ||
| 185 | + this.audioUrl = this.contentDetailData[0].audioList[0].audioUrl | ||
| 186 | + console.log('音频时长',JSON.stringify(this.audioUrl)) | ||
| 187 | + } catch (exception) { | ||
| 188 | + console.log('请求失败',JSON.stringify(exception)) | ||
| 189 | + } | ||
| 190 | + } | ||
| 191 | +} |
| @@ -229,6 +229,7 @@ export struct MorningEveningPaperComponent { | @@ -229,6 +229,7 @@ export struct MorningEveningPaperComponent { | ||
| 229 | // console.info(TAG, `onClick listen_right_bg`); | 229 | // console.info(TAG, `onClick listen_right_bg`); |
| 230 | }) | 230 | }) |
| 231 | } | 231 | } |
| 232 | + .margin({ left: 12, right: 12 }) | ||
| 232 | // .width('100%') | 233 | // .width('100%') |
| 233 | .height(56) | 234 | .height(56) |
| 234 | .alignItems(VerticalAlign.Center) | 235 | .alignItems(VerticalAlign.Center) |
| @@ -33,17 +33,20 @@ export struct topicInfoView { | @@ -33,17 +33,20 @@ export struct topicInfoView { | ||
| 33 | 33 | ||
| 34 | Row() { | 34 | Row() { |
| 35 | Text("查看详情") | 35 | Text("查看详情") |
| 36 | - .fontSize(16) | 36 | + .fontSize(14) |
| 37 | .fontColor($r('app.color.white')) | 37 | .fontColor($r('app.color.white')) |
| 38 | .maxLines(1) | 38 | .maxLines(1) |
| 39 | - .backgroundColor($r('app.color.color_99636363')) | ||
| 40 | .borderRadius(2) | 39 | .borderRadius(2) |
| 40 | + .padding({ left: 6, top: 4, bottom: 4 }) | ||
| 41 | 41 | ||
| 42 | - Image($r('app.media.more')) | ||
| 43 | - .height($r('app.float.top_arrow_size')) | ||
| 44 | - .width(20) | 42 | + Image($r('app.media.more'))// .height($r('app.float.top_arrow_size')) |
| 43 | + .width(12) | ||
| 44 | + .height(12) | ||
| 45 | + .margin({ left: 4, right: 7 }) | ||
| 45 | } | 46 | } |
| 46 | - .margin({ top: 10, left: 16, right: 16 }) | 47 | + .backgroundColor($r('app.color.color_99636363')) |
| 48 | + .margin({ top: 8, left: 16, right: 16, bottom: 16 }) | ||
| 49 | + .borderRadius(2) | ||
| 47 | // .backgroundColor(Color.Red) | 50 | // .backgroundColor(Color.Red) |
| 48 | .alignRules({ | 51 | .alignRules({ |
| 49 | left: { anchor: "__container__", align: HorizontalAlign.Start }, | 52 | left: { anchor: "__container__", align: HorizontalAlign.Start }, |
| @@ -61,6 +64,7 @@ export struct topicInfoView { | @@ -61,6 +64,7 @@ export struct topicInfoView { | ||
| 61 | left: { anchor: "__container__", align: HorizontalAlign.Start }, | 64 | left: { anchor: "__container__", align: HorizontalAlign.Start }, |
| 62 | bottom: { anchor: "row_detail", align: VerticalAlign.Top } | 65 | bottom: { anchor: "row_detail", align: VerticalAlign.Top } |
| 63 | }) | 66 | }) |
| 67 | + .margin({ left: 16, right: 16 }) | ||
| 64 | .id('txt_summary') | 68 | .id('txt_summary') |
| 65 | 69 | ||
| 66 | Text(this.frontLinkObject?.title ?? "") | 70 | Text(this.frontLinkObject?.title ?? "") |
| @@ -71,6 +75,7 @@ export struct topicInfoView { | @@ -71,6 +75,7 @@ export struct topicInfoView { | ||
| 71 | left: { anchor: "__container__", align: HorizontalAlign.Start }, | 75 | left: { anchor: "__container__", align: HorizontalAlign.Start }, |
| 72 | bottom: { anchor: "txt_summary", align: VerticalAlign.Top } | 76 | bottom: { anchor: "txt_summary", align: VerticalAlign.Top } |
| 73 | }) | 77 | }) |
| 78 | + .margin({ left: 16, right: 16, bottom: 8 }) | ||
| 74 | .id('txt_title') | 79 | .id('txt_title') |
| 75 | } | 80 | } |
| 76 | .width("100%") | 81 | .width("100%") |
| @@ -5,9 +5,6 @@ const TAG = 'MultiPictureDetailPageComponent'; | @@ -5,9 +5,6 @@ const TAG = 'MultiPictureDetailPageComponent'; | ||
| 5 | 5 | ||
| 6 | @Component | 6 | @Component |
| 7 | export struct MultiPictureDetailItemComponent { | 7 | export struct MultiPictureDetailItemComponent { |
| 8 | - private photoListLength: number = 1; | ||
| 9 | - private index: number = 1; | ||
| 10 | - private newsTitle: string = ''; | ||
| 11 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean | 8 | private MultiPictureDetailItem: PhotoListBean = {} as PhotoListBean |
| 12 | 9 | ||
| 13 | 10 | ||
| @@ -23,49 +20,11 @@ export struct MultiPictureDetailItemComponent { | @@ -23,49 +20,11 @@ export struct MultiPictureDetailItemComponent { | ||
| 23 | .width('100%') | 20 | .width('100%') |
| 24 | .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) | 21 | .aspectRatio(this.MultiPictureDetailItem.width / this.MultiPictureDetailItem.height) |
| 25 | .objectFit(ImageFit.Fill) | 22 | .objectFit(ImageFit.Fill) |
| 23 | + .interpolation(ImageInterpolation.High) | ||
| 26 | } | 24 | } |
| 27 | .height('100%') | 25 | .height('100%') |
| 28 | .width('100%') | 26 | .width('100%') |
| 29 | 27 | ||
| 30 | - | ||
| 31 | - Row() { | ||
| 32 | - Flex({ | ||
| 33 | - direction: FlexDirection.Column, | ||
| 34 | - justifyContent: FlexAlign.Start | ||
| 35 | - }) { | ||
| 36 | - Text() { | ||
| 37 | - Span(`${this.index + 1}`).fontSize(24).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(28) | ||
| 38 | - Span(`/${this.photoListLength}`).fontSize(14).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(19) | ||
| 39 | - }.fontColor(Color.White).margin(4) | ||
| 40 | - | ||
| 41 | - Text(`${this.newsTitle}`).fontColor(Color.White).fontSize(16).fontFamily('PingFang SC-Semibold') | ||
| 42 | - .fontWeight(600).lineHeight(24) | ||
| 43 | - .margin ({ | ||
| 44 | - top: 4, | ||
| 45 | - left: 0, | ||
| 46 | - bottom: 4, | ||
| 47 | - right: 0 | ||
| 48 | - }) | ||
| 49 | - Text(`${this.MultiPictureDetailItem.picDesc}`).fontColor(Color.White) | ||
| 50 | - .fontSize(14).fontFamily('PingFang SC-Regular').fontWeight(400).lineHeight(22) | ||
| 51 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 52 | - .margin ({ | ||
| 53 | - top: 4, | ||
| 54 | - left: 0, | ||
| 55 | - bottom: 4, | ||
| 56 | - right: 18 | ||
| 57 | - }) | ||
| 58 | - } | ||
| 59 | - } | ||
| 60 | - .width('100%') | ||
| 61 | - .height(178) | ||
| 62 | - .margin ({ | ||
| 63 | - top: 8, | ||
| 64 | - left: 18, | ||
| 65 | - bottom: 8, | ||
| 66 | - right: 18 | ||
| 67 | - }) | ||
| 68 | - | ||
| 69 | } | 28 | } |
| 70 | .backgroundColor(Color.Black) | 29 | .backgroundColor(Color.Black) |
| 71 | .width('100%') | 30 | .width('100%') |
| 1 | import { Logger } from 'wdKit'; | 1 | import { Logger } from 'wdKit'; |
| 2 | -import { ContentDetailDTO, PhotoListBean } from 'wdBean'; | 2 | +import { |
| 3 | + ContentDetailDTO, | ||
| 4 | + PhotoListBean, | ||
| 5 | + postInteractBrowsOperateParams, | ||
| 6 | + postBatchAttentionStatusParams, | ||
| 7 | + postInteractAccentionOperateParams | ||
| 8 | +} from 'wdBean'; | ||
| 3 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 9 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| 4 | import display from '@ohos.display'; | 10 | import display from '@ohos.display'; |
| 5 | import font from '@ohos.font'; | 11 | import font from '@ohos.font'; |
| 6 | import { OperRowListView } from './view/OperRowListView'; | 12 | import { OperRowListView } from './view/OperRowListView'; |
| 7 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; | 13 | import { MultiPictureDetailItemComponent } from './MultiPictureDetailItemComponent'; |
| 14 | +import { DateTimeUtils } from 'wdKit/Index'; | ||
| 15 | +import { HttpUrlUtils } from 'wdNetwork/Index'; | ||
| 16 | +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | ||
| 17 | +import { PageRepository } from '../repository/PageRepository'; | ||
| 8 | 18 | ||
| 9 | const TAG = 'MultiPictureDetailPageComponent'; | 19 | const TAG = 'MultiPictureDetailPageComponent'; |
| 10 | 20 | ||
| @@ -17,10 +27,11 @@ export struct MultiPictureDetailPageComponent { | @@ -17,10 +27,11 @@ export struct MultiPictureDetailPageComponent { | ||
| 17 | private screenWidth: number = 0 | 27 | private screenWidth: number = 0 |
| 18 | private picWidth: number = 0 | 28 | private picWidth: number = 0 |
| 19 | @State picHeight: number = 0 | 29 | @State picHeight: number = 0 |
| 20 | - @State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[] | 30 | + @State contentDetailData: ContentDetailDTO = {} as ContentDetailDTO |
| 21 | @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' | 31 | @Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01' |
| 22 | private swiperController: SwiperController = new SwiperController() | 32 | private swiperController: SwiperController = new SwiperController() |
| 23 | @State swiperIndex: number = 0; | 33 | @State swiperIndex: number = 0; |
| 34 | + @Provide followStatus: string = '0' // 关注状态 | ||
| 24 | 35 | ||
| 25 | //watch监听页码回调 | 36 | //watch监听页码回调 |
| 26 | onCurrentPageNumUpdated(): void { | 37 | onCurrentPageNumUpdated(): void { |
| @@ -43,6 +54,10 @@ export struct MultiPictureDetailPageComponent { | @@ -43,6 +54,10 @@ export struct MultiPictureDetailPageComponent { | ||
| 43 | familySrc: $rawfile('font/BebasNeue_Regular.otf') | 54 | familySrc: $rawfile('font/BebasNeue_Regular.otf') |
| 44 | }) | 55 | }) |
| 45 | this.getContentDetailData() | 56 | this.getContentDetailData() |
| 57 | + if (HttpUrlUtils.getUserId()) { | ||
| 58 | + this.getInteractBrowsOperate() | ||
| 59 | + this.getBatchAttentionStatus() | ||
| 60 | + } | ||
| 46 | } | 61 | } |
| 47 | 62 | ||
| 48 | aboutToDisappear() { | 63 | aboutToDisappear() { |
| @@ -51,10 +66,10 @@ export struct MultiPictureDetailPageComponent { | @@ -51,10 +66,10 @@ export struct MultiPictureDetailPageComponent { | ||
| 51 | 66 | ||
| 52 | build() { | 67 | build() { |
| 53 | RelativeContainer() { | 68 | RelativeContainer() { |
| 54 | - if (this.contentDetailData && this.contentDetailData.length > 0 && this.contentDetailData[0].photoList && this.contentDetailData[0].photoList?.length > 0) { | 69 | + if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) { |
| 55 | Swiper(this.swiperController) { | 70 | Swiper(this.swiperController) { |
| 56 | - ForEach(this.contentDetailData[0].photoList, (item: PhotoListBean, index: number) => { | ||
| 57 | - MultiPictureDetailItemComponent({ photoListLength: this.contentDetailData[0].photoList?.length , index: index, newsTitle: this.contentDetailData[0].newsTitle, MultiPictureDetailItem: item }) | 71 | + ForEach(this.contentDetailData.photoList, (item: PhotoListBean) => { |
| 72 | + MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) | ||
| 58 | }) | 73 | }) |
| 59 | } | 74 | } |
| 60 | .index(this.swiperIndex) | 75 | .index(this.swiperIndex) |
| @@ -73,17 +88,141 @@ export struct MultiPictureDetailPageComponent { | @@ -73,17 +88,141 @@ export struct MultiPictureDetailPageComponent { | ||
| 73 | .onChange((index: number) => { | 88 | .onChange((index: number) => { |
| 74 | this.swiperIndex = index | 89 | this.swiperIndex = index |
| 75 | }) | 90 | }) |
| 91 | + if(this.contentDetailData.rmhPlatform == 1) { | ||
| 92 | + Row() { | ||
| 93 | + Row(){ | ||
| 94 | + Row({space: 8}) { | ||
| 95 | + Image(this.contentDetailData?.rmhInfo?.rmhHeadUrl) | ||
| 96 | + .borderRadius('50%') | ||
| 97 | + .alt($r('app.media.picture_loading')) | ||
| 98 | + .width(36) | ||
| 99 | + .height(36) | ||
| 100 | + .objectFit(ImageFit.Fill) | ||
| 101 | + .interpolation(ImageInterpolation.High) | ||
| 102 | + } | ||
| 103 | + .width('13%') | ||
| 104 | + .height('100%') | ||
| 105 | + Row() { | ||
| 106 | + Flex({ | ||
| 107 | + direction: FlexDirection.Column, | ||
| 108 | + justifyContent: FlexAlign.Start | ||
| 109 | + }) { | ||
| 110 | + Text(`${this.contentDetailData?.rmhInfo?.rmhName}`) | ||
| 111 | + .fontColor(Color.White) | ||
| 112 | + .fontSize(14) | ||
| 113 | + .fontFamily('PingFang PingFang SC-Medium') | ||
| 114 | + .fontWeight(500) | ||
| 115 | + .lineHeight(17) | ||
| 116 | + .margin(0) | ||
| 117 | + Text(`${this.contentDetailData?.rmhInfo?.rmhDesc}`) | ||
| 118 | + .fontColor('#676767') | ||
| 119 | + .fontSize(12) | ||
| 120 | + .fontFamily('PingFang SC-Regular') | ||
| 121 | + .fontWeight(400) | ||
| 122 | + .lineHeight(14) | ||
| 123 | + .textOverflow({ overflow: TextOverflow.Clip }) | ||
| 124 | + .margin (0) | ||
| 125 | + } | ||
| 126 | + } | ||
| 127 | + .width('81%') | ||
| 128 | + .height('100%') | ||
| 129 | + } | ||
| 130 | + .width('74.4%') | ||
| 131 | + .height('100%') | ||
| 132 | + .margin({ | ||
| 133 | + top: 0, | ||
| 134 | + bottom: 0, | ||
| 135 | + left: 16, | ||
| 136 | + right:0 | ||
| 137 | + }) | ||
| 138 | + if(this.followStatus == '0') { | ||
| 139 | + Row(){ | ||
| 140 | + Button('+关注', { type: ButtonType.Normal, stateEffect: true }) | ||
| 141 | + .borderRadius(4) | ||
| 142 | + .backgroundColor('#ED2800') | ||
| 143 | + .width(48) | ||
| 144 | + .height(24) | ||
| 145 | + .onClick(() => { | ||
| 146 | + this.handleAccention() | ||
| 147 | + }) | ||
| 148 | + .margin({ | ||
| 149 | + top: 10, | ||
| 150 | + bottom: 10, | ||
| 151 | + left: 16, | ||
| 152 | + right:16 | ||
| 153 | + }) | ||
| 154 | + .fontSize(12) | ||
| 155 | + .fontColor(Color.White) | ||
| 156 | + } | ||
| 157 | + .width('21.6%') | ||
| 158 | + .height('100%') | ||
| 159 | + } | ||
| 76 | } | 160 | } |
| 77 | - OperRowListView() | 161 | + .width('100%') |
| 162 | + .height(44) | ||
| 163 | + .alignRules({ | ||
| 164 | + top: { anchor: "e_swiper_content", align: VerticalAlign.Top }, | ||
| 165 | + middle: { anchor: "e_swiper_content", align: HorizontalAlign.Center } | ||
| 166 | + }) | ||
| 167 | + .id('e_attention') | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + Row() { | ||
| 171 | + Flex({ | ||
| 172 | + direction: FlexDirection.Column, | ||
| 173 | + justifyContent: FlexAlign.Start | ||
| 174 | + }) { | ||
| 175 | + Text() { | ||
| 176 | + Span(`${this.swiperIndex + 1}`).fontSize(24).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(28) | ||
| 177 | + Span(`/${this.contentDetailData.photoList.length}`).fontSize(14).fontFamily('PingFang SC-Medium').fontWeight(500).lineHeight(19) | ||
| 178 | + }.fontColor(Color.White).margin(4) | ||
| 179 | + | ||
| 180 | + Text(`${this.contentDetailData.newsTitle}`).fontColor(Color.White).fontSize(16).fontFamily('PingFang SC-Semibold') | ||
| 181 | + .fontWeight(600).lineHeight(24) | ||
| 182 | + .margin ({ | ||
| 183 | + top: 4, | ||
| 184 | + left: 0, | ||
| 185 | + bottom: 4, | ||
| 186 | + right: 0 | ||
| 187 | + }) | ||
| 188 | + Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`).fontColor(Color.White) | ||
| 189 | + .fontSize(14).fontFamily('PingFang SC-Regular').fontWeight(400).lineHeight(22) | ||
| 190 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 191 | + .margin ({ | ||
| 192 | + top: 4, | ||
| 193 | + left: 0, | ||
| 194 | + bottom: 4, | ||
| 195 | + right: 18 | ||
| 196 | + }) | ||
| 197 | + .maxLines(3) | ||
| 198 | + } | ||
| 199 | + } | ||
| 200 | + .width('100%') | ||
| 201 | + .height(178) | ||
| 202 | + .margin ({ | ||
| 203 | + top: 8, | ||
| 204 | + left: 18, | ||
| 205 | + bottom: 8, | ||
| 206 | + right: 18 | ||
| 207 | + }) | ||
| 208 | + .id('e_swiper_titles') | ||
| 209 | + .alignRules({ | ||
| 210 | + bottom: { anchor: "e_swiper_content", align: VerticalAlign.Bottom }, | ||
| 211 | + middle: { anchor: "e_swiper_content", align: HorizontalAlign.Center } | ||
| 212 | + }) | ||
| 213 | + | ||
| 214 | + OperRowListView({ | ||
| 215 | + contentDetailData: this.contentDetailData, | ||
| 216 | + }) | ||
| 78 | .alignRules({ | 217 | .alignRules({ |
| 79 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, | 218 | bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, |
| 80 | middle: { anchor: "__container__", align: HorizontalAlign.Center } | 219 | middle: { anchor: "__container__", align: HorizontalAlign.Center } |
| 81 | }) | 220 | }) |
| 82 | - .width('100%') | ||
| 83 | - .height(56) | 221 | + .width('100%').height(56).margin(16) |
| 84 | .border({ width: {top: 0.5}, color: '#FFFFFF' }) | 222 | .border({ width: {top: 0.5}, color: '#FFFFFF' }) |
| 85 | .id('e_oper_row') | 223 | .id('e_oper_row') |
| 86 | } | 224 | } |
| 225 | + } | ||
| 87 | .width('100%') | 226 | .width('100%') |
| 88 | .height('100%') | 227 | .height('100%') |
| 89 | .backgroundColor(Color.Black) | 228 | .backgroundColor(Color.Black) |
| @@ -93,10 +232,70 @@ export struct MultiPictureDetailPageComponent { | @@ -93,10 +232,70 @@ export struct MultiPictureDetailPageComponent { | ||
| 93 | private async getContentDetailData() { | 232 | private async getContentDetailData() { |
| 94 | try { | 233 | try { |
| 95 | let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) | 234 | let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) |
| 96 | - this.contentDetailData = data; | 235 | + this.contentDetailData = data?.[0]; |
| 97 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) | 236 | Logger.info(TAG, `contentDetailData:${JSON.stringify(this.contentDetailData)}`) |
| 98 | } catch (exception) { | 237 | } catch (exception) { |
| 99 | 238 | ||
| 100 | } | 239 | } |
| 101 | } | 240 | } |
| 241 | + | ||
| 242 | + // 记录浏览历史 | ||
| 243 | + private getInteractBrowsOperate() { | ||
| 244 | + try { | ||
| 245 | + const params: postInteractBrowsOperateParams = { | ||
| 246 | + delStatus: 0, | ||
| 247 | + contentList: [{ | ||
| 248 | + browseTime: DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN), | ||
| 249 | + contentId: this.contentDetailData?.newsId + '', | ||
| 250 | + contentType: this.contentDetailData?.newsType || 0, | ||
| 251 | + }] | ||
| 252 | + } | ||
| 253 | + MultiPictureDetailViewModel.getInteractBrowsOperate(params).then(res => { | ||
| 254 | + console.log(TAG, '记录浏览历史==', JSON.stringify(res.data)) | ||
| 255 | + }) | ||
| 256 | + } catch (exception) { | ||
| 257 | + | ||
| 258 | + } | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + // 已登录->批量查作品是否被号主关注 | ||
| 262 | + private async getBatchAttentionStatus() { | ||
| 263 | + try { | ||
| 264 | + const params: postBatchAttentionStatusParams = { | ||
| 265 | + creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }] | ||
| 266 | + } | ||
| 267 | + let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params) | ||
| 268 | + this.followStatus = data[0]?.status; | ||
| 269 | + Logger.info(TAG, `followStatus:${JSON.stringify(this.followStatus)}`) | ||
| 270 | + } catch (exception) { | ||
| 271 | + | ||
| 272 | + } | ||
| 273 | + } | ||
| 274 | + /** | ||
| 275 | + * 关注号主 | ||
| 276 | + */ | ||
| 277 | + handleAccention() { | ||
| 278 | + // 未登录,跳转登录 | ||
| 279 | + if (!HttpUrlUtils.getUserId()) { | ||
| 280 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 281 | + return | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + const params: postInteractAccentionOperateParams = { | ||
| 285 | + attentionUserType: this.contentDetailData?.rmhInfo?.userType || '', //被关注用户类型(1 普通用户 2 视频号 3 矩阵号) | ||
| 286 | + attentionUserId: this.contentDetailData?.rmhInfo?.userId || '', // 被关注用户号主id | ||
| 287 | + attentionCreatorId: this.contentDetailData?.rmhInfo?.rmhId || '', // 被关注用户号主id | ||
| 288 | + // userType: 1, | ||
| 289 | + // userId: '1', | ||
| 290 | + status: 1, | ||
| 291 | + } | ||
| 292 | + PageRepository.postInteractAccentionOperate(params).then(res => { | ||
| 293 | + console.log(TAG, '关注号主==', JSON.stringify(res.data)) | ||
| 294 | + if (this.followStatus == '1') { | ||
| 295 | + this.followStatus = '0' | ||
| 296 | + } else { | ||
| 297 | + this.followStatus = '1' | ||
| 298 | + } | ||
| 299 | + }) | ||
| 300 | + } | ||
| 102 | } | 301 | } |
sight_harmony/features/wdComponent/src/main/ets/components/broadcast/BroadcastPageComponent.ets
0 → 100644
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { Params } from 'wdBean' | ||
| 3 | +import { RecommendHeader } from './RecommendHeader'; | ||
| 4 | +import { RecommendTitle } from './RecommendTitle'; | ||
| 5 | +import { RecommendLists } from './RecommendLists' | ||
| 6 | +import { SelectedColumns } from './SelectedColumns' | ||
| 7 | +import { CompList, PageInfoBean, CompInfoBean } from 'wdBean'; | ||
| 8 | +import { DateTimeUtils, Logger } from 'wdKit/Index'; | ||
| 9 | +import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | ||
| 10 | +import { BroadcastViewModel } from '../../viewmodel/BroadcastViewModel'; | ||
| 11 | +import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer'; | ||
| 12 | +import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList'; | ||
| 13 | +import { CommonConstants } from 'wdConstant/Index'; | ||
| 14 | + | ||
| 15 | +const TAG = 'BroadcastPageComponent'; | ||
| 16 | + | ||
| 17 | +@Entry | ||
| 18 | +@Component | ||
| 19 | +export struct BroadcastPageComponent { | ||
| 20 | + @State params:Params = router.getParams() as Params; | ||
| 21 | + | ||
| 22 | + @State pageInfoBean: PageInfoBean = {} as PageInfoBean // 播报页面信息 | ||
| 23 | + @State compInfoBean: CompInfoBean = {} as CompInfoBean // 组件信息 | ||
| 24 | + @State recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐播报组件信息 | ||
| 25 | + @State columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息 | ||
| 26 | + | ||
| 27 | + @State compListItem: CompList = {} as CompList | ||
| 28 | + @State audioPlayUrl: string = "" | ||
| 29 | + @Provide title: string = '' | ||
| 30 | + @Provide subTitle: string = '' | ||
| 31 | + @Provide isAudioPlaying: boolean = false | ||
| 32 | + @Provide status: number = PlayerConstants.STATUS_START; | ||
| 33 | + @Provide currentTime: string = "00:00"; | ||
| 34 | + @Provide totalTime: string = "00:00"; | ||
| 35 | + @Provide progressVal: number = 0; | ||
| 36 | + private audioDataList: AudioDataList[] = [] | ||
| 37 | + private playerController: WDPlayerController = new WDPlayerController(); | ||
| 38 | + simpleAudioDialog: CustomDialogController = new CustomDialogController({ | ||
| 39 | + builder: PaperReaderSimpleDialog({ | ||
| 40 | + cancel: this.onCancel, | ||
| 41 | + confirm: this.onConfirm, | ||
| 42 | + playerController: this.playerController | ||
| 43 | + }), | ||
| 44 | + autoCancel: false, | ||
| 45 | + customStyle: true, | ||
| 46 | + alignment: DialogAlignment.CenterStart, | ||
| 47 | + offset: { dx: 12, dy: -150 }, | ||
| 48 | + }) | ||
| 49 | + | ||
| 50 | + onCancel() { | ||
| 51 | + Logger.info(TAG, "cj2024 onCancel = ") | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 回调无用 | ||
| 56 | + **/ | ||
| 57 | + onConfirm() { | ||
| 58 | + Logger.info(TAG, "cj2024 onConfirm = ") | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + // 续播判断 | ||
| 62 | + changeContinue() { | ||
| 63 | + Logger.info(TAG, "cj2024 changeContinue = 1") | ||
| 64 | + this.playerController.continue = () => { | ||
| 65 | + Logger.info(TAG, "cj2024 changeContinue = 2") | ||
| 66 | + this.playerController?.stop(); | ||
| 67 | + } | ||
| 68 | + return; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + async aboutToAppear() { | ||
| 72 | + Logger.debug(TAG, `about1ToAppear`, router.getParams().toString()) | ||
| 73 | + const currentTime = new Date().getTime() | ||
| 74 | + try { | ||
| 75 | + // 获取页面信息 | ||
| 76 | + Logger.warn('获取页面信息') | ||
| 77 | + let pageInfoBean = await BroadcastViewModel.getBroadcastViewPageInfo('21003') | ||
| 78 | + Logger.warn('pageInfoBean-') | ||
| 79 | + Logger.warn(pageInfoBean.groups[0].blockDesc) | ||
| 80 | + | ||
| 81 | + this.pageInfoBean = pageInfoBean; | ||
| 82 | + //TODO 根据页面中组件信息。现在默认认为后端只返回2个。第一个是播报,第二个是精选栏目 | ||
| 83 | + const pageId = pageInfoBean.id, | ||
| 84 | + groupId_0 = pageInfoBean.groups[0]?.id, | ||
| 85 | + refreshTime = currentTime + "", | ||
| 86 | + topicId = pageInfoBean?.topicInfo?.topicId || '', | ||
| 87 | + channelId = pageInfoBean?.channelInfo?.channelId || '' | ||
| 88 | + if(pageInfoBean.groups[0]) { | ||
| 89 | + this.recommendCompInfoBean = await BroadcastViewModel.getBroadcastCompInfo(pageId, groupId_0, refreshTime, topicId, channelId) | ||
| 90 | + } | ||
| 91 | + if(pageInfoBean.groups[1]) { | ||
| 92 | + const groupId_1 = pageInfoBean.groups[1]?.id | ||
| 93 | + this.columnsCompInfoBean = await BroadcastViewModel.getBroadcastCompInfo(pageId, groupId_1, refreshTime, topicId, channelId) | ||
| 94 | + } | ||
| 95 | + } catch (exception) { | ||
| 96 | + | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + onPageShow() { | ||
| 100 | + Logger.debug(TAG, `onPageShow--`, JSON.stringify(router.getParams())) | ||
| 101 | + } | ||
| 102 | + onPageHide() { | ||
| 103 | + this.status = PlayerConstants.STATUS_PAUSE; | ||
| 104 | + this.playerController?.pause(); | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + build() { | ||
| 108 | + Column() { | ||
| 109 | + // 顶部标题 | ||
| 110 | + RecommendHeader() | ||
| 111 | + List() { | ||
| 112 | + ListItem(){ | ||
| 113 | + RecommendTitle() | ||
| 114 | + } | ||
| 115 | + if(this.pageInfoBean.groups && this.pageInfoBean.groups[0] && this.recommendCompInfoBean.compList) { | ||
| 116 | + ListItem(){ | ||
| 117 | + RecommendLists({ | ||
| 118 | + recommendCompInfoBean: this.recommendCompInfoBean | ||
| 119 | + }) | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + if(this.pageInfoBean.groups && this.pageInfoBean.groups[1] && this.columnsCompInfoBean.compList) { | ||
| 123 | + ListItem() { | ||
| 124 | + SelectedColumns({ | ||
| 125 | + columnsCompTitle: this.pageInfoBean.groups[1].blockDesc, | ||
| 126 | + columnsCompInfoBean: this.columnsCompInfoBean | ||
| 127 | + }) | ||
| 128 | + .margin({ top: 12 }) | ||
| 129 | + } | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + .layoutWeight(1) | ||
| 133 | + // @ts-ignore | ||
| 134 | + .onScrollFrameBegin((offset, state) => { | ||
| 135 | + console.log('ccc',String(offset), state) | ||
| 136 | + }) | ||
| 137 | + .onReachStart(() => { | ||
| 138 | + console.log('onReachStart----->',) | ||
| 139 | + }) | ||
| 140 | + } | ||
| 141 | + .width(CommonConstants.FULL_WIDTH) | ||
| 142 | + .backgroundImage($r('app.media.broadcast_bg')) | ||
| 143 | + .backgroundImageSize({width: '100%', height: '100%'}) | ||
| 144 | + } | ||
| 145 | +} |
| 1 | +import router from '@ohos.router'; | ||
| 2 | +import { CommonConstants } from 'wdConstant/Index'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * 今日推荐顶部标题--fixed标题 | ||
| 6 | + */ | ||
| 7 | +@Entry | ||
| 8 | +@Component | ||
| 9 | +export struct RecommendHeader { | ||
| 10 | + build() { | ||
| 11 | + Stack() { | ||
| 12 | + Image($r('app.media.icon_arrow_down_black')) | ||
| 13 | + .height($r('app.float.top_arrow_size')) | ||
| 14 | + .width($r('app.float.top_arrow_size')) | ||
| 15 | + .onClick((event: ClickEvent) => { | ||
| 16 | + router.back() | ||
| 17 | + }) | ||
| 18 | + .zIndex(1) | ||
| 19 | + Text('今日推荐') | ||
| 20 | + .margin({ left: 5 }) | ||
| 21 | + .fontSize($r('app.float.selected_text_size')) | ||
| 22 | + .fontColor($r('app.color.color_222222')) | ||
| 23 | + .width(CommonConstants.FULL_WIDTH) | ||
| 24 | + .height(CommonConstants.FULL_HEIGHT) | ||
| 25 | + .textAlign(TextAlign.Center) | ||
| 26 | + } | ||
| 27 | + .height($r('app.float.top_bar_height')) | ||
| 28 | + .padding({left: 16, right: 16}) | ||
| 29 | + .alignContent(Alignment.Start) | ||
| 30 | + } | ||
| 31 | +} |
| 1 | +import { CompInfoBean, CompDTO } from 'wdBean' | ||
| 2 | +import { CommonConstants } from 'wdConstant'; | ||
| 3 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 播报--今日推荐列表 | ||
| 7 | + */ | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +export struct RecommendLists { | ||
| 11 | + @Prop recommendCompInfoBean: CompInfoBean = {} as CompInfoBean // 推荐-组件信息 | ||
| 12 | + | ||
| 13 | + build() { | ||
| 14 | + Column(){ | ||
| 15 | + ForEach(this.recommendCompInfoBean.compList.slice(0,3), (item: CompDTO) => { | ||
| 16 | + this.recommendTop3Item(item) | ||
| 17 | + }) | ||
| 18 | + // 查看更多 | ||
| 19 | + if(this.recommendCompInfoBean.compList.length > 3) { | ||
| 20 | + Row() { | ||
| 21 | + Text("查看全部") | ||
| 22 | + .fontSize($r("app.float.font_size_12")) | ||
| 23 | + .fontColor($r("app.color.color_222222")) | ||
| 24 | + .margin({ right: 1 }) | ||
| 25 | + Image($r("app.media.more")) | ||
| 26 | + .width(14) | ||
| 27 | + .height(14) | ||
| 28 | + } | ||
| 29 | + .width(CommonConstants.FULL_WIDTH) | ||
| 30 | + .height(40) | ||
| 31 | + .borderRadius(3) | ||
| 32 | + .justifyContent(FlexAlign.Center) | ||
| 33 | + .margin({top: 5}) | ||
| 34 | + .onClick(() => { | ||
| 35 | + // console.log(1) | ||
| 36 | + }) | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + .margin({left: 16, right: 16}) | ||
| 40 | + .padding({left: 16, right: 16}) | ||
| 41 | + .backgroundColor($r('app.color.color_fff')) | ||
| 42 | + .borderRadius(5) | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @Builder | ||
| 46 | + recommendTop3Item(item: CompDTO) { | ||
| 47 | + Row(){ | ||
| 48 | + Image($r('app.media.broadcast_pause')) | ||
| 49 | + .width(24) | ||
| 50 | + .height(24) | ||
| 51 | + .margin({right:12}) | ||
| 52 | + Text(item.operDataList[0].newsTitle) | ||
| 53 | + .fontSize($r('app.float.font_size_16')) | ||
| 54 | + .fontColor($r('app.color.color_212228')) | ||
| 55 | + .maxLines(1) | ||
| 56 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 57 | + .layoutWeight(1) | ||
| 58 | + } | ||
| 59 | + .width(CommonConstants.FULL_WIDTH) | ||
| 60 | + .padding({top: 12, bottom: 12}) | ||
| 61 | + .onClick(() => { | ||
| 62 | + ProcessUtils.processPage(item.operDataList[0]) | ||
| 63 | + }) | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @Builder | ||
| 67 | + recommendListItem() { | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | +} |
| 1 | +import { CommonConstants } from 'wdConstant/Index' | ||
| 2 | +import { DateTimeUtils } from 'wdKit'; | ||
| 3 | +/** | ||
| 4 | + * 播报标题描述 | ||
| 5 | + */ | ||
| 6 | +@Entry | ||
| 7 | +@Component | ||
| 8 | +export struct RecommendTitle { | ||
| 9 | + build() { | ||
| 10 | + Row(){ | ||
| 11 | + // 左边 | ||
| 12 | + Column(){ | ||
| 13 | + Text('每日最动听的声音') | ||
| 14 | + .fontSize($r('app.float.font_size_14')) | ||
| 15 | + .fontColor($r('app.color.color_222222')) | ||
| 16 | + .alignSelf(ItemAlign.Start) | ||
| 17 | + Image($r('app.media.broadcast_line')) | ||
| 18 | + .width(147) | ||
| 19 | + .margin({ | ||
| 20 | + top: 8, bottom: 8 | ||
| 21 | + }) | ||
| 22 | + Row(){ | ||
| 23 | + Column(){ | ||
| 24 | + Text('今推') | ||
| 25 | + .fontSize($r('app.float.font_size_24')) | ||
| 26 | + .fontColor($r('app.color.color_222222')) | ||
| 27 | + .fontWeight(600) | ||
| 28 | + Text('日荐') | ||
| 29 | + .fontSize($r('app.float.font_size_24')) | ||
| 30 | + .fontColor($r('app.color.color_222222')) | ||
| 31 | + .fontWeight(600) | ||
| 32 | + } | ||
| 33 | + .margin({right: 8}) | ||
| 34 | + .alignSelf(ItemAlign.Start) | ||
| 35 | + Column() { | ||
| 36 | + Text(DateTimeUtils.getLunar()) | ||
| 37 | + .fontSize($r('app.float.font_size_14')) | ||
| 38 | + .fontColor($r('app.color.color_222222')) | ||
| 39 | + .alignSelf(ItemAlign.Start) | ||
| 40 | + Text(DateTimeUtils.formatDate(new Date().getTime(), 'MM/dd')) | ||
| 41 | + .fontSize($r('app.float.font_size_24')) | ||
| 42 | + .fontColor($r('app.color.color_222222')) | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + .alignSelf(ItemAlign.Start) | ||
| 46 | + } | ||
| 47 | + Blank() | ||
| 48 | + Image($r('app.media.broadcast_pause')) | ||
| 49 | + .width(90) | ||
| 50 | + .height(90) | ||
| 51 | + .margin({ | ||
| 52 | + right: 9 | ||
| 53 | + }) | ||
| 54 | + } | ||
| 55 | + .width(CommonConstants.FULL_WIDTH) | ||
| 56 | + .padding({left: 16, right: 16}) | ||
| 57 | + .margin({bottom: 12}) | ||
| 58 | + } | ||
| 59 | +} |
| 1 | +import { CompInfoBean, CompDTO } from 'wdBean' | ||
| 2 | +import { DateTimeUtils } from 'wdKit/Index' | ||
| 3 | +import { CommonConstants } from 'wdConstant'; | ||
| 4 | +import { ProcessUtils } from '../../utils/ProcessUtils'; | ||
| 5 | +/** | ||
| 6 | + * 精选栏目 | ||
| 7 | + */ | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +export struct SelectedColumns { | ||
| 11 | + @Prop columnsCompInfoBean: CompInfoBean = {} as CompInfoBean // 精选栏目组件信息 | ||
| 12 | + @Prop columnsCompTitle: string = '' | ||
| 13 | + build() { | ||
| 14 | + Column(){ | ||
| 15 | + Text(this.columnsCompTitle) | ||
| 16 | + .fontSize($r('app.float.selected_text_size')) | ||
| 17 | + .fontColor($r('app.color.color_222222')) | ||
| 18 | + .fontWeight(500) | ||
| 19 | + .width(CommonConstants.FULL_WIDTH) | ||
| 20 | + ForEach(this.columnsCompInfoBean.compList, (item: CompDTO) => { | ||
| 21 | + this.SelectedColumnsItem(item) | ||
| 22 | + }) | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | + .padding({left: 16,top: 12, right: 16}) | ||
| 26 | + .backgroundColor($r('app.color.white')) | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Builder | ||
| 30 | + SelectedColumnsItem(item: CompDTO) { | ||
| 31 | + Row() { | ||
| 32 | + Image(item.operDataList[0].coverUrl) | ||
| 33 | + .height(53) | ||
| 34 | + .width(80) | ||
| 35 | + .objectFit(ImageFit.Cover) | ||
| 36 | + .margin({right: 12}) | ||
| 37 | + Column({space: 4}){ | ||
| 38 | + Text(item.operDataList[0].newsTitle) | ||
| 39 | + .fontSize($r('app.float.font_size_16')) | ||
| 40 | + .fontColor($r('app.color.color_222222')) | ||
| 41 | + .width(CommonConstants.FULL_WIDTH) | ||
| 42 | + .maxLines(1) | ||
| 43 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 44 | + Text(item.operDataList[0].newsSummary) | ||
| 45 | + .fontSize($r('app.float.font_size_12')) | ||
| 46 | + .fontColor($r('app.color.color_999999')) | ||
| 47 | + .width(CommonConstants.FULL_WIDTH) | ||
| 48 | + .maxLines(1) | ||
| 49 | + .textOverflow({overflow: TextOverflow.Ellipsis}) | ||
| 50 | + Row(){ | ||
| 51 | + Image($r('app.media.broadcast_clock')) | ||
| 52 | + .width(12) | ||
| 53 | + .height(12) | ||
| 54 | + .margin({right: 4}) | ||
| 55 | + Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.operDataList[0].publishTime))) | ||
| 56 | + .fontSize($r('app.float.font_size_12')) | ||
| 57 | + .fontColor($r('app.color.color_999999')) | ||
| 58 | + .margin({ right :24 }) | ||
| 59 | + Image($r('app.media.broadcast_listen')) | ||
| 60 | + .width(12) | ||
| 61 | + .height(12) | ||
| 62 | + .margin({right: 4}) | ||
| 63 | + Text('0') | ||
| 64 | + .fontSize($r('app.float.font_size_12')) | ||
| 65 | + .fontColor($r('app.color.color_999999')) | ||
| 66 | + .margin({ right :24}) | ||
| 67 | + } | ||
| 68 | + .width(CommonConstants.FULL_WIDTH) | ||
| 69 | + } | ||
| 70 | + .layoutWeight(1) | ||
| 71 | + } | ||
| 72 | + .onClick((event: ClickEvent) => { | ||
| 73 | + // TODO 跳转到音频专题页 | ||
| 74 | + }) | ||
| 75 | + .width(CommonConstants.FULL_WIDTH) | ||
| 76 | + .height(73) | ||
| 77 | + } | ||
| 78 | +} |
| @@ -30,17 +30,18 @@ export default struct MinePageUserSimpleInfoUI { | @@ -30,17 +30,18 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 30 | build(){ | 30 | build(){ |
| 31 | Row(){ | 31 | Row(){ |
| 32 | //头像 | 32 | //头像 |
| 33 | - Stack({alignContent: Alignment.Center}){ | 33 | + Stack(){ |
| 34 | Image(this.headPhotoUrl) | 34 | Image(this.headPhotoUrl) |
| 35 | .alt($r('app.media.default_head')) | 35 | .alt($r('app.media.default_head')) |
| 36 | .width('108lpx') | 36 | .width('108lpx') |
| 37 | .height('108lpx') | 37 | .height('108lpx') |
| 38 | - .objectFit(ImageFit.Auto) | 38 | + .objectFit(ImageFit.Cover) |
| 39 | .borderRadius(50) | 39 | .borderRadius(50) |
| 40 | Image(this.levelHead) | 40 | Image(this.levelHead) |
| 41 | .width('130lpx') | 41 | .width('130lpx') |
| 42 | .height('130lpx') | 42 | .height('130lpx') |
| 43 | - .objectFit(ImageFit.Auto) | 43 | + .objectFit(ImageFit.Cover) |
| 44 | + .borderRadius(50) | ||
| 44 | }.width('130lpx') | 45 | }.width('130lpx') |
| 45 | .height('130lpx') | 46 | .height('130lpx') |
| 46 | .alignContent(Alignment.Center) | 47 | .alignContent(Alignment.Center) |
| @@ -80,7 +80,7 @@ export struct FollowFirstTabsComponent{ | @@ -80,7 +80,7 @@ export struct FollowFirstTabsComponent{ | ||
| 80 | this.currentIndex = index | 80 | this.currentIndex = index |
| 81 | }) | 81 | }) |
| 82 | .width('100%') | 82 | .width('100%') |
| 83 | - .height('100%') | 83 | + .layoutWeight(1) |
| 84 | }.width('100%') | 84 | }.width('100%') |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
| @@ -23,14 +23,14 @@ export struct FollowSecondTabsComponent{ | @@ -23,14 +23,14 @@ export struct FollowSecondTabsComponent{ | ||
| 23 | 23 | ||
| 24 | if(this.data != null){ | 24 | if(this.data != null){ |
| 25 | if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){ | 25 | if(this.data[this.firstIndex].children == null || this.data[this.firstIndex].children.length == 0){ |
| 26 | - FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}) | 26 | + FollowListDetailUI({creatorDirectoryId:this.data[this.firstIndex].id}).layoutWeight(1) |
| 27 | }else{ | 27 | }else{ |
| 28 | this.FollowSecondUI() | 28 | this.FollowSecondUI() |
| 29 | } | 29 | } |
| 30 | } | 30 | } |
| 31 | } | 31 | } |
| 32 | .width('100%') | 32 | .width('100%') |
| 33 | - .height('100%') | 33 | + .layoutWeight(1) |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | @Builder FollowSecondUI(){ | 36 | @Builder FollowSecondUI(){ |
| @@ -128,7 +128,7 @@ export struct HomePageBottomComponent{ | @@ -128,7 +128,7 @@ export struct HomePageBottomComponent{ | ||
| 128 | List({ space: 3 }) { | 128 | List({ space: 3 }) { |
| 129 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { | 129 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { |
| 130 | ListItem() { | 130 | ListItem() { |
| 131 | - ChildCommentComponent({data: item}) | 131 | + ChildCommentComponent({data: item,isLastItem:index===this.data_comment.totalCount()-1}) |
| 132 | } | 132 | } |
| 133 | .onClick(() => { | 133 | .onClick(() => { |
| 134 | }) | 134 | }) |
| @@ -158,7 +158,7 @@ export struct HomePageBottomComponent{ | @@ -158,7 +158,7 @@ export struct HomePageBottomComponent{ | ||
| 158 | }) | 158 | }) |
| 159 | } | 159 | } |
| 160 | } | 160 | } |
| 161 | - }.height('100%') | 161 | + }.layoutWeight(1) |
| 162 | .justifyContent(FlexAlign.Start) | 162 | .justifyContent(FlexAlign.Start) |
| 163 | .width('100%') | 163 | .width('100%') |
| 164 | } | 164 | } |
| @@ -334,6 +334,7 @@ struct ChildFollowComponent { | @@ -334,6 +334,7 @@ struct ChildFollowComponent { | ||
| 334 | @Component | 334 | @Component |
| 335 | struct ChildCommentComponent { | 335 | struct ChildCommentComponent { |
| 336 | @ObjectLink data: CommentListItem | 336 | @ObjectLink data: CommentListItem |
| 337 | + isLastItem: boolean = false | ||
| 337 | 338 | ||
| 338 | build() { | 339 | build() { |
| 339 | Column(){ | 340 | Column(){ |
| @@ -408,10 +409,12 @@ struct ChildCommentComponent { | @@ -408,10 +409,12 @@ struct ChildCommentComponent { | ||
| 408 | .backgroundColor($r('app.color.color_F5F5F5')) | 409 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 409 | .margin({top:'19lpx',bottom:'31lpx'}) | 410 | .margin({top:'19lpx',bottom:'31lpx'}) |
| 410 | 411 | ||
| 412 | + if(!this.isLastItem){ | ||
| 411 | Divider().width('100%') | 413 | Divider().width('100%') |
| 412 | .height('12lpx') | 414 | .height('12lpx') |
| 413 | .strokeWidth('12lpx') | 415 | .strokeWidth('12lpx') |
| 414 | - .backgroundColor($r('app.color.color_F5F5F5')) | 416 | + .color($r('app.color.color_F5F5F5')) |
| 417 | + } | ||
| 415 | 418 | ||
| 416 | } | 419 | } |
| 417 | .justifyContent(FlexAlign.Center) | 420 | .justifyContent(FlexAlign.Center) |
| @@ -37,7 +37,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -37,7 +37,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 37 | List({ space: 3 }) { | 37 | List({ space: 3 }) { |
| 38 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { | 38 | LazyForEach(this.data_comment, (item: CommentListItem, index: number = 0) => { |
| 39 | ListItem() { | 39 | ListItem() { |
| 40 | - ChildCommentComponent({data: item,levelHead:this.levelHead}) | 40 | + ChildCommentComponent({data: item,levelHead:this.levelHead,isLastItem:index===this.data_comment.totalCount()-1}) |
| 41 | } | 41 | } |
| 42 | .onClick(() => { | 42 | .onClick(() => { |
| 43 | }) | 43 | }) |
| @@ -68,6 +68,8 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -68,6 +68,8 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | .width('100%') | 70 | .width('100%') |
| 71 | + .layoutWeight(1) | ||
| 72 | + .justifyContent(FlexAlign.Start) | ||
| 71 | } | 73 | } |
| 72 | 74 | ||
| 73 | 75 | ||
| @@ -143,6 +145,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -143,6 +145,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 143 | struct ChildCommentComponent { | 145 | struct ChildCommentComponent { |
| 144 | @ObjectLink data: CommentListItem | 146 | @ObjectLink data: CommentListItem |
| 145 | @Prop levelHead:string | 147 | @Prop levelHead:string |
| 148 | + isLastItem: boolean = false | ||
| 146 | 149 | ||
| 147 | build() { | 150 | build() { |
| 148 | Column(){ | 151 | Column(){ |
| @@ -234,10 +237,12 @@ struct ChildCommentComponent { | @@ -234,10 +237,12 @@ struct ChildCommentComponent { | ||
| 234 | .backgroundColor($r('app.color.color_F5F5F5')) | 237 | .backgroundColor($r('app.color.color_F5F5F5')) |
| 235 | .margin({top:'19lpx',bottom:'31lpx'}) | 238 | .margin({top:'19lpx',bottom:'31lpx'}) |
| 236 | 239 | ||
| 240 | + if(!this.isLastItem){ | ||
| 237 | Divider().width('100%') | 241 | Divider().width('100%') |
| 238 | .height('12lpx') | 242 | .height('12lpx') |
| 239 | .strokeWidth('12lpx') | 243 | .strokeWidth('12lpx') |
| 240 | - .backgroundColor($r('app.color.color_F5F5F5')) | 244 | + .color($r('app.color.color_F5F5F5')) |
| 245 | + } | ||
| 241 | 246 | ||
| 242 | } | 247 | } |
| 243 | .justifyContent(FlexAlign.Center) | 248 | .justifyContent(FlexAlign.Center) |
| 1 | -import { CustomTitleUI } from '../reusable/CustomTitleUI' | 1 | +import { CustomTitleAndEditUI } from '../reusable/CustomTitleAndEditUI' |
| 2 | import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; | 2 | import MyCollectionViewModel from '../../viewmodel/MyCollectionViewModel'; |
| 3 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 4 | import { CommonConstants, ViewType } from 'wdConstant' | 4 | import { CommonConstants, ViewType } from 'wdConstant' |
| @@ -11,20 +11,31 @@ import LoadMoreLayout from './LoadMoreLayout' | @@ -11,20 +11,31 @@ import LoadMoreLayout from './LoadMoreLayout' | ||
| 11 | import NoMoreLayout from './NoMoreLayout' | 11 | import NoMoreLayout from './NoMoreLayout' |
| 12 | import { CompParser } from '../CompParser' | 12 | import { CompParser } from '../CompParser' |
| 13 | import CustomRefreshLoadLayout from './CustomRefreshLoadLayout'; | 13 | import CustomRefreshLoadLayout from './CustomRefreshLoadLayout'; |
| 14 | -import { listTouchEvent } from '../../utils/PullDownRefresh'; | 14 | +import { CustomSelectUI } from '../view/CustomSelectUI'; |
| 15 | +import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; | ||
| 15 | 16 | ||
| 16 | @Entry | 17 | @Entry |
| 17 | @Component | 18 | @Component |
| 18 | struct BrowsingHistoryPage { | 19 | struct BrowsingHistoryPage { |
| 19 | @State private browSingModel: PageModel = new PageModel() | 20 | @State private browSingModel: PageModel = new PageModel() |
| 20 | - | 21 | + isloading : boolean = false |
| 22 | + @Provide isEditState:boolean = false | ||
| 23 | + @State allDatas :CompDTO[] = []; | ||
| 24 | + @State selectDatas :CompDTO[] = []; | ||
| 25 | + @Provide deleteNum :number = 0; | ||
| 26 | + @Provide isAllSelect:boolean = false | ||
| 21 | aboutToAppear(){ | 27 | aboutToAppear(){ |
| 22 | this.getData() | 28 | this.getData() |
| 23 | } | 29 | } |
| 24 | 30 | ||
| 25 | build() { | 31 | build() { |
| 26 | Column(){ | 32 | Column(){ |
| 27 | - CustomTitleUI({titleName:'浏览历史'}) | 33 | + CustomTitleAndEditUI({titleName:'浏览历史',isDisplayButton:true,editCallback:()=>{ |
| 34 | + this.allSelectDatas(false) | ||
| 35 | + this.isAllSelect = false | ||
| 36 | + this.selectDatas = [] | ||
| 37 | + this.deleteNum = 0 | ||
| 38 | + }}) | ||
| 28 | if (this.browSingModel.viewType == ViewType.LOADING){ | 39 | if (this.browSingModel.viewType == ViewType.LOADING){ |
| 29 | this.LoadingLayout() | 40 | this.LoadingLayout() |
| 30 | }else if(this.browSingModel.viewType == ViewType.ERROR){ | 41 | }else if(this.browSingModel.viewType == ViewType.ERROR){ |
| @@ -34,16 +45,21 @@ struct BrowsingHistoryPage { | @@ -34,16 +45,21 @@ struct BrowsingHistoryPage { | ||
| 34 | }else { | 45 | }else { |
| 35 | this.ListLayout() | 46 | this.ListLayout() |
| 36 | } | 47 | } |
| 48 | + | ||
| 49 | + if (this.isEditState){ | ||
| 50 | + CustomBottomFuctionUI({ | ||
| 51 | + selectAllCallback:(isAllSelect)=>{ | ||
| 52 | + this.allSelectDatas(isAllSelect) | ||
| 53 | + }, | ||
| 54 | + confirmCallback:()=>{ | ||
| 55 | + this.deleteDatas() | ||
| 37 | } | 56 | } |
| 38 | - .width(CommonConstants.FULL_WIDTH) | ||
| 39 | - .height(CommonConstants.FULL_HEIGHT) | ||
| 40 | - .onTouch((event: TouchEvent | undefined) => { | ||
| 41 | - if (event) { | ||
| 42 | - if (this.browSingModel.viewType === ViewType.LOADED) { | ||
| 43 | - listTouchEvent(this.browSingModel, event); | 57 | + }) |
| 58 | + .position({y:'92%'}) | ||
| 44 | } | 59 | } |
| 45 | } | 60 | } |
| 46 | - }) | 61 | + .width(CommonConstants.FULL_WIDTH) |
| 62 | + .height(CommonConstants.FULL_HEIGHT) | ||
| 47 | } | 63 | } |
| 48 | 64 | ||
| 49 | @Builder ListLayout() { | 65 | @Builder ListLayout() { |
| @@ -56,11 +72,9 @@ struct BrowsingHistoryPage { | @@ -56,11 +72,9 @@ struct BrowsingHistoryPage { | ||
| 56 | }) | 72 | }) |
| 57 | } | 73 | } |
| 58 | 74 | ||
| 59 | - LazyForEach(this.browSingModel.compList, (compDTO: CompDTO, compIndex: number) => { | 75 | + ForEach(this.allDatas, (compDTO: CompDTO, compIndex: number) => { |
| 60 | ListItem() { | 76 | ListItem() { |
| 61 | - Column() { | ||
| 62 | - CompParser({ compDTO: compDTO, compIndex: compIndex }); | ||
| 63 | - } | 77 | + this.newCompParser(compDTO,compIndex) |
| 64 | } | 78 | } |
| 65 | }) | 79 | }) |
| 66 | 80 | ||
| @@ -79,6 +93,24 @@ struct BrowsingHistoryPage { | @@ -79,6 +93,24 @@ struct BrowsingHistoryPage { | ||
| 79 | .height(CommonConstants.FULL_PARENT) | 93 | .height(CommonConstants.FULL_PARENT) |
| 80 | } | 94 | } |
| 81 | 95 | ||
| 96 | + @Builder | ||
| 97 | + newCompParser(compDTO: CompDTO, compIndex: number){ | ||
| 98 | + Row(){ | ||
| 99 | + if (this.isEditState){ | ||
| 100 | + CustomSelectUI({ | ||
| 101 | + isOn:compDTO.isSelect, | ||
| 102 | + selectCallback:(isOn)=>{ | ||
| 103 | + this.addCompDTO(isOn,compDTO) | ||
| 104 | + } | ||
| 105 | + }) | ||
| 106 | + .margin({left:16}) | ||
| 107 | + } | ||
| 108 | + Column() { | ||
| 109 | + CompParser({ compDTO: compDTO, compIndex: compIndex }) | ||
| 110 | + } | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | + | ||
| 82 | @Builder LoadingLayout() { | 114 | @Builder LoadingLayout() { |
| 83 | CustomRefreshLoadLayout({ refreshBean: new RefreshLayoutBean(true, | 115 | CustomRefreshLoadLayout({ refreshBean: new RefreshLayoutBean(true, |
| 84 | $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), this.browSingModel.pullDownRefreshHeight) }) | 116 | $r('app.media.ic_pull_up_load'), $r('app.string.pull_up_load_text'), this.browSingModel.pullDownRefreshHeight) }) |
| @@ -89,7 +121,7 @@ struct BrowsingHistoryPage { | @@ -89,7 +121,7 @@ struct BrowsingHistoryPage { | ||
| 89 | MyCollectionViewModel.newFetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(pageDto => { | 121 | MyCollectionViewModel.newFetchMyCollectList(2,'1',this.browSingModel.currentPage,getContext(this)).then(pageDto => { |
| 90 | if (pageDto && pageDto.compList && pageDto.compList.length > 0) { | 122 | if (pageDto && pageDto.compList && pageDto.compList.length > 0) { |
| 91 | this.browSingModel.viewType = ViewType.LOADED; | 123 | this.browSingModel.viewType = ViewType.LOADED; |
| 92 | - this.browSingModel.compList.push(...pageDto.compList) | 124 | + this.allDatas.push(...pageDto.compList) |
| 93 | if (pageDto.compList.length === this.browSingModel.pageSize) { | 125 | if (pageDto.compList.length === this.browSingModel.pageSize) { |
| 94 | this.browSingModel.currentPage++; | 126 | this.browSingModel.currentPage++; |
| 95 | this.browSingModel.hasMore = true; | 127 | this.browSingModel.hasMore = true; |
| @@ -101,4 +133,49 @@ struct BrowsingHistoryPage { | @@ -101,4 +133,49 @@ struct BrowsingHistoryPage { | ||
| 101 | } | 133 | } |
| 102 | }) | 134 | }) |
| 103 | } | 135 | } |
| 136 | + | ||
| 137 | + //数据处理 | ||
| 138 | + //单个选择 | ||
| 139 | + addCompDTO(isOn:boolean , compDTO: CompDTO){ | ||
| 140 | + compDTO.isSelect = isOn; | ||
| 141 | + if (isOn === true){ | ||
| 142 | + this.selectDatas.push(compDTO) | ||
| 143 | + }else { | ||
| 144 | + this.selectDatas.splice(this.selectDatas.indexOf(compDTO),1) | ||
| 145 | + } | ||
| 146 | + this.deleteNum = this.selectDatas.length | ||
| 147 | + | ||
| 148 | + this.isAllSelect = this.deleteNum === this.allDatas.length?true:false; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + //全选 | ||
| 152 | + allSelectDatas(isOn:boolean){ | ||
| 153 | + let datas: CompDTO[] = []; | ||
| 154 | + for (let index = 0; index < this.allDatas.length; index++) { | ||
| 155 | + const compDTO = this.allDatas[index]; | ||
| 156 | + compDTO.isSelect = isOn | ||
| 157 | + datas.push(compDTO) | ||
| 158 | + } | ||
| 159 | + this.selectDatas = [] | ||
| 160 | + this.allDatas = [] | ||
| 161 | + if (isOn === true) { | ||
| 162 | + this.selectDatas.push(...datas) | ||
| 163 | + }else { | ||
| 164 | + this.selectDatas.splice(0,this.deleteNum) | ||
| 165 | + } | ||
| 166 | + this.allDatas.push(...datas) | ||
| 167 | + this.deleteNum = this.selectDatas.length | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + //删除 | ||
| 171 | + deleteDatas(){ | ||
| 172 | + for (let index = 0; index < this.selectDatas.length; index++) { | ||
| 173 | + const compDTO = this.allDatas[index]; | ||
| 174 | + this.allDatas.splice(this.selectDatas.indexOf(compDTO),1) | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + //重置删除状态 | ||
| 178 | + this.isEditState = false | ||
| 179 | + this.isAllSelect = false | ||
| 180 | + } | ||
| 104 | } | 181 | } |
| @@ -25,7 +25,7 @@ export struct CarouselLayout01CardView { | @@ -25,7 +25,7 @@ export struct CarouselLayout01CardView { | ||
| 25 | .width(CommonConstants.FULL_PARENT) | 25 | .width(CommonConstants.FULL_PARENT) |
| 26 | .height(CommonConstants.FULL_PARENT) | 26 | .height(CommonConstants.FULL_PARENT) |
| 27 | .objectFit(ImageFit.Cover) | 27 | .objectFit(ImageFit.Cover) |
| 28 | - .borderRadius($r("app.float.border_radius_6")) | 28 | + // .borderRadius($r("app.float.border_radius_6")) |
| 29 | .alignRules({ | 29 | .alignRules({ |
| 30 | top: { anchor: '__container__', align: VerticalAlign.Top }, | 30 | top: { anchor: '__container__', align: VerticalAlign.Top }, |
| 31 | left: { anchor: '__container__', align: HorizontalAlign.Start } | 31 | left: { anchor: '__container__', align: HorizontalAlign.Start } |
| @@ -45,7 +45,7 @@ export struct CarouselLayout01CardView { | @@ -45,7 +45,7 @@ export struct CarouselLayout01CardView { | ||
| 45 | // .id('img_corner_top_Left') | 45 | // .id('img_corner_top_Left') |
| 46 | // } | 46 | // } |
| 47 | 47 | ||
| 48 | - Text(this.item.title) | 48 | + Text(this.item.newsTitle) |
| 49 | .width(CommonConstants.FULL_PARENT) | 49 | .width(CommonConstants.FULL_PARENT) |
| 50 | .height(39) | 50 | .height(39) |
| 51 | .padding({ left: 8, right: 69, bottom: 8 }) | 51 | .padding({ left: 8, right: 69, bottom: 8 }) |
| 1 | import { TopNavDTO } from 'wdBean'; | 1 | import { TopNavDTO } from 'wdBean'; |
| 2 | - | 2 | +import curves from '@ohos.curves'; |
| 3 | 3 | ||
| 4 | const INDEX_SETTING_TITLE: string = '首页设置' | 4 | const INDEX_SETTING_TITLE: string = '首页设置' |
| 5 | const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' | 5 | const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' |
| 6 | const MY_CHANNEL: string = '我的频道' | 6 | const MY_CHANNEL: string = '我的频道' |
| 7 | const EDIT_TEXT: string = '编辑' | 7 | const EDIT_TEXT: string = '编辑' |
| 8 | const EDIT_DOWN: string = '完成' | 8 | const EDIT_DOWN: string = '完成' |
| 9 | +const MY_CHANNEL_TIP1: string = '点击进入频道' | ||
| 10 | +const MY_CHANNEL_TIP2: string = '拖动调整频道顺序' | ||
| 9 | const MORE_CHANNEL: string = '更多频道' | 11 | const MORE_CHANNEL: string = '更多频道' |
| 10 | const LOCAL_CHANNEL: string = '地方频道' | 12 | const LOCAL_CHANNEL: string = '地方频道' |
| 11 | 13 | ||
| 14 | + | ||
| 12 | @CustomDialog | 15 | @CustomDialog |
| 13 | struct ChannelDialog { | 16 | struct ChannelDialog { |
| 14 | - @State indexSettingTabIndex: number = 1 | 17 | + @State dragItem: number = -1 |
| 18 | + @State item: number = -1 | ||
| 19 | + private dragRefOffsetX: number = 0 | ||
| 20 | + private dragRefOffsetY: number = 0 | ||
| 21 | + @State offsetX: number = 0 | ||
| 22 | + @State offsetY: number = 0 | ||
| 23 | + private FIX_VP_X: number = 80 | ||
| 24 | + private FIX_VP_Y: number = 48 | ||
| 25 | + @State indexSettingTabIndex: number = 0 | ||
| 15 | @State isEditIng: boolean = false | 26 | @State isEditIng: boolean = false |
| 16 | - @Link currentTopNavSelectedIndex : number | ||
| 17 | - @Link myChannelList: Array<TopNavDTO> | ||
| 18 | - @Link moreChannelList: Array<TopNavDTO> | ||
| 19 | - @Link localChannelList: Array<TopNavDTO> | ||
| 20 | - @Link indexSettingArray: Array<string> | ||
| 21 | - @Link topNavList: Array<TopNavDTO> | ||
| 22 | - myChannelItemEditHandle = (index: number): void => { | ||
| 23 | - let item = this.myChannelList.splice(index, 1)[0] | ||
| 24 | - console.info(`itemitemitem${JSON.stringify(item)}`) | ||
| 25 | - if (item.moreChannel === '1') { | ||
| 26 | - this.moreChannelList.unshift(item) | 27 | + @State currentTopNavSelectedItem: TopNavDTO = {} as TopNavDTO |
| 28 | + @Link currentTopNavSelectedIndex: number | ||
| 29 | + @Link myChannelList: TopNavDTO[] | ||
| 30 | + @Link moreChannelList: TopNavDTO[] | ||
| 31 | + @Link localChannelList: TopNavDTO[] | ||
| 32 | + @Link indexSettingArray: string[] | ||
| 33 | + controller?: CustomDialogController | ||
| 34 | + confirm: (index: number) => void = () => { | ||
| 35 | + } | ||
| 36 | + changeChannelIndex: (index1: number, index2: number) => void = () => { | ||
| 37 | + } | ||
| 38 | + delChannelItem: (index: number) => void = () => { | ||
| 39 | + } | ||
| 40 | + addChannelItem: (item: TopNavDTO) => void = () => { | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + aboutToAppear() { | ||
| 44 | + this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + itemMove(index: number, newIndex: number): void { | ||
| 48 | + let targetItem = this.myChannelList[newIndex] | ||
| 49 | + if (!(targetItem?.headlinesOn === 1 || targetItem?.movePermitted === 0 || targetItem?.homeChannel === '1')) { | ||
| 50 | + this.changeChannelIndex(index, newIndex) | ||
| 51 | + if (index <= this.currentTopNavSelectedIndex || newIndex <= this.currentTopNavSelectedIndex) { | ||
| 52 | + // this.currentTopNavSelectedIndex = this.myChannelList.findIndex(ele => ele.channelId === currentTopNavSelectedItem.channelId) | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + //向下滑 | ||
| 58 | + down(index: number): void { | ||
| 59 | + console.info(`向下滑`) | ||
| 60 | + this.offsetY -= this.FIX_VP_Y | ||
| 61 | + this.dragRefOffsetY += this.FIX_VP_Y | ||
| 62 | + this.itemMove(index, index + 4) | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + //向下滑(右下角为空) | ||
| 66 | + down2(index: number): void { | ||
| 67 | + this.offsetY -= this.FIX_VP_Y | ||
| 68 | + this.dragRefOffsetY += this.FIX_VP_Y | ||
| 69 | + this.itemMove(index, index + 4) | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + //向上滑 | ||
| 73 | + up(index: number): void { | ||
| 74 | + console.info(`向上滑`) | ||
| 75 | + this.offsetY += this.FIX_VP_Y | ||
| 76 | + this.dragRefOffsetY -= this.FIX_VP_Y | ||
| 77 | + this.itemMove(index, index - 4) | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + //向左滑 | ||
| 81 | + left(index: number): void { | ||
| 82 | + console.info(`向左滑`) | ||
| 83 | + this.offsetX += this.FIX_VP_X | ||
| 84 | + this.dragRefOffsetX -= this.FIX_VP_X | ||
| 85 | + this.itemMove(index, index - 1) | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + //向右滑 | ||
| 89 | + right(index: number): void { | ||
| 90 | + console.info(`向右滑`) | ||
| 91 | + this.offsetX -= this.FIX_VP_X | ||
| 92 | + this.dragRefOffsetX += this.FIX_VP_X | ||
| 93 | + this.itemMove(index, index + 1) | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + //向右下滑 | ||
| 97 | + lowerRight(index: number): void { | ||
| 98 | + console.info(`向右下滑`) | ||
| 99 | + this.offsetX -= this.FIX_VP_X | ||
| 100 | + this.dragRefOffsetX += this.FIX_VP_X | ||
| 101 | + this.offsetY -= this.FIX_VP_Y | ||
| 102 | + this.dragRefOffsetY += this.FIX_VP_Y | ||
| 103 | + this.itemMove(index, index + 5) | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + //向右上滑 | ||
| 107 | + upperRight(index: number): void { | ||
| 108 | + console.info(`向右上滑`) | ||
| 109 | + this.offsetX -= this.FIX_VP_X | ||
| 110 | + this.dragRefOffsetX += this.FIX_VP_X | ||
| 111 | + this.offsetY += this.FIX_VP_Y | ||
| 112 | + this.dragRefOffsetY -= this.FIX_VP_Y | ||
| 113 | + this.itemMove(index, index - 3) | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + //向左下滑 | ||
| 117 | + lowerLeft(index: number): void { | ||
| 118 | + console.info(`向左下滑`) | ||
| 119 | + this.offsetX += this.FIX_VP_X | ||
| 120 | + this.dragRefOffsetX -= this.FIX_VP_X | ||
| 121 | + this.offsetY -= this.FIX_VP_Y | ||
| 122 | + this.dragRefOffsetY += this.FIX_VP_Y | ||
| 123 | + this.itemMove(index, index + 3) | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + //向左上滑 | ||
| 127 | + upperLeft(index: number): void { | ||
| 128 | + console.info(`向左上滑`) | ||
| 129 | + this.offsetX += this.FIX_VP_X | ||
| 130 | + this.dragRefOffsetX -= this.FIX_VP_X | ||
| 131 | + this.offsetY += this.FIX_VP_Y | ||
| 132 | + this.dragRefOffsetY -= this.FIX_VP_Y | ||
| 133 | + this.itemMove(index, index - 5) | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + handleAnimationTo(item: TopNavDTO, event: GestureEvent) { | ||
| 137 | + let index = this.myChannelList.findIndex(ele => ele.num === this.dragItem) | ||
| 138 | + if (!(item.headlinesOn === 1 || item.movePermitted === 0 || item.homeChannel === '1') && this.isEditIng) { | ||
| 139 | + this.offsetY = event.offsetY - this.dragRefOffsetY | ||
| 140 | + this.offsetX = event.offsetX - this.dragRefOffsetX | ||
| 141 | + if (this.offsetY >= this.FIX_VP_Y / 2 && (this.offsetX <= 44 && this.offsetX >= -44) | ||
| 142 | + ) { | ||
| 143 | + //向下滑 | ||
| 144 | + this.down(index) | ||
| 145 | + } else if (this.offsetY <= -this.FIX_VP_Y / 2 && (this.offsetX <= 44 && this.offsetX >= -44) | ||
| 146 | + ) { | ||
| 147 | + //向上滑 | ||
| 148 | + this.up(index) | ||
| 149 | + } else if (this.offsetX >= this.FIX_VP_X / 2 && (this.offsetY <= 20 && this.offsetY >= -20) | ||
| 150 | + ) { | ||
| 151 | + //向右滑 | ||
| 152 | + this.right(index) | ||
| 153 | + } else if (this.offsetX <= -this.FIX_VP_X / 2 && (this.offsetY <= 20 && this.offsetY >= -20) | ||
| 154 | + ) { | ||
| 155 | + //向左滑 | ||
| 156 | + this.left(index) | ||
| 157 | + } else if (this.offsetX >= this.FIX_VP_X / 2 && this.offsetY >= this.FIX_VP_Y / 2 | ||
| 158 | + ) { | ||
| 159 | + //向右下滑 | ||
| 160 | + this.lowerRight(index) | ||
| 161 | + } else if (this.offsetX >= this.FIX_VP_X / 2 && this.offsetY <= -this.FIX_VP_Y / 2 | ||
| 162 | + ) { | ||
| 163 | + //向右上滑 | ||
| 164 | + this.upperRight(index) | ||
| 165 | + } else if (this.offsetX <= -this.FIX_VP_X / 2 && this.offsetY >= this.FIX_VP_Y / 2 | ||
| 166 | + ) { | ||
| 167 | + //向左下滑 | ||
| 168 | + this.lowerLeft(index) | ||
| 169 | + } else if (this.offsetX <= -this.FIX_VP_X / 2 && this.offsetY <= -this.FIX_VP_Y / 2 | ||
| 170 | + ) { | ||
| 171 | + //向左上滑 | ||
| 172 | + this.upperLeft(index) | ||
| 173 | + } else if (this.offsetX >= this.FIX_VP_X / 2 && this.offsetY >= this.FIX_VP_Y / 2 | ||
| 174 | + ) { | ||
| 175 | + //向右下滑(右下角为空) | ||
| 176 | + this.down2(index) | ||
| 27 | } | 177 | } |
| 28 | - if (item.localChannel === '1') { | ||
| 29 | - this.localChannelList.unshift(item) | ||
| 30 | } | 178 | } |
| 31 | } | 179 | } |
| 32 | - controller?: CustomDialogController | ||
| 33 | 180 | ||
| 34 | build() { | 181 | build() { |
| 35 | Column() { | 182 | Column() { |
| 36 | - | ||
| 37 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { | 183 | Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { |
| 38 | Image($r('app.media.icon_ren_min_ri_bao')) | 184 | Image($r('app.media.icon_ren_min_ri_bao')) |
| 39 | .width(72) | 185 | .width(72) |
| @@ -45,7 +191,7 @@ struct ChannelDialog { | @@ -45,7 +191,7 @@ struct ChannelDialog { | ||
| 45 | }) | 191 | }) |
| 46 | } | 192 | } |
| 47 | .width('100%') | 193 | .width('100%') |
| 48 | - .margin({ top: 30, bottom: 10 }) | 194 | + .padding({ bottom: 10 }) |
| 49 | 195 | ||
| 50 | List() { | 196 | List() { |
| 51 | 197 | ||
| @@ -59,6 +205,7 @@ struct ChannelDialog { | @@ -59,6 +205,7 @@ struct ChannelDialog { | ||
| 59 | Text(INDEX_SETTING_SUBTITLE) | 205 | Text(INDEX_SETTING_SUBTITLE) |
| 60 | .fontSize(12) | 206 | .fontSize(12) |
| 61 | .fontWeight(400) | 207 | .fontWeight(400) |
| 208 | + .fontColor('#222222') | ||
| 62 | } | 209 | } |
| 63 | .width('100%') | 210 | .width('100%') |
| 64 | .margin({ top: 22, bottom: 16 }) | 211 | .margin({ top: 22, bottom: 16 }) |
| @@ -68,13 +215,27 @@ struct ChannelDialog { | @@ -68,13 +215,27 @@ struct ChannelDialog { | ||
| 68 | ListItem() { | 215 | ListItem() { |
| 69 | Flex({ justifyContent: FlexAlign.SpaceBetween }) { | 216 | Flex({ justifyContent: FlexAlign.SpaceBetween }) { |
| 70 | ForEach(this.indexSettingArray, (text: string, index: number) => { | 217 | ForEach(this.indexSettingArray, (text: string, index: number) => { |
| 71 | - Button(text, { type: ButtonType.Normal, stateEffect: false }) | ||
| 72 | - .width('48%') | ||
| 73 | - .borderRadius(2) | ||
| 74 | - .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800') | 218 | + Stack() { |
| 219 | + Image(this.indexSettingTabIndex === index ? $r('app.media.index_setting_button_active') : $r('app.media.index_setting_button')) | ||
| 220 | + .objectFit(ImageFit.Auto) | ||
| 221 | + .rotate({ | ||
| 222 | + angle: index === 1 ? 180 : 0 | ||
| 223 | + }) | ||
| 224 | + Row() { | ||
| 225 | + if (index === 0) { | ||
| 226 | + Image(this.indexSettingTabIndex === index ? $r('app.media.recommend_icon') : $r('app.media.recommend_icon_active')) | ||
| 227 | + .width(20) | ||
| 228 | + } | ||
| 229 | + Text(text) | ||
| 230 | + .textAlign(TextAlign.Center) | ||
| 75 | .fontSize(16) | 231 | .fontSize(16) |
| 76 | - .fontWeight(400) | ||
| 77 | - .backgroundColor(index === this.indexSettingTabIndex ? '#ED2800' : '#FDE9E5') | 232 | + .fontColor(index === this.indexSettingTabIndex ? '#ffffff' : '#ED2800') |
| 233 | + } | ||
| 234 | + .width('100%') | ||
| 235 | + .justifyContent(FlexAlign.Center) | ||
| 236 | + } | ||
| 237 | + .alignContent(Alignment.Start) | ||
| 238 | + .height(36) | ||
| 78 | .onClick(() => { | 239 | .onClick(() => { |
| 79 | this.indexSettingTabIndex = index | 240 | this.indexSettingTabIndex = index |
| 80 | }) | 241 | }) |
| @@ -86,9 +247,17 @@ struct ChannelDialog { | @@ -86,9 +247,17 @@ struct ChannelDialog { | ||
| 86 | 247 | ||
| 87 | ListItem() { | 248 | ListItem() { |
| 88 | Row() { | 249 | Row() { |
| 250 | + Row() { | ||
| 89 | Text(MY_CHANNEL) | 251 | Text(MY_CHANNEL) |
| 90 | .fontSize(16) | 252 | .fontSize(16) |
| 91 | .fontWeight(600) | 253 | .fontWeight(600) |
| 254 | + .margin({ right: 4 }) | ||
| 255 | + Text(!this.isEditIng ? MY_CHANNEL_TIP1 : MY_CHANNEL_TIP2) | ||
| 256 | + .fontSize(12) | ||
| 257 | + .fontWeight(400) | ||
| 258 | + .fontColor('#222222') | ||
| 259 | + } | ||
| 260 | + | ||
| 92 | Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT) | 261 | Text(this.isEditIng ? EDIT_DOWN : EDIT_TEXT) |
| 93 | .fontSize(14) | 262 | .fontSize(14) |
| 94 | .fontColor('#ED2800') | 263 | .fontColor('#ED2800') |
| @@ -101,14 +270,15 @@ struct ChannelDialog { | @@ -101,14 +270,15 @@ struct ChannelDialog { | ||
| 101 | .margin({ bottom: 12 }) | 270 | .margin({ bottom: 12 }) |
| 102 | } | 271 | } |
| 103 | 272 | ||
| 273 | + // 我的频道列表 | ||
| 104 | ListItem() { | 274 | ListItem() { |
| 105 | - GridRow({ columns: 4, gutter: 10 }) { | 275 | + Grid() { |
| 106 | ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { | 276 | ForEach(this.myChannelList, (item: TopNavDTO, index: number) => { |
| 107 | - GridCol() { | 277 | + GridItem() { |
| 108 | Row() { | 278 | Row() { |
| 109 | Text(item.name) | 279 | Text(item.name) |
| 110 | .fontSize(14) | 280 | .fontSize(14) |
| 111 | - .fontColor( this.currentTopNavSelectedIndex === index ? '#ED2800' : (item.homeChannel === '1' ? '#999999' : '#222222')) | 281 | + .fontColor(this.currentTopNavSelectedItem.channelId === item.channelId ? '#ED2800' : (item.homeChannel === '1' || item.movePermitted === 0 ? '#999999' : '#222222')) |
| 112 | 282 | ||
| 113 | if (this.isEditIng && item.myChannel !== '1') { | 283 | if (this.isEditIng && item.myChannel !== '1') { |
| 114 | Image($r('app.media.icon_audio_close')) | 284 | Image($r('app.media.icon_audio_close')) |
| @@ -119,30 +289,63 @@ struct ChannelDialog { | @@ -119,30 +289,63 @@ struct ChannelDialog { | ||
| 119 | .width('100%') | 289 | .width('100%') |
| 120 | .height('100%') | 290 | .height('100%') |
| 121 | .justifyContent(FlexAlign.Center) | 291 | .justifyContent(FlexAlign.Center) |
| 122 | - .backgroundColor(item.homeChannel === '1' ? '#F5F5F5' : '') | 292 | + .backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '#ffffff') |
| 123 | .onClick(() => { | 293 | .onClick(() => { |
| 124 | if (this.isEditIng) { | 294 | if (this.isEditIng) { |
| 125 | - if(item.myChannel !== '1'){ | ||
| 126 | - this.myChannelItemEditHandle(index) | 295 | + if (item.myChannel !== '1') { |
| 296 | + this.delChannelItem(index) | ||
| 127 | } | 297 | } |
| 128 | - }else{ | 298 | + } else { |
| 299 | + this.confirm(index) | ||
| 129 | this.controller?.close() | 300 | this.controller?.close() |
| 130 | } | 301 | } |
| 131 | }) | 302 | }) |
| 132 | } | 303 | } |
| 133 | - .width(80) | 304 | + .width('23%') |
| 134 | .height(40) | 305 | .height(40) |
| 135 | .border({ | 306 | .border({ |
| 136 | width: item.homeChannel === '1' ? 0 : 1, | 307 | width: item.homeChannel === '1' ? 0 : 1, |
| 137 | color: '#EDEDED', | 308 | color: '#EDEDED', |
| 138 | radius: 3 | 309 | radius: 3 |
| 139 | }) | 310 | }) |
| 311 | + .zIndex(this.dragItem == item.num ? 1 : 0) | ||
| 312 | + .translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 }) | ||
| 313 | + .gesture( | ||
| 314 | + GestureGroup(GestureMode.Sequence, | ||
| 315 | + PanGesture({ fingers: 1, direction: null, distance: 0 }) | ||
| 316 | + .onActionStart((event: GestureEvent) => { | ||
| 317 | + this.dragItem = item.num | ||
| 318 | + this.dragRefOffsetX = 0 | ||
| 319 | + this.dragRefOffsetY = 0 | ||
| 320 | + }) | ||
| 321 | + .onActionUpdate((event: GestureEvent) => { | ||
| 322 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 323 | + this.handleAnimationTo(item, event) | ||
| 324 | + }) | ||
| 325 | + }) | ||
| 326 | + .onActionEnd((event: GestureEvent) => { | ||
| 327 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 328 | + this.dragItem = -1 | ||
| 329 | + }) | ||
| 330 | + }) | ||
| 331 | + ) | ||
| 332 | + .onCancel(() => { | ||
| 333 | + animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => { | ||
| 334 | + this.dragItem = -1 | ||
| 335 | + }) | ||
| 336 | + })) | ||
| 337 | + | ||
| 140 | }, (item: TopNavDTO) => JSON.stringify(item)) | 338 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 141 | } | 339 | } |
| 142 | .width('100%') | 340 | .width('100%') |
| 143 | .margin({ bottom: 24 }) | 341 | .margin({ bottom: 24 }) |
| 342 | + .columnsTemplate('1fr 1fr 1fr 1fr') | ||
| 343 | + .columnsGap(8) | ||
| 344 | + .rowsGap(8) | ||
| 345 | + .height(Math.ceil(this.myChannelList.length / 4) * 48) | ||
| 144 | } | 346 | } |
| 145 | 347 | ||
| 348 | + //更多频道列表 | ||
| 146 | ListItem() { | 349 | ListItem() { |
| 147 | Column() { | 350 | Column() { |
| 148 | if (this.moreChannelList.length > 0) { | 351 | if (this.moreChannelList.length > 0) { |
| @@ -168,7 +371,7 @@ struct ChannelDialog { | @@ -168,7 +371,7 @@ struct ChannelDialog { | ||
| 168 | .width('100%').height('100%') | 371 | .width('100%').height('100%') |
| 169 | .justifyContent(FlexAlign.Center) | 372 | .justifyContent(FlexAlign.Center) |
| 170 | .onClick(() => { | 373 | .onClick(() => { |
| 171 | - this.myChannelList.push(this.moreChannelList.splice(index, 1)[0]) | 374 | + this.addChannelItem(this.moreChannelList.splice(index, 1)[0]) |
| 172 | }) | 375 | }) |
| 173 | } | 376 | } |
| 174 | .width(80) | 377 | .width(80) |
| @@ -186,6 +389,7 @@ struct ChannelDialog { | @@ -186,6 +389,7 @@ struct ChannelDialog { | ||
| 186 | .width('100%') | 389 | .width('100%') |
| 187 | } | 390 | } |
| 188 | 391 | ||
| 392 | + //本地频道列表 | ||
| 189 | ListItem() { | 393 | ListItem() { |
| 190 | Column() { | 394 | Column() { |
| 191 | if (this.localChannelList.length > 0) { | 395 | if (this.localChannelList.length > 0) { |
| @@ -211,7 +415,7 @@ struct ChannelDialog { | @@ -211,7 +415,7 @@ struct ChannelDialog { | ||
| 211 | .width('100%').height('100%') | 415 | .width('100%').height('100%') |
| 212 | .justifyContent(FlexAlign.Center) | 416 | .justifyContent(FlexAlign.Center) |
| 213 | .onClick(() => { | 417 | .onClick(() => { |
| 214 | - this.myChannelList.push(this.localChannelList.splice(index, 1)[0]) | 418 | + this.addChannelItem(this.localChannelList.splice(index, 1)[0]) |
| 215 | }) | 419 | }) |
| 216 | } | 420 | } |
| 217 | .width(80) | 421 | .width(80) |
| @@ -229,311 +433,1634 @@ struct ChannelDialog { | @@ -229,311 +433,1634 @@ struct ChannelDialog { | ||
| 229 | } | 433 | } |
| 230 | 434 | ||
| 231 | }.width('100%').height('100%') | 435 | }.width('100%').height('100%') |
| 232 | - | ||
| 233 | } | 436 | } |
| 234 | - .padding(16) | 437 | + .padding({ top: 40, right: 15, bottom: 20, left: 15 }) |
| 235 | .backgroundColor('#ffffff') | 438 | .backgroundColor('#ffffff') |
| 236 | } | 439 | } |
| 237 | - | ||
| 238 | - onTopNavigationDataUpdated() { | ||
| 239 | - } | ||
| 240 | } | 440 | } |
| 241 | 441 | ||
| 242 | -@Entry | 442 | +// @Entry |
| 243 | @Component | 443 | @Component |
| 244 | struct ChannelSubscriptionLayout { | 444 | struct ChannelSubscriptionLayout { |
| 445 | + @State indexSettingArray: string [] = ['推荐', '热点'] | ||
| 245 | //当前选中的频道 | 446 | //当前选中的频道 |
| 246 | - @Prop currentTopNavSelectedIndex?: number; | ||
| 247 | - | ||
| 248 | - @State indexSettingArray: Array<string> = ['推荐', '热点'] | ||
| 249 | - @State myChannelList: Array<TopNavDTO> = [ | 447 | + @Link currentTopNavSelectedIndex: number; |
| 448 | + @Link myChannelList: TopNavDTO [] | ||
| 449 | + @Link moreChannelList: TopNavDTO [] | ||
| 450 | + @Link localChannelList: TopNavDTO [] | ||
| 451 | + @Link @Watch('onChannelIdsUpdate') channelIds: number [] | ||
| 452 | + changeTab: (index: number) => void = () => { | ||
| 453 | + } | ||
| 454 | + //频道弹窗点击切换频道 | ||
| 455 | + onAccept = (index: number) => { | ||
| 456 | + this.changeTab(index) | ||
| 457 | + } | ||
| 458 | + //交换我的频道数组中的位置 | ||
| 459 | + changeChannelIndex = (index1: number, index2: number) => { | ||
| 460 | + let tmp = this.myChannelList.splice(index1, 1) | ||
| 461 | + let channelIdTmp = this.channelIds.splice(index1, 1) | ||
| 462 | + this.myChannelList.splice(index2, 0, tmp[0]) | ||
| 463 | + this.channelIds.splice(index2, 0, channelIdTmp[0]) | ||
| 464 | + } | ||
| 465 | + //删除频道 | ||
| 466 | + delChannelItem = (index: number) => { | ||
| 467 | + let item = this.myChannelList.splice(index, 1)[0] | ||
| 468 | + this.channelIds.splice(index, 1) | ||
| 469 | + if (item.moreChannel === '1') { | ||
| 470 | + this.moreChannelList.unshift(item) | ||
| 471 | + } | ||
| 472 | + if (item.localChannel === '1') { | ||
| 473 | + this.localChannelList.unshift(item) | ||
| 474 | + } | ||
| 475 | + } | ||
| 476 | + // 添加频道 | ||
| 477 | + addChannelItem = (item: TopNavDTO) => { | ||
| 478 | + this.channelIds.push(item.channelId) | ||
| 479 | + this.myChannelList.push(item) | ||
| 480 | + } | ||
| 481 | + // @State currentTopNavSelectedIndex: number = 0 | ||
| 482 | + // @State topNavList: TopNavDTO [] = [ | ||
| 250 | // { | 483 | // { |
| 251 | - // channelId: 0, | ||
| 252 | - // channelStyle: 1, | 484 | + // channelId: 2001, |
| 485 | + // channelStrategy: 1, | ||
| 486 | + // channelStyle: 2, | ||
| 253 | // channelType: 1, | 487 | // channelType: 1, |
| 254 | // defaultPermitted: 1, | 488 | // defaultPermitted: 1, |
| 255 | - // delPermitted: 1, | ||
| 256 | - // fontCColor: '#000000', | ||
| 257 | - // fontColor: '#000000', | 489 | + // delPermitted: 0, |
| 490 | + // fontCColor: "#FFFFFF", | ||
| 491 | + // fontColor: "#F9AB99", | ||
| 258 | // headlinesOn: 0, | 492 | // headlinesOn: 0, |
| 259 | - // homeChannel: '1', | ||
| 260 | - // iconCUrl: '', | ||
| 261 | - // iconCUrlSize: '', | ||
| 262 | - // iconUrl: '', | ||
| 263 | - // iconUrlSize: '', | ||
| 264 | - // localChannel: '', | ||
| 265 | - // moreChannel: '', | 493 | + // homeChannel: "0", |
| 494 | + // iconCUrl: "", | ||
| 495 | + // iconCUrlSize: "", | ||
| 496 | + // iconUrl: "", | ||
| 497 | + // iconUrlSize: "", | ||
| 498 | + // localChannel: "0", | ||
| 499 | + // moreChannel: "0", | ||
| 266 | // movePermitted: 0, | 500 | // movePermitted: 0, |
| 267 | - // myChannel: '1', | ||
| 268 | - // name: '推荐', | ||
| 269 | - // num: 0, | ||
| 270 | - // pageId: 21212, | ||
| 271 | - // pageType: '', | ||
| 272 | - // underlineCColor: '' | 501 | + // myChannel: "0", |
| 502 | + // name: "推荐", | ||
| 503 | + // num: 1, | ||
| 504 | + // pageId: 20011, | ||
| 505 | + // pageType: "", | ||
| 506 | + // underlineCColor: "" | ||
| 273 | // }, | 507 | // }, |
| 274 | // { | 508 | // { |
| 275 | - // channelId: 1, | ||
| 276 | - // channelStyle: 1, | 509 | + // channelId: 2002, |
| 510 | + // channelStrategy: 2, | ||
| 511 | + // channelStyle: 2, | ||
| 277 | // channelType: 1, | 512 | // channelType: 1, |
| 278 | // defaultPermitted: 1, | 513 | // defaultPermitted: 1, |
| 279 | - // delPermitted: 1, | ||
| 280 | - // fontCColor: '#000000', | ||
| 281 | - // fontColor: '#000000', | 514 | + // delPermitted: 0, |
| 515 | + // fontCColor: "#FFFFFF", | ||
| 516 | + // fontColor: "#F9AB99", | ||
| 282 | // headlinesOn: 0, | 517 | // headlinesOn: 0, |
| 283 | - // homeChannel: '1', | ||
| 284 | - // iconCUrl: '', | ||
| 285 | - // iconCUrlSize: '', | ||
| 286 | - // iconUrl: '', | ||
| 287 | - // iconUrlSize: '', | ||
| 288 | - // localChannel: '', | ||
| 289 | - // moreChannel: '', | 518 | + // homeChannel: "0", |
| 519 | + // iconCUrl: "", | ||
| 520 | + // iconCUrlSize: "", | ||
| 521 | + // iconUrl: "", | ||
| 522 | + // iconUrlSize: "", | ||
| 523 | + // localChannel: "0", | ||
| 524 | + // moreChannel: "0", | ||
| 290 | // movePermitted: 0, | 525 | // movePermitted: 0, |
| 291 | - // myChannel: '1', | ||
| 292 | - // name: '热点', | ||
| 293 | - // num: 0, | ||
| 294 | - // pageId: 21212, | ||
| 295 | - // pageType: '', | ||
| 296 | - // underlineCColor: '' | 526 | + // myChannel: "0", |
| 527 | + // name: "热点", | ||
| 528 | + // num: 2, | ||
| 529 | + // pageId: 20012, | ||
| 530 | + // pageType: "", | ||
| 531 | + // underlineCColor: "" | ||
| 297 | // }, | 532 | // }, |
| 298 | // { | 533 | // { |
| 299 | - // channelId: 2, | ||
| 300 | - // channelStyle: 1, | 534 | + // channelId: 2003, |
| 535 | + // channelStrategy: 2, | ||
| 536 | + // channelStyle: 2, | ||
| 301 | // channelType: 1, | 537 | // channelType: 1, |
| 302 | - // defaultPermitted: 1, | 538 | + // defaultPermitted: 0, |
| 539 | + // delPermitted: 0, | ||
| 540 | + // fontCColor: "#FFFFFF", | ||
| 541 | + // fontColor: "#F9AB99", | ||
| 542 | + // headlinesOn: 0, | ||
| 543 | + // homeChannel: "0", | ||
| 544 | + // iconCUrl: "", | ||
| 545 | + // iconCUrlSize: "", | ||
| 546 | + // iconUrl: "", | ||
| 547 | + // iconUrlSize: "", | ||
| 548 | + // localChannel: "0", | ||
| 549 | + // moreChannel: "0", | ||
| 550 | + // movePermitted: 1, | ||
| 551 | + // myChannel: "0", | ||
| 552 | + // name: "锐评", | ||
| 553 | + // num: 3, | ||
| 554 | + // pageId: 20013, | ||
| 555 | + // pageType: "", | ||
| 556 | + // underlineCColor: "" | ||
| 557 | + // }, | ||
| 558 | + // { | ||
| 559 | + // channelId: 2066, | ||
| 560 | + // channelStrategy: 2, | ||
| 561 | + // channelStyle: 3, | ||
| 562 | + // channelType: 1, | ||
| 563 | + // defaultPermitted: 0, | ||
| 303 | // delPermitted: 1, | 564 | // delPermitted: 1, |
| 304 | - // fontCColor: '#000000', | ||
| 305 | - // fontColor: '#000000', | 565 | + // fontCColor: "#FFFFFF", |
| 566 | + // fontColor: "#F9AB99", | ||
| 306 | // headlinesOn: 0, | 567 | // headlinesOn: 0, |
| 307 | - // homeChannel: '', | ||
| 308 | - // iconCUrl: '', | ||
| 309 | - // iconCUrlSize: '', | ||
| 310 | - // iconUrl: '', | ||
| 311 | - // iconUrlSize: '', | ||
| 312 | - // localChannel: '', | ||
| 313 | - // moreChannel: '', | ||
| 314 | - // movePermitted: 0, | ||
| 315 | - // myChannel: '1', | ||
| 316 | - // name: '视频', | ||
| 317 | - // num: 0, | ||
| 318 | - // pageId: 21212, | ||
| 319 | - // pageType: '', | ||
| 320 | - // underlineCColor: '' | 568 | + // homeChannel: "0", |
| 569 | + // iconCUrl: "", | ||
| 570 | + // iconCUrlSize: "", | ||
| 571 | + // iconUrl: "", | ||
| 572 | + // iconUrlSize: "", | ||
| 573 | + // localChannel: "0", | ||
| 574 | + // moreChannel: "0", | ||
| 575 | + // movePermitted: 1, | ||
| 576 | + // myChannel: "0", | ||
| 577 | + // name: "播报", | ||
| 578 | + // num: 4, | ||
| 579 | + // pageId: 21003, | ||
| 580 | + // pageType: "", | ||
| 581 | + // underlineCColor: "" | ||
| 321 | // }, | 582 | // }, |
| 322 | // { | 583 | // { |
| 323 | - // channelId: 3, | ||
| 324 | - // channelStyle: 1, | 584 | + // channelId: 2006, |
| 585 | + // channelStrategy: 2, | ||
| 586 | + // channelStyle: 3, | ||
| 325 | // channelType: 1, | 587 | // channelType: 1, |
| 326 | - // defaultPermitted: 1, | 588 | + // defaultPermitted: 0, |
| 589 | + // delPermitted: 0, | ||
| 590 | + // fontCColor: "#FFFFFF", | ||
| 591 | + // fontColor: "#F9AB99", | ||
| 592 | + // headlinesOn: 0, | ||
| 593 | + // homeChannel: "0", | ||
| 594 | + // iconCUrl: "", | ||
| 595 | + // iconCUrlSize: "", | ||
| 596 | + // iconUrl: "", | ||
| 597 | + // iconUrlSize: "", | ||
| 598 | + // localChannel: "0", | ||
| 599 | + // moreChannel: "0", | ||
| 600 | + // movePermitted: 1, | ||
| 601 | + // myChannel: "0", | ||
| 602 | + // name: "版面", | ||
| 603 | + // num: 5, | ||
| 604 | + // pageId: 20016, | ||
| 605 | + // pageType: "", | ||
| 606 | + // underlineCColor: "" | ||
| 607 | + // }, | ||
| 608 | + // { | ||
| 609 | + // channelId: 2011, | ||
| 610 | + // channelStrategy: 2, | ||
| 611 | + // channelStyle: 2, | ||
| 612 | + // channelType: 1, | ||
| 613 | + // defaultPermitted: 0, | ||
| 327 | // delPermitted: 1, | 614 | // delPermitted: 1, |
| 328 | - // fontCColor: '#000000', | ||
| 329 | - // fontColor: '#000000', | 615 | + // fontCColor: "#FFFFFF", |
| 616 | + // fontColor: "#F9AB99", | ||
| 330 | // headlinesOn: 0, | 617 | // headlinesOn: 0, |
| 331 | - // homeChannel: '', | ||
| 332 | - // iconCUrl: '', | ||
| 333 | - // iconCUrlSize: '', | ||
| 334 | - // iconUrl: '', | ||
| 335 | - // iconUrlSize: '', | ||
| 336 | - // localChannel: '', | ||
| 337 | - // moreChannel: '', | ||
| 338 | - // movePermitted: 0, | ||
| 339 | - // myChannel: '1', | ||
| 340 | - // name: '云课堂', | ||
| 341 | - // num: 0, | ||
| 342 | - // pageId: 21212, | ||
| 343 | - // pageType: '', | ||
| 344 | - // underlineCColor: '' | ||
| 345 | - // }, | ||
| 346 | - ] | ||
| 347 | - @State moreChannelList: Array<TopNavDTO> = [ | ||
| 348 | - // { | ||
| 349 | - // channelId: 4, | ||
| 350 | - // channelStyle: 1, | 618 | + // homeChannel: "0", |
| 619 | + // iconCUrl: "", | ||
| 620 | + // iconCUrlSize: "", | ||
| 621 | + // iconUrl: "", | ||
| 622 | + // iconUrlSize: "", | ||
| 623 | + // localChannel: "0", | ||
| 624 | + // moreChannel: "0", | ||
| 625 | + // movePermitted: 1, | ||
| 626 | + // myChannel: "0", | ||
| 627 | + // name: "体育", | ||
| 628 | + // num: 6, | ||
| 629 | + // pageId: 20021, | ||
| 630 | + // pageType: "", | ||
| 631 | + // underlineCColor: "" | ||
| 632 | + // }, | ||
| 633 | + // { | ||
| 634 | + // channelId: 2020, | ||
| 635 | + // channelStrategy: 1, | ||
| 636 | + // channelStyle: 2, | ||
| 351 | // channelType: 1, | 637 | // channelType: 1, |
| 352 | - // defaultPermitted: 1, | 638 | + // defaultPermitted: 0, |
| 353 | // delPermitted: 1, | 639 | // delPermitted: 1, |
| 354 | - // fontCColor: '#000000', | ||
| 355 | - // fontColor: '#000000', | 640 | + // fontCColor: "#FFFFFF", |
| 641 | + // fontColor: "#F9AB99", | ||
| 356 | // headlinesOn: 0, | 642 | // headlinesOn: 0, |
| 357 | - // homeChannel: '', | ||
| 358 | - // iconCUrl: '', | ||
| 359 | - // iconCUrlSize: '', | ||
| 360 | - // iconUrl: '', | ||
| 361 | - // iconUrlSize: '', | ||
| 362 | - // localChannel: '', | ||
| 363 | - // moreChannel: '1', | 643 | + // homeChannel: "0", |
| 644 | + // iconCUrl: "", | ||
| 645 | + // iconCUrlSize: "", | ||
| 646 | + // iconUrl: "", | ||
| 647 | + // iconUrlSize: "", | ||
| 648 | + // localChannel: "0", | ||
| 649 | + // moreChannel: "0", | ||
| 650 | + // movePermitted: 1, | ||
| 651 | + // myChannel: "0", | ||
| 652 | + // name: "国际", | ||
| 653 | + // num: 7, | ||
| 654 | + // pageId: 20030, | ||
| 655 | + // pageType: "", | ||
| 656 | + // underlineCColor: "" | ||
| 657 | + // }, | ||
| 658 | + // { | ||
| 659 | + // channelId: 2063, | ||
| 660 | + // channelStrategy: 2, | ||
| 661 | + // channelStyle: 2, | ||
| 662 | + // channelType: 1, | ||
| 663 | + // defaultPermitted: 0, | ||
| 664 | + // delPermitted: 0, | ||
| 665 | + // fontCColor: "#FFFFFF", | ||
| 666 | + // fontColor: "#F9AB99", | ||
| 667 | + // headlinesOn: 0, | ||
| 668 | + // homeChannel: "0", | ||
| 669 | + // iconCUrl: "", | ||
| 670 | + // iconCUrlSize: "", | ||
| 671 | + // iconUrl: "", | ||
| 672 | + // iconUrlSize: "", | ||
| 673 | + // localChannel: "0", | ||
| 674 | + // moreChannel: "0", | ||
| 364 | // movePermitted: 0, | 675 | // movePermitted: 0, |
| 365 | - // myChannel: '', | ||
| 366 | - // name: '房产', | ||
| 367 | - // num: 0, | ||
| 368 | - // pageId: 21212, | ||
| 369 | - // pageType: '', | ||
| 370 | - // underlineCColor: '' | 676 | + // myChannel: "0", |
| 677 | + // name: "两会", | ||
| 678 | + // num: 8, | ||
| 679 | + // pageId: 21000, | ||
| 680 | + // pageType: "", | ||
| 681 | + // underlineCColor: "" | ||
| 371 | // }, | 682 | // }, |
| 372 | // { | 683 | // { |
| 373 | - // channelId: 5, | ||
| 374 | - // channelStyle: 1, | 684 | + // channelId: 2072, |
| 685 | + // channelStrategy: 2, | ||
| 686 | + // channelStyle: 2, | ||
| 375 | // channelType: 1, | 687 | // channelType: 1, |
| 376 | - // defaultPermitted: 1, | ||
| 377 | - // delPermitted: 1, | ||
| 378 | - // fontCColor: '#000000', | ||
| 379 | - // fontColor: '#000000', | 688 | + // defaultPermitted: 0, |
| 689 | + // delPermitted: 0, | ||
| 690 | + // fontCColor: "#FFFFFF", | ||
| 691 | + // fontColor: "#F9AB99", | ||
| 380 | // headlinesOn: 0, | 692 | // headlinesOn: 0, |
| 381 | - // homeChannel: '', | ||
| 382 | - // iconCUrl: '', | ||
| 383 | - // iconCUrlSize: '', | ||
| 384 | - // iconUrl: '', | ||
| 385 | - // iconUrlSize: '', | ||
| 386 | - // localChannel: '', | ||
| 387 | - // moreChannel: '1', | 693 | + // homeChannel: "0", |
| 694 | + // iconCUrl: "", | ||
| 695 | + // iconCUrlSize: "", | ||
| 696 | + // iconUrl: "", | ||
| 697 | + // iconUrlSize: "", | ||
| 698 | + // localChannel: "0", | ||
| 699 | + // moreChannel: "0", | ||
| 388 | // movePermitted: 0, | 700 | // movePermitted: 0, |
| 389 | - // myChannel: '', | ||
| 390 | - // name: '生态', | ||
| 391 | - // num: 0, | ||
| 392 | - // pageId: 21212, | ||
| 393 | - // pageType: '', | ||
| 394 | - // underlineCColor: '' | 701 | + // myChannel: "0", |
| 702 | + // name: "亚运", | ||
| 703 | + // num: 9, | ||
| 704 | + // pageId: 21009, | ||
| 705 | + // pageType: "", | ||
| 706 | + // underlineCColor: "" | ||
| 395 | // }, | 707 | // }, |
| 396 | // { | 708 | // { |
| 397 | - // channelId: 6, | ||
| 398 | - // channelStyle: 1, | 709 | + // channelId: 2015, |
| 710 | + // channelStrategy: 1, | ||
| 711 | + // channelStyle: 2, | ||
| 399 | // channelType: 1, | 712 | // channelType: 1, |
| 400 | - // defaultPermitted: 1, | 713 | + // defaultPermitted: 0, |
| 401 | // delPermitted: 1, | 714 | // delPermitted: 1, |
| 402 | - // fontCColor: '#000000', | ||
| 403 | - // fontColor: '#000000', | 715 | + // fontCColor: "#FFFFFF", |
| 716 | + // fontColor: "#F9AB99", | ||
| 404 | // headlinesOn: 0, | 717 | // headlinesOn: 0, |
| 405 | - // homeChannel: '', | ||
| 406 | - // iconCUrl: '', | ||
| 407 | - // iconCUrlSize: '', | ||
| 408 | - // iconUrl: '', | ||
| 409 | - // iconUrlSize: '', | ||
| 410 | - // localChannel: '', | ||
| 411 | - // moreChannel: '1', | ||
| 412 | - // movePermitted: 0, | ||
| 413 | - // myChannel: '', | ||
| 414 | - // name: '健康', | ||
| 415 | - // num: 0, | ||
| 416 | - // pageId: 21212, | ||
| 417 | - // pageType: '', | ||
| 418 | - // underlineCColor: '' | ||
| 419 | - // } | ||
| 420 | - ] | ||
| 421 | - @State localChannelList: Array<TopNavDTO> = [ | 718 | + // homeChannel: "0", |
| 719 | + // iconCUrl: "", | ||
| 720 | + // iconCUrlSize: "", | ||
| 721 | + // iconUrl: "", | ||
| 722 | + // iconUrlSize: "", | ||
| 723 | + // localChannel: "0", | ||
| 724 | + // moreChannel: "0", | ||
| 725 | + // movePermitted: 1, | ||
| 726 | + // myChannel: "0", | ||
| 727 | + // name: "科技", | ||
| 728 | + // num: 10, | ||
| 729 | + // pageId: 20025, | ||
| 730 | + // pageType: "", | ||
| 731 | + // underlineCColor: "" | ||
| 732 | + // }, | ||
| 422 | // { | 733 | // { |
| 423 | - // channelId: 7, | ||
| 424 | - // channelStyle: 1, | 734 | + // channelId: 2004, |
| 735 | + // channelStrategy: 2, | ||
| 736 | + // channelStyle: 2, | ||
| 425 | // channelType: 1, | 737 | // channelType: 1, |
| 426 | - // defaultPermitted: 1, | 738 | + // defaultPermitted: 0, |
| 739 | + // delPermitted: 0, | ||
| 740 | + // fontCColor: "#FFFFFF", | ||
| 741 | + // fontColor: "#F9AB99", | ||
| 742 | + // headlinesOn: 0, | ||
| 743 | + // homeChannel: "0", | ||
| 744 | + // iconCUrl: "", | ||
| 745 | + // iconCUrlSize: "", | ||
| 746 | + // iconUrl: "", | ||
| 747 | + // iconUrlSize: "", | ||
| 748 | + // localChannel: "0", | ||
| 749 | + // moreChannel: "0", | ||
| 750 | + // movePermitted: 1, | ||
| 751 | + // myChannel: "0", | ||
| 752 | + // name: "云课堂", | ||
| 753 | + // num: 11, | ||
| 754 | + // pageId: 20014, | ||
| 755 | + // pageType: "", | ||
| 756 | + // underlineCColor: "" | ||
| 757 | + // }, | ||
| 758 | + // { | ||
| 759 | + // channelId: 2005, | ||
| 760 | + // channelStrategy: 2, | ||
| 761 | + // channelStyle: 2, | ||
| 762 | + // channelType: 1, | ||
| 763 | + // defaultPermitted: 0, | ||
| 764 | + // delPermitted: 0, | ||
| 765 | + // fontCColor: "#FFFFFF", | ||
| 766 | + // fontColor: "#F9AB99", | ||
| 767 | + // headlinesOn: 0, | ||
| 768 | + // homeChannel: "0", | ||
| 769 | + // iconCUrl: "", | ||
| 770 | + // iconCUrlSize: "", | ||
| 771 | + // iconUrl: "", | ||
| 772 | + // iconUrlSize: "", | ||
| 773 | + // localChannel: "0", | ||
| 774 | + // moreChannel: "0", | ||
| 775 | + // movePermitted: 1, | ||
| 776 | + // myChannel: "0", | ||
| 777 | + // name: "文件", | ||
| 778 | + // num: 12, | ||
| 779 | + // pageId: 20015, | ||
| 780 | + // pageType: "", | ||
| 781 | + // underlineCColor: "" | ||
| 782 | + // }, | ||
| 783 | + // { | ||
| 784 | + // channelId: 2007, | ||
| 785 | + // channelStrategy: 1, | ||
| 786 | + // channelStyle: 2, | ||
| 787 | + // channelType: 1, | ||
| 788 | + // defaultPermitted: 0, | ||
| 789 | + // delPermitted: 0, | ||
| 790 | + // fontCColor: "#FFFFFF", | ||
| 791 | + // fontColor: "#F9AB99", | ||
| 792 | + // headlinesOn: 0, | ||
| 793 | + // homeChannel: "0", | ||
| 794 | + // iconCUrl: "", | ||
| 795 | + // iconCUrlSize: "", | ||
| 796 | + // iconUrl: "", | ||
| 797 | + // iconUrlSize: "", | ||
| 798 | + // localChannel: "0", | ||
| 799 | + // moreChannel: "0", | ||
| 800 | + // movePermitted: 1, | ||
| 801 | + // myChannel: "0", | ||
| 802 | + // name: "镜头", | ||
| 803 | + // num: 13, | ||
| 804 | + // pageId: 20017, | ||
| 805 | + // pageType: "", | ||
| 806 | + // underlineCColor: "" | ||
| 807 | + // }, | ||
| 808 | + // { | ||
| 809 | + // channelId: 2008, | ||
| 810 | + // channelStrategy: 2, | ||
| 811 | + // channelStyle: 2, | ||
| 812 | + // channelType: 1, | ||
| 813 | + // defaultPermitted: 0, | ||
| 814 | + // delPermitted: 0, | ||
| 815 | + // fontCColor: "#FFFFFF", | ||
| 816 | + // fontColor: "#F9AB99", | ||
| 817 | + // headlinesOn: 0, | ||
| 818 | + // homeChannel: "0", | ||
| 819 | + // iconCUrl: "", | ||
| 820 | + // iconCUrlSize: "", | ||
| 821 | + // iconUrl: "", | ||
| 822 | + // iconUrlSize: "", | ||
| 823 | + // localChannel: "0", | ||
| 824 | + // moreChannel: "0", | ||
| 825 | + // movePermitted: 1, | ||
| 826 | + // myChannel: "0", | ||
| 827 | + // name: "公益", | ||
| 828 | + // num: 14, | ||
| 829 | + // pageId: 20018, | ||
| 830 | + // pageType: "", | ||
| 831 | + // underlineCColor: "" | ||
| 832 | + // }, | ||
| 833 | + // { | ||
| 834 | + // channelId: 2009, | ||
| 835 | + // channelStrategy: 1, | ||
| 836 | + // channelStyle: 2, | ||
| 837 | + // channelType: 1, | ||
| 838 | + // defaultPermitted: 0, | ||
| 427 | // delPermitted: 1, | 839 | // delPermitted: 1, |
| 428 | - // fontCColor: '#000000', | ||
| 429 | - // fontColor: '#000000', | 840 | + // fontCColor: "#FFFFFF", |
| 841 | + // fontColor: "#F9AB99", | ||
| 430 | // headlinesOn: 0, | 842 | // headlinesOn: 0, |
| 431 | - // homeChannel: '', | ||
| 432 | - // iconCUrl: '', | ||
| 433 | - // iconCUrlSize: '', | ||
| 434 | - // iconUrl: '', | ||
| 435 | - // iconUrlSize: '', | ||
| 436 | - // localChannel: '1', | ||
| 437 | - // moreChannel: '', | ||
| 438 | - // movePermitted: 0, | ||
| 439 | - // myChannel: '', | ||
| 440 | - // name: '北京', | ||
| 441 | - // num: 0, | ||
| 442 | - // pageId: 21212, | ||
| 443 | - // pageType: '', | ||
| 444 | - // underlineCColor: '' | 843 | + // homeChannel: "0", |
| 844 | + // iconCUrl: "", | ||
| 845 | + // iconCUrlSize: "", | ||
| 846 | + // iconUrl: "", | ||
| 847 | + // iconUrlSize: "", | ||
| 848 | + // localChannel: "0", | ||
| 849 | + // moreChannel: "0", | ||
| 850 | + // movePermitted: 1, | ||
| 851 | + // myChannel: "0", | ||
| 852 | + // name: "社会", | ||
| 853 | + // num: 15, | ||
| 854 | + // pageId: 20019, | ||
| 855 | + // pageType: "", | ||
| 856 | + // underlineCColor: "" | ||
| 445 | // }, | 857 | // }, |
| 446 | // { | 858 | // { |
| 447 | - // channelId: 8, | ||
| 448 | - // channelStyle: 1, | 859 | + // channelId: 2010, |
| 860 | + // channelStrategy: 1, | ||
| 861 | + // channelStyle: 2, | ||
| 449 | // channelType: 1, | 862 | // channelType: 1, |
| 450 | - // defaultPermitted: 1, | 863 | + // defaultPermitted: 0, |
| 451 | // delPermitted: 1, | 864 | // delPermitted: 1, |
| 452 | - // fontCColor: '#000000', | ||
| 453 | - // fontColor: '#000000', | 865 | + // fontCColor: "#FFFFFF", |
| 866 | + // fontColor: "#F9AB99", | ||
| 454 | // headlinesOn: 0, | 867 | // headlinesOn: 0, |
| 455 | - // homeChannel: '', | ||
| 456 | - // iconCUrl: '', | ||
| 457 | - // iconCUrlSize: '', | ||
| 458 | - // iconUrl: '', | ||
| 459 | - // iconUrlSize: '', | ||
| 460 | - // localChannel: '1', | ||
| 461 | - // moreChannel: '', | ||
| 462 | - // movePermitted: 0, | ||
| 463 | - // myChannel: '', | ||
| 464 | - // name: '上海', | ||
| 465 | - // num: 0, | ||
| 466 | - // pageId: 21212, | ||
| 467 | - // pageType: '', | ||
| 468 | - // underlineCColor: '' | 868 | + // homeChannel: "0", |
| 869 | + // iconCUrl: "", | ||
| 870 | + // iconCUrlSize: "", | ||
| 871 | + // iconUrl: "", | ||
| 872 | + // iconUrlSize: "", | ||
| 873 | + // localChannel: "0", | ||
| 874 | + // moreChannel: "0", | ||
| 875 | + // movePermitted: 1, | ||
| 876 | + // myChannel: "0", | ||
| 877 | + // name: "财经", | ||
| 878 | + // num: 16, | ||
| 879 | + // pageId: 20020, | ||
| 880 | + // pageType: "", | ||
| 881 | + // underlineCColor: "" | ||
| 469 | // }, | 882 | // }, |
| 470 | // { | 883 | // { |
| 471 | - // channelId: 9, | ||
| 472 | - // channelStyle: 1, | 884 | + // channelId: 2012, |
| 885 | + // channelStrategy: 1, | ||
| 886 | + // channelStyle: 2, | ||
| 473 | // channelType: 1, | 887 | // channelType: 1, |
| 474 | - // defaultPermitted: 1, | 888 | + // defaultPermitted: 0, |
| 475 | // delPermitted: 1, | 889 | // delPermitted: 1, |
| 476 | - // fontCColor: '#000000', | ||
| 477 | - // fontColor: '#000000', | 890 | + // fontCColor: "#FFFFFF", |
| 891 | + // fontColor: "#F9AB99", | ||
| 478 | // headlinesOn: 0, | 892 | // headlinesOn: 0, |
| 479 | - // homeChannel: '', | ||
| 480 | - // iconCUrl: '', | ||
| 481 | - // iconCUrlSize: '', | ||
| 482 | - // iconUrl: '', | ||
| 483 | - // iconUrlSize: '', | ||
| 484 | - // localChannel: '1', | ||
| 485 | - // moreChannel: '', | ||
| 486 | - // movePermitted: 0, | ||
| 487 | - // myChannel: '', | ||
| 488 | - // name: '江苏', | ||
| 489 | - // num: 0, | ||
| 490 | - // pageId: 21212, | ||
| 491 | - // pageType: '', | ||
| 492 | - // underlineCColor: '' | 893 | + // homeChannel: "0", |
| 894 | + // iconCUrl: "", | ||
| 895 | + // iconCUrlSize: "", | ||
| 896 | + // iconUrl: "", | ||
| 897 | + // iconUrlSize: "", | ||
| 898 | + // localChannel: "0", | ||
| 899 | + // moreChannel: "0", | ||
| 900 | + // movePermitted: 1, | ||
| 901 | + // myChannel: "0", | ||
| 902 | + // name: "文化", | ||
| 903 | + // num: 17, | ||
| 904 | + // pageId: 20022, | ||
| 905 | + // pageType: "", | ||
| 906 | + // underlineCColor: "" | ||
| 907 | + // }, | ||
| 908 | + // { | ||
| 909 | + // channelId: 2013, | ||
| 910 | + // channelStrategy: 1, | ||
| 911 | + // channelStyle: 2, | ||
| 912 | + // channelType: 1, | ||
| 913 | + // defaultPermitted: 0, | ||
| 914 | + // delPermitted: 1, | ||
| 915 | + // fontCColor: "#FFFFFF", | ||
| 916 | + // fontColor: "#F9AB99", | ||
| 917 | + // headlinesOn: 0, | ||
| 918 | + // homeChannel: "0", | ||
| 919 | + // iconCUrl: "", | ||
| 920 | + // iconCUrlSize: "", | ||
| 921 | + // iconUrl: "", | ||
| 922 | + // iconUrlSize: "", | ||
| 923 | + // localChannel: "0", | ||
| 924 | + // moreChannel: "0", | ||
| 925 | + // movePermitted: 1, | ||
| 926 | + // myChannel: "0", | ||
| 927 | + // name: "教育", | ||
| 928 | + // num: 18, | ||
| 929 | + // pageId: 20023, | ||
| 930 | + // pageType: "", | ||
| 931 | + // underlineCColor: "" | ||
| 932 | + // }, | ||
| 933 | + // { | ||
| 934 | + // channelId: 2014, | ||
| 935 | + // channelStrategy: 1, | ||
| 936 | + // channelStyle: 2, | ||
| 937 | + // channelType: 1, | ||
| 938 | + // defaultPermitted: 0, | ||
| 939 | + // delPermitted: 1, | ||
| 940 | + // fontCColor: "#FFFFFF", | ||
| 941 | + // fontColor: "#F9AB99", | ||
| 942 | + // headlinesOn: 0, | ||
| 943 | + // homeChannel: "0", | ||
| 944 | + // iconCUrl: "", | ||
| 945 | + // iconCUrlSize: "", | ||
| 946 | + // iconUrl: "", | ||
| 947 | + // iconUrlSize: "", | ||
| 948 | + // localChannel: "0", | ||
| 949 | + // moreChannel: "0", | ||
| 950 | + // movePermitted: 1, | ||
| 951 | + // myChannel: "0", | ||
| 952 | + // name: "军事", | ||
| 953 | + // num: 19, | ||
| 954 | + // pageId: 20024, | ||
| 955 | + // pageType: "", | ||
| 956 | + // underlineCColor: "" | ||
| 957 | + // }, | ||
| 958 | + // { | ||
| 959 | + // channelId: 2017, | ||
| 960 | + // channelStrategy: 2, | ||
| 961 | + // channelStyle: 2, | ||
| 962 | + // channelType: 1, | ||
| 963 | + // defaultPermitted: 0, | ||
| 964 | + // delPermitted: 1, | ||
| 965 | + // fontCColor: "#FFFFFF", | ||
| 966 | + // fontColor: "#F9AB99", | ||
| 967 | + // headlinesOn: 0, | ||
| 968 | + // homeChannel: "0", | ||
| 969 | + // iconCUrl: "", | ||
| 970 | + // iconCUrlSize: "", | ||
| 971 | + // iconUrl: "", | ||
| 972 | + // iconUrlSize: "", | ||
| 973 | + // localChannel: "0", | ||
| 974 | + // moreChannel: "0", | ||
| 975 | + // movePermitted: 1, | ||
| 976 | + // myChannel: "0", | ||
| 977 | + // name: "健康", | ||
| 978 | + // num: 20, | ||
| 979 | + // pageId: 20027, | ||
| 980 | + // pageType: "", | ||
| 981 | + // underlineCColor: "" | ||
| 982 | + // }, | ||
| 983 | + // { | ||
| 984 | + // channelId: 2019, | ||
| 985 | + // channelStrategy: 1, | ||
| 986 | + // channelStyle: 2, | ||
| 987 | + // channelType: 1, | ||
| 988 | + // defaultPermitted: 0, | ||
| 989 | + // delPermitted: 1, | ||
| 990 | + // fontCColor: "#FFFFFF", | ||
| 991 | + // fontColor: "#F9AB99", | ||
| 992 | + // headlinesOn: 0, | ||
| 993 | + // homeChannel: "0", | ||
| 994 | + // iconCUrl: "", | ||
| 995 | + // iconCUrlSize: "", | ||
| 996 | + // iconUrl: "", | ||
| 997 | + // iconUrlSize: "", | ||
| 998 | + // localChannel: "0", | ||
| 999 | + // moreChannel: "0", | ||
| 1000 | + // movePermitted: 1, | ||
| 1001 | + // myChannel: "0", | ||
| 1002 | + // name: "房产", | ||
| 1003 | + // num: 21, | ||
| 1004 | + // pageId: 20029, | ||
| 1005 | + // pageType: "", | ||
| 1006 | + // underlineCColor: "" | ||
| 1007 | + // }, | ||
| 1008 | + // { | ||
| 1009 | + // channelId: 2018, | ||
| 1010 | + // channelStrategy: 1, | ||
| 1011 | + // channelStyle: 2, | ||
| 1012 | + // channelType: 1, | ||
| 1013 | + // defaultPermitted: 0, | ||
| 1014 | + // delPermitted: 1, | ||
| 1015 | + // fontCColor: "#FFFFFF", | ||
| 1016 | + // fontColor: "#F9AB99", | ||
| 1017 | + // headlinesOn: 0, | ||
| 1018 | + // homeChannel: "0", | ||
| 1019 | + // iconCUrl: "", | ||
| 1020 | + // iconCUrlSize: "", | ||
| 1021 | + // iconUrl: "", | ||
| 1022 | + // iconUrlSize: "", | ||
| 1023 | + // localChannel: "0", | ||
| 1024 | + // moreChannel: "0", | ||
| 1025 | + // movePermitted: 1, | ||
| 1026 | + // myChannel: "0", | ||
| 1027 | + // name: "汽车", | ||
| 1028 | + // num: 22, | ||
| 1029 | + // pageId: 20028, | ||
| 1030 | + // pageType: "", | ||
| 1031 | + // underlineCColor: "" | ||
| 1032 | + // }, | ||
| 1033 | + // { | ||
| 1034 | + // channelId: 2065, | ||
| 1035 | + // channelStrategy: 2, | ||
| 1036 | + // channelStyle: 2, | ||
| 1037 | + // channelType: 1, | ||
| 1038 | + // defaultPermitted: 0, | ||
| 1039 | + // delPermitted: 0, | ||
| 1040 | + // fontCColor: "#FFFFFF", | ||
| 1041 | + // fontColor: "#F9AB99", | ||
| 1042 | + // headlinesOn: 0, | ||
| 1043 | + // homeChannel: "0", | ||
| 1044 | + // iconCUrl: "", | ||
| 1045 | + // iconCUrlSize: "", | ||
| 1046 | + // iconUrl: "", | ||
| 1047 | + // iconUrlSize: "", | ||
| 1048 | + // localChannel: "0", | ||
| 1049 | + // moreChannel: "0", | ||
| 1050 | + // movePermitted: 1, | ||
| 1051 | + // myChannel: "0", | ||
| 1052 | + // name: "三农", | ||
| 1053 | + // num: 24, | ||
| 1054 | + // pageId: 21002, | ||
| 1055 | + // pageType: "", | ||
| 1056 | + // underlineCColor: "" | ||
| 1057 | + // }, | ||
| 1058 | + // { | ||
| 1059 | + // channelId: 2024, | ||
| 1060 | + // channelStrategy: 1, | ||
| 1061 | + // channelStyle: 2, | ||
| 1062 | + // channelType: 1, | ||
| 1063 | + // defaultPermitted: 0, | ||
| 1064 | + // delPermitted: 1, | ||
| 1065 | + // fontCColor: "#FFFFFF", | ||
| 1066 | + // fontColor: "#F9AB99", | ||
| 1067 | + // headlinesOn: 0, | ||
| 1068 | + // homeChannel: "0", | ||
| 1069 | + // iconCUrl: "", | ||
| 1070 | + // iconCUrlSize: "", | ||
| 1071 | + // iconUrl: "", | ||
| 1072 | + // iconUrlSize: "", | ||
| 1073 | + // localChannel: "0", | ||
| 1074 | + // moreChannel: "0", | ||
| 1075 | + // movePermitted: 1, | ||
| 1076 | + // myChannel: "0", | ||
| 1077 | + // name: "家居", | ||
| 1078 | + // num: 25, | ||
| 1079 | + // pageId: 20034, | ||
| 1080 | + // pageType: "", | ||
| 1081 | + // underlineCColor: "" | ||
| 1082 | + // }, | ||
| 1083 | + // { | ||
| 1084 | + // channelId: 2021, | ||
| 1085 | + // channelStrategy: 1, | ||
| 1086 | + // channelStyle: 2, | ||
| 1087 | + // channelType: 1, | ||
| 1088 | + // defaultPermitted: 0, | ||
| 1089 | + // delPermitted: 1, | ||
| 1090 | + // fontCColor: "#FFFFFF", | ||
| 1091 | + // fontColor: "#F9AB99", | ||
| 1092 | + // headlinesOn: 0, | ||
| 1093 | + // homeChannel: "0", | ||
| 1094 | + // iconCUrl: "", | ||
| 1095 | + // iconCUrlSize: "", | ||
| 1096 | + // iconUrl: "", | ||
| 1097 | + // iconUrlSize: "", | ||
| 1098 | + // localChannel: "0", | ||
| 1099 | + // moreChannel: "0", | ||
| 1100 | + // movePermitted: 1, | ||
| 1101 | + // myChannel: "0", | ||
| 1102 | + // name: "法治", | ||
| 1103 | + // num: 27, | ||
| 1104 | + // pageId: 20031, | ||
| 1105 | + // pageType: "", | ||
| 1106 | + // underlineCColor: "" | ||
| 1107 | + // }, | ||
| 1108 | + // { | ||
| 1109 | + // channelId: 2022, | ||
| 1110 | + // channelStrategy: 1, | ||
| 1111 | + // channelStyle: 2, | ||
| 1112 | + // channelType: 1, | ||
| 1113 | + // defaultPermitted: 0, | ||
| 1114 | + // delPermitted: 1, | ||
| 1115 | + // fontCColor: "#FFFFFF", | ||
| 1116 | + // fontColor: "#F9AB99", | ||
| 1117 | + // headlinesOn: 0, | ||
| 1118 | + // homeChannel: "0", | ||
| 1119 | + // iconCUrl: "", | ||
| 1120 | + // iconCUrlSize: "", | ||
| 1121 | + // iconUrl: "", | ||
| 1122 | + // iconUrlSize: "", | ||
| 1123 | + // localChannel: "0", | ||
| 1124 | + // moreChannel: "0", | ||
| 1125 | + // movePermitted: 1, | ||
| 1126 | + // myChannel: "0", | ||
| 1127 | + // name: "美食", | ||
| 1128 | + // num: 28, | ||
| 1129 | + // pageId: 20032, | ||
| 1130 | + // pageType: "", | ||
| 1131 | + // underlineCColor: "" | ||
| 1132 | + // }, | ||
| 1133 | + // { | ||
| 1134 | + // channelId: 2025, | ||
| 1135 | + // channelStrategy: 1, | ||
| 1136 | + // channelStyle: 2, | ||
| 1137 | + // channelType: 1, | ||
| 1138 | + // defaultPermitted: 0, | ||
| 1139 | + // delPermitted: 1, | ||
| 1140 | + // fontCColor: "#FFFFFF", | ||
| 1141 | + // fontColor: "#F9AB99", | ||
| 1142 | + // headlinesOn: 0, | ||
| 1143 | + // homeChannel: "0", | ||
| 1144 | + // iconCUrl: "", | ||
| 1145 | + // iconCUrlSize: "", | ||
| 1146 | + // iconUrl: "", | ||
| 1147 | + // iconUrlSize: "", | ||
| 1148 | + // localChannel: "0", | ||
| 1149 | + // moreChannel: "0", | ||
| 1150 | + // movePermitted: 1, | ||
| 1151 | + // myChannel: "0", | ||
| 1152 | + // name: "育儿", | ||
| 1153 | + // num: 29, | ||
| 1154 | + // pageId: 20035, | ||
| 1155 | + // pageType: "", | ||
| 1156 | + // underlineCColor: "" | ||
| 1157 | + // }, | ||
| 1158 | + // { | ||
| 1159 | + // channelId: 2026, | ||
| 1160 | + // channelStrategy: 1, | ||
| 1161 | + // channelStyle: 2, | ||
| 1162 | + // channelType: 1, | ||
| 1163 | + // defaultPermitted: 0, | ||
| 1164 | + // delPermitted: 1, | ||
| 1165 | + // fontCColor: "#FFFFFF", | ||
| 1166 | + // fontColor: "#F9AB99", | ||
| 1167 | + // headlinesOn: 0, | ||
| 1168 | + // homeChannel: "0", | ||
| 1169 | + // iconCUrl: "", | ||
| 1170 | + // iconCUrlSize: "", | ||
| 1171 | + // iconUrl: "", | ||
| 1172 | + // iconUrlSize: "", | ||
| 1173 | + // localChannel: "0", | ||
| 1174 | + // moreChannel: "0", | ||
| 1175 | + // movePermitted: 1, | ||
| 1176 | + // myChannel: "0", | ||
| 1177 | + // name: "生态", | ||
| 1178 | + // num: 30, | ||
| 1179 | + // pageId: 20036, | ||
| 1180 | + // pageType: "", | ||
| 1181 | + // underlineCColor: "" | ||
| 1182 | + // }, | ||
| 1183 | + // { | ||
| 1184 | + // channelId: 2023, | ||
| 1185 | + // channelStrategy: 1, | ||
| 1186 | + // channelStyle: 2, | ||
| 1187 | + // channelType: 1, | ||
| 1188 | + // defaultPermitted: 0, | ||
| 1189 | + // delPermitted: 1, | ||
| 1190 | + // fontCColor: "#FFFFFF", | ||
| 1191 | + // fontColor: "#F9AB99", | ||
| 1192 | + // headlinesOn: 0, | ||
| 1193 | + // homeChannel: "0", | ||
| 1194 | + // iconCUrl: "", | ||
| 1195 | + // iconCUrlSize: "", | ||
| 1196 | + // iconUrl: "", | ||
| 1197 | + // iconUrlSize: "", | ||
| 1198 | + // localChannel: "0", | ||
| 1199 | + // moreChannel: "0", | ||
| 1200 | + // movePermitted: 1, | ||
| 1201 | + // myChannel: "0", | ||
| 1202 | + // name: "时尚", | ||
| 1203 | + // num: 31, | ||
| 1204 | + // pageId: 20033, | ||
| 1205 | + // pageType: "", | ||
| 1206 | + // underlineCColor: "" | ||
| 1207 | + // }, | ||
| 1208 | + // { | ||
| 1209 | + // channelId: 2027, | ||
| 1210 | + // channelStrategy: 1, | ||
| 1211 | + // channelStyle: 2, | ||
| 1212 | + // channelType: 2, | ||
| 1213 | + // defaultPermitted: 0, | ||
| 1214 | + // delPermitted: 1, | ||
| 1215 | + // fontCColor: "#FFFFFF", | ||
| 1216 | + // fontColor: "#F9AB99", | ||
| 1217 | + // headlinesOn: 0, | ||
| 1218 | + // homeChannel: "0", | ||
| 1219 | + // iconCUrl: "", | ||
| 1220 | + // iconCUrlSize: "", | ||
| 1221 | + // iconUrl: "", | ||
| 1222 | + // iconUrlSize: "", | ||
| 1223 | + // localChannel: "0", | ||
| 1224 | + // moreChannel: "0", | ||
| 1225 | + // movePermitted: 1, | ||
| 1226 | + // myChannel: "0", | ||
| 1227 | + // name: "北京", | ||
| 1228 | + // num: 32, | ||
| 1229 | + // pageId: 20037, | ||
| 1230 | + // pageType: "", | ||
| 1231 | + // underlineCColor: "" | ||
| 1232 | + // }, | ||
| 1233 | + // { | ||
| 1234 | + // channelId: 2029, | ||
| 1235 | + // channelStrategy: 1, | ||
| 1236 | + // channelStyle: 2, | ||
| 1237 | + // channelType: 2, | ||
| 1238 | + // defaultPermitted: 0, | ||
| 1239 | + // delPermitted: 1, | ||
| 1240 | + // fontCColor: "#FFFFFF", | ||
| 1241 | + // fontColor: "#F9AB99", | ||
| 1242 | + // headlinesOn: 0, | ||
| 1243 | + // homeChannel: "0", | ||
| 1244 | + // iconCUrl: "", | ||
| 1245 | + // iconCUrlSize: "", | ||
| 1246 | + // iconUrl: "", | ||
| 1247 | + // iconUrlSize: "", | ||
| 1248 | + // localChannel: "0", | ||
| 1249 | + // moreChannel: "0", | ||
| 1250 | + // movePermitted: 1, | ||
| 1251 | + // myChannel: "0", | ||
| 1252 | + // name: "天津", | ||
| 1253 | + // num: 33, | ||
| 1254 | + // pageId: 20039, | ||
| 1255 | + // pageType: "", | ||
| 1256 | + // underlineCColor: "" | ||
| 1257 | + // }, | ||
| 1258 | + // { | ||
| 1259 | + // channelId: 2030, | ||
| 1260 | + // channelStrategy: 1, | ||
| 1261 | + // channelStyle: 2, | ||
| 1262 | + // channelType: 2, | ||
| 1263 | + // defaultPermitted: 0, | ||
| 1264 | + // delPermitted: 1, | ||
| 1265 | + // fontCColor: "#FFFFFF", | ||
| 1266 | + // fontColor: "#F9AB99", | ||
| 1267 | + // headlinesOn: 0, | ||
| 1268 | + // homeChannel: "0", | ||
| 1269 | + // iconCUrl: "", | ||
| 1270 | + // iconCUrlSize: "", | ||
| 1271 | + // iconUrl: "", | ||
| 1272 | + // iconUrlSize: "", | ||
| 1273 | + // localChannel: "0", | ||
| 1274 | + // moreChannel: "0", | ||
| 1275 | + // movePermitted: 1, | ||
| 1276 | + // myChannel: "0", | ||
| 1277 | + // name: "河北", | ||
| 1278 | + // num: 34, | ||
| 1279 | + // pageId: 20040, | ||
| 1280 | + // pageType: "", | ||
| 1281 | + // underlineCColor: "" | ||
| 1282 | + // }, | ||
| 1283 | + // { | ||
| 1284 | + // channelId: 2042, | ||
| 1285 | + // channelStrategy: 1, | ||
| 1286 | + // channelStyle: 2, | ||
| 1287 | + // channelType: 2, | ||
| 1288 | + // defaultPermitted: 0, | ||
| 1289 | + // delPermitted: 1, | ||
| 1290 | + // fontCColor: "#FFFFFF", | ||
| 1291 | + // fontColor: "#F9AB99", | ||
| 1292 | + // headlinesOn: 0, | ||
| 1293 | + // homeChannel: "0", | ||
| 1294 | + // iconCUrl: "", | ||
| 1295 | + // iconCUrlSize: "", | ||
| 1296 | + // iconUrl: "", | ||
| 1297 | + // iconUrlSize: "", | ||
| 1298 | + // localChannel: "0", | ||
| 1299 | + // moreChannel: "0", | ||
| 1300 | + // movePermitted: 1, | ||
| 1301 | + // myChannel: "0", | ||
| 1302 | + // name: "河南", | ||
| 1303 | + // num: 35, | ||
| 1304 | + // pageId: 20052, | ||
| 1305 | + // pageType: "", | ||
| 1306 | + // underlineCColor: "" | ||
| 1307 | + // }, | ||
| 1308 | + // { | ||
| 1309 | + // channelId: 2041, | ||
| 1310 | + // channelStrategy: 1, | ||
| 1311 | + // channelStyle: 2, | ||
| 1312 | + // channelType: 2, | ||
| 1313 | + // defaultPermitted: 0, | ||
| 1314 | + // delPermitted: 1, | ||
| 1315 | + // fontCColor: "#FFFFFF", | ||
| 1316 | + // fontColor: "#F9AB99", | ||
| 1317 | + // headlinesOn: 0, | ||
| 1318 | + // homeChannel: "0", | ||
| 1319 | + // iconCUrl: "", | ||
| 1320 | + // iconCUrlSize: "", | ||
| 1321 | + // iconUrl: "", | ||
| 1322 | + // iconUrlSize: "", | ||
| 1323 | + // localChannel: "0", | ||
| 1324 | + // moreChannel: "0", | ||
| 1325 | + // movePermitted: 1, | ||
| 1326 | + // myChannel: "0", | ||
| 1327 | + // name: "山东", | ||
| 1328 | + // num: 36, | ||
| 1329 | + // pageId: 20051, | ||
| 1330 | + // pageType: "", | ||
| 1331 | + // underlineCColor: "" | ||
| 1332 | + // }, | ||
| 1333 | + // { | ||
| 1334 | + // channelId: 2031, | ||
| 1335 | + // channelStrategy: 2, | ||
| 1336 | + // channelStyle: 2, | ||
| 1337 | + // channelType: 2, | ||
| 1338 | + // defaultPermitted: 0, | ||
| 1339 | + // delPermitted: 1, | ||
| 1340 | + // fontCColor: "#FFFFFF", | ||
| 1341 | + // fontColor: "#F9AB99", | ||
| 1342 | + // headlinesOn: 0, | ||
| 1343 | + // homeChannel: "0", | ||
| 1344 | + // iconCUrl: "", | ||
| 1345 | + // iconCUrlSize: "", | ||
| 1346 | + // iconUrl: "", | ||
| 1347 | + // iconUrlSize: "", | ||
| 1348 | + // localChannel: "0", | ||
| 1349 | + // moreChannel: "0", | ||
| 1350 | + // movePermitted: 1, | ||
| 1351 | + // myChannel: "0", | ||
| 1352 | + // name: "山西", | ||
| 1353 | + // num: 37, | ||
| 1354 | + // pageId: 20041, | ||
| 1355 | + // pageType: "", | ||
| 1356 | + // underlineCColor: "" | ||
| 1357 | + // }, | ||
| 1358 | + // { | ||
| 1359 | + // channelId: 2032, | ||
| 1360 | + // channelStrategy: 1, | ||
| 1361 | + // channelStyle: 2, | ||
| 1362 | + // channelType: 2, | ||
| 1363 | + // defaultPermitted: 0, | ||
| 1364 | + // delPermitted: 1, | ||
| 1365 | + // fontCColor: "#FFFFFF", | ||
| 1366 | + // fontColor: "#F9AB99", | ||
| 1367 | + // headlinesOn: 0, | ||
| 1368 | + // homeChannel: "0", | ||
| 1369 | + // iconCUrl: "", | ||
| 1370 | + // iconCUrlSize: "", | ||
| 1371 | + // iconUrl: "", | ||
| 1372 | + // iconUrlSize: "", | ||
| 1373 | + // localChannel: "0", | ||
| 1374 | + // moreChannel: "0", | ||
| 1375 | + // movePermitted: 1, | ||
| 1376 | + // myChannel: "0", | ||
| 1377 | + // name: "内蒙古", | ||
| 1378 | + // num: 38, | ||
| 1379 | + // pageId: 20042, | ||
| 1380 | + // pageType: "", | ||
| 1381 | + // underlineCColor: "" | ||
| 1382 | + // }, | ||
| 1383 | + // { | ||
| 1384 | + // channelId: 2033, | ||
| 1385 | + // channelStrategy: 1, | ||
| 1386 | + // channelStyle: 2, | ||
| 1387 | + // channelType: 2, | ||
| 1388 | + // defaultPermitted: 0, | ||
| 1389 | + // delPermitted: 1, | ||
| 1390 | + // fontCColor: "#FFFFFF", | ||
| 1391 | + // fontColor: "#F9AB99", | ||
| 1392 | + // headlinesOn: 0, | ||
| 1393 | + // homeChannel: "0", | ||
| 1394 | + // iconCUrl: "", | ||
| 1395 | + // iconCUrlSize: "", | ||
| 1396 | + // iconUrl: "", | ||
| 1397 | + // iconUrlSize: "", | ||
| 1398 | + // localChannel: "0", | ||
| 1399 | + // moreChannel: "0", | ||
| 1400 | + // movePermitted: 1, | ||
| 1401 | + // myChannel: "0", | ||
| 1402 | + // name: "辽宁", | ||
| 1403 | + // num: 39, | ||
| 1404 | + // pageId: 20043, | ||
| 1405 | + // pageType: "", | ||
| 1406 | + // underlineCColor: "" | ||
| 1407 | + // }, | ||
| 1408 | + // { | ||
| 1409 | + // channelId: 2034, | ||
| 1410 | + // channelStrategy: 1, | ||
| 1411 | + // channelStyle: 2, | ||
| 1412 | + // channelType: 2, | ||
| 1413 | + // defaultPermitted: 0, | ||
| 1414 | + // delPermitted: 1, | ||
| 1415 | + // fontCColor: "#FFFFFF", | ||
| 1416 | + // fontColor: "#F9AB99", | ||
| 1417 | + // headlinesOn: 0, | ||
| 1418 | + // homeChannel: "0", | ||
| 1419 | + // iconCUrl: "", | ||
| 1420 | + // iconCUrlSize: "", | ||
| 1421 | + // iconUrl: "", | ||
| 1422 | + // iconUrlSize: "", | ||
| 1423 | + // localChannel: "0", | ||
| 1424 | + // moreChannel: "0", | ||
| 1425 | + // movePermitted: 1, | ||
| 1426 | + // myChannel: "0", | ||
| 1427 | + // name: "吉林", | ||
| 1428 | + // num: 40, | ||
| 1429 | + // pageId: 20044, | ||
| 1430 | + // pageType: "", | ||
| 1431 | + // underlineCColor: "" | ||
| 1432 | + // }, | ||
| 1433 | + // { | ||
| 1434 | + // channelId: 2035, | ||
| 1435 | + // channelStrategy: 1, | ||
| 1436 | + // channelStyle: 2, | ||
| 1437 | + // channelType: 2, | ||
| 1438 | + // defaultPermitted: 0, | ||
| 1439 | + // delPermitted: 1, | ||
| 1440 | + // fontCColor: "#FFFFFF", | ||
| 1441 | + // fontColor: "#F9AB99", | ||
| 1442 | + // headlinesOn: 0, | ||
| 1443 | + // homeChannel: "0", | ||
| 1444 | + // iconCUrl: "", | ||
| 1445 | + // iconCUrlSize: "", | ||
| 1446 | + // iconUrl: "", | ||
| 1447 | + // iconUrlSize: "", | ||
| 1448 | + // localChannel: "0", | ||
| 1449 | + // moreChannel: "0", | ||
| 1450 | + // movePermitted: 1, | ||
| 1451 | + // myChannel: "0", | ||
| 1452 | + // name: "黑龙江", | ||
| 1453 | + // num: 41, | ||
| 1454 | + // pageId: 20045, | ||
| 1455 | + // pageType: "", | ||
| 1456 | + // underlineCColor: "" | ||
| 1457 | + // }, | ||
| 1458 | + // { | ||
| 1459 | + // channelId: 2028, | ||
| 1460 | + // channelStrategy: 1, | ||
| 1461 | + // channelStyle: 2, | ||
| 1462 | + // channelType: 2, | ||
| 1463 | + // defaultPermitted: 0, | ||
| 1464 | + // delPermitted: 1, | ||
| 1465 | + // fontCColor: "#FFFFFF", | ||
| 1466 | + // fontColor: "#F9AB99", | ||
| 1467 | + // headlinesOn: 0, | ||
| 1468 | + // homeChannel: "0", | ||
| 1469 | + // iconCUrl: "", | ||
| 1470 | + // iconCUrlSize: "", | ||
| 1471 | + // iconUrl: "", | ||
| 1472 | + // iconUrlSize: "", | ||
| 1473 | + // localChannel: "0", | ||
| 1474 | + // moreChannel: "0", | ||
| 1475 | + // movePermitted: 1, | ||
| 1476 | + // myChannel: "0", | ||
| 1477 | + // name: "上海", | ||
| 1478 | + // num: 42, | ||
| 1479 | + // pageId: 20038, | ||
| 1480 | + // pageType: "", | ||
| 1481 | + // underlineCColor: "" | ||
| 1482 | + // }, | ||
| 1483 | + // { | ||
| 1484 | + // channelId: 2036, | ||
| 1485 | + // channelStrategy: 1, | ||
| 1486 | + // channelStyle: 2, | ||
| 1487 | + // channelType: 2, | ||
| 1488 | + // defaultPermitted: 0, | ||
| 1489 | + // delPermitted: 1, | ||
| 1490 | + // fontCColor: "#FFFFFF", | ||
| 1491 | + // fontColor: "#F9AB99", | ||
| 1492 | + // headlinesOn: 0, | ||
| 1493 | + // homeChannel: "0", | ||
| 1494 | + // iconCUrl: "", | ||
| 1495 | + // iconCUrlSize: "", | ||
| 1496 | + // iconUrl: "", | ||
| 1497 | + // iconUrlSize: "", | ||
| 1498 | + // localChannel: "0", | ||
| 1499 | + // moreChannel: "0", | ||
| 1500 | + // movePermitted: 1, | ||
| 1501 | + // myChannel: "0", | ||
| 1502 | + // name: "江苏", | ||
| 1503 | + // num: 43, | ||
| 1504 | + // pageId: 20046, | ||
| 1505 | + // pageType: "", | ||
| 1506 | + // underlineCColor: "" | ||
| 1507 | + // }, | ||
| 1508 | + // { | ||
| 1509 | + // channelId: 2037, | ||
| 1510 | + // channelStrategy: 1, | ||
| 1511 | + // channelStyle: 2, | ||
| 1512 | + // channelType: 2, | ||
| 1513 | + // defaultPermitted: 0, | ||
| 1514 | + // delPermitted: 1, | ||
| 1515 | + // fontCColor: "#FFFFFF", | ||
| 1516 | + // fontColor: "#F9AB99", | ||
| 1517 | + // headlinesOn: 0, | ||
| 1518 | + // homeChannel: "0", | ||
| 1519 | + // iconCUrl: "", | ||
| 1520 | + // iconCUrlSize: "", | ||
| 1521 | + // iconUrl: "", | ||
| 1522 | + // iconUrlSize: "", | ||
| 1523 | + // localChannel: "0", | ||
| 1524 | + // moreChannel: "0", | ||
| 1525 | + // movePermitted: 1, | ||
| 1526 | + // myChannel: "0", | ||
| 1527 | + // name: "浙江", | ||
| 1528 | + // num: 44, | ||
| 1529 | + // pageId: 20047, | ||
| 1530 | + // pageType: "", | ||
| 1531 | + // underlineCColor: "" | ||
| 1532 | + // }, | ||
| 1533 | + // { | ||
| 1534 | + // channelId: 2038, | ||
| 1535 | + // channelStrategy: 1, | ||
| 1536 | + // channelStyle: 2, | ||
| 1537 | + // channelType: 2, | ||
| 1538 | + // defaultPermitted: 0, | ||
| 1539 | + // delPermitted: 1, | ||
| 1540 | + // fontCColor: "#FFFFFF", | ||
| 1541 | + // fontColor: "#F9AB99", | ||
| 1542 | + // headlinesOn: 0, | ||
| 1543 | + // homeChannel: "0", | ||
| 1544 | + // iconCUrl: "", | ||
| 1545 | + // iconCUrlSize: "", | ||
| 1546 | + // iconUrl: "", | ||
| 1547 | + // iconUrlSize: "", | ||
| 1548 | + // localChannel: "0", | ||
| 1549 | + // moreChannel: "0", | ||
| 1550 | + // movePermitted: 1, | ||
| 1551 | + // myChannel: "0", | ||
| 1552 | + // name: "安徽", | ||
| 1553 | + // num: 45, | ||
| 1554 | + // pageId: 20048, | ||
| 1555 | + // pageType: "", | ||
| 1556 | + // underlineCColor: "" | ||
| 1557 | + // }, | ||
| 1558 | + // { | ||
| 1559 | + // channelId: 2039, | ||
| 1560 | + // channelStrategy: 1, | ||
| 1561 | + // channelStyle: 2, | ||
| 1562 | + // channelType: 2, | ||
| 1563 | + // defaultPermitted: 0, | ||
| 1564 | + // delPermitted: 1, | ||
| 1565 | + // fontCColor: "#FFFFFF", | ||
| 1566 | + // fontColor: "#F9AB99", | ||
| 1567 | + // headlinesOn: 0, | ||
| 1568 | + // homeChannel: "0", | ||
| 1569 | + // iconCUrl: "", | ||
| 1570 | + // iconCUrlSize: "", | ||
| 1571 | + // iconUrl: "", | ||
| 1572 | + // iconUrlSize: "", | ||
| 1573 | + // localChannel: "0", | ||
| 1574 | + // moreChannel: "0", | ||
| 1575 | + // movePermitted: 1, | ||
| 1576 | + // myChannel: "0", | ||
| 1577 | + // name: "福建", | ||
| 1578 | + // num: 46, | ||
| 1579 | + // pageId: 20049, | ||
| 1580 | + // pageType: "", | ||
| 1581 | + // underlineCColor: "" | ||
| 1582 | + // }, | ||
| 1583 | + // { | ||
| 1584 | + // channelId: 2040, | ||
| 1585 | + // channelStrategy: 1, | ||
| 1586 | + // channelStyle: 2, | ||
| 1587 | + // channelType: 2, | ||
| 1588 | + // defaultPermitted: 0, | ||
| 1589 | + // delPermitted: 1, | ||
| 1590 | + // fontCColor: "#FFFFFF", | ||
| 1591 | + // fontColor: "#F9AB99", | ||
| 1592 | + // headlinesOn: 0, | ||
| 1593 | + // homeChannel: "0", | ||
| 1594 | + // iconCUrl: "", | ||
| 1595 | + // iconCUrlSize: "", | ||
| 1596 | + // iconUrl: "", | ||
| 1597 | + // iconUrlSize: "", | ||
| 1598 | + // localChannel: "0", | ||
| 1599 | + // moreChannel: "0", | ||
| 1600 | + // movePermitted: 1, | ||
| 1601 | + // myChannel: "0", | ||
| 1602 | + // name: "江西", | ||
| 1603 | + // num: 47, | ||
| 1604 | + // pageId: 20050, | ||
| 1605 | + // pageType: "", | ||
| 1606 | + // underlineCColor: "" | ||
| 1607 | + // }, | ||
| 1608 | + // { | ||
| 1609 | + // channelId: 2045, | ||
| 1610 | + // channelStrategy: 2, | ||
| 1611 | + // channelStyle: 2, | ||
| 1612 | + // channelType: 2, | ||
| 1613 | + // defaultPermitted: 0, | ||
| 1614 | + // delPermitted: 1, | ||
| 1615 | + // fontCColor: "#FFFFFF", | ||
| 1616 | + // fontColor: "#F9AB99", | ||
| 1617 | + // headlinesOn: 0, | ||
| 1618 | + // homeChannel: "0", | ||
| 1619 | + // iconCUrl: "", | ||
| 1620 | + // iconCUrlSize: "", | ||
| 1621 | + // iconUrl: "", | ||
| 1622 | + // iconUrlSize: "", | ||
| 1623 | + // localChannel: "0", | ||
| 1624 | + // moreChannel: "0", | ||
| 1625 | + // movePermitted: 1, | ||
| 1626 | + // myChannel: "0", | ||
| 1627 | + // name: "广东", | ||
| 1628 | + // num: 48, | ||
| 1629 | + // pageId: 20055, | ||
| 1630 | + // pageType: "", | ||
| 1631 | + // underlineCColor: "" | ||
| 1632 | + // }, | ||
| 1633 | + // { | ||
| 1634 | + // channelId: 2046, | ||
| 1635 | + // channelStrategy: 1, | ||
| 1636 | + // channelStyle: 2, | ||
| 1637 | + // channelType: 2, | ||
| 1638 | + // defaultPermitted: 0, | ||
| 1639 | + // delPermitted: 1, | ||
| 1640 | + // fontCColor: "#FFFFFF", | ||
| 1641 | + // fontColor: "#F9AB99", | ||
| 1642 | + // headlinesOn: 0, | ||
| 1643 | + // homeChannel: "0", | ||
| 1644 | + // iconCUrl: "", | ||
| 1645 | + // iconCUrlSize: "", | ||
| 1646 | + // iconUrl: "", | ||
| 1647 | + // iconUrlSize: "", | ||
| 1648 | + // localChannel: "0", | ||
| 1649 | + // moreChannel: "0", | ||
| 1650 | + // movePermitted: 1, | ||
| 1651 | + // myChannel: "0", | ||
| 1652 | + // name: "广西", | ||
| 1653 | + // num: 49, | ||
| 1654 | + // pageId: 20056, | ||
| 1655 | + // pageType: "", | ||
| 1656 | + // underlineCColor: "" | ||
| 1657 | + // }, | ||
| 1658 | + // { | ||
| 1659 | + // channelId: 2048, | ||
| 1660 | + // channelStrategy: 1, | ||
| 1661 | + // channelStyle: 2, | ||
| 1662 | + // channelType: 2, | ||
| 1663 | + // defaultPermitted: 0, | ||
| 1664 | + // delPermitted: 1, | ||
| 1665 | + // fontCColor: "#FFFFFF", | ||
| 1666 | + // fontColor: "#F9AB99", | ||
| 1667 | + // headlinesOn: 0, | ||
| 1668 | + // homeChannel: "0", | ||
| 1669 | + // iconCUrl: "", | ||
| 1670 | + // iconCUrlSize: "", | ||
| 1671 | + // iconUrl: "", | ||
| 1672 | + // iconUrlSize: "", | ||
| 1673 | + // localChannel: "0", | ||
| 1674 | + // moreChannel: "0", | ||
| 1675 | + // movePermitted: 1, | ||
| 1676 | + // myChannel: "0", | ||
| 1677 | + // name: "重庆", | ||
| 1678 | + // num: 50, | ||
| 1679 | + // pageId: 20058, | ||
| 1680 | + // pageType: "", | ||
| 1681 | + // underlineCColor: "" | ||
| 1682 | + // }, | ||
| 1683 | + // { | ||
| 1684 | + // channelId: 2049, | ||
| 1685 | + // channelStrategy: 1, | ||
| 1686 | + // channelStyle: 2, | ||
| 1687 | + // channelType: 2, | ||
| 1688 | + // defaultPermitted: 0, | ||
| 1689 | + // delPermitted: 1, | ||
| 1690 | + // fontCColor: "#FFFFFF", | ||
| 1691 | + // fontColor: "#F9AB99", | ||
| 1692 | + // headlinesOn: 0, | ||
| 1693 | + // homeChannel: "0", | ||
| 1694 | + // iconCUrl: "", | ||
| 1695 | + // iconCUrlSize: "", | ||
| 1696 | + // iconUrl: "", | ||
| 1697 | + // iconUrlSize: "", | ||
| 1698 | + // localChannel: "0", | ||
| 1699 | + // moreChannel: "0", | ||
| 1700 | + // movePermitted: 1, | ||
| 1701 | + // myChannel: "0", | ||
| 1702 | + // name: "四川", | ||
| 1703 | + // num: 51, | ||
| 1704 | + // pageId: 20059, | ||
| 1705 | + // pageType: "", | ||
| 1706 | + // underlineCColor: "" | ||
| 1707 | + // }, | ||
| 1708 | + // { | ||
| 1709 | + // channelId: 2051, | ||
| 1710 | + // channelStrategy: 1, | ||
| 1711 | + // channelStyle: 2, | ||
| 1712 | + // channelType: 2, | ||
| 1713 | + // defaultPermitted: 0, | ||
| 1714 | + // delPermitted: 1, | ||
| 1715 | + // fontCColor: "#FFFFFF", | ||
| 1716 | + // fontColor: "#F9AB99", | ||
| 1717 | + // headlinesOn: 0, | ||
| 1718 | + // homeChannel: "0", | ||
| 1719 | + // iconCUrl: "", | ||
| 1720 | + // iconCUrlSize: "", | ||
| 1721 | + // iconUrl: "", | ||
| 1722 | + // iconUrlSize: "", | ||
| 1723 | + // localChannel: "0", | ||
| 1724 | + // moreChannel: "0", | ||
| 1725 | + // movePermitted: 1, | ||
| 1726 | + // myChannel: "0", | ||
| 1727 | + // name: "云南", | ||
| 1728 | + // num: 52, | ||
| 1729 | + // pageId: 20061, | ||
| 1730 | + // pageType: "", | ||
| 1731 | + // underlineCColor: "" | ||
| 1732 | + // }, | ||
| 1733 | + // { | ||
| 1734 | + // channelId: 2050, | ||
| 1735 | + // channelStrategy: 1, | ||
| 1736 | + // channelStyle: 2, | ||
| 1737 | + // channelType: 2, | ||
| 1738 | + // defaultPermitted: 0, | ||
| 1739 | + // delPermitted: 1, | ||
| 1740 | + // fontCColor: "#FFFFFF", | ||
| 1741 | + // fontColor: "#F9AB99", | ||
| 1742 | + // headlinesOn: 0, | ||
| 1743 | + // homeChannel: "0", | ||
| 1744 | + // iconCUrl: "", | ||
| 1745 | + // iconCUrlSize: "", | ||
| 1746 | + // iconUrl: "", | ||
| 1747 | + // iconUrlSize: "", | ||
| 1748 | + // localChannel: "0", | ||
| 1749 | + // moreChannel: "0", | ||
| 1750 | + // movePermitted: 1, | ||
| 1751 | + // myChannel: "0", | ||
| 1752 | + // name: "贵州", | ||
| 1753 | + // num: 53, | ||
| 1754 | + // pageId: 20060, | ||
| 1755 | + // pageType: "", | ||
| 1756 | + // underlineCColor: "" | ||
| 1757 | + // }, | ||
| 1758 | + // { | ||
| 1759 | + // channelId: 2044, | ||
| 1760 | + // channelStrategy: 1, | ||
| 1761 | + // channelStyle: 2, | ||
| 1762 | + // channelType: 2, | ||
| 1763 | + // defaultPermitted: 0, | ||
| 1764 | + // delPermitted: 1, | ||
| 1765 | + // fontCColor: "#FFFFFF", | ||
| 1766 | + // fontColor: "#F9AB99", | ||
| 1767 | + // headlinesOn: 0, | ||
| 1768 | + // homeChannel: "0", | ||
| 1769 | + // iconCUrl: "", | ||
| 1770 | + // iconCUrlSize: "", | ||
| 1771 | + // iconUrl: "", | ||
| 1772 | + // iconUrlSize: "", | ||
| 1773 | + // localChannel: "0", | ||
| 1774 | + // moreChannel: "0", | ||
| 1775 | + // movePermitted: 1, | ||
| 1776 | + // myChannel: "0", | ||
| 1777 | + // name: "湖南", | ||
| 1778 | + // num: 54, | ||
| 1779 | + // pageId: 20054, | ||
| 1780 | + // pageType: "", | ||
| 1781 | + // underlineCColor: "" | ||
| 1782 | + // }, | ||
| 1783 | + // { | ||
| 1784 | + // channelId: 2043, | ||
| 1785 | + // channelStrategy: 1, | ||
| 1786 | + // channelStyle: 2, | ||
| 1787 | + // channelType: 2, | ||
| 1788 | + // defaultPermitted: 0, | ||
| 1789 | + // delPermitted: 1, | ||
| 1790 | + // fontCColor: "#FFFFFF", | ||
| 1791 | + // fontColor: "#F9AB99", | ||
| 1792 | + // headlinesOn: 0, | ||
| 1793 | + // homeChannel: "0", | ||
| 1794 | + // iconCUrl: "", | ||
| 1795 | + // iconCUrlSize: "", | ||
| 1796 | + // iconUrl: "", | ||
| 1797 | + // iconUrlSize: "", | ||
| 1798 | + // localChannel: "0", | ||
| 1799 | + // moreChannel: "0", | ||
| 1800 | + // movePermitted: 1, | ||
| 1801 | + // myChannel: "0", | ||
| 1802 | + // name: "湖北", | ||
| 1803 | + // num: 55, | ||
| 1804 | + // pageId: 20053, | ||
| 1805 | + // pageType: "", | ||
| 1806 | + // underlineCColor: "" | ||
| 1807 | + // }, | ||
| 1808 | + // { | ||
| 1809 | + // channelId: 2052, | ||
| 1810 | + // channelStrategy: 2, | ||
| 1811 | + // channelStyle: 2, | ||
| 1812 | + // channelType: 2, | ||
| 1813 | + // defaultPermitted: 0, | ||
| 1814 | + // delPermitted: 1, | ||
| 1815 | + // fontCColor: "#FFFFFF", | ||
| 1816 | + // fontColor: "#F9AB99", | ||
| 1817 | + // headlinesOn: 0, | ||
| 1818 | + // homeChannel: "0", | ||
| 1819 | + // iconCUrl: "", | ||
| 1820 | + // iconCUrlSize: "", | ||
| 1821 | + // iconUrl: "", | ||
| 1822 | + // iconUrlSize: "", | ||
| 1823 | + // localChannel: "0", | ||
| 1824 | + // moreChannel: "0", | ||
| 1825 | + // movePermitted: 1, | ||
| 1826 | + // myChannel: "0", | ||
| 1827 | + // name: "西藏", | ||
| 1828 | + // num: 56, | ||
| 1829 | + // pageId: 20062, | ||
| 1830 | + // pageType: "", | ||
| 1831 | + // underlineCColor: "" | ||
| 1832 | + // }, | ||
| 1833 | + // { | ||
| 1834 | + // channelId: 2057, | ||
| 1835 | + // channelStrategy: 2, | ||
| 1836 | + // channelStyle: 2, | ||
| 1837 | + // channelType: 2, | ||
| 1838 | + // defaultPermitted: 0, | ||
| 1839 | + // delPermitted: 1, | ||
| 1840 | + // fontCColor: "#FFFFFF", | ||
| 1841 | + // fontColor: "#F9AB99", | ||
| 1842 | + // headlinesOn: 0, | ||
| 1843 | + // homeChannel: "0", | ||
| 1844 | + // iconCUrl: "", | ||
| 1845 | + // iconCUrlSize: "", | ||
| 1846 | + // iconUrl: "", | ||
| 1847 | + // iconUrlSize: "", | ||
| 1848 | + // localChannel: "0", | ||
| 1849 | + // moreChannel: "0", | ||
| 1850 | + // movePermitted: 1, | ||
| 1851 | + // myChannel: "0", | ||
| 1852 | + // name: "新疆", | ||
| 1853 | + // num: 57, | ||
| 1854 | + // pageId: 20067, | ||
| 1855 | + // pageType: "", | ||
| 1856 | + // underlineCColor: "" | ||
| 1857 | + // }, | ||
| 1858 | + // { | ||
| 1859 | + // channelId: 2053, | ||
| 1860 | + // channelStrategy: 1, | ||
| 1861 | + // channelStyle: 2, | ||
| 1862 | + // channelType: 2, | ||
| 1863 | + // defaultPermitted: 0, | ||
| 1864 | + // delPermitted: 1, | ||
| 1865 | + // fontCColor: "#FFFFFF", | ||
| 1866 | + // fontColor: "#F9AB99", | ||
| 1867 | + // headlinesOn: 0, | ||
| 1868 | + // homeChannel: "0", | ||
| 1869 | + // iconCUrl: "", | ||
| 1870 | + // iconCUrlSize: "", | ||
| 1871 | + // iconUrl: "", | ||
| 1872 | + // iconUrlSize: "", | ||
| 1873 | + // localChannel: "0", | ||
| 1874 | + // moreChannel: "0", | ||
| 1875 | + // movePermitted: 1, | ||
| 1876 | + // myChannel: "0", | ||
| 1877 | + // name: "陕西", | ||
| 1878 | + // num: 58, | ||
| 1879 | + // pageId: 20063, | ||
| 1880 | + // pageType: "", | ||
| 1881 | + // underlineCColor: "" | ||
| 1882 | + // }, | ||
| 1883 | + // { | ||
| 1884 | + // channelId: 2054, | ||
| 1885 | + // channelStrategy: 1, | ||
| 1886 | + // channelStyle: 2, | ||
| 1887 | + // channelType: 2, | ||
| 1888 | + // defaultPermitted: 0, | ||
| 1889 | + // delPermitted: 1, | ||
| 1890 | + // fontCColor: "#FFFFFF", | ||
| 1891 | + // fontColor: "#F9AB99", | ||
| 1892 | + // headlinesOn: 0, | ||
| 1893 | + // homeChannel: "0", | ||
| 1894 | + // iconCUrl: "", | ||
| 1895 | + // iconCUrlSize: "", | ||
| 1896 | + // iconUrl: "", | ||
| 1897 | + // iconUrlSize: "", | ||
| 1898 | + // localChannel: "0", | ||
| 1899 | + // moreChannel: "0", | ||
| 1900 | + // movePermitted: 1, | ||
| 1901 | + // myChannel: "0", | ||
| 1902 | + // name: "甘肃", | ||
| 1903 | + // num: 59, | ||
| 1904 | + // pageId: 20064, | ||
| 1905 | + // pageType: "", | ||
| 1906 | + // underlineCColor: "" | ||
| 1907 | + // }, | ||
| 1908 | + // { | ||
| 1909 | + // channelId: 2055, | ||
| 1910 | + // channelStrategy: 1, | ||
| 1911 | + // channelStyle: 2, | ||
| 1912 | + // channelType: 2, | ||
| 1913 | + // defaultPermitted: 0, | ||
| 1914 | + // delPermitted: 1, | ||
| 1915 | + // fontCColor: "#FFFFFF", | ||
| 1916 | + // fontColor: "#F9AB99", | ||
| 1917 | + // headlinesOn: 0, | ||
| 1918 | + // homeChannel: "0", | ||
| 1919 | + // iconCUrl: "", | ||
| 1920 | + // iconCUrlSize: "", | ||
| 1921 | + // iconUrl: "", | ||
| 1922 | + // iconUrlSize: "", | ||
| 1923 | + // localChannel: "0", | ||
| 1924 | + // moreChannel: "0", | ||
| 1925 | + // movePermitted: 1, | ||
| 1926 | + // myChannel: "0", | ||
| 1927 | + // name: "青海", | ||
| 1928 | + // num: 60, | ||
| 1929 | + // pageId: 20065, | ||
| 1930 | + // pageType: "", | ||
| 1931 | + // underlineCColor: "" | ||
| 1932 | + // }, | ||
| 1933 | + // { | ||
| 1934 | + // channelId: 2056, | ||
| 1935 | + // channelStrategy: 2, | ||
| 1936 | + // channelStyle: 2, | ||
| 1937 | + // channelType: 2, | ||
| 1938 | + // defaultPermitted: 0, | ||
| 1939 | + // delPermitted: 1, | ||
| 1940 | + // fontCColor: "#FFFFFF", | ||
| 1941 | + // fontColor: "#F9AB99", | ||
| 1942 | + // headlinesOn: 0, | ||
| 1943 | + // homeChannel: "0", | ||
| 1944 | + // iconCUrl: "", | ||
| 1945 | + // iconCUrlSize: "", | ||
| 1946 | + // iconUrl: "", | ||
| 1947 | + // iconUrlSize: "", | ||
| 1948 | + // localChannel: "0", | ||
| 1949 | + // moreChannel: "0", | ||
| 1950 | + // movePermitted: 1, | ||
| 1951 | + // myChannel: "0", | ||
| 1952 | + // name: "宁夏", | ||
| 1953 | + // num: 61, | ||
| 1954 | + // pageId: 20066, | ||
| 1955 | + // pageType: "", | ||
| 1956 | + // underlineCColor: "" | ||
| 1957 | + // }, | ||
| 1958 | + // { | ||
| 1959 | + // channelId: 2047, | ||
| 1960 | + // channelStrategy: 1, | ||
| 1961 | + // channelStyle: 2, | ||
| 1962 | + // channelType: 2, | ||
| 1963 | + // defaultPermitted: 0, | ||
| 1964 | + // delPermitted: 1, | ||
| 1965 | + // fontCColor: "#FFFFFF", | ||
| 1966 | + // fontColor: "#F9AB99", | ||
| 1967 | + // headlinesOn: 0, | ||
| 1968 | + // homeChannel: "0", | ||
| 1969 | + // iconCUrl: "", | ||
| 1970 | + // iconCUrlSize: "", | ||
| 1971 | + // iconUrl: "", | ||
| 1972 | + // iconUrlSize: "", | ||
| 1973 | + // localChannel: "0", | ||
| 1974 | + // moreChannel: "0", | ||
| 1975 | + // movePermitted: 1, | ||
| 1976 | + // myChannel: "0", | ||
| 1977 | + // name: "海南", | ||
| 1978 | + // num: 62, | ||
| 1979 | + // pageId: 20057, | ||
| 1980 | + // pageType: "", | ||
| 1981 | + // underlineCColor: "" | ||
| 493 | // } | 1982 | // } |
| 494 | - ] | ||
| 495 | - // 顶导数据 | ||
| 496 | - @State topNavList: TopNavDTO[] = [] | 1983 | + // ] |
| 1984 | + // @State myChannelList: TopNavDTO [] = [] | ||
| 1985 | + // @State moreChannelList: TopNavDTO [] = [] | ||
| 1986 | + // @State localChannelList: TopNavDTO [] = [] | ||
| 497 | dialogController: CustomDialogController | null = new CustomDialogController({ | 1987 | dialogController: CustomDialogController | null = new CustomDialogController({ |
| 498 | builder: ChannelDialog({ | 1988 | builder: ChannelDialog({ |
| 499 | - currentTopNavSelectedIndex:this.currentTopNavSelectedIndex, | ||
| 500 | - indexSettingArray: this.indexSettingArray, | ||
| 501 | - topNavList: this.topNavList, | ||
| 502 | - myChannelList: this.myChannelList, | ||
| 503 | - moreChannelList: this.moreChannelList, | ||
| 504 | - localChannelList: this.localChannelList, | 1989 | + currentTopNavSelectedIndex: $currentTopNavSelectedIndex, |
| 1990 | + indexSettingArray: $indexSettingArray, | ||
| 1991 | + myChannelList: $myChannelList, | ||
| 1992 | + moreChannelList: $moreChannelList, | ||
| 1993 | + localChannelList: $localChannelList, | ||
| 1994 | + confirm: this.onAccept, | ||
| 1995 | + changeChannelIndex: this.changeChannelIndex, | ||
| 1996 | + delChannelItem: this.delChannelItem, | ||
| 1997 | + addChannelItem: this.addChannelItem | ||
| 505 | }), | 1998 | }), |
| 506 | - cancel: this.exitApp, | ||
| 507 | alignment: DialogAlignment.TopEnd, | 1999 | alignment: DialogAlignment.TopEnd, |
| 508 | customStyle: true, | 2000 | customStyle: true, |
| 509 | }) | 2001 | }) |
| 510 | - aboutToAppear() { | ||
| 511 | - this.topNavList.forEach((item,index)=>{ | ||
| 512 | - if(item.myChannel === '1'){ | ||
| 513 | - this.myChannelList.push(item) | ||
| 514 | - } | ||
| 515 | - if(item.moreChannel === '1'){ | ||
| 516 | - this.moreChannelList.push(item) | ||
| 517 | - } | ||
| 518 | - if(item.localChannel === '1'){ | ||
| 519 | - this.localChannelList.push(item) | ||
| 520 | - } | ||
| 521 | - }) | ||
| 522 | - } | ||
| 523 | - aboutToDisappear() { | ||
| 524 | - this.dialogController = null // 将dialogController置空 | ||
| 525 | - } | ||
| 526 | 2002 | ||
| 527 | - onCancel() { | ||
| 528 | - console.info('Callback when the first button is clicked') | 2003 | + // topNavListHandle() { |
| 2004 | + // let defaultMyChannelList: TopNavDTO[] = [] | ||
| 2005 | + // let handledTopNavList = [...this.topNavList] | ||
| 2006 | + // handledTopNavList.sort((a, b) => { | ||
| 2007 | + // return a.num - b.num; | ||
| 2008 | + // }); | ||
| 2009 | + // handledTopNavList.forEach(item => { | ||
| 2010 | + // if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 || item.headlinesOn === 1) { | ||
| 2011 | + // defaultMyChannelList.push(item); | ||
| 2012 | + // } | ||
| 2013 | + // }) | ||
| 2014 | + // defaultMyChannelList.forEach(item => { | ||
| 2015 | + // item.myChannel = '1' | ||
| 2016 | + // if (item.defaultPermitted === 1) { | ||
| 2017 | + // item.homeChannel = '1' | ||
| 2018 | + // } | ||
| 2019 | + // let index = handledTopNavList.findIndex(_item => _item.channelId === item.channelId) | ||
| 2020 | + // if (index !== -1) { | ||
| 2021 | + // handledTopNavList.splice(index, 1) | ||
| 2022 | + // } | ||
| 2023 | + // }) | ||
| 2024 | + // | ||
| 2025 | + // handledTopNavList.unshift(...defaultMyChannelList) | ||
| 2026 | + // handledTopNavList.forEach((item, index) => { | ||
| 2027 | + // if (item.channelType === 2) { | ||
| 2028 | + // item.localChannel = '1' | ||
| 2029 | + // } | ||
| 2030 | + // if (index >= 11) { | ||
| 2031 | + // if (item.channelType === 1) { | ||
| 2032 | + // item.moreChannel = '1' | ||
| 2033 | + // } | ||
| 2034 | + // } else { | ||
| 2035 | + // if (item.channelType === 1 && item.myChannel !== '1') { | ||
| 2036 | + // item.moreChannel = '1' | ||
| 2037 | + // } | ||
| 2038 | + // } | ||
| 2039 | + // | ||
| 2040 | + // if (item.myChannel === '1') { | ||
| 2041 | + // this.myChannelList.push(item) | ||
| 2042 | + // } | ||
| 2043 | + // if (item.moreChannel === '1') { | ||
| 2044 | + // this.moreChannelList.push(item) | ||
| 2045 | + // } | ||
| 2046 | + // if (item.localChannel === '1') { | ||
| 2047 | + // this.localChannelList.push(item) | ||
| 2048 | + // } | ||
| 2049 | + // }) | ||
| 2050 | + // } | ||
| 2051 | + | ||
| 2052 | + onChannelIdsUpdate(){ | ||
| 2053 | + AppStorage.SetOrCreate('channelIds', this.channelIds.join(',')); | ||
| 2054 | + console.log(`AppStorage.get('channelIds')${AppStorage.get('channelIds')}`) | ||
| 529 | } | 2055 | } |
| 530 | 2056 | ||
| 531 | - onAccept() { | ||
| 532 | - console.info('Callback when the second button is clicked') | 2057 | + aboutToAppear() { |
| 2058 | + console.log(`myChannelListzz${this.channelIds}}`) | ||
| 2059 | + // this.topNavListHandle() | ||
| 533 | } | 2060 | } |
| 534 | 2061 | ||
| 535 | - exitApp() { | ||
| 536 | - console.info('Click the callback in the blank area') | 2062 | + aboutToDisappear() { |
| 2063 | + this.dialogController = null // 将dialogController置空 | ||
| 537 | } | 2064 | } |
| 538 | 2065 | ||
| 539 | build() { | 2066 | build() { |
| @@ -542,8 +2069,9 @@ struct ChannelSubscriptionLayout { | @@ -542,8 +2069,9 @@ struct ChannelSubscriptionLayout { | ||
| 542 | .width(18) | 2069 | .width(18) |
| 543 | } | 2070 | } |
| 544 | .width(36) | 2071 | .width(36) |
| 545 | - .height(30) | 2072 | + .height(36) |
| 546 | .justifyContent(FlexAlign.Center) | 2073 | .justifyContent(FlexAlign.Center) |
| 2074 | + .padding({ bottom: 6 }) | ||
| 547 | .backgroundColor('#ffffff') | 2075 | .backgroundColor('#ffffff') |
| 548 | .onClick(() => { | 2076 | .onClick(() => { |
| 549 | if (this.dialogController != null) { | 2077 | if (this.dialogController != null) { |
-
Please register or login to post a comment