liyubing

Merge remote-tracking branch 'origin/main'

@@ -60,12 +60,14 @@ export struct WdWebLocalComponent { @@ -60,12 +60,14 @@ export struct WdWebLocalComponent {
60 .imageAccess(true) 60 .imageAccess(true)
61 .mixedMode(MixedMode.All) 61 .mixedMode(MixedMode.All)
62 .onlineImageAccess(true) 62 .onlineImageAccess(true)
63 - .enableNativeEmbedMode(true)  
64 - .layoutMode(WebLayoutMode.FIT_CONTENT) 63 + // .enableNativeEmbedMode(true)
  64 + // .layoutMode(WebLayoutMode.FIT_CONTENT)
65 .nestedScroll({ 65 .nestedScroll({
66 scrollForward: NestedScrollMode.SELF_FIRST, 66 scrollForward: NestedScrollMode.SELF_FIRST,
67 scrollBackward: NestedScrollMode.PARENT_FIRST 67 scrollBackward: NestedScrollMode.PARENT_FIRST
68 - })// .height(this.webHeight) 68 + })
  69 + .width('100%')
  70 + .height(this.webHeight)
69 .onPageBegin((event) => { 71 .onPageBegin((event) => {
70 this.onPageBegin(event?.url); 72 this.onPageBegin(event?.url);
71 }) 73 })
@@ -63,6 +63,14 @@ export struct Card9Component { @@ -63,6 +63,14 @@ export struct Card9Component {
63 this.textArr = titleInitRes.textArr; 63 this.textArr = titleInitRes.textArr;
64 } 64 }
65 65
  66 + formatTime(timeStamp: number) {
  67 + let todayDate = new Date().setHours(0,0,0,0);
  68 + let paramsDate = new Date(timeStamp).setHours(0,0,0,0);
  69 + let isToday = todayDate === paramsDate
  70 + let format: string = isToday ? 'HH:mm' : 'MM月dd日 HH:mm';
  71 + return DateTimeUtils.formatDate(timeStamp, format)
  72 + }
  73 +
66 build() { 74 build() {
67 Column() { 75 Column() {
68 // 顶部标题,最多两行 76 // 顶部标题,最多两行
@@ -208,7 +216,7 @@ export struct Card9Component { @@ -208,7 +216,7 @@ export struct Card9Component {
208 .margin({ right: 5 }) 216 .margin({ right: 5 })
209 .fillColor(item.newsTitleColor) 217 .fillColor(item.newsTitleColor)
210 218
211 - Text(DateTimeUtils.formatDate(item.publishTime, "MM月dd日 HH:mm")) 219 + Text(this.formatTime(item.publishTime))
212 .fontSize($r('app.float.font_size_12')) 220 .fontSize($r('app.float.font_size_12'))
213 .fontColor($r('app.color.color_222222')) 221 .fontColor($r('app.color.color_222222'))
214 .fontWeight(600) 222 .fontWeight(600)
@@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent { @@ -45,7 +45,7 @@ export struct ZhGridLayout02NewsContent {
45 buildItemCard(item: ContentDTO, index: number) { 45 buildItemCard(item: ContentDTO, index: number) {
46 Column() { 46 Column() {
47 Stack({ alignContent: Alignment.BottomEnd }) { 47 Stack({ alignContent: Alignment.BottomEnd }) {
48 - Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '') 48 + Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls?.[0]?.url : '')
49 .backgroundColor(0xf5f5f5) 49 .backgroundColor(0xf5f5f5)
50 .width('100%') 50 .width('100%')
51 // .height(95) 51 // .height(95)
@@ -19,8 +19,8 @@ export struct ZhSingleRow02 { @@ -19,8 +19,8 @@ export struct ZhSingleRow02 {
19 @State pageId: string = ''; 19 @State pageId: string = '';
20 @State pageName: string = ''; 20 @State pageName: string = '';
21 @State compDTO: CompDTO = {} as CompDTO 21 @State compDTO: CompDTO = {} as CompDTO
22 - @State initMoreWidth: number = 16;  
23 - @State moreWidth:number = 16 22 + @State initMoreWidth: number = 22;
  23 + @State moreWidth:number = 22
24 @State moreTips: string = '' 24 @State moreTips: string = ''
25 scroller: Scroller = new Scroller() 25 scroller: Scroller = new Scroller()
26 26
@@ -53,7 +53,7 @@ export struct ZhSingleRow02 { @@ -53,7 +53,7 @@ export struct ZhSingleRow02 {
53 53
54 resetEdgeAnimation() { 54 resetEdgeAnimation() {
55 if (this.moreWidth > this.initMoreWidth) { 55 if (this.moreWidth > this.initMoreWidth) {
56 - this.moreWidth = 16 56 + this.moreWidth = 22
57 } 57 }
58 this.resetMoreTips() 58 this.resetMoreTips()
59 } 59 }
@@ -43,8 +43,8 @@ export struct ZhSingleRow03 { @@ -43,8 +43,8 @@ export struct ZhSingleRow03 {
43 // @State reserveStatus: reserveItem[] = [] 43 // @State reserveStatus: reserveItem[] = []
44 @State reservedIds: string[] = []; 44 @State reservedIds: string[] = [];
45 @State loadImg: boolean = false; 45 @State loadImg: boolean = false;
46 - @State initMoreWidth: number = 16;  
47 - @State moreWidth:number = 16 46 + @State initMoreWidth: number = 22;
  47 + @State moreWidth:number = 22
48 @State moreTips: string = '' 48 @State moreTips: string = ''
49 scroller: Scroller = new Scroller() 49 scroller: Scroller = new Scroller()
50 50
@@ -78,7 +78,7 @@ export struct ZhSingleRow03 { @@ -78,7 +78,7 @@ export struct ZhSingleRow03 {
78 78
79 resetEdgeAnimation() { 79 resetEdgeAnimation() {
80 if (this.moreWidth > this.initMoreWidth) { 80 if (this.moreWidth > this.initMoreWidth) {
81 - this.moreWidth = 16 81 + this.moreWidth = 22
82 } 82 }
83 this.resetMoreTips() 83 this.resetMoreTips()
84 } 84 }
@@ -260,7 +260,7 @@ export struct ZhSingleRow03 { @@ -260,7 +260,7 @@ export struct ZhSingleRow03 {
260 .fontSize(12) 260 .fontSize(12)
261 .textAlign(TextAlign.Start) 261 .textAlign(TextAlign.Start)
262 .fontFamily('PingFang SC-Semibold') 262 .fontFamily('PingFang SC-Semibold')
263 - .fontWeight(600) 263 + .fontWeight(500)
264 Image($r('app.media.timeline_rect')) 264 Image($r('app.media.timeline_rect'))
265 .width(4) 265 .width(4)
266 .height(3) 266 .height(3)
@@ -270,7 +270,7 @@ export struct ZhSingleRow03 { @@ -270,7 +270,7 @@ export struct ZhSingleRow03 {
270 .fontColor(0x000000) 270 .fontColor(0x000000)
271 .fontSize(12) 271 .fontSize(12)
272 .fontFamily('PingFang SC-Semibold') 272 .fontFamily('PingFang SC-Semibold')
273 - .fontWeight(600) 273 + .fontWeight(500)
274 Text('开始直播') 274 Text('开始直播')
275 .fontColor(0xC8C8C8) 275 .fontColor(0xC8C8C8)
276 .fontSize(12) 276 .fontSize(12)
@@ -681,15 +681,23 @@ export struct TopNavigationComponentNew { @@ -681,15 +681,23 @@ export struct TopNavigationComponentNew {
681 } else { 681 } else {
682 ToastUtils.showToast('暂无早晚报信息', 1000) 682 ToastUtils.showToast('暂无早晚报信息', 1000)
683 } 683 }
684 - 684 + let timer = setInterval(() => {
685 this.isClickMorningEveningPaper = false 685 this.isClickMorningEveningPaper = false
  686 + clearInterval(timer);
  687 + }, 1000);
686 }).catch((err: string) => { 688 }).catch((err: string) => {
687 ToastUtils.showToast('暂无早晚报信息', 1000) 689 ToastUtils.showToast('暂无早晚报信息', 1000)
  690 + let timer = setInterval(() => {
688 this.isClickMorningEveningPaper = false 691 this.isClickMorningEveningPaper = false
  692 + clearInterval(timer);
  693 + }, 1000);
689 }) 694 })
690 } else { 695 } else {
691 ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000) 696 ToastUtils.showToast('网络出小差了,请检查网络后重试', 1000)
  697 + let timer = setInterval(() => {
692 this.isClickMorningEveningPaper = false 698 this.isClickMorningEveningPaper = false
  699 + clearInterval(timer);
  700 + }, 1000);
693 } 701 }
694 } 702 }
695 703
@@ -120,15 +120,15 @@ export struct PeopleShipHomePageNavComponent { @@ -120,15 +120,15 @@ export struct PeopleShipHomePageNavComponent {
120 } 120 }
121 .height('100%') 121 .height('100%')
122 Blank() 122 Blank()
123 - // 分享  
124 - Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))  
125 - .width('24vp')  
126 - .height('24vp')  
127 - .objectFit(ImageFit.Auto)  
128 - .margin({ right: '10vp' })  
129 - .onClick(() => {  
130 - ToastUtils.showToast('分享为公共方法,待开发', 1000);  
131 - }) 123 + // 分享 分享暂不展示
  124 + // Image((this.topOpacity > 0.5 ? $r('app.media.icon_forward') : $r('app.media.icon_share')))
  125 + // .width('24vp')
  126 + // .height('24vp')
  127 + // .objectFit(ImageFit.Auto)
  128 + // .margin({ right: '10vp' })
  129 + // .onClick(() => {
  130 + // ToastUtils.showToast('分享为公共方法,待开发', 1000);
  131 + // })
132 } 132 }
133 .width('100%') 133 .width('100%')
134 .height('100%') 134 .height('100%')
@@ -9,8 +9,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -9,8 +9,8 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
9 @State compDTO: CompDTO = {} as CompDTO 9 @State compDTO: CompDTO = {} as CompDTO
10 @State pageId: string = ''; 10 @State pageId: string = '';
11 @State pageName: string = ''; 11 @State pageName: string = '';
12 - @State initMoreWidth: number = 16;  
13 - @State moreWidth:number = 16 12 + @State initMoreWidth: number = 22;
  13 + @State moreWidth:number = 22
14 @State moreTips: string = '' 14 @State moreTips: string = ''
15 scroller: Scroller = new Scroller() 15 scroller: Scroller = new Scroller()
16 16
@@ -44,7 +44,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -44,7 +44,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
44 44
45 resetEdgeAnimation() { 45 resetEdgeAnimation() {
46 if (this.moreWidth > this.initMoreWidth) { 46 if (this.moreWidth > this.initMoreWidth) {
47 - this.moreWidth = 16 47 + this.moreWidth = 22
48 } 48 }
49 this.resetMoreTips() 49 this.resetMoreTips()
50 } 50 }
@@ -18,8 +18,8 @@ export struct LiveHorizontalCardComponent { @@ -18,8 +18,8 @@ export struct LiveHorizontalCardComponent {
18 @State pageName: string = ''; 18 @State pageName: string = '';
19 @State compDTO: CompDTO = {} as CompDTO 19 @State compDTO: CompDTO = {} as CompDTO
20 @State loadImg: boolean = false; 20 @State loadImg: boolean = false;
21 - @State initMoreWidth: number = 16;  
22 - @State moreWidth:number = 16 21 + @State initMoreWidth: number = 22;
  22 + @State moreWidth:number = 22
23 @State moreTips: string = '' 23 @State moreTips: string = ''
24 scroller: Scroller = new Scroller() 24 scroller: Scroller = new Scroller()
25 25
@@ -53,7 +53,7 @@ export struct LiveHorizontalCardComponent { @@ -53,7 +53,7 @@ export struct LiveHorizontalCardComponent {
53 53
54 resetEdgeAnimation() { 54 resetEdgeAnimation() {
55 if (this.moreWidth > this.initMoreWidth) { 55 if (this.moreWidth > this.initMoreWidth) {
56 - this.moreWidth = 16 56 + this.moreWidth = 22
57 } 57 }
58 this.resetMoreTips() 58 this.resetMoreTips()
59 } 59 }
@@ -33,13 +33,11 @@ struct LoginProtocolWebview { @@ -33,13 +33,11 @@ struct LoginProtocolWebview {
33 this.contentID = params.contentID 33 this.contentID = params.contentID
34 } 34 }
35 if (params.contentID == "1") { //"人民日报客户端网络服务使用协议" 35 if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
36 - this.webUrl = this.userProtocol  
37 - this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string 36 + this.webUrl = SPHelper.default.getSync(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
38 } else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议" 37 } else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
39 - this.webUrl = this.privateProtocol  
40 - this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string 38 + this.webUrl = SPHelper.default.getSync(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
41 }else if(params.contentID == "3"){ //注销协议 39 }else if(params.contentID == "3"){ //注销协议
42 - this.webUrl = await SPHelper.default.get(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string 40 + this.webUrl = SPHelper.default.getSync(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
43 } else if(params.contentID == "4"){ //华为用户认证协议 41 } else if(params.contentID == "4"){ //华为用户认证协议
44 this.webUrl = this.huaweiAuthProtocol 42 this.webUrl = this.huaweiAuthProtocol
45 } else if(params.contentID == "5"){ //收集个人信息明示清单 43 } else if(params.contentID == "5"){ //收集个人信息明示清单
@@ -21,7 +21,7 @@ export class PublicParams { @@ -21,7 +21,7 @@ export class PublicParams {
21 "isSign": AccountManagerUtils.isLoginSync() ? "1" : "0", 21 "isSign": AccountManagerUtils.isLoginSync() ? "1" : "0",
22 "environment": PublicParams.getEnv(), 22 "environment": PublicParams.getEnv(),
23 "os": AppUtils.getOSName(), 23 "os": AppUtils.getOSName(),
24 - "actionTime": new Date().getTime() * 0.001, 24 + "actionTime": Math.log(new Date().getTime() / 1000),
25 "channel": AppUtils.getAppChannel(), 25 "channel": AppUtils.getAppChannel(),
26 "version": AppUtils.getAppVersionName(), 26 "version": AppUtils.getAppVersionName(),
27 "deviceId": DeviceUtil.clientId(), 27 "deviceId": DeviceUtil.clientId(),