Showing
36 changed files
with
258 additions
and
67 deletions
| @@ -72,6 +72,10 @@ export class UserDataLocal { | @@ -72,6 +72,10 @@ export class UserDataLocal { | ||
| 72 | SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url) | 72 | SPHelper.default.save(UserDataLocal.USER_HEADER_URL, url) |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | + public static setUserType(type:string) { | ||
| 76 | + SPHelper.default.save(UserDataLocal.USER_Type, type) | ||
| 77 | + } | ||
| 78 | + | ||
| 75 | public static setUserFollowOperation(timestamp:string) { | 79 | public static setUserFollowOperation(timestamp:string) { |
| 76 | SPHelper.default.saveSync(UserDataLocal.USER_FOLLOW_OPERATION, timestamp) | 80 | SPHelper.default.saveSync(UserDataLocal.USER_FOLLOW_OPERATION, timestamp) |
| 77 | } | 81 | } |
| @@ -323,6 +323,8 @@ export class ProcessUtils { | @@ -323,6 +323,8 @@ export class ProcessUtils { | ||
| 323 | extra: { | 323 | extra: { |
| 324 | relType: content?.relType, | 324 | relType: content?.relType, |
| 325 | relId: content?.relId, | 325 | relId: content?.relId, |
| 326 | + extra: content?.extra, | ||
| 327 | + title: content?.newsTitle | ||
| 326 | } as ExtraDTO | 328 | } as ExtraDTO |
| 327 | } as Params, | 329 | } as Params, |
| 328 | }; | 330 | }; |
| @@ -130,8 +130,6 @@ export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; | @@ -130,8 +130,6 @@ export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; | ||
| 130 | 130 | ||
| 131 | export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams'; | 131 | export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams'; |
| 132 | 132 | ||
| 133 | -export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams'; | ||
| 134 | - | ||
| 135 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; | 133 | export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; |
| 136 | 134 | ||
| 137 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; | 135 | export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; |
| @@ -165,3 +163,7 @@ export { | @@ -165,3 +163,7 @@ export { | ||
| 165 | AttentionBatchDTO, | 163 | AttentionBatchDTO, |
| 166 | CreatorDTO | 164 | CreatorDTO |
| 167 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; | 165 | } from './src/main/ets/bean/peoples/AttentionBatchDTO'; |
| 166 | + | ||
| 167 | +export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPositionExtraBean'; | ||
| 168 | +export { ClassBean } from './src/main/ets/bean/content/ClassBean'; | ||
| 169 | +export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean'; |
| @@ -17,4 +17,6 @@ export interface ExtraDTO extends ItemDTO { | @@ -17,4 +17,6 @@ export interface ExtraDTO extends ItemDTO { | ||
| 17 | photoList: PhotoListBean[]; | 17 | photoList: PhotoListBean[]; |
| 18 | swiperIndex?: number | 18 | swiperIndex?: number |
| 19 | commentId?: string; | 19 | commentId?: string; |
| 20 | + extra?:string | ||
| 21 | + title: string | ||
| 20 | } | 22 | } |
| 1 | +import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO'; | ||
| 2 | +import { LiveInfoDTO } from '../detail/LiveInfoDTO'; | ||
| 3 | +import { VideoInfoDTO } from '../detail/VideoInfoDTO'; | ||
| 4 | +import { InteractDataDTO } from './InteractDataDTO'; | ||
| 5 | +import { slideShows } from '../morningevening/slideShows'; | ||
| 6 | +import { VoiceInfoDTO } from '../detail/VoiceInfoDTO'; | ||
| 7 | +import { RmhInfoDTO } from '../detail/RmhInfoDTO'; | ||
| 8 | +import { commentInfo } from './commentInfo'; | ||
| 9 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 10 | + | ||
| 11 | +export interface ClassBean { | ||
| 12 | + secondClassifyName:string | ||
| 13 | + classifyName:string | ||
| 14 | +} |
| @@ -77,9 +77,11 @@ export interface ContentDTO { | @@ -77,9 +77,11 @@ export interface ContentDTO { | ||
| 77 | newTags: string; | 77 | newTags: string; |
| 78 | titleShow?: number; | 78 | titleShow?: number; |
| 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 | 79 | isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据 |
| 80 | + isCollection?: boolean; // 是否是收藏的结果,区分搜索和主页的数据 | ||
| 80 | commentInfo?: commentInfo | 81 | commentInfo?: commentInfo |
| 81 | //底部导航栏 id(用于频道跳转) | 82 | //底部导航栏 id(用于频道跳转) |
| 82 | bottomNavId:string; | 83 | bottomNavId:string; |
| 83 | // 链接类型: 0:无链接;1:内链(文章);2:外链 | 84 | // 链接类型: 0:无链接;1:内链(文章);2:外链 |
| 84 | openType:string | 85 | openType:string |
| 86 | + extra:string | ||
| 85 | } | 87 | } |
| 1 | +import { ArrayList } from '@kit.ArkTS'; | ||
| 2 | +import { ClassBean } from './ClassBean'; | ||
| 3 | +import { CreatorsBean } from './CreatorsBean'; | ||
| 4 | + | ||
| 5 | +export interface GoldenPositionExtraBean { | ||
| 6 | + sort:number | ||
| 7 | + pageNum:number | ||
| 8 | + pageSize:number | ||
| 9 | + channelId:string | ||
| 10 | + topicId:string | ||
| 11 | + keyWord:string | ||
| 12 | + aggregateType:string | ||
| 13 | + poolCode:string | ||
| 14 | + showPublishStartTime:string | ||
| 15 | + showPublishEndTime:string | ||
| 16 | + keywordsType:string | ||
| 17 | + keywords:ArrayList<string> | ||
| 18 | + classifys: ArrayList<ClassBean> | ||
| 19 | + creatorTags: ArrayList<CreatorsBean> | ||
| 20 | +} |
| 1 | // import { FrontLinkObject, MorningEveningPaperDTO, PageInfoBean } from 'wdBean'; | 1 | // import { FrontLinkObject, MorningEveningPaperDTO, PageInfoBean } from 'wdBean'; |
| 2 | import { CompList, PageInfoBean } from 'wdBean'; | 2 | import { CompList, PageInfoBean } from 'wdBean'; |
| 3 | -import { DateTimeUtils, Logger, SPHelper } from 'wdKit/Index'; | 3 | +import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; |
| 4 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | 4 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; |
| 5 | import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel'; | 5 | import { MorningEveningViewModel } from '../../viewmodel/MorningEveningViewModel'; |
| 6 | // import { AudioBarView } from './AudioBarView'; | 6 | // import { AudioBarView } from './AudioBarView'; |
| @@ -102,6 +102,7 @@ export struct MorningEveningPaperComponent { | @@ -102,6 +102,7 @@ export struct MorningEveningPaperComponent { | ||
| 102 | async aboutToAppear() { | 102 | async aboutToAppear() { |
| 103 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); | 103 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); |
| 104 | await windowHight.setWindowLayoutFullScreen(true); | 104 | await windowHight.setWindowLayoutFullScreen(true); |
| 105 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | ||
| 105 | this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) | 106 | this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) |
| 106 | 107 | ||
| 107 | let dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String | 108 | let dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String |
| @@ -173,6 +174,7 @@ export struct MorningEveningPaperComponent { | @@ -173,6 +174,7 @@ export struct MorningEveningPaperComponent { | ||
| 173 | async aboutToDisappear() { | 174 | async aboutToDisappear() { |
| 174 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); | 175 | let windowHight: window.Window = await window.getLastWindow(getContext(this)); |
| 175 | await windowHight.setWindowLayoutFullScreen(false); | 176 | await windowHight.setWindowLayoutFullScreen(false); |
| 177 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | ||
| 176 | } | 178 | } |
| 177 | 179 | ||
| 178 | onPageHide() { | 180 | onPageHide() { |
| @@ -34,7 +34,7 @@ export struct PaperTitleComponent { | @@ -34,7 +34,7 @@ export struct PaperTitleComponent { | ||
| 34 | Text(this.subTitle ?? '')// Text('2024年\n1月16日') | 34 | Text(this.subTitle ?? '')// Text('2024年\n1月16日') |
| 35 | // .width(50) | 35 | // .width(50) |
| 36 | .margin({ left: 5 }) | 36 | .margin({ left: 5 }) |
| 37 | - .fontSize(12) | 37 | + .fontSize(8) |
| 38 | .fontColor($r('app.color.white')) | 38 | .fontColor($r('app.color.white')) |
| 39 | .maxLines(2) | 39 | .maxLines(2) |
| 40 | 40 | ||
| @@ -47,7 +47,8 @@ export struct PaperTitleComponent { | @@ -47,7 +47,8 @@ export struct PaperTitleComponent { | ||
| 47 | .alignItems(VerticalAlign.Center) | 47 | .alignItems(VerticalAlign.Center) |
| 48 | .alignRules({ | 48 | .alignRules({ |
| 49 | left: { anchor: "img_logo1", align: HorizontalAlign.End }, | 49 | left: { anchor: "img_logo1", align: HorizontalAlign.End }, |
| 50 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 50 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 51 | + }) | ||
| 51 | .id('row_paper_date') | 52 | .id('row_paper_date') |
| 52 | 53 | ||
| 53 | Image($r('app.media.icon_close')) | 54 | Image($r('app.media.icon_close')) |
| @@ -55,7 +56,8 @@ export struct PaperTitleComponent { | @@ -55,7 +56,8 @@ export struct PaperTitleComponent { | ||
| 55 | .width($r('app.float.top_arrow_size')) | 56 | .width($r('app.float.top_arrow_size')) |
| 56 | .alignRules({ | 57 | .alignRules({ |
| 57 | right: { anchor: "__container__", align: HorizontalAlign.End }, | 58 | right: { anchor: "__container__", align: HorizontalAlign.End }, |
| 58 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 59 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 60 | + }) | ||
| 59 | .id('img_close') | 61 | .id('img_close') |
| 60 | .onClick((event: ClickEvent) => { | 62 | .onClick((event: ClickEvent) => { |
| 61 | // console.info(TAG, "img_close") | 63 | // console.info(TAG, "img_close") |
| @@ -68,11 +70,12 @@ export struct PaperTitleComponent { | @@ -68,11 +70,12 @@ export struct PaperTitleComponent { | ||
| 68 | .width($r('app.float.top_arrow_size')) | 70 | .width($r('app.float.top_arrow_size')) |
| 69 | .alignRules({ | 71 | .alignRules({ |
| 70 | right: { anchor: "img_close", align: HorizontalAlign.Start }, | 72 | right: { anchor: "img_close", align: HorizontalAlign.Start }, |
| 71 | - center: { anchor: "__container__", align: VerticalAlign.Center } }) | 73 | + center: { anchor: "__container__", align: VerticalAlign.Center } |
| 74 | + }) | ||
| 72 | .id('img_share') | 75 | .id('img_share') |
| 73 | .margin({ right: 13 }) | 76 | .margin({ right: 13 }) |
| 74 | } | 77 | } |
| 75 | - // .margin({ left: 14, right: 14 }) | 78 | + .margin({ left: 14, right: 14 }) |
| 76 | .height($r('app.float.top_bar_height')) | 79 | .height($r('app.float.top_bar_height')) |
| 77 | 80 | ||
| 78 | // .backgroundColor(Color.Black) | 81 | // .backgroundColor(Color.Black) |
| @@ -150,7 +150,10 @@ export struct SingleColumn999Component { | @@ -150,7 +150,10 @@ export struct SingleColumn999Component { | ||
| 150 | scrollBackward: NestedScrollMode.SELF_FIRST | 150 | scrollBackward: NestedScrollMode.SELF_FIRST |
| 151 | }) | 151 | }) |
| 152 | } else { | 152 | } else { |
| 153 | - EmptyComponent({ emptyHeight: 200 }) | 153 | + if (this.compListItem && this.compListItem?.operDataList) { |
| 154 | + EmptyComponent({ emptyHeight: 200 }) | ||
| 155 | + } | ||
| 156 | + | ||
| 154 | } | 157 | } |
| 155 | } | 158 | } |
| 156 | 159 |
| @@ -28,7 +28,7 @@ export struct CardSourceInfo { | @@ -28,7 +28,7 @@ export struct CardSourceInfo { | ||
| 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 29 | } | 29 | } |
| 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 | 30 | // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间 |
| 31 | - if (this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime | 31 | + if (this.contentDTO.isSearch || this.contentDTO.isCollection || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime |
| 32 | (Number | 32 | (Number |
| 33 | .parseFloat(this | 33 | .parseFloat(this |
| 34 | .contentDTO.publishTime)) | 34 | .contentDTO.publishTime)) |
| @@ -9,13 +9,13 @@ export default struct MinePageUserSimpleInfoUI { | @@ -9,13 +9,13 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 9 | @Watch('loginStateChange') @Prop isLogin :boolean | 9 | @Watch('loginStateChange') @Prop isLogin :boolean |
| 10 | @State userName:string = "登陆注册" | 10 | @State userName:string = "登陆注册" |
| 11 | @State headPhotoUrl:string = "" | 11 | @State headPhotoUrl:string = "" |
| 12 | + userType:string = "1" | ||
| 12 | @State levelHead:string = "" | 13 | @State levelHead:string = "" |
| 13 | @State levelId:number = 0 | 14 | @State levelId:number = 0 |
| 14 | 15 | ||
| 15 | loginStateChange(){ | 16 | loginStateChange(){ |
| 16 | if(this.isLogin){ | 17 | if(this.isLogin){ |
| 17 | this.getUserInfo() | 18 | this.getUserInfo() |
| 18 | - this.getUserLevel() | ||
| 19 | }else{ | 19 | }else{ |
| 20 | this.headPhotoUrl = "" | 20 | this.headPhotoUrl = "" |
| 21 | this.levelHead = "" | 21 | this.levelHead = "" |
| @@ -54,8 +54,10 @@ export default struct MinePageUserSimpleInfoUI { | @@ -54,8 +54,10 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 54 | Text(this.userName) | 54 | Text(this.userName) |
| 55 | .fontColor($r('app.color.color_222222')) | 55 | .fontColor($r('app.color.color_222222')) |
| 56 | .maxLines(1) | 56 | .maxLines(1) |
| 57 | + .fontWeight(FontWeight.Bold) | ||
| 57 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 58 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 58 | .fontSize('33lpx') | 59 | .fontSize('33lpx') |
| 60 | + .lineHeight("46lpx") | ||
| 59 | 61 | ||
| 60 | Image($r('app.media.mine_user_edit')) | 62 | Image($r('app.media.mine_user_edit')) |
| 61 | .width('27lpx') | 63 | .width('27lpx') |
| @@ -144,7 +146,21 @@ export default struct MinePageUserSimpleInfoUI { | @@ -144,7 +146,21 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 144 | this.userName = value.userName | 146 | this.userName = value.userName |
| 145 | this.headPhotoUrl = value.headPhotoUrl | 147 | this.headPhotoUrl = value.headPhotoUrl |
| 146 | UserDataLocal.setUserHeaderUrl(value.headPhotoUrl) | 148 | UserDataLocal.setUserHeaderUrl(value.headPhotoUrl) |
| 149 | + | ||
| 150 | + this.userType = value.userType | ||
| 151 | + UserDataLocal.setUserType(value.userType) | ||
| 152 | + | ||
| 153 | + if(this.userType === "1"){ | ||
| 154 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 155 | + this.levelHead = value.honoraryIcon | ||
| 156 | + return | ||
| 157 | + } | ||
| 158 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 159 | + this.levelHead = value.avatarFrame | ||
| 160 | + } | ||
| 161 | + } | ||
| 147 | } | 162 | } |
| 163 | + this.getUserLevel() | ||
| 148 | }).catch((err:Error)=>{ | 164 | }).catch((err:Error)=>{ |
| 149 | console.log(TAG,JSON.stringify(err)) | 165 | console.log(TAG,JSON.stringify(err)) |
| 150 | }) | 166 | }) |
| @@ -152,10 +168,14 @@ export default struct MinePageUserSimpleInfoUI { | @@ -152,10 +168,14 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 152 | getUserLevel(){ | 168 | getUserLevel(){ |
| 153 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ | 169 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ |
| 154 | if(value!=null){ | 170 | if(value!=null){ |
| 155 | - this.levelHead = value.levelHead | 171 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 172 | + if(this.userType === "1"){ | ||
| 173 | + this.levelHead = value.levelHead | ||
| 174 | + } | ||
| 175 | + } | ||
| 156 | this.levelId = value.levelId | 176 | this.levelId = value.levelId |
| 157 | - UserDataLocal.setUserLevel(value.levelId) | ||
| 158 | - UserDataLocal.setUserLevelHeaderUrl(value.levelHead + "") | 177 | + UserDataLocal.setUserLevel(this.levelId) |
| 178 | + UserDataLocal.setUserLevelHeaderUrl(this.levelHead + "") | ||
| 159 | } | 179 | } |
| 160 | }).catch((err:Error)=>{ | 180 | }).catch((err:Error)=>{ |
| 161 | console.log(TAG,JSON.stringify(err)) | 181 | console.log(TAG,JSON.stringify(err)) |
| @@ -128,7 +128,8 @@ struct EditUserInfoPage { | @@ -128,7 +128,8 @@ struct EditUserInfoPage { | ||
| 128 | onAccept:(value:DatePickerResult) => { | 128 | onAccept:(value:DatePickerResult) => { |
| 129 | let mon = value.month as number + 1 | 129 | let mon = value.month as number + 1 |
| 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); | 130 | let monStr = mon < 10? '0'+mon.toString():mon.toString(); |
| 131 | - this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+value.day; | 131 | + let dayStr = value.day as number < 10? '0'+value.day:value.day; |
| 132 | + this.currentUserInfo.userExtend.birthday = value.year+'-'+monStr+'-'+dayStr; | ||
| 132 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday | 133 | this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_birthday |
| 133 | this.updateEditModel() | 134 | this.updateEditModel() |
| 134 | } | 135 | } |
| @@ -47,6 +47,7 @@ struct MyCollectionListPage { | @@ -47,6 +47,7 @@ struct MyCollectionListPage { | ||
| 47 | CustomPullToRefresh({ | 47 | CustomPullToRefresh({ |
| 48 | alldata:this.allDatas, | 48 | alldata:this.allDatas, |
| 49 | scroller:this.scroller, | 49 | scroller:this.scroller, |
| 50 | + hasMore:this.browSingModel.hasMore, | ||
| 50 | customList:()=>{ | 51 | customList:()=>{ |
| 51 | this.ListLayout() | 52 | this.ListLayout() |
| 52 | }, | 53 | }, |
| @@ -122,10 +123,14 @@ struct MyCollectionListPage { | @@ -122,10 +123,14 @@ struct MyCollectionListPage { | ||
| 122 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { | 123 | if (collectionItem && collectionItem.list && collectionItem.list.length > 0) { |
| 123 | if (this.currentPage === 1) { | 124 | if (this.currentPage === 1) { |
| 124 | this.allDatas = [] | 125 | this.allDatas = [] |
| 125 | - this.allDatas.push(...collectionItem.list) | ||
| 126 | - }else { | ||
| 127 | - this.allDatas = this.allDatas.concat(...collectionItem.list) | ||
| 128 | } | 126 | } |
| 127 | + | ||
| 128 | + for (let index = 0; index < collectionItem.list.length; index++) { | ||
| 129 | + const compDTO = collectionItem.list[index]; | ||
| 130 | + compDTO.isCollection = true ///用于时间展示 | ||
| 131 | + this.allDatas.push(compDTO) | ||
| 132 | + } | ||
| 133 | + | ||
| 129 | if (collectionItem.hasNext === 0) { | 134 | if (collectionItem.hasNext === 0) { |
| 130 | this.browSingModel.hasMore = false; | 135 | this.browSingModel.hasMore = false; |
| 131 | } else { | 136 | } else { |
| @@ -188,8 +193,17 @@ struct MyCollectionListPage { | @@ -188,8 +193,17 @@ struct MyCollectionListPage { | ||
| 188 | }) | 193 | }) |
| 189 | 194 | ||
| 190 | //重置删除状态 | 195 | //重置删除状态 |
| 196 | + this.updataUIState() | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + updataUIState(){ | ||
| 191 | this.isEditState = false | 200 | this.isEditState = false |
| 192 | this.isAllSelect = false | 201 | this.isAllSelect = false |
| 202 | + | ||
| 203 | + if (this.allDatas.length === 0) { | ||
| 204 | + this.browSingModel.viewType = ViewType.EMPTY; | ||
| 205 | + this.browSingModel.hasMore === true | ||
| 206 | + } | ||
| 193 | } | 207 | } |
| 194 | 208 | ||
| 195 | } | 209 | } |
| 1 | -import { ContentDTO } from 'wdBean'; | 1 | +import { ContentDTO , Action,GoldenPositionExtraBean} from 'wdBean'; |
| 2 | import { CommonConstants ,ViewType} from 'wdConstant'; | 2 | import { CommonConstants ,ViewType} from 'wdConstant'; |
| 3 | import PageViewModel from '../../viewmodel/PageViewModel'; | 3 | import PageViewModel from '../../viewmodel/PageViewModel'; |
| 4 | import RefreshLayout from '../page/RefreshLayout'; | 4 | import RefreshLayout from '../page/RefreshLayout'; |
| @@ -22,9 +22,14 @@ struct ThemeListPage { | @@ -22,9 +22,14 @@ struct ThemeListPage { | ||
| 22 | currentPage: number = 1; | 22 | currentPage: number = 1; |
| 23 | pageSize: number = 20; | 23 | pageSize: number = 20; |
| 24 | title: string = '金刚位聚合页' | 24 | title: string = '金刚位聚合页' |
| 25 | + extra: string = '' | ||
| 25 | 26 | ||
| 26 | aboutToAppear(): void { | 27 | aboutToAppear(): void { |
| 27 | - PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => { | 28 | + let par:Action = router.getParams() as Action; |
| 29 | + let params = par?.params; | ||
| 30 | + this.extra = params?.extra?.extra || ''; | ||
| 31 | + this.title = params?.extra?.title || ''; | ||
| 32 | + PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize,this.extra).then((liveReviewDTO) => { | ||
| 28 | console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`) | 33 | console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`) |
| 29 | this.data.push(...liveReviewDTO.list) | 34 | this.data.push(...liveReviewDTO.list) |
| 30 | if(this.data.getDataArray().length > 0){ | 35 | if(this.data.getDataArray().length > 0){ |
| 1 | +import { ToastUtils } from 'wdKit'; | ||
| 2 | + | ||
| 1 | @Component | 3 | @Component |
| 2 | export struct PeopleShipHomeAttentionComponent { | 4 | export struct PeopleShipHomeAttentionComponent { |
| 3 | @Consume isAttention: string | 5 | @Consume isAttention: string |
| @@ -111,7 +113,7 @@ export struct PeopleShipHomeAttentionComponent { | @@ -111,7 +113,7 @@ export struct PeopleShipHomeAttentionComponent { | ||
| 111 | left: '-5vp' | 113 | left: '-5vp' |
| 112 | }) | 114 | }) |
| 113 | .onClick(() => { | 115 | .onClick(() => { |
| 114 | - | 116 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); |
| 115 | }) | 117 | }) |
| 116 | 118 | ||
| 117 | } | 119 | } |
| @@ -2,6 +2,7 @@ import router from '@ohos.router' | @@ -2,6 +2,7 @@ import router from '@ohos.router' | ||
| 2 | import { PeopleShipUserDetailData } from 'wdBean' | 2 | import { PeopleShipUserDetailData } from 'wdBean' |
| 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' | 3 | import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' |
| 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' | 4 | import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' |
| 5 | +import { ToastUtils } from 'wdKit'; | ||
| 5 | 6 | ||
| 6 | @Component | 7 | @Component |
| 7 | export struct PeopleShipHomePageNavComponent { | 8 | export struct PeopleShipHomePageNavComponent { |
| @@ -126,7 +127,7 @@ export struct PeopleShipHomePageNavComponent { | @@ -126,7 +127,7 @@ export struct PeopleShipHomePageNavComponent { | ||
| 126 | .objectFit(ImageFit.Auto) | 127 | .objectFit(ImageFit.Auto) |
| 127 | .margin({ right: '10vp' }) | 128 | .margin({ right: '10vp' }) |
| 128 | .onClick(() => { | 129 | .onClick(() => { |
| 129 | - | 130 | + ToastUtils.showToast('分享为公共方法,待开发', 1000); |
| 130 | }) | 131 | }) |
| 131 | } | 132 | } |
| 132 | .width('100%') | 133 | .width('100%') |
| @@ -108,12 +108,14 @@ export struct SearchComponent { | @@ -108,12 +108,14 @@ export struct SearchComponent { | ||
| 108 | SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index) }) | 108 | SearchHistoryComponent({ searchHistoryData: $searchHistoryData, onDelHistory: (): void => this.getSearchHistoryData(),onGetSearchRes: (item,index): void => this.getSearchHistoryResData(item,index) }) |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | - //分隔符 | ||
| 112 | - Divider() | ||
| 113 | - .width('100%') | ||
| 114 | - .height('1lpx') | ||
| 115 | - .color($r('app.color.color_EDEDED')) | ||
| 116 | - .strokeWidth('1lpx') | 111 | + if(this.searchHistoryData.length>0){ |
| 112 | + //分隔符 | ||
| 113 | + Divider() | ||
| 114 | + .width('100%') | ||
| 115 | + .height('1lpx') | ||
| 116 | + .color($r('app.color.color_EDEDED')) | ||
| 117 | + .strokeWidth('1lpx') | ||
| 118 | + } | ||
| 117 | 119 | ||
| 118 | SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)}) | 120 | SearchHotsComponent({onGetSearchRes: (item): void => this.getSearchHotResData(item)}) |
| 119 | } | 121 | } |
| @@ -123,7 +125,6 @@ export struct SearchComponent { | @@ -123,7 +125,6 @@ export struct SearchComponent { | ||
| 123 | .width('100%') | 125 | .width('100%') |
| 124 | .height('100%') | 126 | .height('100%') |
| 125 | .padding({ left: '31lpx', right: '31lpx' }) | 127 | .padding({ left: '31lpx', right: '31lpx' }) |
| 126 | - .margin({ top: '36lpx' }) | ||
| 127 | } else { | 128 | } else { |
| 128 | if (this.hasChooseSearch) { | 129 | if (this.hasChooseSearch) { |
| 129 | //搜索结果 | 130 | //搜索结果 |
| @@ -120,7 +120,7 @@ export struct SearchHistoryComponent{ | @@ -120,7 +120,7 @@ export struct SearchHistoryComponent{ | ||
| 120 | .columnsTemplate('1fr 1fr') | 120 | .columnsTemplate('1fr 1fr') |
| 121 | .rowsGap('23lpx') | 121 | .rowsGap('23lpx') |
| 122 | } | 122 | } |
| 123 | - .margin({bottom:'46lpx'}) | 123 | + .margin({top:"36lpx",bottom:'46lpx'}) |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | getCategoryRowCount() { | 126 | getCategoryRowCount() { |
| @@ -41,18 +41,18 @@ export struct SearchHotsComponent{ | @@ -41,18 +41,18 @@ export struct SearchHotsComponent{ | ||
| 41 | 41 | ||
| 42 | Text("热门搜索") | 42 | Text("热门搜索") |
| 43 | .textAlign(TextAlign.Center) | 43 | .textAlign(TextAlign.Center) |
| 44 | - .fontWeight('600lpx') | 44 | + .fontWeight(FontWeight.Bold) |
| 45 | .fontSize('33lpx') | 45 | .fontSize('33lpx') |
| 46 | .lineHeight('46lpx') | 46 | .lineHeight('46lpx') |
| 47 | .fontColor($r('app.color.color_222222')) | 47 | .fontColor($r('app.color.color_222222')) |
| 48 | - .height('38lpx') | 48 | + .height('46lpx') |
| 49 | } | 49 | } |
| 50 | .width('100%') | 50 | .width('100%') |
| 51 | + .margin({bottom:"15lpx"}) | ||
| 51 | 52 | ||
| 52 | List(){ | 53 | List(){ |
| 53 | ForEach(this.searchHotsData,(item:SearchHotContentItem,index:number)=>{ | 54 | ForEach(this.searchHotsData,(item:SearchHotContentItem,index:number)=>{ |
| 54 | ListItem(){ | 55 | ListItem(){ |
| 55 | - Column(){ | ||
| 56 | Column(){ | 56 | Column(){ |
| 57 | Row(){ | 57 | Row(){ |
| 58 | Row(){ | 58 | Row(){ |
| @@ -80,6 +80,7 @@ export struct SearchHotsComponent{ | @@ -80,6 +80,7 @@ export struct SearchHotsComponent{ | ||
| 80 | .fontWeight('400lpx') | 80 | .fontWeight('400lpx') |
| 81 | .lineHeight('42lpx') | 81 | .lineHeight('42lpx') |
| 82 | }.layoutWeight(1) | 82 | }.layoutWeight(1) |
| 83 | + | ||
| 83 | if(item.mark===1 || item.mark===2){ | 84 | if(item.mark===1 || item.mark===2){ |
| 84 | Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2')) | 85 | Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2')) |
| 85 | .width('42lpx') | 86 | .width('42lpx') |
| @@ -89,6 +90,7 @@ export struct SearchHotsComponent{ | @@ -89,6 +90,7 @@ export struct SearchHotsComponent{ | ||
| 89 | } | 90 | } |
| 90 | }.alignItems(VerticalAlign.Center) | 91 | }.alignItems(VerticalAlign.Center) |
| 91 | .height('84lpx') | 92 | .height('84lpx') |
| 93 | + .width('100%') | ||
| 92 | .justifyContent(FlexAlign.SpaceBetween) | 94 | .justifyContent(FlexAlign.SpaceBetween) |
| 93 | 95 | ||
| 94 | if(index != this.searchHotsData.length-1 ){ | 96 | if(index != this.searchHotsData.length-1 ){ |
| @@ -98,18 +100,15 @@ export struct SearchHotsComponent{ | @@ -98,18 +100,15 @@ export struct SearchHotsComponent{ | ||
| 98 | .color($r('app.color.color_F5F5F5')) | 100 | .color($r('app.color.color_F5F5F5')) |
| 99 | .strokeWidth('1lpx') | 101 | .strokeWidth('1lpx') |
| 100 | } | 102 | } |
| 101 | - }.height('108lpx') | ||
| 102 | - .justifyContent(FlexAlign.Center) | 103 | + }.height('85lpx') |
| 104 | + .width('100%') | ||
| 103 | .alignItems(HorizontalAlign.Start) | 105 | .alignItems(HorizontalAlign.Start) |
| 104 | - .padding({left:'27lpx'}) | ||
| 105 | - } | ||
| 106 | } | 106 | } |
| 107 | .onClick(()=>{ | 107 | .onClick(()=>{ |
| 108 | if (this.onGetSearchRes !== undefined) { | 108 | if (this.onGetSearchRes !== undefined) { |
| 109 | this.onGetSearchRes(item.hotEntry) | 109 | this.onGetSearchRes(item.hotEntry) |
| 110 | } | 110 | } |
| 111 | }) | 111 | }) |
| 112 | - .height('117lpx') | ||
| 113 | }) | 112 | }) |
| 114 | }.onScrollFrameBegin((offset, state) => { | 113 | }.onScrollFrameBegin((offset, state) => { |
| 115 | return { offsetRemain: 0 } | 114 | return { offsetRemain: 0 } |
| @@ -194,7 +194,8 @@ export struct SearchResultContentComponent{ | @@ -194,7 +194,8 @@ export struct SearchResultContentComponent{ | ||
| 194 | isSearch: true, | 194 | isSearch: true, |
| 195 | publishTimestamp:"", | 195 | publishTimestamp:"", |
| 196 | bottomNavId:'', | 196 | bottomNavId:'', |
| 197 | - openType:'' | 197 | + openType:'', |
| 198 | + extra:'' | ||
| 198 | } | 199 | } |
| 199 | 200 | ||
| 200 | this.data.push(contentDTO) | 201 | this.data.push(contentDTO) |
| @@ -158,20 +158,38 @@ export struct ImageItemView { | @@ -158,20 +158,38 @@ export struct ImageItemView { | ||
| 158 | 158 | ||
| 159 | build() { | 159 | build() { |
| 160 | Stack() { | 160 | Stack() { |
| 161 | - Image(this.imagePixelMap)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 162 | - .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 163 | - .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 164 | - .aspectRatio(this.imageWHRatio) | ||
| 165 | - .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 166 | - .autoResize(false) | ||
| 167 | - .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 168 | - .defaultFocus(true) | ||
| 169 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 170 | - .offset({ | ||
| 171 | - // TODO:知识点:通过offset控制图片的偏移 | ||
| 172 | - x: this.imageOffsetInfo.currentX, | ||
| 173 | - y: this.imageOffsetInfo.currentY | ||
| 174 | - }) | 161 | + if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ |
| 162 | + Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 163 | + .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 164 | + .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 165 | + .aspectRatio(this.imageWHRatio) | ||
| 166 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 167 | + .autoResize(false) | ||
| 168 | + .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 169 | + .defaultFocus(true) | ||
| 170 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 171 | + .offset({ | ||
| 172 | + // TODO:知识点:通过offset控制图片的偏移 | ||
| 173 | + x: this.imageOffsetInfo.currentX, | ||
| 174 | + y: this.imageOffsetInfo.currentY | ||
| 175 | + }) | ||
| 176 | + }else{ | ||
| 177 | + Image(this.imagePixelMap)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | ||
| 178 | + .width(this.fitWH === "width" ? "100%" : undefined) | ||
| 179 | + .height(this.fitWH === "height" ? "100%" : undefined) | ||
| 180 | + .aspectRatio(this.imageWHRatio) | ||
| 181 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | ||
| 182 | + .autoResize(false) | ||
| 183 | + .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | ||
| 184 | + .defaultFocus(true) | ||
| 185 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 186 | + .offset({ | ||
| 187 | + // TODO:知识点:通过offset控制图片的偏移 | ||
| 188 | + x: this.imageOffsetInfo.currentX, | ||
| 189 | + y: this.imageOffsetInfo.currentY | ||
| 190 | + }) | ||
| 191 | + } | ||
| 192 | + | ||
| 175 | } | 193 | } |
| 176 | .onBlur(() => { | 194 | .onBlur(() => { |
| 177 | this.resetCurrentImageInfo(); | 195 | this.resetCurrentImageInfo(); |
| @@ -20,6 +20,7 @@ struct MineHomePage { | @@ -20,6 +20,7 @@ struct MineHomePage { | ||
| 20 | @State userName:string = "" | 20 | @State userName:string = "" |
| 21 | @State headPhotoUrl:string = "" | 21 | @State headPhotoUrl:string = "" |
| 22 | @State levelHead:string = "" | 22 | @State levelHead:string = "" |
| 23 | + userType:string = "1" | ||
| 23 | @State levelId:number = 0 | 24 | @State levelId:number = 0 |
| 24 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 | 25 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 |
| 25 | @State isHasIntroduction: boolean = false | 26 | @State isHasIntroduction: boolean = false |
| @@ -31,7 +32,6 @@ struct MineHomePage { | @@ -31,7 +32,6 @@ struct MineHomePage { | ||
| 31 | 32 | ||
| 32 | onPageShow(): void { | 33 | onPageShow(): void { |
| 33 | this.getUserInfo() | 34 | this.getUserInfo() |
| 34 | - this.getUserLevel() | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | build() { | 37 | build() { |
| @@ -403,7 +403,20 @@ struct MineHomePage { | @@ -403,7 +403,20 @@ struct MineHomePage { | ||
| 403 | this.attentionNum = value.attentionNum | 403 | this.attentionNum = value.attentionNum |
| 404 | this.registTime = value.registTime | 404 | this.registTime = value.registTime |
| 405 | this.getRegisterDays() | 405 | this.getRegisterDays() |
| 406 | + | ||
| 407 | + this.userType = value.userType | ||
| 408 | + | ||
| 409 | + if(this.userType === "1"){ | ||
| 410 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 411 | + this.levelHead = value.honoraryIcon | ||
| 412 | + return | ||
| 413 | + } | ||
| 414 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 415 | + this.levelHead = value.avatarFrame | ||
| 416 | + } | ||
| 417 | + } | ||
| 406 | } | 418 | } |
| 419 | + this.getUserLevel() | ||
| 407 | }).catch((err:Error)=>{ | 420 | }).catch((err:Error)=>{ |
| 408 | console.log(TAG,JSON.stringify(err)) | 421 | console.log(TAG,JSON.stringify(err)) |
| 409 | }) | 422 | }) |
| @@ -411,7 +424,11 @@ struct MineHomePage { | @@ -411,7 +424,11 @@ struct MineHomePage { | ||
| 411 | getUserLevel(){ | 424 | getUserLevel(){ |
| 412 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ | 425 | MinePageDatasModel.getUserLevelData(getContext(this)).then((value)=>{ |
| 413 | if(value!=null){ | 426 | if(value!=null){ |
| 414 | - this.levelHead = value.levelHead | 427 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 428 | + if(this.userType === "1"){ | ||
| 429 | + this.levelHead = value.levelHead | ||
| 430 | + } | ||
| 431 | + } | ||
| 415 | this.levelId = value.levelId | 432 | this.levelId = value.levelId |
| 416 | } | 433 | } |
| 417 | }).catch((err:Error)=>{ | 434 | }).catch((err:Error)=>{ |
| @@ -3,6 +3,7 @@ import { display, router } from '@kit.ArkUI'; | @@ -3,6 +3,7 @@ import { display, router } from '@kit.ArkUI'; | ||
| 3 | import { ImageItemView } from '../components/view/ImageItemView'; | 3 | import { ImageItemView } from '../components/view/ImageItemView'; |
| 4 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; | 4 | import { ImageDownloadComponent } from '../components/ImageDownloadComponent'; |
| 5 | import { Action } from 'wdBean'; | 5 | import { Action } from 'wdBean'; |
| 6 | +import { WindowModel } from 'wdKit/Index'; | ||
| 6 | 7 | ||
| 7 | const TAG = 'MultiPictureListPage'; | 8 | const TAG = 'MultiPictureListPage'; |
| 8 | 9 | ||
| @@ -23,6 +24,7 @@ export struct MultiPictureListPage { | @@ -23,6 +24,7 @@ export struct MultiPictureListPage { | ||
| 23 | // @Provide bgc: Color = Color.White; | 24 | // @Provide bgc: Color = Color.White; |
| 24 | 25 | ||
| 25 | aboutToAppear(): void { | 26 | aboutToAppear(): void { |
| 27 | + this.openFullScreen() | ||
| 26 | //获取宽高尺寸 | 28 | //获取宽高尺寸 |
| 27 | this.screenWidth = this.displayTool.width | 29 | this.screenWidth = this.displayTool.width |
| 28 | // this.picWidth = this.screenWidth - vp2px(52) | 30 | // this.picWidth = this.screenWidth - vp2px(52) |
| @@ -130,10 +132,36 @@ export struct MultiPictureListPage { | @@ -130,10 +132,36 @@ export struct MultiPictureListPage { | ||
| 130 | } | 132 | } |
| 131 | .width('100%') | 133 | .width('100%') |
| 132 | .height('100%') | 134 | .height('100%') |
| 135 | + .padding({top:$r('app.float.margin_44')}) | ||
| 133 | .backgroundColor(Color.Black) | 136 | .backgroundColor(Color.Black) |
| 134 | .id('e_picture_container') | 137 | .id('e_picture_container') |
| 135 | // 设置顶部绘制延伸到状态栏 | 138 | // 设置顶部绘制延伸到状态栏 |
| 136 | // 设置底部绘制延伸到导航条 | 139 | // 设置底部绘制延伸到导航条 |
| 137 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | 140 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 138 | } | 141 | } |
| 142 | + | ||
| 143 | + /** | ||
| 144 | + * 开启沉浸式 | ||
| 145 | + * TODO:颜色待根据业务接口修改 | ||
| 146 | + */ | ||
| 147 | + openFullScreen() { | ||
| 148 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | ||
| 149 | + WindowModel.shared.setWindowLayoutFullScreen(true) | ||
| 150 | + // WindowModel.shared.setWindowSystemBarEnable([]) | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + aboutToDisappear(): void { | ||
| 154 | + console.log(TAG, 'aboutToDisappear') | ||
| 155 | + this.closeFullScreen() | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 关闭沉浸式 | ||
| 160 | + * TODO:颜色待根据业务接口修改 | ||
| 161 | + */ | ||
| 162 | + closeFullScreen() { | ||
| 163 | + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | ||
| 164 | + WindowModel.shared.setWindowLayoutFullScreen(false) | ||
| 165 | + // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | ||
| 166 | + } | ||
| 139 | } | 167 | } |
| @@ -38,10 +38,10 @@ struct OtherNormalUserHomePage { | @@ -38,10 +38,10 @@ struct OtherNormalUserHomePage { | ||
| 38 | @State commentNum:number = 0//评论数 | 38 | @State commentNum:number = 0//评论数 |
| 39 | @State attentionNum:number = 0//关注数 | 39 | @State attentionNum:number = 0//关注数 |
| 40 | @State desc:string = "" | 40 | @State desc:string = "" |
| 41 | + userType:string = "1" | ||
| 41 | 42 | ||
| 42 | aboutToAppear(){ | 43 | aboutToAppear(){ |
| 43 | this.getUserInfo() | 44 | this.getUserInfo() |
| 44 | - this.getUserLevel() | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | 47 | ||
| @@ -348,7 +348,20 @@ struct OtherNormalUserHomePage { | @@ -348,7 +348,20 @@ struct OtherNormalUserHomePage { | ||
| 348 | this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum | 348 | this.browseNum = StringUtils.isEmpty(value.browseNum)?0:value.browseNum |
| 349 | this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum | 349 | this.commentNum = StringUtils.isEmpty(value.commentNum)?0:value.commentNum |
| 350 | this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum | 350 | this.attentionNum = StringUtils.isEmpty(value.attentionNum)?0:value.attentionNum |
| 351 | + | ||
| 352 | + this.userType = value.userType | ||
| 353 | + | ||
| 354 | + if(this.userType === "1"){ | ||
| 355 | + if(StringUtils.isNotEmpty(value.honoraryIcon)){ | ||
| 356 | + this.levelHead = value.honoraryIcon | ||
| 357 | + return | ||
| 358 | + } | ||
| 359 | + if(StringUtils.isNotEmpty(value.avatarFrame)){ | ||
| 360 | + this.levelHead = value.avatarFrame | ||
| 361 | + } | ||
| 362 | + } | ||
| 351 | } | 363 | } |
| 364 | + this.getUserLevel() | ||
| 352 | }).catch((err:Error)=>{ | 365 | }).catch((err:Error)=>{ |
| 353 | console.log(TAG,JSON.stringify(err)) | 366 | console.log(TAG,JSON.stringify(err)) |
| 354 | }) | 367 | }) |
| @@ -359,7 +372,11 @@ struct OtherNormalUserHomePage { | @@ -359,7 +372,11 @@ struct OtherNormalUserHomePage { | ||
| 359 | } | 372 | } |
| 360 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ | 373 | MinePageDatasModel.getOtherUserLevelData([this.curUserId],getContext(this)).then((value)=>{ |
| 361 | if(value!=null){ | 374 | if(value!=null){ |
| 362 | - this.levelHead = value[0].levelHead | 375 | + if(StringUtils.isEmpty(this.levelHead)){ |
| 376 | + if(this.userType === "1"){ | ||
| 377 | + this.levelHead = value[0].levelHead | ||
| 378 | + } | ||
| 379 | + } | ||
| 363 | this.levelId = value[0].level | 380 | this.levelId = value[0].level |
| 364 | } | 381 | } |
| 365 | }).catch((err:Error)=>{ | 382 | }).catch((err:Error)=>{ |
| @@ -22,7 +22,7 @@ import { | @@ -22,7 +22,7 @@ import { | ||
| 22 | postExecuteLikeParams, | 22 | postExecuteLikeParams, |
| 23 | postInteractAccentionOperateParams, | 23 | postInteractAccentionOperateParams, |
| 24 | postRecommendListParams, | 24 | postRecommendListParams, |
| 25 | - postThemeListParams | 25 | + GoldenPositionExtraBean |
| 26 | } from 'wdBean'; | 26 | } from 'wdBean'; |
| 27 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; | 27 | import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; |
| 28 | 28 | ||
| @@ -437,7 +437,7 @@ export class PageRepository { | @@ -437,7 +437,7 @@ export class PageRepository { | ||
| 437 | * @param params | 437 | * @param params |
| 438 | * @returns | 438 | * @returns |
| 439 | * */ | 439 | * */ |
| 440 | - static postThemeList(params: postThemeListParams) { | 440 | + static postThemeList(params: GoldenPositionExtraBean) { |
| 441 | let url = HttpUrlUtils.getThemeListUrl() | 441 | let url = HttpUrlUtils.getThemeListUrl() |
| 442 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) | 442 | Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params)) |
| 443 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) | 443 | return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params) |
| @@ -9,4 +9,10 @@ export class MineUserDetailItem{ | @@ -9,4 +9,10 @@ export class MineUserDetailItem{ | ||
| 9 | commentNum:number = 0//评论数 | 9 | commentNum:number = 0//评论数 |
| 10 | attentionNum:number = 0//关注数 | 10 | attentionNum:number = 0//关注数 |
| 11 | registTime:number = 0//账号注册时间 | 11 | registTime:number = 0//账号注册时间 |
| 12 | + | ||
| 13 | + honoraryIcon = ""//荣誉称号 (优先) | ||
| 14 | + avatarFrame:string = ""//最佳评论员头像框地址 | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 12 | } | 18 | } |
| @@ -8,7 +8,8 @@ import { | @@ -8,7 +8,8 @@ import { | ||
| 8 | NavigationBodyDTO, | 8 | NavigationBodyDTO, |
| 9 | PageDTO, | 9 | PageDTO, |
| 10 | PageInfoBean, | 10 | PageInfoBean, |
| 11 | - PageInfoDTO | 11 | + PageInfoDTO, |
| 12 | + GoldenPositionExtraBean | ||
| 12 | } from 'wdBean'; | 13 | } from 'wdBean'; |
| 13 | 14 | ||
| 14 | import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; | 15 | import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; |
| @@ -379,10 +380,13 @@ export class PageViewModel extends BaseViewModel { | @@ -379,10 +380,13 @@ export class PageViewModel extends BaseViewModel { | ||
| 379 | }) | 380 | }) |
| 380 | } | 381 | } |
| 381 | 382 | ||
| 382 | - async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> { | 383 | + async postThemeList(sort: number, pageNum: number, pageSize: number,extra: string) : Promise<LiveReviewDTO> { |
| 384 | + let bean: GoldenPositionExtraBean = JSON.parse(extra) | ||
| 385 | + bean.pageNum = pageNum | ||
| 386 | + bean.pageSize = pageSize | ||
| 383 | return new Promise<LiveReviewDTO>((success, error) => { | 387 | return new Promise<LiveReviewDTO>((success, error) => { |
| 384 | Logger.info(TAG, `postThemeList pageInfo start`); | 388 | Logger.info(TAG, `postThemeList pageInfo start`); |
| 385 | - PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => { | 389 | + PageRepository.postThemeList(bean).then((resDTO) => { |
| 386 | if (!resDTO || !resDTO.data) { | 390 | if (!resDTO || !resDTO.data) { |
| 387 | Logger.error(TAG, 'postThemeList then navResDTO is empty'); | 391 | Logger.error(TAG, 'postThemeList then navResDTO is empty'); |
| 388 | error('resDTO is empty'); | 392 | error('resDTO is empty'); |
-
Please register or login to post a comment