wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix:bug[17818] UI还原问题-【uat】点击退出,提示未居中,并且样式和android不一致
  ref |> 视频播放,点击评论按钮,播放区域上推,点击播放区,评论弹窗应自动关闭
  ref |> 全局规则-游客评论开关关闭,弹出提示暂时无法评论
  fix:bug[18503] 我的预约列表,底部缺少已加载全部内容提示
  fix(18049):全域规则-人民日报客户端稿件评论开关关闭,号主动态列表,评论按钮不应展示
  fix:bug[17505] 设置密码的密码长度判断提示信息和实际判断逻辑不一致
  fix:bug[18529] 修改密码未能作最少8位校验
@@ -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 { 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)
@@ -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 { 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
@@ -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;