liyubing

Merge remote-tracking branch 'origin/main'

Showing 38 changed files with 808 additions and 181 deletions
@@ -236,6 +236,10 @@ export class HttpUrlUtils { @@ -236,6 +236,10 @@ export class HttpUrlUtils {
236 * 预约状态 236 * 预约状态
237 */ 237 */
238 static readonly LIVE_APPOINTMENT_BATCH_PATH: string = "/api/live-center-message/zh/c/live/subscribe/user/batch"; 238 static readonly LIVE_APPOINTMENT_BATCH_PATH: string = "/api/live-center-message/zh/c/live/subscribe/user/batch";
  239 + /**
  240 + * 游客 评论列表
  241 + */
  242 + static readonly VISITOR_COMMENT_LIST_DATA_PATH: string = "/api/rmrb-comment/comment/zh/c/visitorCommentList";
239 243
240 /** 244 /**
241 * 查询是否被禁言 245 * 查询是否被禁言
@@ -868,4 +872,9 @@ export class HttpUrlUtils { @@ -868,4 +872,9 @@ export class HttpUrlUtils {
868 let url = HttpUrlUtils.getHost() + "/api/rmrb-contact/contact/zh/c/push/device" 872 let url = HttpUrlUtils.getHost() + "/api/rmrb-contact/contact/zh/c/push/device"
869 return url 873 return url
870 } 874 }
  875 +
  876 + static getVisitorCommentListDataUrl() {
  877 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.VISITOR_COMMENT_LIST_DATA_PATH
  878 + return url
  879 + }
871 } 880 }
@@ -91,6 +91,8 @@ export class WDRouterPage { @@ -91,6 +91,8 @@ export class WDRouterPage {
91 static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview"); 91 static loginProtocolPage = new WDRouterPage("wdLogin", "ets/pages/login/LoginProtocolWebview");
92 //我的主页 92 //我的主页
93 static mineHomePage = new WDRouterPage("wdComponent", "ets/pages/MineHomePage"); 93 static mineHomePage = new WDRouterPage("wdComponent", "ets/pages/MineHomePage");
  94 + //游客评论列表
  95 + static visitorCommentPage = new WDRouterPage("wdComponent", "ets/pages/VisitorCommentPage");
94 // 隐私设置页 96 // 隐私设置页
95 static privacySettingPage = new WDRouterPage("wdComponent", "ets/components/page/PrivacySettingPage"); 97 static privacySettingPage = new WDRouterPage("wdComponent", "ets/components/page/PrivacySettingPage");
96 // 关于页 98 // 关于页
@@ -115,6 +115,7 @@ export class ProcessUtils { @@ -115,6 +115,7 @@ export class ProcessUtils {
115 } 115 }
116 break; 116 break;
117 case ContentConstants.TYPE_LINK: 117 case ContentConstants.TYPE_LINK:
  118 + content.openType = "1"
118 ProcessUtils.gotoDefaultWeb(content); 119 ProcessUtils.gotoDefaultWeb(content);
119 break; 120 break;
120 //图集详情页 121 //图集详情页
@@ -60,20 +60,13 @@ export struct CarderInteraction { @@ -60,20 +60,13 @@ export struct CarderInteraction {
60 }) 60 })
61 } 61 }
62 62
63 -  
64 - Row() {  
65 - Image($r('app.media.CarderInteraction_comment'))  
66 - .width(18)  
67 - .height(18)  
68 - Text('评论')  
69 - .margin({ left: 4 })  
70 - .fontSize(14)  
71 - .fontColor('#666666') 63 + if(this.contentDetailData.rmhInfo != null){
  64 + if(this.contentDetailData.shareInfo != null && 1 == this.contentDetailData.shareInfo.shareOpen && 1 == this.contentDetailData.rmhInfo.cnShareControl){
  65 + this.shareLayout()
  66 + }
  67 + }else{
  68 + this.shareLayout()
72 } 69 }
73 - .justifyContent(FlexAlign.Center)  
74 - .onClick(() => {  
75 - ProcessUtils.processPage(this.contentDTO)  
76 - })  
77 70
78 this.builderLike() 71 this.builderLike()
79 } 72 }
@@ -87,6 +80,23 @@ export struct CarderInteraction { @@ -87,6 +80,23 @@ export struct CarderInteraction {
87 .alignItems(VerticalAlign.Center) 80 .alignItems(VerticalAlign.Center)
88 } 81 }
89 82
  83 + @Builder
  84 + shareLayout() {
  85 + Row() {
  86 + Image($r('app.media.CarderInteraction_comment'))
  87 + .width(18)
  88 + .height(18);
  89 + Text('评论')
  90 + .margin({ left: 4 })
  91 + .fontSize(14)
  92 + .fontColor('#666666');
  93 + }
  94 + .justifyContent(FlexAlign.Center)
  95 + .onClick(() => {
  96 + ProcessUtils.processPage(this.contentDTO);
  97 + })
  98 + }
  99 +
90 /** 100 /**
91 * 点赞组件 101 * 点赞组件
92 */ 102 */
  1 +import { ContentDetailDTO, InteractDataDTO, PageInfoDTO } from 'wdBean/Index'
  2 +
  3 +import { CommentListDialogView, publishCommentModel } from '../../../../Index'
  4 +
  5 +@Component
  6 +export struct CommentDialogView {
  7 + @Link @Watch('showCommentListChange') showCommentList: boolean
  8 + @Link index: number
  9 + @Link currentIndex: number
  10 + @Link publishCommentModel: publishCommentModel
  11 + @Consume contentDetailData: ContentDetailDTO
  12 + @Link interactData: InteractDataDTO
  13 + @State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
  14 + @State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
  15 +
  16 + @State @Watch("innerShowCommentChange") innerShowComment: boolean = false
  17 +
  18 + showCommentListChange(val: boolean) {
  19 + if (this.showCommentList && this.index === this.currentIndex) {
  20 + this.innerShowComment = true
  21 + } else {
  22 + this.innerShowComment = false
  23 + }
  24 + }
  25 +
  26 + innerShowCommentChange() {
  27 + this.showCommentList = this.innerShowComment
  28 + }
  29 +
  30 + build() {
  31 + CommentListDialogView({
  32 + showCommentList: this.innerShowComment,
  33 + contentDetailData: this.contentDetailData,
  34 + publishCommentModel: this.publishCommentModel,
  35 + pageInfo: this.fakePageInfo,
  36 + onClose: () => {
  37 + this.showCommentList = false
  38 + if (Number.parseInt(this.publishCommentModel.totalCommentNumer) > Number.parseInt(this.interactData.commentNum + "")) {
  39 + this.interactData.commentNum = Number.parseInt(this.publishCommentModel.totalCommentNumer)
  40 + }
  41 + }
  42 + })
  43 + }
  44 +}
@@ -54,7 +54,7 @@ export struct PaperTitleComponent { @@ -54,7 +54,7 @@ export struct PaperTitleComponent {
54 .margin({ left: 10 }) 54 .margin({ left: 10 })
55 .fontSize(22) 55 .fontSize(22)
56 .fontColor($r('app.color.white')) 56 .fontColor($r('app.color.white'))
57 - .fontWeight(900) 57 + .fontFamily('Source Han Serif CN')
58 .maxLines(1) 58 .maxLines(1)
59 59
60 60
@@ -133,7 +133,7 @@ export struct PaperTitleComponent { @@ -133,7 +133,7 @@ export struct PaperTitleComponent {
133 .linearGradient({ 133 .linearGradient({
134 direction: GradientDirection.Right, // 渐变方向 134 direction: GradientDirection.Right, // 渐变方向
135 repeating: false, // 渐变颜色是否重复 135 repeating: false, // 渐变颜色是否重复
136 - colors: [[0x4dffffff, 0.0], [0x33ffffff, 0.3], [0x1affffff,0.6], [0x03ffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果 136 + colors: [[0x4dffffff, 0.0], [0x33ffffff, 0.2], [0x1affffff,0.6], [0x03ffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果
137 }) 137 })
138 .margin({ left:8, right: 0}) 138 .margin({ left:8, right: 0})
139 139
@@ -12,7 +12,7 @@ export struct MultiPictureDetailItemComponent { @@ -12,7 +12,7 @@ export struct MultiPictureDetailItemComponent {
12 12
13 13
14 async aboutToAppear() { 14 async aboutToAppear() {
15 - // Logger.info(TAG, 'pictures preview') 15 + // Logger.info(TAG, 'pictures preview'
16 } 16 }
17 17
18 build() { 18 build() {
1 -import { Action, H5ReceiveDetailBean, ContentDetailDTO } from 'wdBean'; 1 +import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO } from 'wdBean';
2 import { WdWebComponent } from 'wdWebComponent'; 2 import { WdWebComponent } from 'wdWebComponent';
3 import router from '@ohos.router'; 3 import router from '@ohos.router';
4 import { CommonConstants } from 'wdConstant' 4 import { CommonConstants } from 'wdConstant'
@@ -13,6 +13,7 @@ import { NetworkUtil, WindowModel } from 'wdKit'; @@ -13,6 +13,7 @@ import { NetworkUtil, WindowModel } from 'wdKit';
13 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' 13 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
14 import { common } from '@kit.AbilityKit'; 14 import { common } from '@kit.AbilityKit';
15 import { PageRepository } from '../repository/PageRepository'; 15 import { PageRepository } from '../repository/PageRepository';
  16 +import { CommentDialogView } from './CommentDialogView';
16 17
17 const TAG: string = 'SpacialTopicPageComponent' 18 const TAG: string = 'SpacialTopicPageComponent'
18 19
@@ -23,7 +24,11 @@ export struct SpacialTopicPageComponent { @@ -23,7 +24,11 @@ export struct SpacialTopicPageComponent {
23 action: Action = {} as Action 24 action: Action = {} as Action
24 @State webUrl: string = ''; 25 @State webUrl: string = '';
25 @State subjectData: string = ''; 26 @State subjectData: string = '';
  27 + @State index: number = 0
  28 + @State currentIndex: number = 0
26 @State isPageEnd: boolean = false 29 @State isPageEnd: boolean = false
  30 + @State showCommentList: boolean = false
  31 + @State interactData: InteractDataDTO = {} as InteractDataDTO
27 @Prop reload: number = 0; 32 @Prop reload: number = 0;
28 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 33 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
29 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean 34 private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
@@ -123,6 +128,7 @@ export struct SpacialTopicPageComponent { @@ -123,6 +128,7 @@ export struct SpacialTopicPageComponent {
123 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '') 128 this.publishCommentModel.keyArticle = String(this.contentDetailData?.keyArticle || '')
124 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') 129 this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '')
125 this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') 130 this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '')
  131 +
126 // } 132 // }
127 this.subjectData = 'dasdasdadas' 133 this.subjectData = 'dasdasdadas'
128 134
@@ -130,8 +136,15 @@ export struct SpacialTopicPageComponent { @@ -130,8 +136,15 @@ export struct SpacialTopicPageComponent {
130 // this.trySendData2H5() 136 // this.trySendData2H5()
131 } 137 }
132 if(pageInfoMsg && pageInfoMsg.data){ 138 if(pageInfoMsg && pageInfoMsg.data){
133 - this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag)  
134 - this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag) 139 + this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo?.commentFlag)
  140 + this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo?.commentShowFlag)
  141 + if(pageInfoMsg.data.topicInfo?.shareOpen === 1){
  142 + if (!this.operationButtonList.includes('share')) {
  143 + this.operationButtonList.push('share');
  144 + }
  145 + }else{
  146 + this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
  147 + }
135 } 148 }
136 149
137 console.log('contentDetailData',this.contentDetailData) 150 console.log('contentDetailData',this.contentDetailData)
@@ -185,6 +198,17 @@ export struct SpacialTopicPageComponent { @@ -185,6 +198,17 @@ export struct SpacialTopicPageComponent {
185 publishCommentModel: this.publishCommentModel, 198 publishCommentModel: this.publishCommentModel,
186 operationButtonList: this.operationButtonList, 199 operationButtonList: this.operationButtonList,
187 styleType: 1, 200 styleType: 1,
  201 + onCommentIconClick:()=>{
  202 + this.showCommentList = true
  203 + }
  204 + })
  205 + //全部评论
  206 + CommentDialogView({
  207 + index: $index,
  208 + currentIndex: $currentIndex,
  209 + showCommentList: $showCommentList,
  210 + publishCommentModel: $publishCommentModel,
  211 + interactData: $interactData,
188 }) 212 })
189 } 213 }
190 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 214 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
@@ -219,8 +219,7 @@ struct createImg { @@ -219,8 +219,7 @@ struct createImg {
219 }) { 219 }) {
220 Image(this.loadImg ? item.fullUrl : '') 220 Image(this.loadImg ? item.fullUrl : '')
221 .backgroundColor(0xf5f5f5) 221 .backgroundColor(0xf5f5f5)
222 - .width(113)  
223 - .height(113) 222 + .aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305)
224 .autoResize(true) 223 .autoResize(true)
225 .borderRadius(this.caclImageRadius(index)) 224 .borderRadius(this.caclImageRadius(index))
226 .opacity(!item.weight && !item.height ? 0 : 1) 225 .opacity(!item.weight && !item.height ? 0 : 1)
@@ -88,7 +88,7 @@ export struct Card6Component { @@ -88,7 +88,7 @@ export struct Card6Component {
88 .fontSize(18) 88 .fontSize(18)
89 .lineHeight(27) 89 .lineHeight(27)
90 .fontWeight(FontWeight.Normal) 90 .fontWeight(FontWeight.Normal)
91 - .maxLines(this.contentDTO.appStyle === '6' ? 5 : 2) 91 + .maxLines(this.contentDTO.appStyle === '6' ? 4 : 2)
92 .alignSelf(ItemAlign.Start) 92 .alignSelf(ItemAlign.Start)
93 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 93 .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
94 .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && 94 .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
@@ -107,7 +107,7 @@ export struct Card6Component { @@ -107,7 +107,7 @@ export struct Card6Component {
107 } 107 }
108 108
109 .alignItems(HorizontalAlign.Start) 109 .alignItems(HorizontalAlign.Start)
110 - .height(78) 110 + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
111 111
112 112
113 .justifyContent(FlexAlign.SpaceBetween) 113 .justifyContent(FlexAlign.SpaceBetween)
@@ -119,7 +119,7 @@ export struct Card6Component { @@ -119,7 +119,7 @@ export struct Card6Component {
119 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) 119 .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
120 .borderRadius(5) 120 .borderRadius(5)
121 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) 121 .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
122 - .height(78) 122 + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
123 CardMediaInfo({ contentDTO: this.contentDTO }) 123 CardMediaInfo({ contentDTO: this.contentDTO })
124 } 124 }
125 125
@@ -138,8 +138,7 @@ export struct Card6Component { @@ -138,8 +138,7 @@ export struct Card6Component {
138 }) 138 })
139 139
140 .width(CommonConstants.FULL_WIDTH) 140 .width(CommonConstants.FULL_WIDTH)
141 - .height(106)  
142 - .justifyContent(FlexAlign.SpaceBetween) 141 + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 106 : 184) .justifyContent(FlexAlign.SpaceBetween)
143 .alignItems(VerticalAlign.Top) 142 .alignItems(VerticalAlign.Top)
144 } 143 }
145 } 144 }
1 import { inputMethodEngine } from '@kit.IMEKit' 1 import { inputMethodEngine } from '@kit.IMEKit'
2 import { commentInfo } from 'wdBean/Index' 2 import { commentInfo } from 'wdBean/Index'
  3 +import { ToastUtils } from 'wdKit/Index'
  4 +import { HttpUtils } from 'wdNetwork/Index'
3 import { commentItemModel } from '../model/CommentModel' 5 import { commentItemModel } from '../model/CommentModel'
4 import { publishCommentModel } from '../model/PublishCommentModel' 6 import { publishCommentModel } from '../model/PublishCommentModel'
5 import commentViewModel from '../viewmodel/CommentViewModel' 7 import commentViewModel from '../viewmodel/CommentViewModel'
@@ -40,6 +42,17 @@ export struct CommentCustomDialog { @@ -40,6 +42,17 @@ export struct CommentCustomDialog {
40 } 42 }
41 } 43 }
42 44
  45 + // 未登录,游客评论未打开 则先登录
  46 + if (!HttpUtils.isLogin()) {
  47 + if (this.publishCommentModel.visitorComment != "1") {
  48 + ToastUtils.showToast("暂时无法评论", 3000)
  49 +
  50 + this.publishCommentModel.commentContent = ''
  51 + this.controller?.close()
  52 + return
  53 + }
  54 + }
  55 +
43 // 点击时 即可埋点 56 // 点击时 即可埋点
44 if (this.onPublishBtnClickTrack) { 57 if (this.onPublishBtnClickTrack) {
45 this.onPublishBtnClickTrack() 58 this.onPublishBtnClickTrack()
@@ -24,7 +24,10 @@ export struct CommentListDialogView { @@ -24,7 +24,10 @@ export struct CommentListDialogView {
24 pageInfo: this.pageInfo, 24 pageInfo: this.pageInfo,
25 onClose: this.onClose 25 onClose: this.onClose
26 }), 26 }),
27 - autoCancel: false, 27 + autoCancel: true,
  28 + cancel: () => {
  29 + PublicDialogManager.shareInstance().closeDialog(this.dialogController)
  30 + },
28 customStyle: true, 31 customStyle: true,
29 alignment: DialogAlignment.Bottom, 32 alignment: DialogAlignment.Bottom,
30 }) 33 })
@@ -128,13 +128,13 @@ export struct CommentTabComponent { @@ -128,13 +128,13 @@ export struct CommentTabComponent {
128 if(this.contentDetail.appstyle === 9) return 128 if(this.contentDetail.appstyle === 9) return
129 this.onCommentFocus && this.onCommentFocus() 129 this.onCommentFocus && this.onCommentFocus()
130 130
131 - // 未登录,游客评论未打开 则先登录  
132 - if (!HttpUtils.isLogin()) {  
133 - if (this.contentDetail.visitorComment != 1) {  
134 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
135 - return  
136 - }  
137 - } 131 + // 未登录,游客评论未打开 则先登录 ,这里逻辑 放到 发布按钮事件判断了
  132 + // if (!HttpUtils.isLogin()) {
  133 + // if (this.contentDetail.visitorComment != 1) {
  134 + // ToastUtils.showToast("暂时无法评论", 3000)
  135 + // return
  136 + // }
  137 + // }
138 138
139 if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) { 139 if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) {
140 ToastUtils.showToast("暂时无法评论", 3000) 140 ToastUtils.showToast("暂时无法评论", 3000)
@@ -25,7 +25,6 @@ export struct ZhSingleRow02 { @@ -25,7 +25,6 @@ export struct ZhSingleRow02 {
25 scroller: Scroller = new Scroller() 25 scroller: Scroller = new Scroller()
26 26
27 resetMoreTips() { 27 resetMoreTips() {
28 - console.log('resetMoreTips', this.moreWidth, this.initMoreWidth)  
29 if (this.moreWidth < this.initMoreWidth * 2) { 28 if (this.moreWidth < this.initMoreWidth * 2) {
30 this.moreTips = '查看更多'; 29 this.moreTips = '查看更多';
31 } 30 }
@@ -56,17 +55,20 @@ export struct ZhSingleRow02 { @@ -56,17 +55,20 @@ export struct ZhSingleRow02 {
56 if (this.moreWidth > this.initMoreWidth) { 55 if (this.moreWidth > this.initMoreWidth) {
57 this.moreWidth = 16 56 this.moreWidth = 16
58 } 57 }
59 - this.resetMoreTips()  
60 } 58 }
61 59
62 toMore() { 60 toMore() {
63 if (this.moreWidth > this.initMoreWidth * 2) { 61 if (this.moreWidth > this.initMoreWidth * 2) {
64 if (this.compDTO?.objectType === '11') { 62 if (this.compDTO?.objectType === '11') {
65 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) 63 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
66 - } else if (this.compDTO?.objectType === '5') {  
67 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
68 - } else if (this.compDTO?.objectType === '6') {  
69 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 64 + } else {
  65 + const contentDTO: ContentDTO = {
  66 + objectId: this.compDTO.objectId,
  67 + objectType: this.compDTO.objectType,
  68 + linkUrl: this.compDTO.linkUrl,
  69 + pageId: this.compDTO.pageId
  70 + } as ContentDTO
  71 + ProcessUtils.processPage(contentDTO)
70 } 72 }
71 } 73 }
72 } 74 }
@@ -90,7 +92,7 @@ export struct ZhSingleRow02 { @@ -90,7 +92,7 @@ export struct ZhSingleRow02 {
90 .margin({ right: 8 }) 92 .margin({ right: 8 })
91 }) 93 })
92 } 94 }
93 - if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 95 + if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
94 Row() { 96 Row() {
95 Ellipse() 97 Ellipse()
96 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 98 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -183,10 +185,14 @@ export struct ZhSingleRow02 { @@ -183,10 +185,14 @@ export struct ZhSingleRow02 {
183 .onClick(() => { 185 .onClick(() => {
184 if (this.compDTO?.objectType === '11') { 186 if (this.compDTO?.objectType === '11') {
185 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) 187 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
186 - } else if (this.compDTO?.objectType === '5') {  
187 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
188 - } else if (this.compDTO?.objectType === '6') {  
189 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 188 + } else {
  189 + const contentDTO: ContentDTO = {
  190 + objectId: this.compDTO.objectId,
  191 + objectType: this.compDTO.objectType,
  192 + linkUrl: this.compDTO.linkUrl,
  193 + pageId: this.compDTO.pageId
  194 + } as ContentDTO
  195 + ProcessUtils.processPage(contentDTO)
190 } 196 }
191 }) 197 })
192 } 198 }
@@ -165,7 +165,7 @@ export struct ZhSingleRow03 { @@ -165,7 +165,7 @@ export struct ZhSingleRow03 {
165 this.ItemCard(item) 165 this.ItemCard(item)
166 }) 166 })
167 } 167 }
168 - if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 168 + if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
169 Row() { 169 Row() {
170 Ellipse() 170 Ellipse()
171 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 171 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -23,7 +23,7 @@ export default struct MinePagePersonFunctionUI { @@ -23,7 +23,7 @@ export default struct MinePagePersonFunctionUI {
23 switch (item.msg){ 23 switch (item.msg){
24 case "评论":{ 24 case "评论":{
25 if(!this.isLogin){ 25 if(!this.isLogin){
26 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage) 26 + WDRouterRule.jumpWithPage(WDRouterPage.visitorCommentPage)
27 return 27 return
28 }else { 28 }else {
29 let params: Record<string, string> = {'comment': "1"}; 29 let params: Record<string, string> = {'comment': "1"};
@@ -83,7 +83,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -83,7 +83,7 @@ export default struct MinePageUserSimpleInfoUI {
83 .textAlign(TextAlign.Center) 83 .textAlign(TextAlign.Center)
84 .fontColor($r('app.color.white')) 84 .fontColor($r('app.color.white'))
85 .fontSize(`${this.calcHeight(19)}lpx`) 85 .fontSize(`${this.calcHeight(19)}lpx`)
86 - .width(`${this.calcHeight(50)}lpx`) 86 + .width(this.levelId>9?`${this.calcHeight(69)}lpx`:`${this.calcHeight(50)}lpx`)
87 .height(`${this.calcHeight(29)}lpx`) 87 .height(`${this.calcHeight(29)}lpx`)
88 }.margin({top:'`${this.calcHeight(15)}lpx`'}) 88 }.margin({top:'`${this.calcHeight(15)}lpx`'})
89 }.alignItems(HorizontalAlign.Start) 89 }.alignItems(HorizontalAlign.Start)
@@ -159,6 +159,9 @@ export struct AppointmentListUI { @@ -159,6 +159,9 @@ export struct AppointmentListUI {
159 this.count = this.data.totalCount() 159 this.count = this.data.totalCount()
160 if (this.data.totalCount() < value.totalCount) { 160 if (this.data.totalCount() < value.totalCount) {
161 this.curPageNum++ 161 this.curPageNum++
  162 + if(this.count < 5){
  163 + this.getNewPageData()
  164 + }
162 } else { 165 } else {
163 this.hasMore = false 166 this.hasMore = false
164 } 167 }
  1 +import { ContentDTO } from 'wdBean/Index'
  2 +import { StringUtils, UserDataLocal } from 'wdKit/Index'
  3 +import MinePageDatasModel from '../../../model/MinePageDatasModel'
  4 +import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'
  5 +import { CommentListItem } from '../../../viewmodel/CommentListItem'
  6 +import measure from '@ohos.measure'
  7 +
  8 +@Component
  9 +export struct VisitorCommentComponent {
  10 + @ObjectLink data: CommentListItem
  11 + isLastItem: boolean = false
  12 + @State isExpand: boolean = false;
  13 + @State isExpandParent: boolean = false;
  14 + @State isOverLines: boolean = false
  15 + @State isOverLinesParent: boolean = false
  16 +
  17 + build() {
  18 + Column() {
  19 + Row() {
  20 + if (this.isExpand) {
  21 + Text() {
  22 + Span(this.data.commentContent)
  23 + }
  24 + .textStyle()
  25 + } else {
  26 + Text() {
  27 + Span(this.clipText(this.data.commentContent, 31, 5, 630, 0))
  28 + if (this.isOverLines) {
  29 + Span('...展开')
  30 + .fontColor($r('app.color.color_999999'))
  31 + .onClick(() => {
  32 + this.isExpand = true
  33 + })
  34 + }
  35 + }.maxLines(5)
  36 + .wordBreak(WordBreak.BREAK_ALL)
  37 + .textStyle()
  38 + }
  39 + }.padding({ left: '31lpx', right: '31lpx' })
  40 + .width('100%')
  41 +
  42 + Column() {
  43 + if (StringUtils.isNotEmpty(this.data.parentCommentContent)) {
  44 + //父评论
  45 + Row() {
  46 + if (this.isExpandParent) {
  47 + Text() {
  48 + Span(`@${this.data.parentCommentUserName}:`)
  49 + .fontColor($r('app.color.color_000000'))
  50 + .fontWeight('500lpx')
  51 + .fontSize('27lpx')
  52 + .lineHeight('40lpx')
  53 + Span(this.data.parentCommentContent)
  54 + .fontColor($r('app.color.color_000000'))
  55 + .fontWeight('400lpx')
  56 + .fontSize('27lpx')
  57 + .lineHeight('40lpx')
  58 + }
  59 + .width('100%')
  60 + .textAlign(TextAlign.Start)
  61 + } else {
  62 + Text() {
  63 + Span(`@${this.data.parentCommentUserName}:`)
  64 + .fontColor($r('app.color.color_000000'))
  65 + .fontWeight('500lpx')
  66 + .fontSize('27lpx')
  67 + .lineHeight('40lpx')
  68 +
  69 + Span(this.clipText(this.data.parentCommentContent, 31, 5, 630, 1))
  70 + .fontColor($r('app.color.color_000000'))
  71 + .fontWeight('400lpx')
  72 + .fontSize('27lpx')
  73 + .lineHeight('40lpx')
  74 + if (this.isOverLinesParent) {
  75 + Span('...展开')
  76 + .fontColor($r('app.color.color_999999'))
  77 + .onClick(() => {
  78 + this.isExpandParent = true
  79 + })
  80 + }
  81 + }.maxLines(5)
  82 + .wordBreak(WordBreak.BREAK_ALL)
  83 + .textAlign(TextAlign.Start)
  84 + .width('100%')
  85 + }
  86 + }
  87 + .width('100%')
  88 + .padding({ top: '23lpx', bottom: '15lpx', right: '23lpx' })
  89 +
  90 + Divider()
  91 + .width('100%')
  92 + .height('1lpx')
  93 + .strokeWidth('1lpx')
  94 + .backgroundColor($r('app.color.color_EDEDED'))
  95 + .margin({ top: '4lpx', bottom: '4lpx' })
  96 + }
  97 +
  98 + Column() {
  99 + Row() {
  100 + Row() {
  101 + Image($r('app.media.comment_link_icon'))
  102 + .objectFit(ImageFit.Auto)
  103 + .width('31lpx')
  104 + .height('31lpx')
  105 + .margin({ right: '10lpx' })
  106 +
  107 + Column() {
  108 + Row() {
  109 + Text(`${this.data.targetTitle}`)
  110 + .fontWeight('400lpx')
  111 + .fontColor($r('app.color.color_666666'))
  112 + .lineHeight('38lpx')
  113 + .fontSize('27lpx')
  114 + .layoutWeight(1)
  115 + .maxLines(1)
  116 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  117 + }.width('100%')
  118 + }
  119 + .layoutWeight(1)
  120 + .alignItems(HorizontalAlign.Start)
  121 + }.layoutWeight(1)
  122 +
  123 + Image($r('app.media.arrow_icon_right'))
  124 + .margin({ right: '4lpx' })
  125 + .width('23lpx')
  126 + .height('23lpx')
  127 + .margin({right:'23lpx'})
  128 + }
  129 + .width('100%')
  130 + .height('69lpx')
  131 + .justifyContent(FlexAlign.SpaceBetween)
  132 +
  133 + }.height('69lpx')
  134 + .justifyContent(FlexAlign.Center)
  135 + }
  136 + .margin({ top: '19lpx', bottom: '31lpx', left: '31lpx', right: '31lpx' })
  137 + .padding({ left: '23lpx' })
  138 + .width('662lpx')
  139 + .backgroundColor($r('app.color.color_F5F5F5'))
  140 +
  141 + if (!this.isLastItem) {
  142 + Divider().width('100%')
  143 + .height('12lpx')
  144 + .strokeWidth('12lpx')
  145 + .color($r('app.color.color_F5F5F5'))
  146 + }
  147 + }
  148 + .justifyContent(FlexAlign.Center)
  149 + }
  150 +
  151 + commentLikeOperation() {
  152 + let item = new CommentLikeOperationRequestItem(this.data.targetId, this.data.id + "", this.data.targetType + "", UserDataLocal.getUserName(), UserDataLocal.getUserHeaderUrl(), this.data.like_status === 0 ? 1 : 0)
  153 + MinePageDatasModel.getCommentLikeOperation(item, getContext(this)).then((value) => {
  154 + if (value != null) {
  155 + if (value.code === 0 || value.code.toString() === "0") {
  156 + this.data.like_status = this.data.like_status === 0 ? 1 : 0
  157 + this.data.likeNum = this.data.like_status === 0 ? this.data.likeNum - 1 : this.data.likeNum + 1
  158 + }
  159 + }
  160 + })
  161 + }
  162 +
  163 + /**
  164 + * 截断文本
  165 + * @author liuzhendong(猩猩G)
  166 + * @param {string} str 要截断的文本 '啊啊啊啊啊'
  167 + * @param {number} fontSize 字体大小(px)
  168 + * @param {number} maxLines 最大行数 3
  169 + * @param {number} textWidth 文本宽度(px) vp 需要转换vp2px()
  170 + * @returns {string} clipStr 截断后的文本 '啊啊'
  171 + * @param {type} 0 我的评论 1 父评论
  172 + */
  173 + clipText(str: string, fontSize: number, maxLines: number, textWidth: number, type: number): string {
  174 + let strArr: string[] = str.split("")
  175 + let truncateContent: string = '啊啊啊啊啊' // ...比正常文字宽度更小,这里使用啊啊啊(任意三个文字)代替计算
  176 + let measureTruncateWidth: number = measure.measureText({
  177 + textContent: truncateContent,
  178 + fontSize: px2fp(fontSize),
  179 + wordBreak:WordBreak.BREAK_ALL
  180 + })
  181 + if(type === 1){
  182 + measureTruncateWidth = measureTruncateWidth + measure.measureText({
  183 + textContent: `@${this.data.parentCommentUserName}:`,
  184 + fontSize: px2fp(fontSize),
  185 + wordBreak:WordBreak.BREAK_ALL
  186 + })
  187 + }
  188 + let clipStr: string = ''
  189 + for (let i = 0; i < strArr.length; i++) {
  190 + if (measure.measureText({
  191 + textContent: clipStr,
  192 + fontSize: px2fp(fontSize),
  193 + wordBreak:WordBreak.BREAK_ALL
  194 + }) >= textWidth * maxLines - measureTruncateWidth) {
  195 + if (type === 0) {
  196 + this.isOverLines = true
  197 + } else {
  198 + this.isOverLinesParent = true
  199 + }
  200 + break;
  201 + }
  202 + clipStr += strArr[i]
  203 + }
  204 + return clipStr
  205 + }
  206 +}
  207 +
  208 +@Extend(Text)
  209 +function textStyle() {
  210 + .width('630lpx')
  211 + .fontSize('31lpx')
  212 + .fontWeight('400lpx')
  213 + .fontColor($r('app.color.color_222222'))
  214 + .lineHeight('46lpx')
  215 +}
  216 +
  217 +function getParams(item: CommentListItem) : ContentDTO{
  218 + let contentDTO = new ContentDTO();
  219 +
  220 + // contentDTO.objectType = item.targetType + ""
  221 + // contentDTO.objectId = item.targetId + ""
  222 + // contentDTO.newsTitle = item.targetTitle
  223 + // contentDTO.channelId =
  224 + // contentDTO.rmhPlatform =
  225 +
  226 + contentDTO.objectId = item.targetId;
  227 + contentDTO.relType = item.targetRelType + "";
  228 + contentDTO.relId = item.targetRelId;
  229 + contentDTO.objectType = item.targetType + "";
  230 + contentDTO.newsTitle = item.targetTitle
  231 +
  232 + return contentDTO
  233 +}
@@ -451,9 +451,9 @@ export struct PaperSingleColumn999CardView { @@ -451,9 +451,9 @@ export struct PaperSingleColumn999CardView {
451 Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000)) 451 Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000))
452 .fontColor(Color.White) 452 .fontColor(Color.White)
453 .fontSize($r('app.float.vp_12')) 453 .fontSize($r('app.float.vp_12'))
454 - .fontWeight(500)  
455 .textAlign(TextAlign.End) 454 .textAlign(TextAlign.End)
456 .lineHeight(18) 455 .lineHeight(18)
  456 + .fontFamily('BebasNeue')
457 .textShadow({ 457 .textShadow({
458 radius: 2, 458 radius: 2,
459 color: 'rgba(0,0,0,0.3)', 459 color: 'rgba(0,0,0,0.3)',
@@ -509,7 +509,7 @@ export struct PaperSingleColumn999CardView { @@ -509,7 +509,7 @@ export struct PaperSingleColumn999CardView {
509 Text(this.item?.photoNum.toString()) 509 Text(this.item?.photoNum.toString())
510 .fontColor(Color.White) 510 .fontColor(Color.White)
511 .fontSize($r('app.float.vp_12')) 511 .fontSize($r('app.float.vp_12'))
512 - .fontWeight(500) 512 + .fontFamily('BebasNeue')
513 .textAlign(TextAlign.End) 513 .textAlign(TextAlign.End)
514 .lineHeight(18) 514 .lineHeight(18)
515 .textShadow({ 515 .textShadow({
@@ -45,7 +45,7 @@ struct EditUserNikeNamePage { @@ -45,7 +45,7 @@ struct EditUserNikeNamePage {
45 .alignItems(VerticalAlign.Center) 45 .alignItems(VerticalAlign.Center)
46 46
47 Divider() 47 Divider()
48 - .margin(20) 48 + .margin({ top:0,bottom:20,left:20 ,right:20 })
49 49
50 Row(){ 50 Row(){
51 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') 51 Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
@@ -98,12 +98,14 @@ struct InteractMessagePage { @@ -98,12 +98,14 @@ struct InteractMessagePage {
98 Column(){ 98 Column(){
99 Row(){ 99 Row(){
100 Text('共获') 100 Text('共获')
101 - .fontSize(18) 101 + .fontSize(18).height(40).align(Alignment.Bottom)
102 Text(this.likeNum.toString()) 102 Text(this.likeNum.toString())
103 - .fontSize(30) 103 + .fontSize(40)
104 .fontColor(Color.Red) 104 .fontColor(Color.Red)
  105 + .fontFamily('BebasNeue')
  106 + .margin(5).height(40).align(Alignment.Bottom)
105 Text('赞') 107 Text('赞')
106 - .fontSize(18) 108 + .fontSize(18).height(40).align(Alignment.Bottom)
107 109
108 }.height(75) 110 }.height(75)
109 111
@@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel'; @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel';
4 import { CommonConstants, ViewType } from 'wdConstant' 4 import { CommonConstants, ViewType } from 'wdConstant'
5 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' 5 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
6 import { ErrorComponent } from '../view/ErrorComponent' 6 import { ErrorComponent } from '../view/ErrorComponent'
7 -import { CompDTO, ContentDTO, contentListParams,contentListItem } from 'wdBean' 7 +import { CompDTO, ContentDTO, contentListParams,contentListItem, InteractDataDTO } from 'wdBean'
8 import NoMoreLayout from './NoMoreLayout' 8 import NoMoreLayout from './NoMoreLayout'
9 import { CustomSelectUI } from '../view/CustomSelectUI'; 9 import { CustomSelectUI } from '../view/CustomSelectUI';
10 import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; 10 import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
@@ -16,6 +16,7 @@ import { NetworkUtil } from 'wdKit/Index'; @@ -16,6 +16,7 @@ import { NetworkUtil } from 'wdKit/Index';
16 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' 16 import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
17 import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; 17 import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
18 18
  19 +import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel';
19 @Entry 20 @Entry
20 @Component 21 @Component
21 struct MyCollectionListPage { 22 struct MyCollectionListPage {
@@ -28,6 +29,8 @@ struct MyCollectionListPage { @@ -28,6 +29,8 @@ struct MyCollectionListPage {
28 @Provide deleteNum :number = 0; 29 @Provide deleteNum :number = 0;
29 @Provide isAllSelect:boolean = false 30 @Provide isAllSelect:boolean = false
30 31
  32 + @Provide commentList: InteractDataDTO[] = []
  33 +
31 @State currentPage: number = 1; 34 @State currentPage: number = 1;
32 private scroller: Scroller = new Scroller(); 35 private scroller: Scroller = new Scroller();
33 emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default 36 emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
@@ -175,6 +178,10 @@ struct MyCollectionListPage { @@ -175,6 +178,10 @@ struct MyCollectionListPage {
175 this.allDatas.push(compDTO) 178 this.allDatas.push(compDTO)
176 } 179 }
177 180
  181 + if (this.allDatas.length > 0){
  182 + this.getContentData()
  183 + }
  184 +
178 if (collectionItem.hasNext === 0) { 185 if (collectionItem.hasNext === 0) {
179 this.browSingModel.hasMore = false; 186 this.browSingModel.hasMore = false;
180 } else { 187 } else {
@@ -254,17 +261,34 @@ struct MyCollectionListPage { @@ -254,17 +261,34 @@ struct MyCollectionListPage {
254 261
255 if (this.allDatas.length === 0) { 262 if (this.allDatas.length === 0) {
256 this.browSingModel.viewType = ViewType.EMPTY; 263 this.browSingModel.viewType = ViewType.EMPTY;
  264 + this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoCollection
257 this.browSingModel.hasMore === true 265 this.browSingModel.hasMore === true
258 this.isDisplayButton = false; 266 this.isDisplayButton = false;
259 } 267 }
260 } 268 }
261 269
262 - getContentData(){  
263 - for (let index = 0; index < this.allDatas.length; index++) {  
264 - const compDTO = this.allDatas[index];  
265 - compDTO.isCollection = true ///用于时间展示  
266 - this.allDatas.push(compDTO) 270 + async getContentData(){
  271 + try {
  272 + // 获取列表数据
  273 + const params: contentListParams = {
  274 + contentList: []
  275 + }
  276 + this.allDatas.forEach((item: ContentDTO) => {
  277 + params.contentList.push({
  278 + contentId: item.objectId,
  279 + contentType: Number(item.objectType ?? '1')
  280 + })
  281 + })
  282 + this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params)
  283 +
  284 + let datas: ContentDTO[] = [];
  285 + for (let index = 0; index < this.allDatas.length; index++) {
  286 + const compDTO = this.allDatas[index];
  287 + compDTO.interactData = this.commentList[index]
  288 + datas.push(compDTO)
  289 + }
  290 + this.allDatas.push(...datas)
  291 + } catch (exception) {
267 } 292 }
268 } 293 }
269 -  
270 } 294 }
@@ -29,10 +29,10 @@ export struct CustomTitleUI { @@ -29,10 +29,10 @@ export struct CustomTitleUI {
29 Text(this.titleName) 29 Text(this.titleName)
30 .maxLines(1) 30 .maxLines(1)
31 .id("title") 31 .id("title")
32 - .fontSize(`${this.calcHeight(30)}lpx`) 32 + .fontSize(`${this.calcHeight(35)}lpx`)
33 .fontWeight(400) 33 .fontWeight(400)
34 .fontColor($r('app.color.color_222222')) 34 .fontColor($r('app.color.color_222222'))
35 - .lineHeight(`${this.calcHeight(43)}lpx`) 35 + .lineHeight(`${this.calcHeight(50)}lpx`)
36 .alignRules({ 36 .alignRules({
37 center: {anchor: "__container__", align: VerticalAlign.Center}, 37 center: {anchor: "__container__", align: VerticalAlign.Center},
38 middle: {anchor: "__container__", align: HorizontalAlign.Center} 38 middle: {anchor: "__container__", align: HorizontalAlign.Center}
1 import { SpConstants } from 'wdConstant'; 1 import { SpConstants } from 'wdConstant';
2 -import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils } from 'wdKit'; 2 +import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils, CustomToast } from 'wdKit';
3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem'; 3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem';
4 import MineSettingDatasModel from '../../model/MineSettingDatasModel'; 4 import MineSettingDatasModel from '../../model/MineSettingDatasModel';
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
@@ -31,6 +31,17 @@ export struct AccountAndSecurityLayout { @@ -31,6 +31,17 @@ export struct AccountAndSecurityLayout {
31 pageShowAccountTime:number = 0; 31 pageShowAccountTime:number = 0;
32 pageHideAccountTime:number = 0; 32 pageHideAccountTime:number = 0;
33 33
  34 + @State toastText:string = ""
  35 + dialogToast: CustomDialogController = new CustomDialogController({
  36 + builder: CustomToast({
  37 + msg: this.toastText,
  38 + }),
  39 + autoCancel: false,
  40 + alignment: DialogAlignment.Center,
  41 + customStyle: true,
  42 + maskColor:"#00000000"
  43 + })
  44 +
34 //注销账户 浏览埋点 45 //注销账户 浏览埋点
35 logoutLayoutHide(){ 46 logoutLayoutHide(){
36 this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp() 47 this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp()
@@ -127,9 +138,6 @@ export struct AccountAndSecurityLayout { @@ -127,9 +138,6 @@ export struct AccountAndSecurityLayout {
127 138
128 // 收到eventId为1的事件后执行该回调 139 // 收到eventId为1的事件后执行该回调
129 let callback = (eventData: emitter.EventData): void => { 140 let callback = (eventData: emitter.EventData): void => {
130 - // promptAction.showToast({  
131 - // message: JSON.stringify(eventData)  
132 - // });  
133 if(eventData&&eventData.data){ 141 if(eventData&&eventData.data){
134 this.listData[0].subTitle = eventData.data['content'] 142 this.listData[0].subTitle = eventData.data['content']
135 } 143 }
@@ -477,11 +485,11 @@ export struct AccountAndSecurityLayout { @@ -477,11 +485,11 @@ export struct AccountAndSecurityLayout {
477 logout(){ 485 logout(){
478 let login = new LoginViewModel; 486 let login = new LoginViewModel;
479 login.logOut().then(()=>{ 487 login.logOut().then(()=>{
480 - promptAction.showToast({ message: '退出登录' }) 488 + this.showToastTip('退出登录')
481 EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION) 489 EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
482 router.back(); 490 router.back();
483 }).catch((error:string)=>{ 491 }).catch((error:string)=>{
484 - promptAction.showToast({ message: error }) 492 + this.showToastTip(error)
485 }); 493 });
486 } 494 }
487 495
@@ -500,6 +508,11 @@ export struct AccountAndSecurityLayout { @@ -500,6 +508,11 @@ export struct AccountAndSecurityLayout {
500 securityNum = phoneNum.replace(needSecurityString,'****') 508 securityNum = phoneNum.replace(needSecurityString,'****')
501 return securityNum; 509 return securityNum;
502 } 510 }
  511 +
  512 + showToastTip(msg:string){
  513 + this.toastText = msg
  514 + this.dialogToast.open()
  515 + }
503 } 516 }
504 517
505 @Component 518 @Component
@@ -141,7 +141,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -141,7 +141,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
141 }) 141 })
142 } 142 }
143 143
144 - if (this.compDTO.operDataList.length >= 2 && (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 144 + if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
145 Row() { 145 Row() {
146 Ellipse() 146 Ellipse()
147 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 147 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -48,6 +48,7 @@ export struct OperRowListView { @@ -48,6 +48,7 @@ export struct OperRowListView {
48 private onCommentFocus: () => void = () => { 48 private onCommentFocus: () => void = () => {
49 } 49 }
50 private onCommentIconClick: () => void = () => { 50 private onCommentIconClick: () => void = () => {
  51 +
51 } 52 }
52 53
53 @Provide inDialog: boolean = false 54 @Provide inDialog: boolean = false
@@ -252,6 +253,9 @@ export struct OperRowListView { @@ -252,6 +253,9 @@ export struct OperRowListView {
252 @Builder 253 @Builder
253 builderComment() { 254 builderComment() {
254 Column() { 255 Column() {
  256 + // Text((this.contentDetailData.openComment == 1).toString())
  257 + // Text((this.contentDetailData.commentDisplay == 1).toString())
  258 + // Text(this.publishCommentModel?.targetId.toString())
255 if (this.contentDetailData.openComment == 1 259 if (this.contentDetailData.openComment == 1
256 && this.contentDetailData.commentDisplay == 1 260 && this.contentDetailData.commentDisplay == 1
257 && this.publishCommentModel?.targetId) { 261 && this.publishCommentModel?.targetId) {
@@ -284,9 +288,10 @@ export struct OperRowListView { @@ -284,9 +288,10 @@ export struct OperRowListView {
284 contentDetail: this.contentDetailData 288 contentDetail: this.contentDetailData
285 }) 289 })
286 .onClick(() => { 290 .onClick(() => {
  291 + console.log('akdbakdbakdbaksjd')
287 this.onCommentIconClick() 292 this.onCommentIconClick()
288 293
289 - console.log(JSON.stringify(this.dialogController?.open)) 294 + // console.log('his.dialogController?.open',JSON.stringify(this.dialogController))
290 295
291 // 评论弹框内部嵌入 296 // 评论弹框内部嵌入
292 !this.showBackIcon && this.dialogController?.open() 297 !this.showBackIcon && this.dialogController?.open()
@@ -4,7 +4,7 @@ import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsI @@ -4,7 +4,7 @@ import MinePageCreatorFunctionsItem from '../viewmodel/MinePageCreatorFunctionsI
4 import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel'; 4 import MinePageMoreFunctionModel from '../viewmodel/MinePageMoreFunctionModel';
5 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork'; 5 import { HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
6 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem'; 6 import { MineAppointmentListItem } from '../viewmodel/MineAppointmentListItem';
7 -import { Logger, StringUtils, EmitterUtils, EmitterEventId, SPHelper } from 'wdKit'; 7 +import { Logger, StringUtils, EmitterUtils, EmitterEventId, SPHelper, DeviceUtil, DateTimeUtils } from 'wdKit';
8 import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem'; 8 import { MineFollowListDetailItem } from '../viewmodel/MineFollowListDetailItem';
9 import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem'; 9 import { FollowListDetailRequestItem } from '../viewmodel/FollowListDetailRequestItem';
10 import { FollowListItem } from '../viewmodel/FollowListItem'; 10 import { FollowListItem } from '../viewmodel/FollowListItem';
@@ -918,6 +918,37 @@ class MinePageDatasModel{ @@ -918,6 +918,37 @@ class MinePageDatasModel{
918 return rmhInfo 918 return rmhInfo
919 } 919 }
920 920
  921 + /**
  922 + * 游客评论列表
  923 + * @param pageSize
  924 + * @param pageNum
  925 + * @returns
  926 + */
  927 + fetchVisitorCommentListData(pageNum:string,visitorFirstTime:string) {
  928 + let time = encodeURI(DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
  929 + let deviceId = DeviceUtil.clientId()
  930 + let url = HttpUrlUtils.getVisitorCommentListDataUrl()+ `?pageSize=${20}&pageNum=${pageNum}&visitorFirstTime=${visitorFirstTime}&time=${time}&deviceId=${deviceId}`
  931 + return WDHttp.get<ResponseDTO<MineCommentListDetailItem>>(url)
  932 + };
  933 +
  934 + visitorCommentListData(pageNum:string,visitorFirstTime:string): Promise<MineCommentListDetailItem> {
  935 + return new Promise<MineCommentListDetailItem>((success, error) => {
  936 + Logger.info(TAG, `visitorCommentListData start`);
  937 + this.fetchVisitorCommentListData(pageNum,visitorFirstTime).then((navResDTO: ResponseDTO<MineCommentListDetailItem>) => {
  938 + if (!navResDTO || navResDTO.code != 0) {
  939 + error(null)
  940 + return
  941 + }
  942 + Logger.info(TAG, "visitorCommentListData then,visitorCommentListData.timeStamp:" + navResDTO.timestamp);
  943 + let navigationBean = navResDTO.data as MineCommentListDetailItem
  944 + success(navigationBean);
  945 + }).catch((err: Error) => {
  946 + Logger.error(TAG, `visitorCommentListData catch, error.name : ${err.name}, error.message:${err.message}`);
  947 + error(null)
  948 + })
  949 + })
  950 + }
  951 +
921 } 952 }
922 953
923 const minePageDatasModel = MinePageDatasModel.getInstance() 954 const minePageDatasModel = MinePageDatasModel.getInstance()
  1 +import { TAG } from '@ohos/hypium/src/main/Constant';
  2 +import { ContentDTO } from 'wdBean/Index';
  3 +import { SpConstants } from 'wdConstant/Index'
  4 +import { DateTimeUtils, LazyDataSource, NetworkUtil, SPHelper, StringUtils} from 'wdKit/Index'
  5 +import { ProcessUtils } from 'wdRouter/Index';
  6 +import { VisitorCommentComponent } from '../components/mine/home/VisitorCommentComponent';
  7 +import { CustomPullToRefresh } from '../components/reusable/CustomPullToRefresh';
  8 +import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
  9 +import { ListHasNoMoreDataUI } from '../components/reusable/ListHasNoMoreDataUI';
  10 +import { EmptyComponent } from '../components/view/EmptyComponent';
  11 +import MinePageDatasModel from '../model/MinePageDatasModel';
  12 +import { CommentListItem } from '../viewmodel/CommentListItem';
  13 +
  14 +@Entry
  15 +@Component
  16 +struct VisitorCommentPage {
  17 + @State data: LazyDataSource<CommentListItem> = new LazyDataSource();
  18 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  19 + @State count: number = 0;
  20 + @State isLoading: boolean = false
  21 + @State hasMore: boolean = true
  22 + curPageNum: number = 1;
  23 + @State isGetRequest: boolean = false
  24 + private scroller: Scroller = new Scroller();
  25 + @State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
  26 + @State commentTime:string = ""
  27 +
  28 + aboutToAppear(): void {
  29 + this.commentTime = SPHelper.default.getSync(SpConstants.FIRSTCOMMENTTIME, "") as string
  30 + if (StringUtils.isNotEmpty(this.commentTime)) {
  31 + this.getNewPageData(this.commentTime)
  32 + }else{
  33 + this.isGetRequest = true
  34 + }
  35 + }
  36 +
  37 + build() {
  38 + Column() {
  39 + //标题栏目
  40 + CustomTitleUI({ titleName: "评论列表" })
  41 + if (this.count == 0) {
  42 + if (this.isGetRequest == true) {
  43 + if(this.isConnectNetwork){
  44 + EmptyComponent({ emptyType: 10 })
  45 + .height('100%')
  46 + .width('100%')
  47 + }else{
  48 + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
  49 + this.isConnectNetwork = NetworkUtil.isNetConnected()
  50 + if(this.isConnectNetwork){
  51 + this.curPageNum = 1;
  52 + this.hasMore = true
  53 + this.isGetRequest = false
  54 + this.data.clear()
  55 +
  56 + if (!this.isLoading) {
  57 + this.getNewPageData(this.commentTime)
  58 + }
  59 + }
  60 + }})
  61 + .layoutWeight(1)
  62 + .width('100%')
  63 + }
  64 + }
  65 + } else {
  66 + Stack(){
  67 + Row()
  68 + .width("100%")
  69 + .height("100%")
  70 + .backgroundColor($r('app.color.white'))
  71 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
  72 + CustomPullToRefresh({
  73 + alldata:this.data,
  74 + scroller:this.scroller,
  75 + customList:()=>{
  76 + this.ListLayout()
  77 + },
  78 + onRefresh:(resolve)=>{
  79 + this.curPageNum = 1;
  80 + this.hasMore = true
  81 + this.isGetRequest = false
  82 + this.data.clear()
  83 +
  84 + if (!this.isLoading){
  85 + this.getNewPageData(this.commentTime)
  86 + if(resolve) resolve('刷新成功')
  87 + }
  88 + },
  89 + onLoadMore:(resolve)=> {
  90 + if (!this.isLoading) {
  91 + this.isLoading = true
  92 + this.getNewPageData(this.commentTime)
  93 + }
  94 + }
  95 + })
  96 + }
  97 + }
  98 + }
  99 + .backgroundColor($r('app.color.color_transparent'))
  100 + .height('100%')
  101 + .width('100%')
  102 + }
  103 +
  104 + @Builder ListLayout(){
  105 + List({ space:6,scroller: this.scroller }) {
  106 + LazyForEach(this.data, (item: CommentListItem, index: number) => {
  107 + ListItem() {
  108 + VisitorCommentComponent({
  109 + data: item,
  110 + isLastItem: index === this.data.totalCount() - 1
  111 + })
  112 + }
  113 + .onClick(() => {
  114 + let content = getParams(item)
  115 + ProcessUtils.processPage(content)
  116 + })
  117 + }, (item: CommentListItem, index: number) => index.toString())
  118 +
  119 + //没有更多数据 显示提示
  120 + if (!this.hasMore) {
  121 + ListItem() {
  122 + ListHasNoMoreDataUI()
  123 + }.padding({bottom:px2vp(this.bottomSafeHeight) + 20})
  124 + }
  125 + }
  126 + .cachedCount(4)
  127 + .scrollBar(BarState.Off)
  128 + .edgeEffect(EdgeEffect.None)
  129 + .margin({ top: '23lpx'})
  130 + .layoutWeight(1)
  131 + }
  132 +
  133 + getNewPageData(commentTime:string) {
  134 + this.isLoading = true
  135 + if (this.hasMore) {
  136 + MinePageDatasModel.visitorCommentListData( `${this.curPageNum}`, encodeURI(commentTime)).then((value) => {
  137 + if (!this.data || value.list.length == 0) {
  138 + this.hasMore = false
  139 + } else {
  140 + value.list.forEach((item) => {
  141 + let commentContent = item.commentContent
  142 + if (item.sensitiveShow === 0 && item.sensitiveExist === 1) {
  143 + commentContent = item.commentContentSensitive
  144 + }
  145 + let parentCommentContent = ""
  146 + if (item.parentCommentVo != null) {
  147 + parentCommentContent = item.parentCommentVo.commentContent
  148 + }
  149 + let parentCommentUserName = ""
  150 + if (item.parentCommentVo != null) {
  151 + parentCommentUserName = item.parentCommentVo.fromUserName
  152 + }
  153 + let publishTime =
  154 + DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
  155 +
  156 + this.data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, publishTime,
  157 + commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId,
  158 + item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent,
  159 + parentCommentUserName))
  160 +
  161 + })
  162 + this.data.notifyDataReload()
  163 + this.count = this.data.totalCount()
  164 + if (this.data.totalCount() < value.totalCount) {
  165 + this.curPageNum++
  166 + } else {
  167 + this.hasMore = false
  168 + }
  169 + }
  170 + this.isGetRequest = true
  171 + this.isLoading = false
  172 + }).catch((err: Error) => {
  173 + console.log(TAG, JSON.stringify(err))
  174 + this.isGetRequest = true
  175 + this.isLoading = false
  176 + })
  177 + }
  178 + }
  179 +}
  180 +
  181 +function getParams(item: CommentListItem) : ContentDTO{
  182 + let contentDTO = new ContentDTO();
  183 +
  184 + // contentDTO.objectType = item.targetType + ""
  185 + // contentDTO.objectId = item.targetId + ""
  186 + // contentDTO.newsTitle = item.targetTitle
  187 + // contentDTO.channelId =
  188 + // contentDTO.rmhPlatform =
  189 +
  190 + contentDTO.objectId = item.targetId;
  191 + contentDTO.relType = item.targetRelType + "";
  192 + contentDTO.relId = item.targetRelId;
  193 + contentDTO.objectType = item.targetType + "";
  194 + contentDTO.newsTitle = item.targetTitle
  195 +
  196 + return contentDTO
  197 +}
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 "pages/MineMessagePage", 26 "pages/MineMessagePage",
27 "components/page/InteractMessagePage", 27 "components/page/InteractMessagePage",
28 "pages/ShowHomePageHeaderPage", 28 "pages/ShowHomePageHeaderPage",
29 - "pages/SubscribeMessagePage" 29 + "pages/SubscribeMessagePage",
  30 + "pages/VisitorCommentPage"
30 ] 31 ]
31 } 32 }
@@ -183,7 +183,7 @@ struct ModifyPasswordPage { @@ -183,7 +183,7 @@ struct ModifyPasswordPage {
183 .alignItems(VerticalAlign.Center) 183 .alignItems(VerticalAlign.Center)
184 184
185 Column() { 185 Column() {
186 - Text("提示:密码长度6~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`}) 186 + Text("提示:密码长度8~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
187 } 187 }
188 .width('100%') 188 .width('100%')
189 .height(`${this.calcHeight(85)}lpx`) 189 .height(`${this.calcHeight(85)}lpx`)
@@ -200,6 +200,7 @@ struct ModifyPasswordPage { @@ -200,6 +200,7 @@ struct ModifyPasswordPage {
200 .width('100%') 200 .width('100%')
201 .height(`${this.calcHeight(80)}lpx`) 201 .height(`${this.calcHeight(80)}lpx`)
202 .backgroundColor(this.btnStatus ? '#ED2800' : '#99ED2800') 202 .backgroundColor(this.btnStatus ? '#ED2800' : '#99ED2800')
  203 + .enabled(this.btnStatus ?true:false)
203 .borderRadius('4vp') 204 .borderRadius('4vp')
204 .onClick(() => { 205 .onClick(() => {
205 if(this.btnStatus){ 206 if(this.btnStatus){
@@ -227,7 +228,7 @@ struct ModifyPasswordPage { @@ -227,7 +228,7 @@ struct ModifyPasswordPage {
227 } 228 }
228 229
229 inputTextChange(){ 230 inputTextChange(){
230 - if ((this.password_old.length >= 6 && this.password_old.length <= 20) && (this.password_new.length >= 6 && this.password_new.length <= 20)&& (this.password_new_repeat.length >= 6 && this.password_new_repeat.length <= 20)) { 231 + if ((this.password_old.length >= 8 && this.password_old.length <= 20) && (this.password_new.length >= 8 && this.password_new.length <= 20)&& (this.password_new_repeat.length >= 8 && this.password_new_repeat.length <= 20)) {
231 this.btnStatus = true; 232 this.btnStatus = true;
232 } else { 233 } else {
233 this.btnStatus = false; 234 this.btnStatus = false;
@@ -134,7 +134,7 @@ export struct SettingPasswordPage { @@ -134,7 +134,7 @@ export struct SettingPasswordPage {
134 this.listData.push(new AccoutPageDataModel(0, '设置密码', '', '', '', '', 0)) 134 this.listData.push(new AccoutPageDataModel(0, '设置密码', '', '', '', '', 0))
135 this.listData.push(new AccoutPageDataModel(1, '', '', '', '', '请输入密码', 10086)) 135 this.listData.push(new AccoutPageDataModel(1, '', '', '', '', '请输入密码', 10086))
136 this.listData.push(new AccoutPageDataModel(1, '', '', '', '', '再次输入密码', 10087)) 136 this.listData.push(new AccoutPageDataModel(1, '', '', '', '', '再次输入密码', 10087))
137 - this.listData.push(new AccoutPageDataModel(3, '', '', '提示:密码长度6~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上', '', '', 0)) 137 + this.listData.push(new AccoutPageDataModel(3, '', '', '提示:密码长度8~20位,使用大写字母、小写字母、数字、特殊字符中三种或三种以上', '', '', 0))
138 this.listData.push(new AccoutPageDataModel(4, '', '', '', '确认', '', 0)) 138 this.listData.push(new AccoutPageDataModel(4, '', '', '', '确认', '', 0))
139 break; 139 break;
140 case 2: 140 case 2:
@@ -294,6 +294,7 @@ export struct SettingPasswordPage { @@ -294,6 +294,7 @@ export struct SettingPasswordPage {
294 .width('100%') 294 .width('100%')
295 .height('80lpx') 295 .height('80lpx')
296 .backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d') 296 .backgroundColor(this.btnStatus ? '#da3e22' : '#e5856d')
  297 + .enabled(this.btnStatus ?true:false)
297 .fontColor('#fff') 298 .fontColor('#fff')
298 .borderRadius('4vp') 299 .borderRadius('4vp')
299 .onClick(() => { 300 .onClick(() => {
@@ -325,7 +326,7 @@ export struct SettingPasswordPage { @@ -325,7 +326,7 @@ export struct SettingPasswordPage {
325 TrackingButton.click("setPasswordPageConfirm",TrackConstants.PageName.Setup_Passwd,TrackConstants.PageName.Setup_Passwd) 326 TrackingButton.click("setPasswordPageConfirm",TrackConstants.PageName.Setup_Passwd,TrackConstants.PageName.Setup_Passwd)
326 } 327 }
327 // 需要+手机号校验 328 // 需要+手机号校验
328 - if (this.password01.length < 6 || this.password01.length > 20) { 329 + if (this.password01.length < 8 || this.password01.length > 20) {
329 this.showToastTip('密码不符合密码规范') 330 this.showToastTip('密码不符合密码规范')
330 return 331 return
331 } 332 }
@@ -376,7 +377,7 @@ export struct SettingPasswordPage { @@ -376,7 +377,7 @@ export struct SettingPasswordPage {
376 } 377 }
377 378
378 if (this.password01) { 379 if (this.password01) {
379 - if ((this.password01.length >= 6 && this.password01.length <= 20) && (this.password02.length >= 6 && this.password02.length <= 20)) { 380 + if ((this.password01.length >= 8 && this.password01.length <= 20) && (this.password02.length >= 8 && this.password02.length <= 20)) {
380 this.btnStatus = true; 381 this.btnStatus = true;
381 } else { 382 } else {
382 this.btnStatus = false; 383 this.btnStatus = false;
@@ -64,5 +64,6 @@ struct MorningEveningPaperPage { @@ -64,5 +64,6 @@ struct MorningEveningPaperPage {
64 64
65 onBackPress() { 65 onBackPress() {
66 Logger.info(TAG, 'onBackPress'); 66 Logger.info(TAG, 'onBackPress');
  67 + return true
67 } 68 }
68 } 69 }
@@ -92,9 +92,8 @@ struct MultiPictureDetailPage { @@ -92,9 +92,8 @@ struct MultiPictureDetailPage {
92 * TODO:颜色待根据业务接口修改 92 * TODO:颜色待根据业务接口修改
93 */ 93 */
94 openFullScreen() { 94 openFullScreen() {
  95 + WindowModel.shared.setWindowLayoutFullScreen(true)
95 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 96 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
96 - // WindowModel.shared.setWindowLayoutFullScreen(true)  
97 - // WindowModel.shared.setWindowSystemBarEnable([])  
98 } 97 }
99 98
100 /** 99 /**
@@ -102,9 +101,8 @@ struct MultiPictureDetailPage { @@ -102,9 +101,8 @@ struct MultiPictureDetailPage {
102 * TODO:颜色待根据业务接口修改 101 * TODO:颜色待根据业务接口修改
103 */ 102 */
104 closeFullScreen() { 103 closeFullScreen() {
  104 + WindowModel.shared.setWindowLayoutFullScreen(false)
105 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 105 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
106 - // WindowModel.shared.setWindowLayoutFullScreen(false)  
107 - // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])  
108 } 106 }
109 107
110 } 108 }
@@ -74,107 +74,86 @@ struct LaunchAdvertisingPage { @@ -74,107 +74,86 @@ struct LaunchAdvertisingPage {
74 bottom: 0 74 bottom: 0
75 }) 75 })
76 76
77 - if (this.defaultModel.isAd === '1'){  
78 - Stack({alignContent:Alignment.TopStart}){  
79 - Text('广告')  
80 - .fontColor(Color.White)  
81 - .textAlign(TextAlign.Center)  
82 - .fontSize('24lpx')  
83 - .width('72lpx')  
84 - .height('36lpx')  
85 - .borderRadius(2)  
86 - .margin({top:'15lpx',left:'19lpx'}) 77 +
  78 + Stack(){
  79 + Column(){
  80 + Row(){
  81 + if (this.defaultModel.isAd === '1') {
  82 + Text('广告')
  83 + .fontColor(Color.White)
  84 + .textAlign(TextAlign.Center)
  85 + .fontSize('24lpx')
  86 + .width('72lpx')
  87 + .height('36lpx')
  88 + .borderRadius(2)
  89 + .margin({top:'15lpx',left:'19lpx'})
  90 + .backgroundColor('#80000000')
  91 + .margin({left:16})
  92 + }
  93 +
  94 + Blank()
  95 +
  96 + Button(){
  97 + Text(this.time + 's 跳过')
  98 + .fontSize('27lpx')
  99 + .fontColor(Color.White)
  100 + .margin({left:'28lpx',right:'28lpx'})
  101 + }
  102 + .width('148lpx')
  103 + .height('56lpx')
  104 + .margin({top:'10lpx',right:'19lpx'})
  105 + .backgroundColor('#80000000')
  106 + .onClick(() => {
  107 + this.enter()
  108 + this.trackingLaunchJumpOver()
  109 + }).margin({right:16})
  110 +
  111 + }.margin({top:10}).width('100%').height('56lpx')
  112 +
  113 + Blank()
  114 +
  115 + if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){
  116 + Button(){
  117 + Row(){
  118 + Text('点击跳转至详情')
  119 + .fontSize('31lpx')
  120 + .fontColor(Color.White)
  121 + .margin({
  122 + left:'55lpx'
  123 + })
  124 + Image($r('app.media.Slice'))
  125 + .width('46lpx')
  126 + .height('46lpx')
  127 + .margin({right:'55lpx'})
  128 + }.alignItems(VerticalAlign.Center)
  129 + }
  130 + .width('566lpx')
  131 + .height('111lpx')
  132 + .margin({
  133 + bottom: '51lpx'
  134 + })
87 .backgroundColor('#80000000') 135 .backgroundColor('#80000000')
  136 + .onClick(()=>{
  137 + this.action()
  138 + })
  139 + }
  140 + if(this.defaultModel.screenType === '1') {
  141 + Image($r('app.media.LaunchPage_logo'))
  142 + .width('278lpx')
  143 + .height('154lpx')
  144 + .margin({top: '28lpx',bottom:'28lpx'})
  145 + }
88 } 146 }
89 .width('100%') 147 .width('100%')
90 .height('100%') 148 .height('100%')
91 } 149 }
92 -  
93 - Stack({alignContent:Alignment.TopEnd}){  
94 - Button(){  
95 - Text(this.time + 's 跳过')  
96 - // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])  
97 - .fontSize('27lpx')  
98 - .fontColor(Color.White)  
99 - .margin({left:'28lpx',right:'28lpx'})  
100 -  
101 - }  
102 - .width('148lpx')  
103 - .height('56lpx')  
104 - .margin({top:'10lpx',right:'19lpx'})  
105 - .backgroundColor('#80000000')  
106 - .onClick(() => {  
107 - this.enter()  
108 - this.trackingLaunchJumpOver()  
109 - })  
110 - }  
111 .width('100%') 150 .width('100%')
112 .height('100%') 151 .height('100%')
113 -  
114 - if(this.defaultModel.screenType != '2'){  
115 - //底部logo样式 按钮加载在背景展示图上  
116 - Button(){  
117 - Row(){  
118 - Text('点击跳转至详情')  
119 - .fontSize('31lpx')  
120 - .fontColor(Color.White)  
121 - .margin({  
122 - left:'55lpx'  
123 - })  
124 - Image($r('app.media.Slice'))  
125 - .width('46lpx')  
126 - .height('46lpx')  
127 - .margin({right:'55lpx'})  
128 - }.alignItems(VerticalAlign.Center)  
129 - }  
130 - .width('566lpx')  
131 - .height('111lpx')  
132 - .margin({  
133 - bottom: '51lpx'  
134 - })  
135 - .backgroundColor('#80000000')  
136 - .onClick(()=>{  
137 - this.action()  
138 - })  
139 - }  
140 } 152 }
141 } 153 }
142 .width('100%') 154 .width('100%')
143 - .height('84%') 155 + .height('100%')
144 .margin({top:'0'}) 156 .margin({top:'0'})
145 -  
146 - if(this.defaultModel.screenType === '2'){  
147 - //全屏样式,底部无logo 按钮放在原底部logo位置  
148 - Button(){  
149 - Row(){  
150 - Text('点击跳转至详情')  
151 - .fontSize('31lpx')  
152 - .fontColor(Color.White)  
153 - .margin({  
154 - left:'55lpx'  
155 - })  
156 - Image($r('app.media.Slice'))  
157 - .width('46lpx')  
158 - .height('46lpx')  
159 - .margin({right:'55lpx'})  
160 - }.alignItems(VerticalAlign.Center)  
161 - }  
162 - .width('566lpx')  
163 - .height('111lpx')  
164 - .margin({  
165 - top: '28lpx'  
166 - })  
167 - .backgroundColor('#80000000')  
168 - .onClick(()=>{  
169 - this.action()  
170 - })  
171 - }else {  
172 - //底部logo样式  
173 - Image($r('app.media.LaunchPage_logo'))  
174 - .width('278lpx')  
175 - .height('154lpx')  
176 - .margin({top: '28lpx'})  
177 - }  
178 } 157 }
179 .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 158 .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
180 .width('100%') 159 .width('100%')
@@ -189,6 +168,7 @@ struct LaunchAdvertisingPage { @@ -189,6 +168,7 @@ struct LaunchAdvertisingPage {
189 168
190 ///埋点 169 ///埋点
191 this.trackingLaunchClick() 170 this.trackingLaunchClick()
  171 + this.enter()
192 172
193 if(this.defaultModel.linkUrl.length > 0){ 173 if(this.defaultModel.linkUrl.length > 0){
194 if (this.defaultModel.openType == '2') { 174 if (this.defaultModel.openType == '2') {
@@ -230,7 +210,12 @@ struct LaunchAdvertisingPage { @@ -230,7 +210,12 @@ struct LaunchAdvertisingPage {
230 this.defaultModel.screenName = dataModel.launchAdInfo[0].matInfo.advTitle 210 this.defaultModel.screenName = dataModel.launchAdInfo[0].matInfo.advTitle
231 this.defaultModel.durations = dataModel.launchAdInfo[0].displayDuration 211 this.defaultModel.durations = dataModel.launchAdInfo[0].displayDuration
232 this.defaultModel.linkUrl = dataModel.launchAdInfo[0].matInfo.linkUrl 212 this.defaultModel.linkUrl = dataModel.launchAdInfo[0].matInfo.linkUrl
233 - this.defaultModel.screenType = dataModel.launchAdInfo[0].matInfo.startStyle 213 + if (dataModel.launchAdInfo[0].matInfo.startStyle === '1') {
  214 + this.defaultModel.screenType = '2'
  215 + }else {
  216 + this.defaultModel.screenType = '1'
  217 + }
  218 +
234 this.defaultModel.bootScreenUrl = dataModel.launchAdInfo[0].matInfo.matImageUrl[0] 219 this.defaultModel.bootScreenUrl = dataModel.launchAdInfo[0].matInfo.matImageUrl[0]
235 this.defaultModel.bootVideoUrl = dataModel.launchAdInfo[0].matInfo.matVideoUrl 220 this.defaultModel.bootVideoUrl = dataModel.launchAdInfo[0].matInfo.matVideoUrl
236 this.defaultModel.showType = dataModel.launchAdInfo[0].matInfo.matType 221 this.defaultModel.showType = dataModel.launchAdInfo[0].matInfo.matType
@@ -353,7 +353,12 @@ export struct MultiPictureDetailPageComponent { @@ -353,7 +353,12 @@ export struct MultiPictureDetailPageComponent {
353 .lineHeight(19) 353 .lineHeight(19)
354 } 354 }
355 .fontColor(Color.White) 355 .fontColor(Color.White)
356 - .margin(4) 356 + .margin({
  357 + top: 4,
  358 + left: 18,
  359 + bottom: 4,
  360 + right: 4
  361 + })
357 } 362 }
358 if (this.contentDetailData.newsTitle) { 363 if (this.contentDetailData.newsTitle) {
359 Text(`${this.contentDetailData.newsTitle}`) 364 Text(`${this.contentDetailData.newsTitle}`)
@@ -364,9 +369,9 @@ export struct MultiPictureDetailPageComponent { @@ -364,9 +369,9 @@ export struct MultiPictureDetailPageComponent {
364 .lineHeight(24) 369 .lineHeight(24)
365 .margin({ 370 .margin({
366 top: 4, 371 top: 4,
367 - left: 0, 372 + left: 18,
368 bottom: 4, 373 bottom: 4,
369 - right: 0 374 + right: 18
370 }) 375 })
371 } 376 }
372 if (this.contentDetailData.photoList?.[this.swiperIndex].picDesc) { 377 if (this.contentDetailData.photoList?.[this.swiperIndex].picDesc) {
@@ -17,11 +17,28 @@ struct DefaultWebPage { @@ -17,11 +17,28 @@ struct DefaultWebPage {
17 17
18 build() { 18 build() {
19 Column() { 19 Column() {
20 - WdWebComponent({  
21 - webviewControl: this.webviewControl,  
22 - webUrl: this.webUrl,  
23 - isPageEnd: $isPageEnd  
24 - }) 20 + Column() {
  21 + WdWebComponent({
  22 + webviewControl: this.webviewControl,
  23 + webUrl: this.webUrl,
  24 + isPageEnd: $isPageEnd
  25 + })
  26 + }.layoutWeight(1)
  27 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
  28 +
  29 + Row() {
  30 + Button({type: ButtonType.Normal}) {
  31 + Image($r("app.media.back_icon_black"))
  32 + .width(20).height(25)
  33 + }.height(44).width(44)
  34 + .backgroundColor(Color.White)
  35 + .onClick(() => {
  36 + router.back()
  37 + })
  38 + Blank()
  39 + }.width("100%").height(44)
  40 + .alignItems(VerticalAlign.Center)
  41 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
25 } 42 }
26 .width(CommonConstants.FULL_WIDTH) 43 .width(CommonConstants.FULL_WIDTH)
27 .height(CommonConstants.FULL_HEIGHT) 44 .height(CommonConstants.FULL_HEIGHT)