liyubing

Merge remote-tracking branch 'origin/main'

Showing 20 changed files with 248 additions and 58 deletions
@@ -9,13 +9,17 @@ import router from '@ohos.router'; @@ -9,13 +9,17 @@ import router from '@ohos.router';
9 import Url from '@ohos.url' 9 import Url from '@ohos.url'
10 import { ContentDTO, PhotoListBean } from 'wdBean'; 10 import { ContentDTO, PhotoListBean } from 'wdBean';
11 import { handleJsCallAppService } from './JsCallAppService' 11 import { handleJsCallAppService } from './JsCallAppService'
12 - 12 +import { HttpUtils } from 'wdNetwork/Index';
13 const TAG = 'JsBridgeBiz' 13 const TAG = 'JsBridgeBiz'
14 14
15 class AppInfo { 15 class AppInfo {
16 plat: string = '' 16 plat: string = ''
17 system: string = '' 17 system: string = ''
18 networkStatus: number = 1 18 networkStatus: number = 1
  19 + screenStatusBarHeight: number = 40 // TODO 这里需要动态获取
  20 + screenTabbarSafeHeight: number = 42 // TODO 这里需要动态获取
  21 + imei: string = HttpUtils.getImei()
  22 + device_id: string = HttpUtils.getDeviceId()
19 // TODO 完善 23 // TODO 完善
20 } 24 }
21 25
@@ -18,4 +18,5 @@ export interface RmhInfoDTO { @@ -18,4 +18,5 @@ export interface RmhInfoDTO {
18 rmhName: string; 18 rmhName: string;
19 userId: string; 19 userId: string;
20 userType: string; 20 userType: string;
  21 + honoraryIcon:string;
21 } 22 }
@@ -97,15 +97,29 @@ export struct DynamicDetailComponent { @@ -97,15 +97,29 @@ export struct DynamicDetailComponent {
97 .height($r('app.float.margin_32')) 97 .height($r('app.float.margin_32'))
98 .objectFit(ImageFit.Cover) 98 .objectFit(ImageFit.Cover)
99 .borderRadius($r('app.float.margin_16')) 99 .borderRadius($r('app.float.margin_16'))
100 - Image($r('app.media.icon_border_test')) 100 + Image(this.contentDetailData.rmhInfo?.honoraryIcon)
101 .width($r('app.float.margin_48')) 101 .width($r('app.float.margin_48'))
102 .height($r('app.float.margin_48')) 102 .height($r('app.float.margin_48'))
103 .objectFit(ImageFit.Cover) 103 .objectFit(ImageFit.Cover)
104 .borderRadius($r('app.float.margin_24')) 104 .borderRadius($r('app.float.margin_24'))
  105 + if(!StringUtils.isEmpty(this.contentDetailData.rmhInfo?.authIcon)){
  106 + Stack() {
  107 + Image(this.contentDetailData.rmhInfo?.authIcon)
  108 + .width($r('app.float.vp_12'))
  109 + .height($r('app.float.vp_12'))
  110 + .objectFit(ImageFit.Cover)
  111 + }
  112 + .width($r('app.float.margin_48'))
  113 + .height($r('app.float.margin_48'))
  114 + .alignContent(Alignment.BottomEnd)
  115 + }
105 } 116 }
106 .width($r('app.float.margin_48')) 117 .width($r('app.float.margin_48'))
107 .height($r('app.float.margin_48')) 118 .height($r('app.float.margin_48'))
108 .alignContent(Alignment.Center) 119 .alignContent(Alignment.Center)
  120 + .onClick(() => {
  121 + ProcessUtils.gotoPeopleShipHomePage(this.contentDetailData.rmhInfo == null ?"":this.contentDetailData.rmhInfo.rmhId)
  122 + })
109 Column(){ 123 Column(){
110 //昵称 124 //昵称
111 Text(this.contentDetailData.rmhInfo?.rmhName) 125 Text(this.contentDetailData.rmhInfo?.rmhName)
@@ -128,7 +142,7 @@ export struct DynamicDetailComponent { @@ -128,7 +142,7 @@ export struct DynamicDetailComponent {
128 .margin({right: $r('app.float.margin_6')}) 142 .margin({right: $r('app.float.margin_6')})
129 if(!StringUtils.isEmpty(this.followStatus)){ 143 if(!StringUtils.isEmpty(this.followStatus)){
130 if (this.followStatus == '0') { 144 if (this.followStatus == '0') {
131 - Text('关注') 145 + Text('+关注')
132 .width($r('app.float.margin_54')) 146 .width($r('app.float.margin_54'))
133 .height($r('app.float.margin_24')) 147 .height($r('app.float.margin_24'))
134 .textAlign(TextAlign.Center) 148 .textAlign(TextAlign.Center)
@@ -300,7 +314,7 @@ export struct DynamicDetailComponent { @@ -300,7 +314,7 @@ export struct DynamicDetailComponent {
300 } 314 }
301 } 315 }
302 } 316 }
303 - .padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0: 16,top: $r('app.float.margin_8')}) 317 + .padding({ left: this.contentDetailData.videoInfo[0].videoLandScape === 1?0: 25,top: $r('app.float.margin_8')})
304 .onClick((event: ClickEvent) => { 318 .onClick((event: ClickEvent) => {
305 ProcessUtils.processPage(this.mJumpInfo) 319 ProcessUtils.processPage(this.mJumpInfo)
306 }) 320 })
@@ -312,8 +326,8 @@ export struct DynamicDetailComponent { @@ -312,8 +326,8 @@ export struct DynamicDetailComponent {
312 .fontSize($r('app.float.font_size_12')) 326 .fontSize($r('app.float.font_size_12'))
313 .lineHeight($r('app.float.margin_16')) 327 .lineHeight($r('app.float.margin_16'))
314 .margin({ top: $r('app.float.margin_16') 328 .margin({ top: $r('app.float.margin_16')
315 - ,left: $r('app.float.margin_16')  
316 - ,right: $r('app.float.margin_16') }) 329 + ,left: $r('app.float.vp_12')
  330 + ,right: $r('app.float.vp_12') })
317 //微信/朋友圈/微博 331 //微信/朋友圈/微博
318 Row(){ 332 Row(){
319 Image($r('app.media.xxhdpi_pic_wechat')) 333 Image($r('app.media.xxhdpi_pic_wechat'))
@@ -2,6 +2,7 @@ import { ContentDTO, slideShows } from 'wdBean'; @@ -2,6 +2,7 @@ import { ContentDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant'; 2 import { CommonConstants } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
  5 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
5 6
6 /** 7 /**
7 * 大专题卡--CompStyle: 10 8 * 大专题卡--CompStyle: 10
@@ -23,9 +24,6 @@ export struct Card10Component { @@ -23,9 +24,6 @@ export struct Card10Component {
23 .maxLines(2) 24 .maxLines(2)
24 .textOverflow({ overflow: TextOverflow.Ellipsis }) 25 .textOverflow({ overflow: TextOverflow.Ellipsis })
25 .margin({ bottom: 19 }) 26 .margin({ bottom: 19 })
26 - .onClick((event: ClickEvent) => {  
27 - ProcessUtils.processPage(this.contentDTO)  
28 - })  
29 } 27 }
30 // 大图 28 // 大图
31 Stack() { 29 Stack() {
@@ -111,12 +109,23 @@ export struct Card10Component { @@ -111,12 +109,23 @@ export struct Card10Component {
111 109
112 // 右侧图片 110 // 右侧图片
113 if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { 111 if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
114 - Image(item.fullColumnImgUrls[0].url)  
115 - .width(117)  
116 - .height(78)  
117 - .objectFit(ImageFit.Cover)  
118 - .borderRadius($r('app.float.image_border_radius'))  
119 - .margin({ left: 12 }) 112 + Stack() {
  113 + Image(item.fullColumnImgUrls[0].url)
  114 + .width(117)
  115 + .height(78)
  116 + .objectFit(ImageFit.Cover)
  117 + .borderRadius($r('app.float.image_border_radius'))
  118 + .margin({ left: 12 })
  119 + CardMediaInfo({
  120 + contentDTO: {
  121 + objectType: String(item.objectType),
  122 + videoInfo: { videoDuration: Number(item.videoDuration) as number },
  123 + photoNum: Number(item.photoNum),
  124 + voiceInfo: { voiceDuration: Number(item.voiceDuration) as number }
  125 + } as ContentDTO
  126 + })
  127 + }
  128 + .alignContent(Alignment.BottomEnd)
120 } 129 }
121 } 130 }
122 .padding({ top: 10, bottom: 10 }) 131 .padding({ top: 10, bottom: 10 })
@@ -15,7 +15,7 @@ export class publishCommentModel { @@ -15,7 +15,7 @@ export class publishCommentModel {
15 /*【迭代二新增】关联的频道id/专题id; 页面必传*/ 15 /*【迭代二新增】关联的频道id/专题id; 页面必传*/
16 targetRelObjectId: string = "" 16 targetRelObjectId: string = ""
17 /*【迭代二新增】是否是重点稿件 1是 0否 页面必传*/ 17 /*【迭代二新增】是否是重点稿件 1是 0否 页面必传*/
18 - keyArticle: string = '' 18 + keyArticle: string = '0'
19 /*内容类别, 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14:动态(13和14为中文版新增) 页面必传*/ 19 /*内容类别, 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14:动态(13和14为中文版新增) 页面必传*/
20 targetType: string = '' 20 targetType: string = ''
21 /*评论总数*/ 21 /*评论总数*/
@@ -9,8 +9,9 @@ import measure from '@ohos.measure' @@ -9,8 +9,9 @@ import measure from '@ohos.measure'
9 import { CommentCustomDialog } from './CommentCustomDialog' 9 import { CommentCustomDialog } from './CommentCustomDialog'
10 import { publishCommentModel } from '../model/PublishCommentModel'; 10 import { publishCommentModel } from '../model/PublishCommentModel';
11 import { ifaa } from '@kit.OnlineAuthenticationKit'; 11 import { ifaa } from '@kit.OnlineAuthenticationKit';
12 -import { HttpUrlUtils } from 'wdNetwork/Index'; 12 +import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index';
13 import NoMoreLayout from '../../page/NoMoreLayout'; 13 import NoMoreLayout from '../../page/NoMoreLayout';
  14 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
14 15
15 const TAG = 'CommentComponent'; 16 const TAG = 'CommentComponent';
16 17
@@ -559,6 +560,12 @@ struct commentFooterView { @@ -559,6 +560,12 @@ struct commentFooterView {
559 560
560 } 561 }
561 .onClick(() => { 562 .onClick(() => {
  563 + // 未登录,跳转登录
  564 + const user_id = HttpUtils.getUserId()
  565 + if (!user_id) {
  566 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  567 + return
  568 + }
562 commentLikeChange(this.item) 569 commentLikeChange(this.item)
563 commentViewModel.commentLike(this.item).then(() => { 570 commentViewModel.commentLike(this.item).then(() => {
564 }).catch(() => { 571 }).catch(() => {
@@ -7,17 +7,17 @@ import commentViewModel from '../viewmodel/CommentViewModel' @@ -7,17 +7,17 @@ import commentViewModel from '../viewmodel/CommentViewModel'
7 @Preview 7 @Preview
8 @CustomDialog 8 @CustomDialog
9 export struct CommentCustomDialog { 9 export struct CommentCustomDialog {
10 -  
11 @ObjectLink publishCommentModel: publishCommentModel 10 @ObjectLink publishCommentModel: publishCommentModel
12 controller?: CustomDialogController 11 controller?: CustomDialogController
13 confirm: (value: Record<string, string>) => void = () => { 12 confirm: (value: Record<string, string>) => void = () => {
14 } 13 }
15 @State private emojiSwitch: boolean = false 14 @State private emojiSwitch: boolean = false
16 textInputController: TextAreaController = new TextAreaController() 15 textInputController: TextAreaController = new TextAreaController()
  16 + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 }
17 17
18 aboutToAppear(): void { 18 aboutToAppear(): void {
19 19
20 - 20 + // this.textInputController.caretPosition(0)
21 } 21 }
22 22
23 publishCommentRequest() { 23 publishCommentRequest() {
@@ -25,7 +25,7 @@ export struct CommentCustomDialog { @@ -25,7 +25,7 @@ export struct CommentCustomDialog {
25 // this.publishCommentModel.commentContent = this.commentText 25 // this.publishCommentModel.commentContent = this.commentText
26 //TODO 判断类型 26 //TODO 判断类型
27 this.publishCommentModel.commentType = '2' 27 this.publishCommentModel.commentType = '2'
28 - commentViewModel.publishComment(this.publishCommentModel).then((model:commentItemModel) => { 28 + commentViewModel.publishComment(this.publishCommentModel).then((model: commentItemModel) => {
29 this.publishCommentModel.commentContent = '' 29 this.publishCommentModel.commentContent = ''
30 // 30 //
31 31
@@ -74,12 +74,13 @@ export struct CommentCustomDialog { @@ -74,12 +74,13 @@ export struct CommentCustomDialog {
74 .height(30) 74 .height(30)
75 .onClick(() => { 75 .onClick(() => {
76 76
77 - // this.commentText = this.commentText + '神鼎' 77 + this.positionInfo = this.textInputController.getCaretOffset()
  78 +
78 this.emojiSwitch = !this.emojiSwitch 79 this.emojiSwitch = !this.emojiSwitch
79 if (this.emojiSwitch) { 80 if (this.emojiSwitch) {
80 this.textInputController.stopEditing() 81 this.textInputController.stopEditing()
81 } else { 82 } else {
82 - this.textInputController.caretPosition(this.textInputController.getTextContentRect().x) 83 + // this.textInputController.caretPosition(this.textInputController.getTextContentRect().x)
83 } 84 }
84 85
85 }) 86 })
@@ -116,7 +117,7 @@ export struct CommentCustomDialog { @@ -116,7 +117,7 @@ export struct CommentCustomDialog {
116 117
117 //表情view 118 //表情view
118 if (this.emojiSwitch) { 119 if (this.emojiSwitch) {
119 - emojiView() 120 + emojiView({ publishCommentModel: this.publishCommentModel }).height(150)
120 } 121 }
121 122
122 }.backgroundColor(Color.White) 123 }.backgroundColor(Color.White)
@@ -129,8 +130,88 @@ export struct CommentCustomDialog { @@ -129,8 +130,88 @@ export struct CommentCustomDialog {
129 130
130 @Component 131 @Component
131 struct emojiView { 132 struct emojiView {
  133 + @ObjectLink publishCommentModel: publishCommentModel
  134 + /*没找到获取系统emoji的方案*/
  135 + private emojiString = '😀,😁,😂,😃,😄,😅,😆,😇,😈,😉,😊,😋,😌,😍,😎,😏,😐,😑,😒,😓,😔,😕,😖,😗,😘,😙,😚,😛,😜,😝,😞,😟,😠,😡,😢,😣,😤,😥,😦,😧,😨,😩,😪,😫,😬,😭,😮,😯,😰,😱,😲,😳,😴,😵,😶,😷,😸,😹,😺,😻,😼,😽,😾,😿,🙀,🙅,🙆,🙇,🙈,🙉,🙊,🙋,🙌,🙍,🙎,🙏'
  136 + private displayArray: string[][] = []
  137 + private swiperController: SwiperController = new SwiperController()
  138 +
  139 + aboutToAppear(): void {
  140 +
  141 +
  142 +
  143 + this.displayArray = chunk(this.emojiString.split(','), 20)
  144 +
  145 + //补上删除按钮以及空白占位
  146 + let lastElement = this.displayArray.slice(-1)[0];
  147 + if (lastElement.length < 20) {
  148 + let needLength = (20 - lastElement.length)
  149 + for (let index = 0; index < needLength; index++) {
  150 + lastElement.push('')
  151 + }
  152 + }
  153 +
  154 + this.displayArray.forEach(element => {
  155 + element.push('删除')
  156 + });
  157 +
  158 + }
  159 +
132 build() { 160 build() {
  161 +
  162 + // String.fromCodePoint()
  163 + Swiper(this.swiperController) {
  164 +
  165 + ForEach(this.displayArray, (array: [], index) => {
  166 + Column() {
  167 + Grid() {
  168 + ForEach(array, (emoji: string, subIndex: number) => {
  169 + GridItem() {
  170 + Text() {
  171 + if (emoji == '删除') {
  172 + ImageSpan($r('app.media.wdInput_delete'))
  173 + } else {
  174 + Span(emoji)
  175 + }
  176 +
  177 + }.textAlign(TextAlign.Center).width(30).height(30)
  178 +
  179 + // .backgroundColor(Color.Orange)
  180 + }.onClick(() => {
  181 + if (emoji == '删除') {
  182 + this.publishCommentModel.commentContent = this.publishCommentModel.commentContent.substring(0, this.publishCommentModel.commentContent.length -1)
  183 + } else if (emoji == '') {
  184 +
  185 + } else {
  186 + this.publishCommentModel.commentContent = this.publishCommentModel.commentContent + emoji
  187 + }
  188 +
  189 + })
  190 + })
  191 + }
  192 + .maxCount(6)
  193 + .columnsTemplate('1fr 1fr 1fr 1fr 1fr 1fr 1fr')
  194 + .rowsGap(10)
  195 + .layoutDirection(GridDirection.Row)
  196 +
  197 + Row().height(40)
  198 + }
  199 + })
  200 + }
  201 + .indicator(true)
  202 + .vertical(false)
  203 + .height(140)
  204 + }
  205 +}
  206 +
  207 +function chunk<T>(array: T[], size: number): T[][] {
  208 + const result: T[][] = [];
  209 +
  210 + for (let i = 0; i < array.length; i += size) {
  211 + result.push(array.slice(i, i + size));
133 } 212 }
  213 +
  214 + return result;
134 } 215 }
135 216
136 217
@@ -5,12 +5,16 @@ import commentViewModel from '../viewmodel/CommentViewModel' @@ -5,12 +5,16 @@ import commentViewModel from '../viewmodel/CommentViewModel'
5 import { router, window } from '@kit.ArkUI' 5 import { router, window } from '@kit.ArkUI'
6 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 6 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
7 import { MyCommentDataSource } from '../model/MyCommentDataSource' 7 import { MyCommentDataSource } from '../model/MyCommentDataSource'
8 -import { HttpUrlUtils } from 'wdNetwork/Index' 8 +import { HttpUrlUtils, HttpUtils } from 'wdNetwork/Index'
9 import PageModel from '../../../viewmodel/PageModel' 9 import PageModel from '../../../viewmodel/PageModel'
10 import { ErrorComponent } from '../../view/ErrorComponent' 10 import { ErrorComponent } from '../../view/ErrorComponent'
11 import { EmptyComponent , WDViewDefaultType} from '../../view/EmptyComponent' 11 import { EmptyComponent , WDViewDefaultType} from '../../view/EmptyComponent'
12 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' 12 import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
13 import NoMoreLayout from '../../page/NoMoreLayout' 13 import NoMoreLayout from '../../page/NoMoreLayout'
  14 +import { CommentCustomDialog } from './CommentCustomDialog'
  15 +import { publishCommentModel } from '../model/PublishCommentModel'
  16 +import { ifaa } from '@kit.OnlineAuthenticationKit'
  17 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
14 18
15 const TAG = 'QualityCommentsComponent'; 19 const TAG = 'QualityCommentsComponent';
16 20
@@ -24,9 +28,6 @@ export struct QualityCommentsComponent { @@ -24,9 +28,6 @@ export struct QualityCommentsComponent {
24 @State hasMore: boolean = true; 28 @State hasMore: boolean = true;
25 @State currentPage: number = 1; 29 @State currentPage: number = 1;
26 private scroller: Scroller = new Scroller(); 30 private scroller: Scroller = new Scroller();
27 -  
28 -  
29 -  
30 @State tileOpacity: number = 0; 31 @State tileOpacity: number = 0;
31 firstPositionY: number = 0; 32 firstPositionY: number = 0;
32 bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px'; 33 bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
@@ -34,6 +35,11 @@ export struct QualityCommentsComponent { @@ -34,6 +35,11 @@ export struct QualityCommentsComponent {
34 lastWindowColor: string = '#ffffff' 35 lastWindowColor: string = '#ffffff'
35 currentWindowColor: string = '#FF4202' 36 currentWindowColor: string = '#FF4202'
36 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); 37 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
  38 + @State dialogController: CustomDialogController | null = null;
  39 +
  40 + /*必传*/
  41 + @State publishCommentModel: publishCommentModel = new publishCommentModel()
  42 +
37 43
38 aboutToDisappear(): void { 44 aboutToDisappear(): void {
39 45
@@ -43,13 +49,33 @@ export struct QualityCommentsComponent { @@ -43,13 +49,33 @@ export struct QualityCommentsComponent {
43 windowClass.setWindowLayoutFullScreen(false) 49 windowClass.setWindowLayoutFullScreen(false)
44 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) 50 // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
45 51
  52 + this.dialogController = null // 将dialogController置空
  53 +
46 } 54 }
47 55
48 aboutToAppear(): void { 56 aboutToAppear(): void {
49 57
50 this.fullScreen(); 58 this.fullScreen();
51 this.getData(); 59 this.getData();
  60 + this.showAlert()
  61 + }
52 62
  63 + showAlert(){
  64 + this.dialogController = new CustomDialogController({
  65 + builder: CommentCustomDialog({
  66 + confirm: (value: Record<string, string>) => {
  67 +
  68 + },
  69 + publishCommentModel: this.publishCommentModel
  70 + }),
  71 + autoCancel: true,
  72 + alignment: DialogAlignment.Bottom,
  73 + customStyle: true,
  74 + offset: {
  75 + dx: 0,
  76 + dy: -20
  77 + },
  78 + })
53 } 79 }
54 80
55 getData(resolve?: (value: string | PromiseLike<string>) => void){ 81 getData(resolve?: (value: string | PromiseLike<string>) => void){
@@ -217,7 +243,7 @@ export struct QualityCommentsComponent { @@ -217,7 +243,7 @@ export struct QualityCommentsComponent {
217 // ListItemGroup({ header: this.titleHeader() }) 243 // ListItemGroup({ header: this.titleHeader() })
218 LazyForEach(this.allDatas, (item: commentItemModel, index: number) => { 244 LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
219 ListItem() { 245 ListItem() {
220 - QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 }) 246 + QualityCommentItem({ item: item, index: index , dialogController:this.dialogController, publishCommentModel:this.publishCommentModel}).margin({ left: 12, right: 12 })
221 } 247 }
222 }) 248 })
223 // 加载更多 249 // 加载更多
@@ -243,16 +269,6 @@ export struct QualityCommentsComponent { @@ -243,16 +269,6 @@ export struct QualityCommentsComponent {
243 } 269 }
244 270
245 271
246 - @Builder  
247 - testLayout(){  
248 - List({ space: 12, scroller:this.scroller }){  
249 - LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {  
250 - ListItem() {  
251 - QualityCommentItem({ item: item, index: index }).margin({ left: 12, right: 12 })  
252 - }  
253 - })  
254 - }  
255 - }  
256 272
257 } 273 }
258 274
@@ -261,6 +277,8 @@ export struct QualityCommentsComponent { @@ -261,6 +277,8 @@ export struct QualityCommentsComponent {
261 277
262 @Component 278 @Component
263 struct QualityCommentItem { 279 struct QualityCommentItem {
  280 + @ObjectLink publishCommentModel: publishCommentModel
  281 + dialogController: CustomDialogController | null = null;
264 @ObjectLink item: commentItemModel 282 @ObjectLink item: commentItemModel
265 index: number = 0 283 index: number = 0
266 284
@@ -360,7 +378,20 @@ struct QualityCommentItem { @@ -360,7 +378,20 @@ struct QualityCommentItem {
360 Row({ space: 16 }) { 378 Row({ space: 16 }) {
361 Row() { 379 Row() {
362 Image($r('app.media.comment_icon_pinglun')).width(16).height(16) 380 Image($r('app.media.comment_icon_pinglun')).width(16).height(16)
363 - } 381 + }.onClick(()=>{
  382 + this.publishCommentModel.targetId = this.item.targetId
  383 + this.publishCommentModel.targetRelId = this.item.targetRelId
  384 + this.publishCommentModel.targetTitle = this.item.targetTitle
  385 + this.publishCommentModel.targetRelType = this.item.targetRelType
  386 + this.publishCommentModel.targetRelObjectId = this.item.targetRelObjectId
  387 + this.publishCommentModel.targetType = this.item.targetType
  388 + // this.publishCommentModel.keyArticle = this.item.keyArticle
  389 +
  390 + this.publishCommentModel.rootCommentId = this.item.rootCommentId
  391 + this.publishCommentModel.parentId = this.item.id
  392 +
  393 + this.dialogController?.open()
  394 + })
364 395
365 Row() { 396 Row() {
366 Image($r(this.item.api_status ? 'app.media.comment_like_select' : 'app.media.comment_like_normal')) 397 Image($r(this.item.api_status ? 'app.media.comment_like_select' : 'app.media.comment_like_normal'))
@@ -373,6 +404,12 @@ struct QualityCommentItem { @@ -373,6 +404,12 @@ struct QualityCommentItem {
373 .margin({ left: 3 }) 404 .margin({ left: 3 })
374 } 405 }
375 }.onClick(() => { 406 }.onClick(() => {
  407 + // 未登录,跳转登录
  408 + const user_id = HttpUtils.getUserId()
  409 + if (!user_id) {
  410 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  411 + return
  412 + }
376 commentLikeChange(this.item) 413 commentLikeChange(this.item)
377 commentViewModel.commentLike(this.item).then(() => { 414 commentViewModel.commentLike(this.item).then(() => {
378 }).catch(() => { 415 }).catch(() => {
@@ -99,8 +99,12 @@ struct PeopleShipHomePage { @@ -99,8 +99,12 @@ struct PeopleShipHomePage {
99 99
100 } 100 }
101 101
102 - async aboutToAppear() { 102 + aboutToAppear() {
103 103
  104 + this.getData()
  105 + }
  106 +
  107 + private async getData() {
104 try { 108 try {
105 // 获取页面信息 109 // 获取页面信息
106 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '') 110 this.detailModel = await PeopleShipHomePageDataModel.getPeopleShipHomePageDetailInfo(this.creatorId, '', '')
@@ -117,8 +121,6 @@ struct PeopleShipHomePage { @@ -117,8 +121,6 @@ struct PeopleShipHomePage {
117 } catch (exception) { 121 } catch (exception) {
118 122
119 } 123 }
120 -  
121 -  
122 } 124 }
123 125
124 findFollowStata(followList: QueryListIsFollowedItem[]) { 126 findFollowStata(followList: QueryListIsFollowedItem[]) {
@@ -156,8 +158,10 @@ struct PeopleShipHomePage { @@ -156,8 +158,10 @@ struct PeopleShipHomePage {
156 PageRepository.postInteractAccentionOperate(params).then(res => { 158 PageRepository.postInteractAccentionOperate(params).then(res => {
157 if (this.isAttention == '1') { 159 if (this.isAttention == '1') {
158 this.isAttention = '0' 160 this.isAttention = '0'
  161 + this.detailModel.fansNum -= 1
159 } else { 162 } else {
160 this.isAttention = '1' 163 this.isAttention = '1'
  164 + this.detailModel.fansNum += 1
161 } 165 }
162 this.isLoadingAttention = false 166 this.isLoadingAttention = false
163 }) 167 })
@@ -339,8 +339,8 @@ export struct TopNavigationComponent { @@ -339,8 +339,8 @@ export struct TopNavigationComponent {
339 }else { 339 }else {
340 Row() { 340 Row() {
341 Image($r('app.media.icon_search')) 341 Image($r('app.media.icon_search'))
342 - .width(18)  
343 - .height(18) 342 + .width('24vp')
  343 + .height('24vp')
344 } 344 }
345 .height('40vp') 345 .height('40vp')
346 .width('40vp') 346 .width('40vp')
@@ -280,6 +280,7 @@ export struct PeopleShipMainComponent { @@ -280,6 +280,7 @@ export struct PeopleShipMainComponent {
280 //批量查询各类型内容动态数据接口 280 //批量查询各类型内容动态数据接口
281 this.checkContentInteractData(listData.list, resolve) 281 this.checkContentInteractData(listData.list, resolve)
282 } else { 282 } else {
  283 + this.hasMore = false;
283 this.resolveEnd(true, resolve) 284 this.resolveEnd(true, resolve)
284 } 285 }
285 286
@@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent { @@ -25,12 +25,27 @@ export struct PeopleShipRecommendHeadComponent {
25 }) 25 })
26 }.margin({ top: 12, bottom: 8 }) 26 }.margin({ top: 12, bottom: 8 })
27 27
28 - Text(this.rmhInfo.userName)  
29 - .fontColor($r('app.color.color_222222'))  
30 - .fontSize($r('app.float.vp_14'))  
31 - .fontWeight(600)  
32 - .maxLines(1)  
33 - .textOverflow({overflow: TextOverflow.Ellipsis}) 28 + Row() {
  29 + Text(this.rmhInfo.userName)
  30 + .fontColor($r('app.color.color_222222'))
  31 + .fontSize($r('app.float.vp_14'))
  32 + .fontWeight(600)
  33 + .maxLines(1)
  34 + .textOverflow({overflow: TextOverflow.Ellipsis})
  35 + if (this.rmhInfo.authIcon) {
  36 + Image(this.rmhInfo.authIcon)
  37 + .width('12vp')
  38 + .height('12vp')
  39 + .borderRadius(6)
  40 + .objectFit(ImageFit.Cover)
  41 + .margin({
  42 + left: '2vp'
  43 + })
  44 + }
  45 + }
  46 + .alignItems(VerticalAlign.Center)
  47 + .justifyContent(FlexAlign.Center)
  48 +
34 49
35 Text(this.rmhInfo.introduction) 50 Text(this.rmhInfo.introduction)
36 .fontColor($r('app.color.color_B0B0B0')) 51 .fontColor($r('app.color.color_B0B0B0'))
@@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent {
24 // 列表 24 // 列表
25 else if (this.publishCount == 0) { 25 else if (this.publishCount == 0) {
26 // 无数据展示 26 // 无数据展示
27 - EmptyComponent({emptyType: 13}).height(DisplayUtils.getDeviceHeight() - this.topHeight) 27 + EmptyComponent({emptyType: 12}).height(DisplayUtils.getDeviceHeight() - this.topHeight)
28 } else { 28 } else {
29 Column() { 29 Column() {
30 Column() { 30 Column() {
1 import router from '@ohos.router' 1 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 5
5 @Component 6 @Component
6 export struct PeopleShipHomePageNavComponent { 7 export struct PeopleShipHomePageNavComponent {
@@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent { @@ -38,8 +39,13 @@ export struct PeopleShipHomePageNavComponent {
38 iconDiameter: 10, 39 iconDiameter: 10,
39 headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'), 40 headPhotoUrl: (this.detailModel.headPhotoUrl && this.detailModel.headPhotoUrl.length > 0 ) ? this.detailModel.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'),
40 authIcon: this.detailModel.authIcon 41 authIcon: this.detailModel.authIcon
41 - })  
42 - .margin({ 42 + }).onClick(()=>{
  43 + let params = {
  44 + 'headPhotoUrl': this.detailModel.headPhotoUrl,
  45 + 'headType': '1'
  46 + } as Record<string, string>;
  47 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
  48 + }).margin({
43 left: '10vp', 49 left: '10vp',
44 }) 50 })
45 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) 51 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden))
@@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent { @@ -9,6 +9,7 @@ export struct PeopleShipHomePageHeadComponent {
9 Stack({ alignContent: Alignment.BottomEnd }) { 9 Stack({ alignContent: Alignment.BottomEnd }) {
10 // 头像 10 // 头像
11 Image( this.headPhotoUrl ) 11 Image( this.headPhotoUrl )
  12 + .alt($r('app.media.WDAccountOwnerHedaerDefaultIcon'))
12 .width(this.diameter) 13 .width(this.diameter)
13 .height(this.diameter) 14 .height(this.diameter)
14 .borderRadius(this.diameter/2) 15 .borderRadius(this.diameter/2)
@@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD @@ -7,6 +7,7 @@ import { PeopleShipHomePageDataModel } from '../../viewmodel/PeopleShipHomePageD
7 import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' 7 import { InfluenceData, PeopleShipUserDetailData } from 'wdBean'
8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' 8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent'
9 import { HWLocationUtils } from 'wdHwAbility' 9 import { HWLocationUtils } from 'wdHwAbility'
  10 +import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
10 11
11 12
12 @Component 13 @Component
@@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent { @@ -51,6 +52,12 @@ export struct PeopleShipHomePageTopComponent {
51 }).margin({ 52 }).margin({
52 left: '10vp', 53 left: '10vp',
53 bottom: '20vp' 54 bottom: '20vp'
  55 + }).onClick(()=>{
  56 + let params = {
  57 + 'headPhotoUrl': this.detailModel.headPhotoUrl,
  58 + 'headType': '1'
  59 + } as Record<string, string>;
  60 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
54 }) 61 })
55 62
56 63
@@ -3,7 +3,7 @@ import { EmptyComponent } from '../view/EmptyComponent' @@ -3,7 +3,7 @@ import { EmptyComponent } from '../view/EmptyComponent'
3 @Entry 3 @Entry
4 @Component 4 @Component
5 export struct DefaultPage { 5 export struct DefaultPage {
6 - @State type: number = 1 6 + @State type: number = 15
7 7
8 retry() { 8 retry() {
9 console.log('daj点击了重试') 9 console.log('daj点击了重试')
@@ -13,7 +13,6 @@ export struct DefaultPage { @@ -13,7 +13,6 @@ export struct DefaultPage {
13 Row() { 13 Row() {
14 EmptyComponent({ 14 EmptyComponent({
15 emptyType: this.type, 15 emptyType: this.type,
16 - emptyButton: true,  
17 retry: () => { 16 retry: () => {
18 this.retry() 17 this.retry()
19 } 18 }
@@ -235,7 +235,7 @@ export struct EmptyComponent { @@ -235,7 +235,7 @@ export struct EmptyComponent {
235 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) { 235 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_ContentFailed) {
236 imageString = $r('app.media.icon_no_content') 236 imageString = $r('app.media.icon_no_content')
237 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) { 237 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoCreation) {
238 - imageString = $r('app.media.icon_no_appointmentMade') 238 + imageString = $r('app.media.icon_no_works1')
239 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) { 239 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoBooking) {
240 imageString = $r('app.media.icon_no_appointmentMade') 240 imageString = $r('app.media.icon_no_appointmentMade')
241 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) { 241 } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NetworkFailed) {
@@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI'; @@ -4,16 +4,18 @@ import { router } from '@kit.ArkUI';
4 @Component 4 @Component
5 struct ShowUserHeaderPage { 5 struct ShowUserHeaderPage {
6 @State headPhotoUrl: string = ''; 6 @State headPhotoUrl: string = '';
  7 + @State headType: string = ''
7 @State params:Record<string, string> = router.getParams() as Record<string, string>; 8 @State params:Record<string, string> = router.getParams() as Record<string, string>;
8 9
9 onPageShow() { 10 onPageShow() {
10 this.headPhotoUrl = this.params?.['headPhotoUrl']; 11 this.headPhotoUrl = this.params?.['headPhotoUrl'];
  12 + this.headType = this.params?.['headType'] ?? '';
11 } 13 }
12 14
13 build() { 15 build() {
14 Row() { 16 Row() {
15 Image(this.headPhotoUrl) 17 Image(this.headPhotoUrl)
16 - .alt($r('app.media.default_head')) 18 + .alt(this.headType.length > 0 ? $r('app.media.WDAccountOwnerHedaerDefaultIcon') : $r('app.media.default_head'))
17 .width('720lpx') 19 .width('720lpx')
18 .height('720lpx') 20 .height('720lpx')
19 .objectFit(ImageFit.Auto) 21 .objectFit(ImageFit.Auto)
1 import { Action } from 'wdBean'; 1 import { Action } from 'wdBean';
2 import { SpacialTopicPageComponent } from 'wdComponent' 2 import { SpacialTopicPageComponent } from 'wdComponent'
3 import { CommonConstants } from 'wdConstant' 3 import { CommonConstants } from 'wdConstant'
4 -import { Logger } from 'wdKit' 4 +import { Logger, WindowModel } from 'wdKit'
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
6 6
7 const TAG = 'SpacialTopicPage'; 7 const TAG = 'SpacialTopicPage';
@@ -27,6 +27,7 @@ struct SpacialTopicPage { @@ -27,6 +27,7 @@ struct SpacialTopicPage {
27 } 27 }
28 28
29 aboutToAppear() { 29 aboutToAppear() {
  30 + WindowModel.shared.setWindowLayoutFullScreen(true)
30 Logger.info(TAG, 'aboutToAppear'); 31 Logger.info(TAG, 'aboutToAppear');
31 let action: Action = router.getParams() as Action 32 let action: Action = router.getParams() as Action
32 this.action = action 33 this.action = action
@@ -34,6 +35,7 @@ struct SpacialTopicPage { @@ -34,6 +35,7 @@ struct SpacialTopicPage {
34 35
35 aboutToDisappear() { 36 aboutToDisappear() {
36 Logger.info(TAG, 'aboutToDisappear'); 37 Logger.info(TAG, 'aboutToDisappear');
  38 + WindowModel.shared.setWindowLayoutFullScreen(false)
37 } 39 }
38 40
39 onPageShow() { 41 onPageShow() {