zhenghy
Showing 67 changed files with 2419 additions and 329 deletions
@@ -11,8 +11,13 @@ export class SpConstants{ @@ -11,8 +11,13 @@ export class SpConstants{
11 static USER_TEMP_TOKEN="tempToken" 11 static USER_TEMP_TOKEN="tempToken"
12 static USER_PHONE = "user_phone" 12 static USER_PHONE = "user_phone"
13 //协议相关 13 //协议相关
14 - static USER_PROTOCOL = "user_protocol" //用户协议  
15 - static PRIVATE_PROTOCOL = "private_protocol" //隐私协议 14 + static NET_SERVICE_PROTOCOL = "user_protocol" //人民日报客户端网络服务使用协议
  15 + static PRIVATE_PROTOCOL = "private_protocol" //人民日报客户端用户隐私协议
  16 + static LOGOUT_PROTOCOL = "logout_protocol" //人民日报客户端app注销协议
  17 + static MESSAGE_BOARD_USER_PROTOCOL = "message_board_user_protocol" //"留言板-用户协议"
  18 + static MESSAGE_BOARD_NOTICE_PROTOCOL = "message_board_notice_protocol" //留言板-留言须知
  19 + static MESSAGE_BOARD_QUESTION_PROTOCOL = "message_board_question_protocol" //"留言板-发布提问规定""
  20 + static MESSAGE_BOARD_PRIVATE_PROTOCOL = "message_board_private_protocol" //"留言板-隐私政策"
16 //设置页面 21 //设置页面
17 static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关 22 static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关
18 static SETTING_WIFI_VIDEO_SWITCH = "setting_wifi_switch" //wifi 视频开关 23 static SETTING_WIFI_VIDEO_SWITCH = "setting_wifi_switch" //wifi 视频开关
1 import { Action } from './Action'; 1 import { Action } from './Action';
2 interface dataObject { 2 interface dataObject {
3 webViewHeight?: string 3 webViewHeight?: string
  4 + dataJson?: string
4 } 5 }
5 /** 6 /**
6 * 消息Message 7 * 消息Message
@@ -218,6 +218,11 @@ export class HttpUrlUtils { @@ -218,6 +218,11 @@ export class HttpUrlUtils {
218 */ 218 */
219 static readonly SEARCH_RESULT_COUNT_DATA_PATH: string = "/api/rmrb-search-api/zh/c/count?keyword="; 219 static readonly SEARCH_RESULT_COUNT_DATA_PATH: string = "/api/rmrb-search-api/zh/c/count?keyword=";
220 /** 220 /**
  221 + * 搜索结果 显示list 详情
  222 + */
  223 + static readonly SEARCH_RESULT_LIST_DATA_PATH: string = "/api/rmrb-search-api/zh/c/search";
  224 +
  225 + /**
221 * 早晚报列表 226 * 早晚报列表
222 * 根据页面id获取页面楼层列表 227 * 根据页面id获取页面楼层列表
223 * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927 228 * https://pdapis.pdnews.cn/api/rmrb-bff-display-zh/display/zh/c/pageInfo?pageId=28927
@@ -498,13 +503,14 @@ export class HttpUrlUtils { @@ -498,13 +503,14 @@ export class HttpUrlUtils {
498 503
499 /*优质评论页*/ 504 /*优质评论页*/
500 static getQualityCommentUrl() { 505 static getQualityCommentUrl() {
501 - let url = HttpUrlUtils._hostUrl + "api/rmrb-comment/comment/zh/c/highQuality" 506 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-comment/comment/zh/c/highQuality";
  507 +
502 return url 508 return url
503 } 509 }
504 510
505 /*获取详情页评论列表*/ 511 /*获取详情页评论列表*/
506 static getContentCommentListDataUrl() { 512 static getContentCommentListDataUrl() {
507 - let url = HttpUrlUtils._hostUrl + "api/rmrb-comment/comment/zh/c/contentCommentList" 513 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-comment/comment/zh/c/contentCommentList"
508 return url 514 return url
509 } 515 }
510 516
@@ -521,6 +527,12 @@ export class HttpUrlUtils { @@ -521,6 +527,12 @@ export class HttpUrlUtils {
521 return url; 527 return url;
522 } 528 }
523 529
  530 + //获取用户安全页信息
  531 + static querySecurity() {
  532 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-user-center/user/zh/c/security/query";
  533 + return url;
  534 + }
  535 +
524 static getAppointmentListDataUrl() { 536 static getAppointmentListDataUrl() {
525 let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH 537 let url = HttpUrlUtils._hostUrl + HttpUrlUtils.APPOINTMENT_LIST_DATA_PATH
526 return url 538 return url
@@ -646,6 +658,16 @@ export class HttpUrlUtils { @@ -646,6 +658,16 @@ export class HttpUrlUtils {
646 return url 658 return url
647 } 659 }
648 660
  661 + static getSearchResultListDataUrl() {
  662 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_LIST_DATA_PATH
  663 + return url
  664 + }
  665 +
  666 + static getInteractListDataUrl() {
  667 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.INTERACT_DATA_PATH
  668 + return url
  669 + }
  670 +
649 // static getYcgCommonHeaders(): HashMap<string, string> { 671 // static getYcgCommonHeaders(): HashMap<string, string> {
650 // let headers: HashMap<string, string> = new HashMap<string, string>() 672 // let headers: HashMap<string, string> = new HashMap<string, string>()
651 // 673 //
@@ -8,6 +8,8 @@ export class H5CallNativeType { @@ -8,6 +8,8 @@ export class H5CallNativeType {
8 static jsCall_getAppPublicInfo = 'jsCall_getAppPublicInfo' 8 static jsCall_getAppPublicInfo = 'jsCall_getAppPublicInfo'
9 static jsCall_getArticleDetailBussinessData = 'jsCall_getArticleDetailBussinessData' 9 static jsCall_getArticleDetailBussinessData = 'jsCall_getArticleDetailBussinessData'
10 static jsCall_callAppService = 'jsCall_callAppService' 10 static jsCall_callAppService = 'jsCall_callAppService'
  11 + static jsCall_appInnerLinkMethod = 'jsCall_appInnerLinkMethod'
  12 + static jsCall_receiveH5Data = 'jsCall_receiveH5Data'
11 // TODO 业务自行新增类型、自行在JsBridgeBiz#performJSCallNative里添加接收分支处理。 13 // TODO 业务自行新增类型、自行在JsBridgeBiz#performJSCallNative里添加接收分支处理。
12 14
13 static { 15 static {
@@ -15,6 +17,8 @@ export class H5CallNativeType { @@ -15,6 +17,8 @@ export class H5CallNativeType {
15 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getAppPublicInfo) 17 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getAppPublicInfo)
16 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getArticleDetailBussinessData) 18 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_getArticleDetailBussinessData)
17 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_callAppService) 19 H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_callAppService)
  20 + H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_appInnerLinkMethod)
  21 + H5CallNativeType.JsCallTypeList.push(H5CallNativeType.jsCall_receiveH5Data)
18 } 22 }
19 } 23 }
20 24
@@ -2,6 +2,9 @@ import { Callback, BridgeWebViewControl } from 'wdJsBridge'; @@ -2,6 +2,9 @@ import { Callback, BridgeWebViewControl } from 'wdJsBridge';
2 import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; 2 import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
3 import { Logger, StringUtils, } from 'wdKit'; 3 import { Logger, StringUtils, } from 'wdKit';
4 import { H5CallNativeType } from './H5CallNativeType'; 4 import { H5CallNativeType } from './H5CallNativeType';
  5 +import { ContentDTO } from 'wdBean';
  6 +//TODO 这里引用了 features模块,是否考虑将跳转抽到公共模块
  7 +import { ProcessUtils } from '../../../../../../features/wdComponent/src/main/ets/utils/ProcessUtils';
5 8
6 const TAG = 'JsBridgeBiz' 9 const TAG = 'JsBridgeBiz'
7 10
@@ -11,7 +14,7 @@ const TAG = 'JsBridgeBiz' @@ -11,7 +14,7 @@ const TAG = 'JsBridgeBiz'
11 * @param call 14 * @param call
12 */ 15 */
13 export function performJSCallNative(data: Message, call: Callback) { 16 export function performJSCallNative(data: Message, call: Callback) {
14 - Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + data.data) 17 + Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + JSON.stringify(data.data))
15 switch (data.handlerName) { 18 switch (data.handlerName) {
16 case H5CallNativeType.jsCall_currentPageOperate: 19 case H5CallNativeType.jsCall_currentPageOperate:
17 break; 20 break;
@@ -23,6 +26,9 @@ export function performJSCallNative(data: Message, call: Callback) { @@ -23,6 +26,9 @@ export function performJSCallNative(data: Message, call: Callback) {
23 break; 26 break;
24 case H5CallNativeType.jsCall_callAppService: 27 case H5CallNativeType.jsCall_callAppService:
25 break; 28 break;
  29 + case H5CallNativeType.jsCall_receiveH5Data:
  30 + handleH5Data(JSON.parse(data?.data?.dataJson || '{}'))
  31 + break;
26 case 'changeNativeMessage': 32 case 'changeNativeMessage':
27 call("this is change Web Message") 33 call("this is change Web Message")
28 break; 34 break;
@@ -50,4 +56,7 @@ function getAppPublicInfo(): string { @@ -50,4 +56,7 @@ function getAppPublicInfo(): string {
50 return result; 56 return result;
51 } 57 }
52 58
  59 +function handleH5Data(content:ContentDTO) {
  60 + ProcessUtils.processPage(content)
  61 +}
53 62
1 import router from '@ohos.router'; 1 import router from '@ohos.router';
2 -import { Action } from 'wdBean';  
3 -import { ConfigConstants } from 'wdConstant';  
4 -import { Logger } from 'wdKit';  
5 -import { BridgeHandler, BridgeUtil, BridgeWebViewControl, Callback } from 'wdJsBridge'; 2 +import { BridgeUtil, BridgeWebViewControl, Callback } from 'wdJsBridge';
  3 +import { Logger } from 'wdKit/Index';
6 import { performJSCallNative } from './JsBridgeBiz'; 4 import { performJSCallNative } from './JsBridgeBiz';
7 -import { setDefaultNativeWebSettings } from './WebComponentUtil';  
8 -import { Message } from 'wdJsBridge/src/main/ets/bean/Message';  
9 import { H5CallNativeType } from './H5CallNativeType'; 5 import { H5CallNativeType } from './H5CallNativeType';
  6 +import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
10 7
11 -const TAG = 'WdWebComponent'; 8 +const TAG = 'WdWebLocalComponent';
12 9
13 @Component 10 @Component
14 export struct WdWebComponent { 11 export struct WdWebComponent {
15 - private webviewControl: BridgeWebViewControl = new BridgeWebViewControl()  
16 - //TODO 默认网页  
17 - webUrl: string | Resource = ConfigConstants.DETAIL_URL  
18 - /**  
19 - * 对外暴露webview的回调,能力  
20 - */  
21 - onPageBegin: (url?: string) => void = () => {  
22 - }  
23 - onPageEnd: (url?: string) => void = () => {  
24 - }  
25 - onLoadIntercept: (url?: string) => boolean = () => {  
26 - return false  
27 - }  
28 - onHttpErrorReceive: (url?: string) => boolean = () => {  
29 - return false  
30 - } 12 + webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
  13 + @Prop backVisibility: boolean = false
  14 + @Prop webUrl: string = ''
31 @Prop @Watch('onReloadStateChanged') reload: number = 0 15 @Prop @Watch('onReloadStateChanged') reload: number = 0
32 - /**  
33 - * 默认【CallNative】逻辑处理  
34 - */  
35 - private defaultPerformJSCallNative: (data: Message, f: Callback) => void = (data: Message, f: Callback) => {  
36 - performJSCallNative(data, f)  
37 - }  
38 - /**  
39 - * jsBridge的处理  
40 - */  
41 - handleInfo: [string, BridgeHandler][] = []  
42 - backVisibility: boolean = false  
43 -  
44 - defaultRegisterHandler(): void {  
45 - this.webviewControl.registerHandler("CallNative", {  
46 - handle: (data: Message, f: Callback) => {  
47 - this.defaultPerformJSCallNative(data, f)  
48 - }  
49 - });  
50 -  
51 - }  
52 16
53 build() { 17 build() {
54 Column() { 18 Column() {
@@ -72,21 +36,13 @@ export struct WdWebComponent { @@ -72,21 +36,13 @@ export struct WdWebComponent {
72 .zoomAccess(false) 36 .zoomAccess(false)
73 .horizontalScrollBarAccess(false) 37 .horizontalScrollBarAccess(false)
74 .verticalScrollBarAccess(false) 38 .verticalScrollBarAccess(false)
75 - .onHttpErrorReceive((event) => {  
76 - //TODO 页面加载不成功的时候处理  
77 - Logger.info(TAG, 'onHttpErrorReceive event.request.getRequestUrl:' + event?.request.getRequestUrl());  
78 - Logger.info(TAG, 'onHttpErrorReceive event.response.getResponseCode:' + event?.response.getResponseCode()); 39 + .onPageBegin((event) => {
  40 + console.log(this.webUrl,"yzl")
  41 + this.onPageBegin(event?.url);
79 }) 42 })
80 .onPageEnd((event) => { 43 .onPageEnd((event) => {
81 this.onPageEnd(event?.url) 44 this.onPageEnd(event?.url)
82 }) 45 })
83 - .onPageBegin((event) => {  
84 - this.onPageBegin(event?.url);  
85 - this.registerHandlers();  
86 - setTimeout(() => {  
87 - BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)  
88 - }, 200)  
89 - })  
90 .onLoadIntercept((event) => { 46 .onLoadIntercept((event) => {
91 let url: string = event.data.getRequestUrl().toString() 47 let url: string = event.data.getRequestUrl().toString()
92 url = url.replace("%(?![0-9a-fA-F]{2})", "%25") 48 url = url.replace("%(?![0-9a-fA-F]{2})", "%25")
@@ -97,30 +53,51 @@ export struct WdWebComponent { @@ -97,30 +53,51 @@ export struct WdWebComponent {
97 return true 53 return true
98 } 54 }
99 if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) { 55 if (url.startsWith(BridgeUtil.YY_OVERRIDE_SCHEMA)) {
  56 + Logger.debug(TAG, 'flushMessageQueue');
100 this.webviewControl.flushMessageQueue() 57 this.webviewControl.flushMessageQueue()
101 return true 58 return true
102 } 59 }
103 - return this.onLoadIntercept(event.data.getRequestUrl().toString()) 60 + return this.onLoadIntercept(event.data.getRequestUrl().toString());
104 }) 61 })
105 } 62 }
106 } 63 }
107 64
108 - onReloadStateChanged() {  
109 - Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`);  
110 - if (this.reload > 0) {  
111 - this.webviewControl.refresh()  
112 - }  
113 - }  
114 -  
115 private registerHandlers(): void { 65 private registerHandlers(): void {
116 // 注册h5调用js相关 66 // 注册h5调用js相关
117 for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) { 67 for (let i = 0; i < H5CallNativeType.JsCallTypeList.length; i++) {
118 let handleName = H5CallNativeType.JsCallTypeList[i]; 68 let handleName = H5CallNativeType.JsCallTypeList[i];
  69 + console.log('handleName:', handleName)
119 let handle = (data: Message, f: Callback) => { 70 let handle = (data: Message, f: Callback) => {
120 this.defaultPerformJSCallNative(data, f) 71 this.defaultPerformJSCallNative(data, f)
121 - } ; 72 + };
122 this.webviewControl.registerHandler(handleName, { handle: handle }); 73 this.webviewControl.registerHandler(handleName, { handle: handle });
123 } 74 }
124 } 75 }
  76 +
  77 + /**
  78 + * 默认【CallNative】逻辑处理
  79 + */
  80 + private defaultPerformJSCallNative: (data: Message, f: Callback) => void = (data: Message, f: Callback) => {
  81 + performJSCallNative(data, f)
  82 + }
  83 + onPageBegin: (url?: string) => void = () => {
  84 + Logger.debug(TAG, 'onPageBegin');
  85 + this.registerHandlers();
  86 + BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
  87 + }
  88 + onPageEnd: (url?: string) => void = () => {
  89 + Logger.debug(TAG, 'onPageEnd');
  90 + }
  91 + onLoadIntercept: (url?: string) => boolean = () => {
  92 + Logger.debug(TAG, 'onLoadIntercept return false');
  93 + return false
  94 + }
  95 + onReloadStateChanged() {
  96 + Logger.info(TAG, `onReloadStateChanged:::refresh, this.reload: ${this.reload}`);
  97 + if (this.reload > 0) {
  98 + this.webviewControl.refresh()
  99 + }
  100 + }
  101 +
125 } 102 }
126 103
@@ -11,9 +11,9 @@ const TAG = 'WdWebLocalComponent'; @@ -11,9 +11,9 @@ const TAG = 'WdWebLocalComponent';
11 11
12 @Component 12 @Component
13 export struct WdWebLocalComponent { 13 export struct WdWebLocalComponent {
14 - private webviewControl: BridgeWebViewControl = new BridgeWebViewControl()  
15 - backVisibility: boolean = false  
16 - webResource: Resource = {} as Resource 14 + webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
  15 + @Prop backVisibility: boolean = false
  16 + @Prop webResource: Resource = {} as Resource
17 @State webHeight : string = '100%' 17 @State webHeight : string = '100%'
18 18
19 build() { 19 build() {
@@ -35,6 +35,10 @@ export struct WdWebLocalComponent { @@ -35,6 +35,10 @@ export struct WdWebLocalComponent {
35 .domStorageAccess(true) 35 .domStorageAccess(true)
36 .databaseAccess(true) 36 .databaseAccess(true)
37 .javaScriptAccess(true) 37 .javaScriptAccess(true)
  38 + .imageAccess(true)
  39 + .mixedMode(MixedMode.All)
  40 + .onlineImageAccess(true)
  41 + .enableNativeEmbedMode(true)
38 .height(this.webHeight === '100%' ? '100%' : Number(this.webHeight)) 42 .height(this.webHeight === '100%' ? '100%' : Number(this.webHeight))
39 .onPageBegin((event) => { 43 .onPageBegin((event) => {
40 this.onPageBegin(event?.url); 44 this.onPageBegin(event?.url);
@@ -70,6 +70,7 @@ export interface ContentDTO { @@ -70,6 +70,7 @@ export interface ContentDTO {
70 rmhInfo: RmhInfoDTO; // 人民号信息 70 rmhInfo: RmhInfoDTO; // 人民号信息
71 photoNum: number; 71 photoNum: number;
72 corner: string; 72 corner: string;
73 - rmhPlatform: number  
74 - 73 + rmhPlatform: number;
  74 + newTags: string;
  75 + isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
75 } 76 }
@@ -12,6 +12,7 @@ import { Card17Component } from './cardview/Card17Component'; @@ -12,6 +12,7 @@ import { Card17Component } from './cardview/Card17Component';
12 import { Card15Component } from './cardview/Card15Component'; 12 import { Card15Component } from './cardview/Card15Component';
13 import { Card19Component } from './cardview/Card19Component'; 13 import { Card19Component } from './cardview/Card19Component';
14 import { Card20Component } from './cardview/Card20Component'; 14 import { Card20Component } from './cardview/Card20Component';
  15 +import { Card21Component } from './cardview/Card21Component';
15 16
16 /** 17 /**
17 * card适配器,卡片样式汇总,依据ContentDTO#appStyle 18 * card适配器,卡片样式汇总,依据ContentDTO#appStyle
@@ -52,6 +53,8 @@ export struct CardParser { @@ -52,6 +53,8 @@ export struct CardParser {
52 Card19Component({ contentDTO }) 53 Card19Component({ contentDTO })
53 } else if (contentDTO.appStyle === CompStyle.Card_20) { 54 } else if (contentDTO.appStyle === CompStyle.Card_20) {
54 Card20Component({ contentDTO }) 55 Card20Component({ contentDTO })
  56 + } else if (contentDTO.appStyle === CompStyle.Card_21) {
  57 + Card21Component({ contentDTO })
55 } 58 }
56 else { 59 else {
57 // todo:组件未实现 / Component Not Implemented 60 // todo:组件未实现 / Component Not Implemented
1 -import { Action, ContentDetailDTO, ContentDTO, batchLikeAndCollectResult, InteractDataDTO, } from 'wdBean'; 1 +import { Action, ContentDetailDTO, } from 'wdBean';
2 import DetailViewModel from '../viewmodel/DetailViewModel'; 2 import DetailViewModel from '../viewmodel/DetailViewModel';
3 -import { OperRowListView } from './view/OperRowListView';  
4 import { WdWebComponent } from 'wdWebComponent'; 3 import { WdWebComponent } from 'wdWebComponent';
5 import router from '@ohos.router'; 4 import router from '@ohos.router';
6 import { CommonConstants } from 'wdConstant' 5 import { CommonConstants } from 'wdConstant'
  6 +import { BridgeWebViewControl } from 'wdJsBridge/Index';
7 7
8 const TAG = 'SpacialTopicPageComponent' 8 const TAG = 'SpacialTopicPageComponent'
9 9
10 @Component 10 @Component
11 export struct SpacialTopicPageComponent { 11 export struct SpacialTopicPageComponent {
  12 + webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
12 scroller: Scroller = new Scroller(); 13 scroller: Scroller = new Scroller();
13 action: Action = {} as Action 14 action: Action = {} as Action
14 - private webUrl?: string;  
15 - @State contentDetailData: ContentDetailDTO [] = [] as ContentDetailDTO []  
16 - @State recommendList: ContentDTO[] = []  
17 - @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态  
18 - @State interactData: InteractDataDTO = {} as InteractDataDTO  
19 - 15 + @State webUrl: string = '';
20 build() { 16 build() {
21 Column() { 17 Column() {
22 Stack({ alignContent: Alignment.Bottom }) { 18 Stack({ alignContent: Alignment.Bottom }) {
23 Column() { 19 Column() {
24 WdWebComponent({ 20 WdWebComponent({
  21 + webviewControl: this.webviewControl,
25 webUrl: this.webUrl, 22 webUrl: this.webUrl,
26 - backVisibility: false 23 + backVisibility: false,
27 }) 24 })
28 } 25 }
29 - .padding({bottom:56}) 26 + .padding({ bottom: 56 })
30 .width(CommonConstants.FULL_WIDTH) 27 .width(CommonConstants.FULL_WIDTH)
31 .height(CommonConstants.FULL_HEIGHT) 28 .height(CommonConstants.FULL_HEIGHT)
32 29
@@ -72,36 +69,11 @@ export struct SpacialTopicPageComponent { @@ -72,36 +69,11 @@ export struct SpacialTopicPageComponent {
72 .backgroundColor(Color.White) 69 .backgroundColor(Color.White)
73 } 70 }
74 71
75 - // private async getDetail() {  
76 - // let contentId: string = ''  
77 - // let relId: string = ''  
78 - // let relType: string = ''  
79 - // if (this.action && this.action.params) {  
80 - // if (this.action.params.contentID) {  
81 - // contentId = this.action.params.contentID;  
82 - // }  
83 - // if (this.action && this.action.params && this.action.params.extra) {  
84 - // if (this.action.params.extra.relId) {  
85 - // relId = this.action.params.extra.relId;  
86 - // }  
87 - // if (this.action.params.extra.relType) {  
88 - // relType = this.action.params.extra.relType  
89 - // }  
90 - //  
91 - // }  
92 - // let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)  
93 - // if (detailBeans && detailBeans.length > 0) {  
94 - // this.contentDetailData = detailBeans;  
95 - // }  
96 - // }  
97 - // }  
98 -  
99 aboutToAppear() { 72 aboutToAppear() {
100 let action: Action = router.getParams() as Action 73 let action: Action = router.getParams() as Action
101 if (action) { 74 if (action) {
102 - this.webUrl = action.params?.url 75 + this.webUrl = action.params?.url || ''
103 } 76 }
104 - // this.getDetail()  
105 } 77 }
106 78
107 aboutToDisappear() { 79 aboutToDisappear() {
@@ -10,56 +10,60 @@ import { DateTimeUtils } from 'wdKit/Index' @@ -10,56 +10,60 @@ import { DateTimeUtils } from 'wdKit/Index'
10 @Component 10 @Component
11 export struct CardMediaInfo { 11 export struct CardMediaInfo {
12 @State contentDTO: ContentDTO = {} as ContentDTO // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中 12 @State contentDTO: ContentDTO = {} as ContentDTO // 如果有duraion,代表点播,显示时长;如果不传或者传0,显示直播中
  13 +
13 // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, 14 // objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,
14 // 14动态图文,15动态视频16问政;100人民号,101标签 15 // 14动态图文,15动态视频16问政;100人民号,101标签
15 16
16 build() { 17 build() {
17 Row() { 18 Row() {
18 - if(this.contentDTO.objectType === '1' || this.contentDTO.objectType === '15' ) { 19 + if (this.contentDTO.objectType === '1' || this.contentDTO.objectType === '15') {
19 // 点播、动态视频 20 // 点播、动态视频
20 - Row(){  
21 - Image($r('app.media.videoTypeIcon')) 21 + Row() {
  22 + Image($r('app.media.card_play'))
22 .mediaLogo() 23 .mediaLogo()
23 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000)) 24 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.videoInfo.videoDuration * 1000))
24 .mediaText() 25 .mediaText()
25 } 26 }
26 - .backgroundColor('#4d000000')  
27 - .borderRadius($r('app.float.button_border_radius'))  
28 - } else if(this.contentDTO.objectType === '2') { 27 + } else if (this.contentDTO.objectType === '2') {
29 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停 28 // liveInfo.liveState 直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
30 // 显示直播信息 29 // 显示直播信息
31 - Row(){  
32 - if(this.contentDTO.liveInfo.liveState === 'running') {  
33 - Image($r('app.media.icon_live')) 30 + Row() {
  31 + if(this.contentDTO.liveInfo.liveState === 'wait') {
  32 + Image($r('app.media.card_wait'))
  33 + .mediaLogo()
  34 + Text('预约')
  35 + .mediaText()
  36 + } else if (this.contentDTO.liveInfo.liveState === 'running') {
  37 + Image($r('app.media.card_live'))
34 .mediaLogo() 38 .mediaLogo()
35 Text('直播中') 39 Text('直播中')
36 .mediaText() 40 .mediaText()
37 - } else if(this.contentDTO.liveInfo.liveState === 'end'){  
38 - Image($r('app.media.videoTypeIcon')) 41 + } else if (this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo.replayUri) {
  42 + Image($r('app.media.card_play'))
39 .mediaLogo() 43 .mediaLogo()
40 Text('回看') 44 Text('回看')
41 .mediaText() 45 .mediaText()
  46 + } else if(this.contentDTO.liveInfo.liveState === 'end' && this.contentDTO.liveInfo
  47 + .replayUri) {
  48 + // Image($r('app.media.card_live'))
  49 + // .mediaLogo()
  50 + Text('直播结束')
  51 + .mediaText()
42 } 52 }
43 } 53 }
44 - .backgroundColor('#4d000000')  
45 - .borderRadius($r('app.float.button_border_radius'))  
46 - } else if(this.contentDTO.objectType === '9') { 54 + } else if (this.contentDTO.objectType === '9') {
47 // 显示组图;图片数量 55 // 显示组图;图片数量
48 - Row(){  
49 - Image($r('app.media.album_card_shape')) 56 + Row() {
  57 + Image($r('app.media.card_image'))
50 .mediaLogo() 58 .mediaLogo()
51 Text(`${this.contentDTO.photoNum}`) 59 Text(`${this.contentDTO.photoNum}`)
52 .mediaText() 60 .mediaText()
53 - .width(20)  
54 } 61 }
55 - .backgroundColor('#4d000000')  
56 - .borderRadius($r('app.float.button_border_radius'))  
57 - } else if(this.contentDTO.objectType === '13') { 62 + } else if (this.contentDTO.objectType === '13') {
58 // 显示音频信息 63 // 显示音频信息
59 - Row(){  
60 - Image($r('app.media.broadcast_listen'))  
61 - .height(14)  
62 - .borderRadius($r('app.float.button_border_radius')) 64 + Row() {
  65 + Image($r('app.media.card_audio'))
  66 + .mediaLogo()
63 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000)) 67 Text(DateTimeUtils.getFormattedDuration(this.contentDTO.voiceInfo.voiceDuration * 1000))
64 .mediaText() 68 .mediaText()
65 } 69 }
@@ -68,18 +72,27 @@ export struct CardMediaInfo { @@ -68,18 +72,27 @@ export struct CardMediaInfo {
68 .margin(6) 72 .margin(6)
69 } 73 }
70 74
71 - @Styles mediaLogo() {  
72 - .width(22)  
73 - .height(18)  
74 - .borderRadius($r('app.float.button_border_radius')) 75 + @Styles
  76 + mediaLogo() {
  77 + .width(14)
  78 + .height(14)
  79 + .margin({ right: 3 })
  80 + .shadow({
  81 + radius: 2,
  82 + color: 'rgba(0,0,0,0.3)',
  83 + offsetY: 2
  84 + })
75 } 85 }
76 } 86 }
77 87
78 -@Extend(Text) function mediaText() { 88 +@Extend(Text)
  89 +function mediaText() {
79 .fontColor($r('app.color.color_fff')) 90 .fontColor($r('app.color.color_fff'))
80 - .fontSize($r('app.float.font_size_12'))  
81 - .width(40)  
82 - .height(18)  
83 - .textAlign(TextAlign.Center)  
84 - .margin({ left: -3 }) 91 + .fontSize($r('app.float.font_size_14'))
  92 + .lineHeight(18)
  93 + .textShadow({
  94 + radius: 2,
  95 + color: 'rgba(0,0,0,0.3)',
  96 + offsetY: 2
  97 + })
85 } 98 }
@@ -7,10 +7,11 @@ export struct CardSourceInfo { @@ -7,10 +7,11 @@ export struct CardSourceInfo {
7 @State contentDTO: ContentDTO = {} as ContentDTO; 7 @State contentDTO: ContentDTO = {} as ContentDTO;
8 build() { 8 build() {
9 Flex() { 9 Flex() {
10 - if(this.contentDTO.corner === '1') {  
11 - Text("锐评") 10 + if(this.contentDTO.corner) {
  11 + Text(this.contentDTO.corner)
12 .fontSize($r("app.float.font_size_12")) 12 .fontSize($r("app.float.font_size_12"))
13 .fontColor($r("app.color.color_ED2800")) 13 .fontColor($r("app.color.color_ED2800"))
  14 + .margin({right: 2})
14 } 15 }
15 if(this.contentDTO.rmhPlatform === 1) { 16 if(this.contentDTO.rmhPlatform === 1) {
16 Text(this.contentDTO.rmhInfo.rmhName) 17 Text(this.contentDTO.rmhInfo.rmhName)
@@ -27,15 +28,23 @@ export struct CardSourceInfo { @@ -27,15 +28,23 @@ export struct CardSourceInfo {
27 .fontColor($r("app.color.color_B0B0B0")) 28 .fontColor($r("app.color.color_B0B0B0"))
28 .maxLines(1) 29 .maxLines(1)
29 .textOverflow({overflow: TextOverflow.Ellipsis}) 30 .textOverflow({overflow: TextOverflow.Ellipsis})
  31 + }
  32 + // 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
  33 + if(this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
  34 + (Number
  35 + .parseFloat(this
  36 + .contentDTO.publishTime))
  37 + .indexOf
  38 + ('-') === -1) {
30 Image($r("app.media.point")) 39 Image($r("app.media.point"))
31 .width(16) 40 .width(16)
32 .height(16) 41 .height(16)
33 - }  
34 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime))) 42 Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
35 .fontSize($r("app.float.font_size_12")) 43 .fontSize($r("app.float.font_size_12"))
36 .fontColor($r("app.color.color_B0B0B0")) 44 .fontColor($r("app.color.color_B0B0B0"))
37 .margin({ right: 6 }) 45 .margin({ right: 6 })
38 .flexShrink(0) 46 .flexShrink(0)
  47 + }
39 if(this.contentDTO?.interactData?.commentNum) { 48 if(this.contentDTO?.interactData?.commentNum) {
40 Text(`${this.contentDTO.interactData.commentNum}评`) 49 Text(`${this.contentDTO.interactData.commentNum}评`)
41 .fontSize($r("app.float.font_size_12")) 50 .fontSize($r("app.float.font_size_12"))
@@ -2,7 +2,8 @@ import { ContentDTO, slideShows } from 'wdBean'; @@ -2,7 +2,8 @@ import { ContentDTO, slideShows } from 'wdBean';
2 import { CommonConstants } from 'wdConstant' 2 import { CommonConstants } from 'wdConstant'
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 import { ProcessUtils } from '../../utils/ProcessUtils'; 4 import { ProcessUtils } from '../../utils/ProcessUtils';
5 - 5 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
  6 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
6 7
7 /** 8 /**
8 * 大专题卡--CompStyle: 10 9 * 大专题卡--CompStyle: 10
@@ -76,10 +77,10 @@ export struct Card10Component { @@ -76,10 +77,10 @@ export struct Card10Component {
76 } 77 }
77 .width(CommonConstants.FULL_WIDTH) 78 .width(CommonConstants.FULL_WIDTH)
78 .padding({ 79 .padding({
79 - top: 14,  
80 - left: 16,  
81 - right: 16,  
82 - bottom: 14 80 + left: $r('app.float.card_comp_pagePadding_lf'),
  81 + right: $r('app.float.card_comp_pagePadding_lf'),
  82 + top: $r('app.float.card_comp_pagePadding_tb'),
  83 + bottom: $r('app.float.card_comp_pagePadding_tb')
83 }) 84 })
84 .backgroundColor($r("app.color.white")) 85 .backgroundColor($r("app.color.white"))
85 .margin({ bottom: 8 }) 86 .margin({ bottom: 8 })
@@ -95,25 +96,14 @@ export struct Card10Component { @@ -95,25 +96,14 @@ export struct Card10Component {
95 .fontColor($r('app.color.color_222222')) 96 .fontColor($r('app.color.color_222222'))
96 .maxLines(2) 97 .maxLines(2)
97 .textOverflow({ overflow: TextOverflow.Ellipsis }) 98 .textOverflow({ overflow: TextOverflow.Ellipsis })
98 - Row() {  
99 - // 展示发稿人  
100 - if (item.source) {  
101 - Text(item.source)  
102 - .fontSize($r('app.float.font_size_12'))  
103 - .fontColor($r('app.color.color_B0B0B0'))  
104 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
105 - .maxLines(1)  
106 - .width(item.source.length > 10 ? '60%' : '')  
107 -  
108 - Image($r('app.media.point'))  
109 - .width(16)  
110 - .height(16)  
111 - }  
112 - Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime))))  
113 - .fontSize($r("app.float.font_size_12"))  
114 - .fontColor($r("app.color.color_B0B0B0")) 99 + CardSourceInfo(
  100 + {
  101 + contentDTO: {
  102 + publishTime: item.publishTime || '',
  103 + source: item.source || ''
  104 + } as ContentDTO
115 } 105 }
116 - .margin({ top: 12 }) 106 + )
117 } 107 }
118 .layoutWeight(1) 108 .layoutWeight(1)
119 .alignItems(HorizontalAlign.Start) 109 .alignItems(HorizontalAlign.Start)
@@ -3,46 +3,45 @@ import { RmhTitle } from '../cardCommon/RmhTitle' @@ -3,46 +3,45 @@ import { RmhTitle } from '../cardCommon/RmhTitle'
3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 3 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
4 import { CommonConstants } from 'wdConstant/Index'; 4 import { CommonConstants } from 'wdConstant/Index';
5 5
6 -const TAG = 'Card12Component'; 6 +const TAG = 'Card14Component';
7 7
8 /** 8 /**
9 - * 人民号-动态---12:人民号无图卡; 9 + * 人民号-动态---14:人民号单图卡;
10 */ 10 */
11 -@Entry  
12 @Component 11 @Component
13 -export struct Card12Component { 12 +export struct Card14Component {
14 @State contentDTO: ContentDTO = { 13 @State contentDTO: ContentDTO = {
15 - appStyle: '20',  
16 - coverType: 1,  
17 - coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
18 - fullColumnImgUrls: [  
19 - {  
20 - landscape: 1,  
21 - size: 1,  
22 - url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',  
23 - weight: 1600  
24 - }  
25 - ],  
26 - newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
27 - rmhInfo: {  
28 - authIcon:  
29 - 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',  
30 - authTitle: '10后音乐人王烁然个人人民号',  
31 - authTitle2: '10后音乐人王烁然个人人民号',  
32 - banControl: 0,  
33 - cnIsAttention: 1,  
34 - rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',  
35 - rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',  
36 - rmhName: '王烁然',  
37 - userId: '522435359667845',  
38 - userType: '2'  
39 - },  
40 - objectType: '1',  
41 - videoInfo: {  
42 - firstFrameImageUri: '',  
43 - videoDuration: 37,  
44 - videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'  
45 - } 14 + // appStyle: '20',
  15 + // coverType: 1,
  16 + // coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  17 + // fullColumnImgUrls: [
  18 + // {
  19 + // landscape: 1,
  20 + // size: 1,
  21 + // url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  22 + // weight: 1600
  23 + // }
  24 + // ],
  25 + // newsTitle: '好玩!》10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
  26 + // rmhInfo: {
  27 + // authIcon:
  28 + // 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
  29 + // authTitle: '10后音乐人王烁然个人人民号',
  30 + // authTitle2: '10后音乐人王烁然个人人民号',
  31 + // banControl: 0,
  32 + // cnIsAttention: 1,
  33 + // rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
  34 + // rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
  35 + // rmhName: '王烁然',
  36 + // userId: '522435359667845',
  37 + // userType: '2'
  38 + // },
  39 + // objectType: '1',
  40 + // videoInfo: {
  41 + // firstFrameImageUri: '',
  42 + // videoDuration: 37,
  43 + // videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
  44 + // }
46 } as ContentDTO; 45 } as ContentDTO;
47 46
48 aboutToAppear(): void { 47 aboutToAppear(): void {
  1 +import { ContentDTO } from 'wdBean';
  2 +import { RmhTitle } from '../cardCommon/RmhTitle'
  3 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
  4 +import { CommonConstants } from 'wdConstant/Index';
  5 +
  6 +const TAG = 'Card16Component';
  7 +
  8 +/**
  9 + * 人民号-动态---16:人民号三图卡;
  10 + */
  11 +@Component
  12 +export struct Card16Component {
  13 + @State contentDTO: ContentDTO = {
  14 + appStyle: '20',
  15 + coverType: 1,
  16 + coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90;https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  17 + fullColumnImgUrls: [
  18 + {
  19 + landscape: 1,
  20 + size: 1,
  21 + url: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/default_image/202105/rmrb_default_image_4GdWrgSw1622451312.jpg?x-oss-process=image/resize,m_fill,h_480,w_360/quality,q_90',
  22 + weight: 1600
  23 + }
  24 + ],
  25 + newsTitle: '好玩!》10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号10后音乐人王烁然个人人民号',
  26 + rmhInfo: {
  27 + authIcon:
  28 + 'https://cdnjdphoto.aikan.pdnews.cn/creator-category/icon/auth/yellow.png',
  29 + authTitle: '10后音乐人王烁然个人人民号',
  30 + authTitle2: '10后音乐人王烁然个人人民号',
  31 + banControl: 0,
  32 + cnIsAttention: 1,
  33 + rmhDesc: '10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人10后少年音乐人',
  34 + rmhHeadUrl: 'https://cdnjdphoto.aikan.pdnews.cn/image/creator/rmh/20221031/3d3419e86a.jpeg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg',
  35 + rmhName: '王烁然',
  36 + userId: '522435359667845',
  37 + userType: '2'
  38 + },
  39 + objectType: '1',
  40 + videoInfo: {
  41 + firstFrameImageUri: '',
  42 + videoDuration: 37,
  43 + videoUrl: 'https://rmrbcmsonline.peopleapp.com/upload/user_app/gov_dynamic/video/mp4/202105/rmrb_GSNARt6P1622451310.mp4'
  44 + }
  45 + } as ContentDTO;
  46 +
  47 + aboutToAppear(): void {
  48 + }
  49 +
  50 + build() {
  51 + Column() {
  52 + // rmh信息
  53 + RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
  54 + // 标题
  55 + if (this.contentDTO.newsTitle) {
  56 + Text(this.contentDTO.newsTitle)
  57 + .fontSize($r('app.float.font_size_17'))
  58 + .fontColor($r('app.color.color_222222'))
  59 + .width(CommonConstants.FULL_WIDTH)
  60 + .textOverflowStyle(2)
  61 + .margin({ bottom: 8 })
  62 + .lineHeight(25)
  63 + }
  64 + if (this.contentDTO.coverUrl) {
  65 + Flex() {
  66 + ForEach(this.contentDTO.coverUrl?.split(';'), (item: string) => {
  67 + Image(item).flexBasis(113).height(75).margin({right: 2})
  68 + })
  69 + }
  70 + }
  71 + //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
  72 + }
  73 + .padding({
  74 + left: $r('app.float.card_comp_pagePadding_lf'),
  75 + right: $r('app.float.card_comp_pagePadding_lf'),
  76 + top: $r('app.float.card_comp_pagePadding_tb'),
  77 + bottom: $r('app.float.card_comp_pagePadding_tb')
  78 + })
  79 + }
  80 +}
  81 +
  82 +interface radiusType {
  83 + topLeft: number | Resource;
  84 + topRight: number | Resource;
  85 + bottomLeft: number | Resource;
  86 + bottomRight: number | Resource;
  87 +}
  88 +
  89 +@Component
  90 +struct createImg {
  91 + @Prop contentDTO: ContentDTO
  92 +
  93 + build() {
  94 + GridRow() {
  95 + if (this.contentDTO.fullColumnImgUrls[0].landscape === 1) {
  96 + // 横屏
  97 + GridCol({
  98 + span: { xs: 12 }
  99 + }) {
  100 + Stack() {
  101 + Image(this.contentDTO.coverUrl)
  102 + .width(CommonConstants.FULL_WIDTH)
  103 + .aspectRatio(16 / 9)
  104 + .borderRadius($r('app.float.image_border_radius'))
  105 + CardMediaInfo({ contentDTO: this.contentDTO })
  106 + }
  107 + .align(Alignment.BottomEnd)
  108 + }
  109 + } else {
  110 + // 竖图显示,宽度占50%,高度自适应
  111 + GridCol({
  112 + span: { xs: 6 }
  113 + }) {
  114 + Stack() {
  115 + Image(this.contentDTO.coverUrl)
  116 + .width(CommonConstants.FULL_WIDTH)
  117 + .borderRadius($r('app.float.image_border_radius'))
  118 + CardMediaInfo({ contentDTO: this.contentDTO })
  119 + }
  120 + .align(Alignment.BottomEnd)
  121 + }
  122 + }
  123 + }
  124 + }
  125 +}
  126 +
  127 +
  128 +@Extend(Text)
  129 +function textOverflowStyle(maxLine: number) {
  130 + .maxLines(maxLine)
  131 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  132 +}
@@ -4,7 +4,7 @@ import { CommonConstants } from 'wdConstant/Index'; @@ -4,7 +4,7 @@ import { CommonConstants } from 'wdConstant/Index';
4 import { DateTimeUtils } from 'wdKit'; 4 import { DateTimeUtils } from 'wdKit';
5 import { WDRouterRule } from 'wdRouter'; 5 import { WDRouterRule } from 'wdRouter';
6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
7 - 7 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
8 const TAG = 'Card17Component'; 8 const TAG = 'Card17Component';
9 9
10 /** 10 /**
@@ -81,25 +81,8 @@ export struct Card17Component { @@ -81,25 +81,8 @@ export struct Card17Component {
81 }; 81 };
82 WDRouterRule.jumpWithAction(taskAction) 82 WDRouterRule.jumpWithAction(taskAction)
83 }) 83 })
84 -  
85 - Row() {  
86 - if (this.contentDTO.source) {  
87 - Text(this.contentDTO.source)  
88 - .fontSize($r('app.float.font_size_13'))  
89 - .fontColor($r('app.color.color_B0B0B0'))  
90 - Image($r('app.media.point'))  
91 - .width(16)  
92 - .height(16)  
93 - }  
94 - if (this.contentDTO.publishTime && this.contentDTO.publishTime.length === 13) {  
95 - Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))  
96 - .fontSize($r('app.float.font_size_13'))  
97 - .fontColor($r('app.color.color_B0B0B0'))  
98 - }  
99 - }  
100 - .width(CommonConstants.FULL_WIDTH)  
101 - .height(16)  
102 - .id('label') 84 + // 评论等信息
  85 + CardSourceInfo({ contentDTO: this.contentDTO })
103 } 86 }
104 .width(CommonConstants.FULL_WIDTH) 87 .width(CommonConstants.FULL_WIDTH)
105 .padding({ 88 .padding({
@@ -13,7 +13,7 @@ export struct Card19Component { @@ -13,7 +13,7 @@ export struct Card19Component {
13 // coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg', 13 // coverUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg',
14 // fullColumnImgUrls: [ 14 // fullColumnImgUrls: [
15 // { 15 // {
16 - // fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994160362418176.png?x-oss-process=image/quality,q_90/auto-orient,1', 16 + // fullUrl: 'https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240323/a_955994155727712256.png?x-oss-process=image/quality,q_90/auto-orient,1',
17 // height: 1500, 17 // height: 1500,
18 // landscape: 1, 18 // landscape: 1,
19 // size: 1, 19 // size: 1,
@@ -107,6 +107,8 @@ interface radiusType { @@ -107,6 +107,8 @@ interface radiusType {
107 @Component 107 @Component
108 struct createImg { 108 struct createImg {
109 @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] 109 @Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
  110 + @State picWidth: number = 0;
  111 + @State picHeight: number = 0;
110 aboutToAppear(): void { 112 aboutToAppear(): void {
111 if(this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 113 if(this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
112 this.fullColumnImgUrls.splice(2,0, { 114 this.fullColumnImgUrls.splice(2,0, {
@@ -137,18 +139,77 @@ struct createImg { @@ -137,18 +139,77 @@ struct createImg {
137 return radius 139 return radius
138 } 140 }
139 141
  142 + getPicType(){
  143 + if (this.picWidth && this.picWidth) {
  144 + if (this.picWidth / this.picHeight > 343/172) {
  145 + return 1; //横长图
  146 + } else if (this.picHeight / this.picWidth > 305/228) {
  147 + return 2; //竖长图
  148 + } else {
  149 + return 3
  150 + }
  151 + } else {
  152 + return 3; //普通图
  153 + }
  154 + }
  155 +
  156 +
140 build() { 157 build() {
141 GridRow({ 158 GridRow({
142 gutter: { x: 2, y: 2 } 159 gutter: { x: 2, y: 2 }
143 }) { 160 }) {
144 ForEach(this.fullColumnImgUrls, (item: FullColumnImgUrlDTO, index: number) => { 161 ForEach(this.fullColumnImgUrls, (item: FullColumnImgUrlDTO, index: number) => {
145 if (this.fullColumnImgUrls.length === 1) { 162 if (this.fullColumnImgUrls.length === 1) {
  163 + if (this.getPicType() !== 3) {
  164 + GridCol({
  165 + span: this.getPicType() === 1 ? 12 : 8
  166 + }){
  167 + Stack({
  168 + alignContent: Alignment.BottomEnd
  169 + }) {
  170 + if (this.getPicType() === 1) {
  171 + Image(item.fullUrl)
  172 + .width('100%')
  173 + .height(172)
  174 + .autoResize(true)
  175 + .borderRadius(this.caclImageRadius(index))
  176 + } else if (this.getPicType() === 2) {
  177 + Image(item.fullUrl)
  178 + .width('100%')
  179 + .height(305)
  180 + .autoResize(true)
  181 + .borderRadius(this.caclImageRadius(index))
  182 + }
  183 + Flex({ direction: FlexDirection.Row }) {
  184 + Image($r('app.media.icon_long_pic'))
  185 + .width(14)
  186 + .height(14)
  187 + .margin({right: 4})
  188 + Text('长图')
  189 + .fontSize(12)
  190 + .fontWeight(400)
  191 + .fontColor(0xffffff)
  192 + .fontFamily('PingFang SC')
  193 + }
  194 + .width(48)
  195 + .padding({bottom: 9})
  196 +
  197 + }
  198 + }
  199 + } else {
146 GridCol({ 200 GridCol({
147 span: { xs: 8 } 201 span: { xs: 8 }
148 }) { 202 }) {
149 Image(item.fullUrl) 203 Image(item.fullUrl)
150 .width('100%') 204 .width('100%')
151 .borderRadius(this.caclImageRadius(index)) 205 .borderRadius(this.caclImageRadius(index))
  206 + .autoResize(true)
  207 + .opacity(!this.picWidth && !this.picHeight ? 0 : 1)
  208 + .onComplete(callback => {
  209 + this.picWidth = callback?.width || 0;
  210 + this.picHeight = callback?.height || 0;
  211 + })
  212 + }
152 } 213 }
153 } else if (this.fullColumnImgUrls.length === 4) { 214 } else if (this.fullColumnImgUrls.length === 4) {
154 GridCol({ 215 GridCol({
  1 +import { ContentDTO } from 'wdBean';
  2 +import { CommonConstants, CompStyle } from 'wdConstant';
  3 +import { ProcessUtils } from '../../utils/ProcessUtils';
  4 +import { RmhTitle } from '../cardCommon/RmhTitle'
  5 +import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
  6 +
  7 +const TAG: string = 'Card6Component-Card13Component';
  8 +
  9 +/**
  10 + * 卡片样式:"appStyle":"21" 小视频卡人民号
  11 + */
  12 +@Component
  13 +export struct Card21Component {
  14 + @State contentDTO: ContentDTO = {} as ContentDTO;
  15 +
  16 + build() {
  17 + Column() {
  18 + // 顶部 rmh信息
  19 + RmhTitle({ rmhInfo: this.contentDTO.rmhInfo })
  20 + // 中间内容
  21 + Grid() {
  22 + GridItem() {
  23 + Text(`${this.contentDTO.newsTitle}`)
  24 + .fontSize($r('app.float.selected_text_size'))
  25 + .fontColor($r('app.color.color_222222'))
  26 + .width(CommonConstants.FULL_WIDTH)
  27 + .maxLines(4)
  28 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  29 + .padding({ right: 12 })
  30 + .lineHeight(26)
  31 + }
  32 +
  33 + GridItem() {
  34 + Stack() {
  35 + Image(this.contentDTO.coverUrl)
  36 + .width(CommonConstants.FULL_WIDTH)
  37 + .borderRadius($r('app.float.image_border_radius'))
  38 + CardMediaInfo({ contentDTO: this.contentDTO })
  39 + }
  40 + .alignContent(Alignment.BottomEnd)
  41 + }
  42 + }
  43 + .columnsTemplate('2fr 1fr')
  44 + .maxCount(1)
  45 +
  46 + //TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
  47 + }
  48 + .onClick((event: ClickEvent) => {
  49 + ProcessUtils.processPage(this.contentDTO)
  50 + })
  51 + .padding({
  52 + left: $r('app.float.card_comp_pagePadding_lf'),
  53 + right: $r('app.float.card_comp_pagePadding_lf'),
  54 + top: $r('app.float.card_comp_pagePadding_tb'),
  55 + bottom: $r('app.float.card_comp_pagePadding_tb')
  56 + })
  57 + .width(CommonConstants.FULL_WIDTH)
  58 + }
  59 +}
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 -import { DateTimeUtils } from 'wdKit';  
4 import { ProcessUtils } from '../../utils/ProcessUtils'; 3 import { ProcessUtils } from '../../utils/ProcessUtils';
5 import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'
6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
7 const TAG: string = 'Card6Component-Card13Component'; 6 const TAG: string = 'Card6Component-Card13Component';
8 -const FULL_PARENT: string = '100%';  
9 7
10 /** 8 /**
11 * 卡片样式:"appStyle":"6"以及13--- 小视频卡 9 * 卡片样式:"appStyle":"6"以及13--- 小视频卡
@@ -18,7 +16,17 @@ export struct Card6Component { @@ -18,7 +16,17 @@ export struct Card6Component {
18 Row() { 16 Row() {
19 Column() { 17 Column() {
20 Column() { 18 Column() {
21 - Text(this.contentDTO.newsTitle) 19 + // TODO 这个tag涉及样式问题。待优化。
  20 + // if (this.contentDTO.newTags) {
  21 + // Text(this.contentDTO.newTags)
  22 + // .backgroundColor($r('app.color.color_ED2800'))
  23 + // .borderRadius($r('app.float.button_border_radius'))
  24 + // .fontColor($r('app.color.color_fff'))
  25 + // .fontSize($r('app.float.font_size_12'))
  26 + // .padding(2)
  27 + // .margin({ right: 2 })
  28 + // }
  29 + Text(`${this.contentDTO.newsTitle}`)
22 .fontSize(16) 30 .fontSize(16)
23 .fontWeight(FontWeight.Normal) 31 .fontWeight(FontWeight.Normal)
24 .maxLines(3)// 32 .maxLines(3)//
@@ -104,7 +104,7 @@ export struct Card9Component { @@ -104,7 +104,7 @@ export struct Card9Component {
104 Column() { 104 Column() {
105 Row() { 105 Row() {
106 // 标题 106 // 标题
107 - Image($r("app.media.point_icon")) 107 + Image($r("app.media.timeline_rect"))
108 .width(9) 108 .width(9)
109 .height(9) 109 .height(9)
110 .margin({ right: 5 }) 110 .margin({ right: 5 })
@@ -157,11 +157,11 @@ struct CreatorItem { @@ -157,11 +157,11 @@ struct CreatorItem {
157 .width(44) 157 .width(44)
158 .height(44) 158 .height(44)
159 if (this.isSelected) { 159 if (this.isSelected) {
160 - Image($r('app.media.MyCollection_selected_icon')) 160 + Image($r('app.media.rmh_selected'))
161 .width(16) 161 .width(16)
162 .height(16) 162 .height(16)
163 } else { 163 } else {
164 - Image($r('app.media.ic_succeed_refresh')) 164 + Image($r('app.media.rmh_unselected'))
165 .width(16) 165 .width(16)
166 .height(16) 166 .height(16)
167 } 167 }
@@ -36,6 +36,7 @@ export class commentListModel extends PageModel{ @@ -36,6 +36,7 @@ export class commentListModel extends PageModel{
36 36
37 } 37 }
38 38
  39 +@Observed
39 export class commentItemModel { 40 export class commentItemModel {
40 authorLike: string = '' 41 authorLike: string = ''
41 avatarFrame: string = '' 42 avatarFrame: string = ''
@@ -92,7 +93,7 @@ export class commentItemModel { @@ -92,7 +93,7 @@ export class commentItemModel {
92 targetRelType:string = ''; 93 targetRelType:string = '';
93 targetType:string = ''; 94 targetType:string = '';
94 visitorComment:string = ''; 95 visitorComment:string = '';
95 - shareInfo:commentItemShareInfoModel[] = [] 96 + shareInfo:commentItemShareInfoModel = new commentItemShareInfoModel;
96 // targetId:string = ''; 97 // targetId:string = '';
97 // targetId:string = ''; 98 // targetId:string = '';
98 // targetId:string = ''; 99 // targetId:string = '';
1 import ArrayList from '@ohos.util.ArrayList' 1 import ArrayList from '@ohos.util.ArrayList'
2 import { ViewType } from 'wdConstant/Index'; 2 import { ViewType } from 'wdConstant/Index';
3 -import { LazyDataSource } from 'wdKit/Index'; 3 +import { DateTimeUtils, LazyDataSource } from 'wdKit/Index';
4 import PageModel from '../../../viewmodel/PageModel'; 4 import PageModel from '../../../viewmodel/PageModel';
5 import { commentItemModel, commentListModel, WDPublicUserType } from '../model/CommentModel'; 5 import { commentItemModel, commentListModel, WDPublicUserType } from '../model/CommentModel';
6 import commentViewModel from '../viewmodel/CommentViewModel' 6 import commentViewModel from '../viewmodel/CommentViewModel'
@@ -166,7 +166,9 @@ export struct CommentComponent { @@ -166,7 +166,9 @@ export struct CommentComponent {
166 // ///1小时~1天:x小时前 166 // ///1小时~1天:x小时前
167 // ///1天~2天:1天前 167 // ///1天~2天:1天前
168 // ///2天~:日期隐藏 168 // ///2天~:日期隐藏
169 - Text(item.createTime) 169 +
  170 +
  171 + Text(DateTimeUtils.getCommentTime(Number.parseFloat(item.createTime)))
170 .fontColor($r('app.color.color_B0B0B0')) 172 .fontColor($r('app.color.color_B0B0B0'))
171 .fontSize(12) 173 .fontSize(12)
172 174
1 import { ViewType } from 'wdConstant/Index' 1 import { ViewType } from 'wdConstant/Index'
2 -import { LazyDataSource } from 'wdKit/Index' 2 +import { DateTimeUtils, LazyDataSource, WindowModel } from 'wdKit/Index'
3 import { commentItemModel, commentListModel } from '../model/CommentModel' 3 import { commentItemModel, commentListModel } from '../model/CommentModel'
4 import commentViewModel from '../viewmodel/CommentViewModel' 4 import commentViewModel from '../viewmodel/CommentViewModel'
  5 +import { window } from '@kit.ArkUI'
  6 +
  7 +const TAG = 'QualityCommentsComponent';
5 8
6 @Entry 9 @Entry
7 @Preview 10 @Preview
8 @Component 11 @Component
9 export struct QualityCommentsComponent { 12 export struct QualityCommentsComponent {
  13 + bottomSafeHeight: string = AppStorage.get<number>('bottomSafeHeight') + 'px';
10 @State private browSingModel: commentListModel = new commentListModel() 14 @State private browSingModel: commentListModel = new commentListModel()
11 isloading: boolean = false 15 isloading: boolean = false
  16 + lastWindowColor:string = '#ffffff'
  17 + currentWindowColor:string = '#FF4202'
12 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource(); 18 @State allDatas: LazyDataSource<commentItemModel> = new LazyDataSource();
13 19
  20 + aboutToDisappear(): void {
  21 +
  22 + const windowStage = WindowModel.shared.getWindowStage() as window.WindowStage
  23 + const windowClass: window.Window = windowStage.getMainWindowSync(); // 获取应用主窗口
  24 + windowClass.setWindowBackgroundColor(this.lastWindowColor)
  25 + windowClass.setWindowLayoutFullScreen(false)
  26 + // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' })
  27 +
  28 + }
  29 +
14 aboutToAppear(): void { 30 aboutToAppear(): void {
15 31
16 - commentViewModel.fetchQualityCommentList('1').then((commentListModel)=>{  
17 - if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {  
18 - commentListModel.hasMore = true;  
19 - this.browSingModel.viewType = ViewType.LOADED; 32 + this.fullScreen();
  33 +
  34 +
  35 + commentViewModel.fetchQualityCommentListLocal(getContext()).then(commentListModel => {
20 this.allDatas.push(...commentListModel.list) 36 this.allDatas.push(...commentListModel.list)
21 - if (commentListModel.list.length === this.browSingModel.pageSize) {  
22 - this.browSingModel.currentPage++;  
23 - this.browSingModel.hasMore = true;  
24 - } else {  
25 - this.browSingModel.hasMore = false; 37 + })
  38 +
  39 + // commentViewModel.fetchQualityCommentList('1').then((commentListModel) => {
  40 + // if (commentListModel && commentListModel.list && commentListModel.list.length > 0) {
  41 + // // commentListModel.hasMore = true;
  42 + // // this.browSingModel.viewType = ViewType.LOADED;
  43 + // this.allDatas.push(...commentListModel.list)
  44 + // // if (commentListModel.list.length === this.browSingModel.pageSize) {
  45 + // // this.browSingModel.currentPage++;
  46 + // // this.browSingModel.hasMore = true;
  47 + // // } else {
  48 + // // this.browSingModel.hasMore = false;
  49 + // // }
  50 + // } else {
  51 + // this.browSingModel.viewType = ViewType.EMPTY;
  52 + // }
  53 + // })
26 } 54 }
27 - } else {  
28 - this.browSingModel.viewType = ViewType.EMPTY; 55 +
  56 + fullScreen() {
  57 + const windowStage = WindowModel.shared.getWindowStage() as window.WindowStage
  58 + const windowClass: window.Window = windowStage.getMainWindowSync(); // 获取应用主窗口
  59 + // windowClass.setWindowBackgroundColor(this.currentWindowColor)
  60 + windowClass.setWindowLayoutFullScreen(true)
  61 + // windowClass.setWindowSystemBarProperties({ statusBarColor: '#fff' })
  62 +
  63 + // windowClass.setWindowLayoutFullScreen(true).then(() => {
  64 + // console.log(TAG + 'setWindowLayoutFullScreen');
  65 + // })
  66 +
29 } 67 }
  68 +
  69 + @Builder
  70 + titleHeader() {
  71 + Row() {
  72 + Image($r('app.media.comment_img_banner')).width('100%').aspectRatio(375 / 283);
  73 + }
  74 + }
  75 +
  76 + build() {
  77 + Column() {
  78 + // this.titleHeader()
  79 + List({ space: 28 }) {
  80 + ListItemGroup({ header: this.titleHeader() })
  81 +
  82 + LazyForEach(this.allDatas, (item: commentItemModel, index: number) => {
  83 + ListItem() {
  84 + QualityCommentItem({ item: item }).margin({ left: 12, right: 12 })
  85 + }
  86 + // .offset({
  87 + // y:-87
  88 + // })
30 }) 89 })
31 } 90 }
  91 + // .contentStartOffset(- 87)
  92 + .edgeEffect(EdgeEffect.Spring)
  93 + .margin({bottom:this.bottomSafeHeight})
  94 + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
  95 + }.backgroundColor(this.currentWindowColor).height('100%').width('100%')
  96 + }
  97 +}
  98 +
  99 +
  100 +@Component
  101 +struct QualityCommentItem {
  102 + @ObjectLink item: commentItemModel
32 103
33 build() { 104 build() {
  105 + Column() {
  106 + /*头像以及昵称*/
  107 + RelativeContainer() {
  108 + Image(this.item.fromUserHeader)
  109 + .width(50)
  110 + .height(50)
  111 + .borderRadius(25)
  112 + .borderWidth(2)
  113 + .borderColor(Color.White)
  114 + .id('image1')
  115 + .alignRules({
  116 + top: { anchor: "__container__", align: VerticalAlign.Top },
  117 + left: { anchor: "__container__", align: HorizontalAlign.Start }
  118 + })
  119 + .offset(
  120 + {
  121 + y: -16
  122 + }
  123 + )
  124 + Text(this.item.fromUserName)
  125 + .fontSize(14)
  126 + .fontColor('#222222')
  127 + .fontWeight(FontWeight.Medium)
  128 + .id('text1')
  129 + .alignRules({
  130 + bottom: { anchor: "image1", align: VerticalAlign.Bottom },
  131 + left: { anchor: "image1", align: HorizontalAlign.End }
  132 + })
  133 + .offset(
  134 + {
  135 + x: 6,
  136 + y: -6 - 16
  137 + }
  138 + )
  139 + }.height(42)
  140 +
  141 + Column() {
  142 + /*评论内容*/
  143 + Text() {
  144 + ImageSpan($r('app.media.WDBestCommentTitleDotIcon'))
  145 + .width(12)
  146 + .height(12)
  147 + .objectFit(ImageFit.Fill)
  148 + .offset({
  149 + y: -6
  150 + })
  151 + Span(' ' + this.item.commentContent)
  152 + .fontSize(16)
  153 + .fontColor('#222222')
  154 + .fontWeight(FontWeight.Medium)
  155 + }.margin({ top: 10 })
  156 +
  157 + /*分割线*/
  158 + Row() {
  159 +
  160 + }.width('100%').margin({ top: 10, left: 0, right: 0 }).backgroundColor('#EDEDED').height(2.5);
  161 +
  162 + /*文章或者评论*/
  163 + Row() {
  164 + Row() {
  165 + Image($r('app.media.comment_img_link')).width(16).height(16)
  166 + Text(this.item.shareInfo.shareTitle)
  167 + .fontSize(14)
  168 + .fontColor('#666666')
  169 + .margin({ left: 6, right: 12 })
  170 + .maxLines(1)
  171 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  172 + }.height(40).layoutWeight(1)
  173 +
  174 + Image($r('app.media.more')).width(12).height(12)
  175 +
  176 + }.width('100%').height(40).justifyContent(FlexAlign.SpaceBetween)
  177 +
  178 + }
  179 + .backgroundColor('#F9F9F9')
  180 + .width('100%')
  181 + .alignItems(HorizontalAlign.Start)
  182 + .borderRadius(4)
  183 + .padding({ left: 12, right: 12 })
  184 +
  185 + /*时间 点赞评论*/
  186 + Row() {
  187 +
  188 + Text(DateTimeUtils.getCommentTime(DateTimeUtils.getDateTimestamp(this.item.createTime))).fontSize(14).fontColor('#999999')
  189 +
  190 + Row({space:16}){
  191 + Row(){
  192 + Image($r('app.media.comment_icon_pinglun')).width(16).height(16)
  193 + }
  194 +
  195 + Row(){
  196 + //comment_like_select
  197 + Image($r(this.item.likeNum?'app.media.comment_like_select':'app.media.comment_like_normal')).width(16).height(16)
  198 + if (this.item.likeNum){Text(this.item.likeNum).fontColor(this.item.isLike?'#ED2800':'#999999').fontSize(14).margin({left:3})}
  199 + }
  200 + }
  201 + }.height(38).width('100%').justifyContent(FlexAlign.SpaceBetween)
  202 +
  203 + }.backgroundColor('#FFFFFF').padding({ top: 0, left: 16, right: 16 }).borderRadius(4)
34 204
35 } 205 }
36 } 206 }
@@ -32,7 +32,21 @@ class CommentViewModel { @@ -32,7 +32,21 @@ class CommentViewModel {
32 return compRes.data 32 return compRes.data
33 } 33 }
34 34
  35 + /*获取本地mock数据*/
  36 + async fetchQualityCommentListLocal(context: Context): Promise<commentListModel> {
  37 + Logger.info(TAG, `getBottomNavDataMock start`);
  38 + let compRes: ResponseDTO<commentListModel> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<commentListModel>>(context,'qualityComment_local.json' );
  39 + if (!compRes || !compRes.data) {
  40 + Logger.info(TAG, `getAppointmentListDataLocal compRes is empty`);
  41 + return new commentListModel()
  42 + }
  43 + Logger.info(TAG, `getAppointmentListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  44 + return compRes.data
  45 + }
  46 +
  47 +
35 48
  49 + //qualityComment_local.json
36 fetchQualityCommentList(pageNum: string) { 50 fetchQualityCommentList(pageNum: string) {
37 let url = HttpUrlUtils.getQualityCommentUrl() + `?&pageSize=${10}&pageNum=${pageNum}` 51 let url = HttpUrlUtils.getQualityCommentUrl() + `?&pageSize=${10}&pageNum=${pageNum}`
38 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 52 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
@@ -90,6 +90,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -90,6 +90,7 @@ export struct OtherHomePageBottomCommentComponent{
90 MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{ 90 MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{
91 if (!this.data_comment || value.list.length == 0){ 91 if (!this.data_comment || value.list.length == 0){
92 this.hasMore = false 92 this.hasMore = false
  93 + this.isLoading = false
93 }else{ 94 }else{
94 this.getCommentListStatus(value) 95 this.getCommentListStatus(value)
95 } 96 }
@@ -84,9 +84,13 @@ struct EditUserInfoPage { @@ -84,9 +84,13 @@ struct EditUserInfoPage {
84 Blank() 84 Blank()
85 85
86 Text(r.subTitle) 86 Text(r.subTitle)
  87 + .textOverflow({overflow:TextOverflow.Ellipsis})
  88 + .maxLines(1)
87 .fontSize(16) 89 .fontSize(16)
88 .fontColor(Color.Gray) 90 .fontColor(Color.Gray)
89 .padding({right:10}) 91 .padding({right:10})
  92 + .width('70%')
  93 + .textAlign(TextAlign.End)
90 94
91 Image($r('app.media.mine_user_edit')) 95 Image($r('app.media.mine_user_edit'))
92 .width('12') 96 .width('12')
@@ -130,10 +134,11 @@ struct EditUserInfoPage { @@ -130,10 +134,11 @@ struct EditUserInfoPage {
130 }) 134 })
131 }else if(i === 5){ 135 }else if(i === 5){
132 TextPickerDialog.show({ 136 TextPickerDialog.show({
133 - range:['女','男'], 137 + range:['男','女'],
  138 + canLoop:false,
134 selected:0, 139 selected:0,
135 onAccept:(value:TextPickerResult) => { 140 onAccept:(value:TextPickerResult) => {
136 - this.currentUserInfo.userExtend.sex = value.index as number; 141 + this.currentUserInfo.userExtend.sex = value.index == 0?1:0;
137 this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_sex 142 this.currentUserInfo.editDataType = WDEditDataModelType.WDEditDataModelType_sex
138 this.updateEditModel() 143 this.updateEditModel()
139 } 144 }
@@ -128,7 +128,7 @@ export struct SearchComponent { @@ -128,7 +128,7 @@ export struct SearchComponent {
128 * @param content 128 * @param content
129 */ 129 */
130 getSearchHistoryResData(content:string,index:number){ 130 getSearchHistoryResData(content:string,index:number){
131 - //删除单记录 131 + //删除单记录
132 SearcherAboutDataModel.delSearchSingleHistoryData(index) 132 SearcherAboutDataModel.delSearchSingleHistoryData(index)
133 this.isClickedHistory = true 133 this.isClickedHistory = true
134 this.searchResData(content) 134 this.searchResData(content)
@@ -149,33 +149,6 @@ export struct SearchComponent { @@ -149,33 +149,6 @@ export struct SearchComponent {
149 this.getSearchResultCountData() 149 this.getSearchResultCountData()
150 } 150 }
151 151
152 - getSearchResultCountData() {  
153 - SearcherAboutDataModel.getSearchResultCountData(encodeURI(this.searchText),getContext(this)).then((value) => {  
154 - if (value != null) {  
155 - this.count = []  
156 - if(value.allTotal!=0){  
157 - this.count.push("全部")  
158 - }  
159 - if(value.cmsTotal!=0){  
160 - this.count.push("精选")  
161 - }  
162 - if(value.rmhTotal!=0){  
163 - this.count.push("人民号")  
164 - }  
165 - if(value.videoTotal!=0){  
166 - this.count.push("视频")  
167 - }  
168 - if(value.activityTotal!=0){  
169 - this.count.push("活动")  
170 - }  
171 - }  
172 - }).catch((err: Error) => {  
173 - console.log(TAG, JSON.stringify(err))  
174 - })  
175 - }  
176 -  
177 -  
178 -  
179 /** 152 /**
180 * 点击联想搜索列表回调 153 * 点击联想搜索列表回调
181 * @param content 154 * @param content
@@ -291,4 +264,30 @@ export struct SearchComponent { @@ -291,4 +264,30 @@ export struct SearchComponent {
291 .padding({ left: '31lpx' }) 264 .padding({ left: '31lpx' })
292 .alignItems(VerticalAlign.Center) 265 .alignItems(VerticalAlign.Center)
293 } 266 }
  267 +
  268 +
  269 + getSearchResultCountData() {
  270 + SearcherAboutDataModel.getSearchResultCountData(encodeURI(this.searchText),getContext(this)).then((value) => {
  271 + if (value != null) {
  272 + this.count = []
  273 + if(value.allTotal!=0){
  274 + this.count.push("全部")
  275 + }
  276 + if(value.cmsTotal!=0){
  277 + this.count.push("精选")
  278 + }
  279 + if(value.rmhTotal!=0){
  280 + this.count.push("人民号")
  281 + }
  282 + if(value.videoTotal!=0){
  283 + this.count.push("视频")
  284 + }
  285 + if(value.activityTotal!=0){
  286 + this.count.push("活动")
  287 + }
  288 + }
  289 + }).catch((err: Error) => {
  290 + console.log(TAG, JSON.stringify(err))
  291 + })
  292 + }
294 } 293 }
@@ -20,7 +20,7 @@ export struct SearchResultComponent{ @@ -20,7 +20,7 @@ export struct SearchResultComponent{
20 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { 20 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
21 ForEach(this.count, (item: string, index: number ) => { 21 ForEach(this.count, (item: string, index: number ) => {
22 TabContent(){ 22 TabContent(){
23 - SearchResultContentComponent() 23 + SearchResultContentComponent({keywords:this.searchText,searchType:item})
24 }.tabBar(this.TabBuilder(index,item)) 24 }.tabBar(this.TabBuilder(index,item))
25 }, (item: string, index: number) => index.toString()) 25 }, (item: string, index: number) => index.toString())
26 } 26 }
  1 +import { ContentDTO,
  2 + contentListParams,
  3 + FullColumnImgUrlDTO, InteractDataDTO, RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index'
  4 +import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
  5 +import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
  6 +import { LazyDataSource, StringUtils } from 'wdKit/Index'
  7 +import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
  8 +import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
  9 +import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
  10 +import { CardParser } from '../CardParser'
  11 +import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
  12 +
1 const TAG = "SearchResultContentComponent" 13 const TAG = "SearchResultContentComponent"
2 14
3 @Component 15 @Component
4 export struct SearchResultContentComponent{ 16 export struct SearchResultContentComponent{
  17 + @State keywords:string = ""
  18 + @State searchType:string = ""
  19 + @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
  20 + @State data_rmh: SearchRmhDescription[] = []
  21 + @State count:number = 0;
  22 + @State isLoading:boolean = false
  23 + @State hasMore:boolean = true
  24 + curPageNum:number = 1;
  25 +
5 26
6 aboutToAppear(): void { 27 aboutToAppear(): void {
  28 + if(this.searchType == "全部"){
  29 + this.searchType = "all"
  30 + }else if(this.searchType == "精选"){
  31 + this.searchType = "cms"
  32 + }else if(this.searchType == "人民号"){
  33 + this.searchType = "rmh"
  34 + }else if(this.searchType == "视频"){
  35 + this.searchType = "video"
  36 + }else if(this.searchType == "活动"){
  37 + this.searchType = "activity"
  38 + }
7 39
  40 + this.keywords = encodeURI(this.keywords)
  41 + this.getNewSearchResultData()
8 } 42 }
9 43
  44 + getNewSearchResultData(){
  45 + this.isLoading = true
  46 + if(this.hasMore){
  47 + SearcherAboutDataModel.getSearchResultListData("20",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{
  48 + if (!this.data || value.list.length == 0){
  49 + this.hasMore = false
  50 + this.isLoading = false
  51 + }else{
  52 + if(value.list[0].dataList!=null){
  53 + this.data_rmh = value.list[0].dataList
  54 + //TODO 查询创作者详情接口
10 55
  56 + }
  57 + this.getInteractData(value)
  58 + }
  59 + }).catch((err:Error)=>{
  60 + console.log(TAG,JSON.stringify(err))
  61 + this.isLoading = false
  62 + })
  63 + }
  64 + }
  65 +
  66 + getInteractData(resultData:SearchResultContentData){
  67 + if(resultData.list[0].dataList!=null){
  68 + resultData.list.splice(0,1)
  69 + }
  70 +
  71 + let data : contentListParams = {
  72 + contentList: []
  73 + }
  74 + resultData.list.forEach((item)=>{
  75 + data.contentList.push({
  76 + contentId: item.data.id + '',
  77 + contentType: Number.parseInt(item.data.type)
  78 + })
  79 + })
  80 +
  81 + SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{
  82 + newValue.forEach((item)=>{
  83 + resultData.list.forEach((data)=>{
  84 + if (item.contentId == data.data.id) {
  85 + data.data.collectNum = item.collectNum+""
  86 + data.data.commentNum = item.commentNum+""
  87 + data.data.likeNum = item.likeNum+""
  88 + data.data.readNum = item.readNum+""
  89 + data.data.shareNum = item.shareNum+""
  90 + }
  91 + })
  92 + })
  93 +
  94 + resultData.list.forEach((value)=>{
  95 + let photos:FullColumnImgUrlDTO[] = []
  96 + if(value.data.appStyle === 4){
  97 + value.data.appStyleImages.split("&&").forEach((value)=>{
  98 + photos.push({url:value} as FullColumnImgUrlDTO)
  99 + })
  100 + }
  101 +
  102 + //TODO 48 个赋值
  103 + let contentDTO:ContentDTO = {
  104 + appStyle: value.data.appStyle + "",
  105 + cityCode: value.data.cityCode,
  106 + coverSize: "",
  107 + coverType: -1,
  108 + coverUrl: value.data.appStyleImages.split("&&")[0],
  109 + description: value.data.description,
  110 + districtCode: value.data.districtCode,
  111 + endTime: value.data.endTime,
  112 + hImageUrl: "",
  113 + heatValue: "",
  114 + innerUrl: "",
  115 + landscape: Number.parseInt(value.data.landscape),
  116 + // lengthTime:null,
  117 + linkUrl: value.data.linkUrl,
  118 + openLikes: Number.parseInt(value.data.openLikes),
  119 + openUrl: "",
  120 + pageId: value.data.pageId,
  121 + programAuth: "",
  122 + programId: "",
  123 + programName: "",
  124 + programSource: -1,
  125 + programType: -1,
  126 + provinceCode: value.data.provinceCode,
  127 + showTitleEd: value.data.showTitleEd,
  128 + showTitleIng: value.data.showTitleIng,
  129 + showTitleNo: value.data.showTitleNo,
  130 + startTime: value.data.startTime,
  131 + subType: "",
  132 + subtitle: "",
  133 + title: value.data.title,
  134 + vImageUrl: "",
  135 + screenType: "",
  136 + source: StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName,
  137 + objectId: "",
  138 + objectType: value.data.type,
  139 + channelId: value.data.channelId,
  140 + relId: value.data.relId,
  141 + relType: value.data.relType,
  142 + newsTitle: value.data.titleLiteral,
  143 + publishTime: value.data.publishTime,
  144 + visitorComment: -1,
  145 + fullColumnImgUrls: photos,
  146 + newsSummary: "",
  147 + hasMore: -1,
  148 + slideShows: [],
  149 + voiceInfo: {} as VoiceInfoDTO,
  150 + tagWord: -1,
  151 + isSelect: true,
  152 + rmhInfo: {} as RmhInfoDTO,
  153 + photoNum: -1,
  154 + liveInfo: {} as LiveInfoDTO,
  155 + videoInfo: {
  156 + videoDuration: Number.parseInt(value.data.duration)
  157 + } as VideoInfoDTO,
  158 + interactData: {} as InteractDataDTO,
  159 + corner: '',
  160 + rmhPlatform: 0,
  161 + newTags: '',
  162 + isSearch: true
  163 + }
  164 +
  165 + this.data.push(contentDTO)
  166 + })
  167 + this.data.notifyDataReload()
  168 + this.count = this.data.totalCount()
  169 + if (this.data.totalCount() < resultData.totalCount) {
  170 + this.curPageNum++
  171 + }else {
  172 + this.hasMore = false
  173 + }
  174 + this.isLoading = false
  175 + }).catch((err:Error)=>{
  176 + console.log(TAG,"请求失败")
  177 + this.isLoading = false
  178 + })
  179 + }
11 180
12 build() { 181 build() {
  182 + Column() {
  183 + if(this.count == 0){
  184 + ListHasNoMoreDataUI({style:2})
  185 + }else{
  186 + Column(){
  187 + if (this.data_rmh!=null && this.data_rmh.length > 0) {
  188 + //List
  189 + List() {
  190 + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
  191 + ListItem() {
  192 + Column(){
  193 + Image($r('app.media.default_head'))
  194 + .width('84lpx')
  195 + .height('84lpx')
  196 + .margin({bottom:'15lpx'})
  197 + Text(item.creatorName)
  198 + .fontSize('20lpx')
  199 + }.alignItems(HorizontalAlign.Center)
  200 +
  201 + }.onClick(()=>{
  202 + //TODO 跳转
  203 + })
  204 + .width('150lpx')
  205 + })
  206 + }
  207 + .cachedCount(6)
  208 + .edgeEffect(EdgeEffect.None)
  209 + .scrollBar(BarState.Off)
  210 + .listDirection(Axis.Horizontal)
  211 + .width('100%')
  212 + .height('150lpx')
  213 + .onReachEnd(()=>{
  214 + if(!this.isLoading){
  215 + //进入更多关注页
  216 + }
  217 + })
  218 + }
  219 + //List
  220 + List({ space: '6lpx' }) {
  221 + LazyForEach(this.data, (item: ContentDTO, index: number) => {
  222 + ListItem() {
  223 + Column(){
  224 + CardParser({contentDTO:item})
  225 + if(index != this.data.totalCount()-1 ){
  226 + Divider()
  227 + .width('100%')
  228 + .height('1lpx')
  229 + .color($r('app.color.color_F5F5F5'))
  230 + .strokeWidth('1lpx')
  231 + }
  232 + }
  233 + }
  234 + .onClick(()=>{
  235 + //TODO 跳转
  236 + })
  237 + }, (item: ContentDTO, index: number) => index.toString())
13 238
  239 + //没有更多数据 显示提示
  240 + if(!this.hasMore){
  241 + ListItem(){
  242 + ListHasNoMoreDataUI()
  243 + }
  244 + }
  245 + }.cachedCount(6)
  246 + .edgeEffect(EdgeEffect.None)
  247 + .scrollBar(BarState.Off)
  248 + .margin({top:'23lpx',left:'23lpx',right:'23lpx'})
  249 + .layoutWeight(1)
  250 + .onReachEnd(()=>{
  251 + console.log(TAG,"触底了");
  252 + if(!this.isLoading){
  253 + //加载分页数据
  254 + this.getNewSearchResultData()
  255 + }
  256 + })
  257 + }
  258 + }
  259 + }
  260 + .backgroundColor($r('app.color.white'))
  261 + .height('100%')
  262 + .width('100%')
14 } 263 }
15 } 264 }
1 import { Params } from 'wdBean'; 1 import { Params } from 'wdBean';
2 import { WDRouterPage, WDRouterRule } from 'wdRouter'; 2 import { WDRouterPage, WDRouterRule } from 'wdRouter';
3 -import featureAbility from '@ohos.ability.featureAbility'; 3 +import { EnvironmentCustomDialog } from './EnvironmentCustomDialog';
4 4
5 const TAG = 'AboutPageUI'; 5 const TAG = 'AboutPageUI';
6 6
@@ -9,7 +9,18 @@ export struct AboutPageUI { @@ -9,7 +9,18 @@ export struct AboutPageUI {
9 @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议']; 9 @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议'];
10 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.' 10 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
11 @State version: string = '版本号:v' 11 @State version: string = '版本号:v'
  12 + clickTimes: number = 0
  13 + dialogController: CustomDialogController = new CustomDialogController({
  14 + builder: EnvironmentCustomDialog({
  15 + cancel: () => {
12 16
  17 + },
  18 + confirm: () => {
  19 + }
  20 + }),
  21 + customStyle: true,
  22 + alignment: DialogAlignment.Center
  23 + })
13 24
14 build() { 25 build() {
15 Navigation() { 26 Navigation() {
@@ -19,18 +30,24 @@ export struct AboutPageUI { @@ -19,18 +30,24 @@ export struct AboutPageUI {
19 .title('关于') 30 .title('关于')
20 } 31 }
21 32
22 - aboutToAppear(){ 33 + aboutToAppear() {
23 let context = getContext(); 34 let context = getContext();
24 context.getApplicationContext(); 35 context.getApplicationContext();
25 } 36 }
26 37
27 - @Builder aboutUi() { 38 + @Builder
  39 + aboutUi() {
28 Column() { 40 Column() {
29 Image($r('app.media.setting_about_logo')) 41 Image($r('app.media.setting_about_logo'))
30 .width('278lpx') 42 .width('278lpx')
31 .height('154lpx') 43 .height('154lpx')
32 - .margin({top:'173lpx',bottom:'154lpx'})  
33 - 44 + .margin({ top: '173lpx', bottom: '154lpx' })
  45 + .onClick(() => {
  46 + this.clickTimes++
  47 + if (this.clickTimes > 2) {
  48 + this.dialogController.open()
  49 + }
  50 + })
34 // Row(){ 51 // Row(){
35 // 52 //
36 // }.backgroundColor(Color.Yellow) 53 // }.backgroundColor(Color.Yellow)
@@ -44,19 +61,17 @@ export struct AboutPageUI { @@ -44,19 +61,17 @@ export struct AboutPageUI {
44 // .height('97lpx') 61 // .height('97lpx')
45 62
46 63
47 -  
48 -  
49 - List(){  
50 - ForEach(this.listData, (item:string, index : number) =>{ 64 + List() {
  65 + ForEach(this.listData, (item: string, index: number) => {
51 ListItem() { 66 ListItem() {
52 this.getArrowCell(item, index) 67 this.getArrowCell(item, index)
53 - }.onClick(() =>{ 68 + }.onClick(() => {
54 if (index == 0) { 69 if (index == 0) {
55 - let bean={contentId:"1",pageID:""} as Params  
56 - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean)  
57 - }else{  
58 - let bean={contentId:"2",pageID:""} as Params  
59 - WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage,bean) 70 + let bean = { contentID: "2", pageID: "" } as Params
  71 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
  72 + } else {
  73 + let bean = { contentID: "1", pageID: "" } as Params
  74 + WDRouterRule.jumpWithPage(WDRouterPage.loginProtocolPage, bean)
60 } 75 }
61 }) 76 })
62 }) 77 })
@@ -77,22 +92,21 @@ export struct AboutPageUI { @@ -77,22 +92,21 @@ export struct AboutPageUI {
77 .fontSize('25lpx') 92 .fontSize('25lpx')
78 .textAlign(TextAlign.Center) 93 .textAlign(TextAlign.Center)
79 .fontColor($r("app.color.color_666666")) 94 .fontColor($r("app.color.color_666666"))
80 - .margin({bottom:'31lpx'}) 95 + .margin({ bottom: '31lpx' })
81 96
82 Text(this.message) 97 Text(this.message)
83 .fontSize('19lpx') 98 .fontSize('19lpx')
84 .textAlign(TextAlign.Center) 99 .textAlign(TextAlign.Center)
85 .fontColor($r("app.color.color_999999")) 100 .fontColor($r("app.color.color_999999"))
86 - .margin({bottom:'35lpx'}) 101 + .margin({ bottom: '35lpx' })
87 } 102 }
88 .width('100%') 103 .width('100%')
89 .height('100%') 104 .height('100%')
90 } 105 }
91 106
92 -  
93 -  
94 // 右文字+箭头cell 107 // 右文字+箭头cell
95 - @Builder getArrowCell(item:string, index:number) { 108 + @Builder
  109 + getArrowCell(item: string, index: number) {
96 110
97 Row() { 111 Row() {
98 // 左侧标题 112 // 左侧标题
@@ -109,10 +123,8 @@ export struct AboutPageUI { @@ -109,10 +123,8 @@ export struct AboutPageUI {
109 .justifyContent(FlexAlign.SpaceBetween) 123 .justifyContent(FlexAlign.SpaceBetween)
110 .height('97lpx') 124 .height('97lpx')
111 .width('100%') 125 .width('100%')
112 - .padding({left:'29lpx',right:'29lpx'}) 126 + .padding({ left: '29lpx', right: '29lpx' })
113 } 127 }
114 -  
115 -  
116 } 128 }
117 129
118 130
@@ -17,6 +17,7 @@ import { Router } from '@ohos.arkui.UIContext'; @@ -17,6 +17,7 @@ import { Router } from '@ohos.arkui.UIContext';
17 import promptAction from '@ohos.promptAction'; 17 import promptAction from '@ohos.promptAction';
18 import { LogoutViewModel } from '../../viewmodel/LogoutViewModel'; 18 import { LogoutViewModel } from '../../viewmodel/LogoutViewModel';
19 import { CustomLogoutDialog } from './CustomLogoutDialog'; 19 import { CustomLogoutDialog } from './CustomLogoutDialog';
  20 +import { emitter } from '@kit.BasicServicesKit';
20 21
21 export { SettingPasswordParams } from "wdLogin" 22 export { SettingPasswordParams } from "wdLogin"
22 23
@@ -41,9 +42,11 @@ export struct AccountAndSecurityLayout { @@ -41,9 +42,11 @@ export struct AccountAndSecurityLayout {
41 alignment: DialogAlignment.Center 42 alignment: DialogAlignment.Center
42 }) 43 })
43 44
  45 +
44 aboutToAppear() { 46 aboutToAppear() {
45 // 获取设置页面数据 47 // 获取设置页面数据
46 this.getAccountAndSecurityData() 48 this.getAccountAndSecurityData()
  49 + this.addEmitEvent()
47 } 50 }
48 51
49 async getAccountAndSecurityData() { 52 async getAccountAndSecurityData() {
@@ -56,6 +59,28 @@ export struct AccountAndSecurityLayout { @@ -56,6 +59,28 @@ export struct AccountAndSecurityLayout {
56 59
57 } 60 }
58 61
  62 + addEmitEvent(){
  63 + // 定义一个eventId为1的事件
  64 + let event: emitter.InnerEvent = {
  65 + eventId: 10010
  66 + };
  67 +
  68 + // 收到eventId为1的事件后执行该回调
  69 + let callback = (eventData: emitter.EventData): void => {
  70 + promptAction.showToast({
  71 + message: JSON.stringify(eventData)
  72 + });
  73 + if(eventData&&eventData.data){
  74 + this.listData[0].subTitle = eventData.data['content']
  75 + }
  76 + Logger.debug( 'event callback:' + JSON.stringify(eventData));
  77 + };
  78 +
  79 + // 订阅eventId为1的事件
  80 + emitter.on(event, callback);
  81 +
  82 + }
  83 +
59 build() { 84 build() {
60 Column(){ 85 Column(){
61 if(this.isAccountPage){ 86 if(this.isAccountPage){
@@ -106,7 +131,8 @@ export struct AccountAndSecurityLayout { @@ -106,7 +131,8 @@ export struct AccountAndSecurityLayout {
106 ListItem() { 131 ListItem() {
107 if (item.type == 0) { 132 if (item.type == 0) {
108 Column() { 133 Column() {
109 - this.getArrowCell(item) 134 + // this.getArrowCell(item)
  135 + AccountArrowCell({ item:item})
110 }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center) 136 }.padding({ left: '27lpx' }).height('117lpx').justifyContent(FlexAlign.Center)
111 } else if (item.type == 1) { 137 } else if (item.type == 1) {
112 Column() { 138 Column() {
@@ -285,7 +311,7 @@ export struct AccountAndSecurityLayout { @@ -285,7 +311,7 @@ export struct AccountAndSecurityLayout {
285 }.alignItems(VerticalAlign.Center) 311 }.alignItems(VerticalAlign.Center)
286 312
287 Row() { 313 Row() {
288 - Text("登录") 314 + Text("注销账户")
289 .borderRadius(4) 315 .borderRadius(4)
290 .fontColor(this.protocolState ? "#FFFFFFFF" : "#66FFFFFF") 316 .fontColor(this.protocolState ? "#FFFFFFFF" : "#66FFFFFF")
291 .fontSize(18) 317 .fontSize(18)
@@ -405,3 +431,46 @@ export struct AccountAndSecurityLayout { @@ -405,3 +431,46 @@ export struct AccountAndSecurityLayout {
405 return securityNum; 431 return securityNum;
406 } 432 }
407 } 433 }
  434 +
  435 +@Component
  436 +export struct AccountArrowCell{
  437 + @ObjectLink item: MineMainSettingFunctionItem
  438 + build() {
  439 + Column() {
  440 + Row() {
  441 + // 左侧logo和标题
  442 + Row() {
  443 + // 判断有没有图片
  444 + if (this.item.imgSrc) {
  445 + Image(this.item.imgSrc)
  446 + .height('38lpx')
  447 + .margin({ right: '5lpx' })
  448 + }
  449 + Text(`${this.item.title}`)
  450 + .margin({ top: '8lpx' })
  451 + .height('38lpx')
  452 + .fontColor('#333333')
  453 + .fontSize('29lpx')
  454 + }.width('60%')
  455 +
  456 + // 右侧文案和右箭头
  457 + Row() {
  458 + Text(this.item.subTitle ? this.item.subTitle : '')
  459 + .fontColor('#999999')
  460 + .maxLines(1)
  461 + Image($r('app.media.mine_user_arrow'))
  462 + .width('27lpx')
  463 + .height('27lpx')
  464 + .objectFit(ImageFit.Auto)
  465 + Column().width('29lpx')
  466 + }.width('40%')
  467 + .margin({ right: '29lpx' })
  468 + .justifyContent(FlexAlign.End)
  469 +
  470 + }
  471 + .alignItems(VerticalAlign.Center)
  472 + .justifyContent(FlexAlign.SpaceBetween)
  473 + }
  474 + .height('54lpx')
  475 + }
  476 +}
  1 +import { SPHelper } from 'wdKit/Index';
  2 +import { HttpUrlUtils } from 'wdNetwork/Index';
  3 +
  4 +@CustomDialog
  5 +export struct EnvironmentCustomDialog {
  6 + currentEnvironment: string = HttpUrlUtils.HOST_PRODUCT;
  7 + controller: CustomDialogController
  8 + cancel: () => void = () => {
  9 + }
  10 + confirm: () => void = () => {
  11 + }
  12 +
  13 + build() {
  14 + Column() {
  15 + Text("请选择环境")
  16 + .fontColor("#222222")
  17 + .fontSize(18)
  18 + .width("100%")
  19 + .fontWeight(FontWeight.Bold)
  20 + .textAlign(TextAlign.Center)
  21 + .margin({ top: 20 })
  22 + Row() {
  23 + Radio({ value: 'Radio1', group: 'radioGroup' })
  24 + .checked(true)
  25 + .height(20)
  26 + .width(20)
  27 + .onChange((isChecked: boolean) => {
  28 + if (isChecked) {
  29 + this.currentEnvironment = HttpUrlUtils.HOST_SIT;
  30 + }
  31 + })
  32 + Text('切换到SIT(测试)环境,重启应用生效')
  33 + .fontSize(14)
  34 + }
  35 + .justifyContent(FlexAlign.Start)
  36 + .width('90%')
  37 +
  38 + Row() {
  39 + Radio({ value: 'Radio1', group: 'radioGroup' })
  40 + .checked(true)
  41 + .height(20)
  42 + .width(20)
  43 + .onChange((isChecked: boolean) => {
  44 + if (isChecked) {
  45 + this.currentEnvironment = HttpUrlUtils.HOST_UAT;
  46 + }
  47 + })
  48 + Text('切换到UAT(预发布)环境,重启应用生效')
  49 + .fontSize(14)
  50 + }
  51 + .width('90%')
  52 + .justifyContent(FlexAlign.Start)
  53 +
  54 + Row() {
  55 + Radio({ value: 'Radio1', group: 'radioGroup' })
  56 + .checked(true)
  57 + .height(20)
  58 + .width(20)
  59 + .onChange((isChecked: boolean) => {
  60 + if (isChecked) {
  61 + this.currentEnvironment = HttpUrlUtils.HOST_PRODUCT;
  62 + }
  63 + })
  64 + Text('切换到PROD(现网)环境,重启应用生效')
  65 + .fontSize(14)
  66 + }
  67 + .width('90%')
  68 + .justifyContent(FlexAlign.Start)
  69 +
  70 + Row() {
  71 + Radio({ value: 'Radio1', group: 'radioGroup' })
  72 + .checked(true)
  73 + .height(20)
  74 + .width(20)
  75 + .onChange((isChecked: boolean) => {
  76 + if (isChecked) {
  77 + this.currentEnvironment = HttpUrlUtils.HOST_DEV;
  78 + }
  79 + })
  80 + Text('切换到DEV(开发)环境,重启应用生效')
  81 + .fontSize(14)
  82 + }
  83 + .width('90%')
  84 + .justifyContent(FlexAlign.Start)
  85 +
  86 + Button('确认')
  87 + .margin({ top: 20 })
  88 + .onClick(() => {
  89 + // HttpUrlUtils.hostUrl = this.currentEnvironment
  90 + SPHelper.default.saveSync('hostUrl', this.currentEnvironment);
  91 + this.controller.close()
  92 + this.confirm()
  93 + })
  94 + }.height(261).backgroundColor(Color.White).borderRadius(6).width('74%')
  95 +
  96 + }
  97 +}
@@ -52,8 +52,7 @@ export struct BannerComponent { @@ -52,8 +52,7 @@ export struct BannerComponent {
52 .borderRadius($r('app.float.image_border_radius')) 52 .borderRadius($r('app.float.image_border_radius'))
53 .displayCount(this.buildDisplayCount()) // 仅展示1个图片 53 .displayCount(this.buildDisplayCount()) // 仅展示1个图片
54 .cachedCount(2) 54 .cachedCount(2)
55 - .index(1) // The default index of Swiper.  
56 - .autoPlay(true) 55 + .index(0) // The default index of Swiper.
57 .indicator(Indicator.dot() 56 .indicator(Indicator.dot()
58 .right(5) 57 .right(5)
59 .itemWidth(4) 58 .itemWidth(4)
@@ -22,6 +22,7 @@ export struct FirstLevelComponent { @@ -22,6 +22,7 @@ export struct FirstLevelComponent {
22 Text('暂无数据').fontSize(20) 22 Text('暂无数据').fontSize(20)
23 }else { 23 }else {
24 TextPicker({range:this.labelList,selected:this.select}) 24 TextPicker({range:this.labelList,selected:this.select})
  25 + .canLoop(false)
25 .onChange((value: string | string[], index: number | number[]) => { 26 .onChange((value: string | string[], index: number | number[]) => {
26 this.select = index as number 27 this.select = index as number
27 this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number]) 28 this.currentFirst = EditInfoViewModel.getAreaListManageModel(this.dataSource[index as number])
@@ -15,6 +15,7 @@ export struct SecondLevelComponent { @@ -15,6 +15,7 @@ export struct SecondLevelComponent {
15 Text(this.mTip).fontSize(20) 15 Text(this.mTip).fontSize(20)
16 }else { 16 }else {
17 TextPicker({range:this.labelList,selected:this.select}) 17 TextPicker({range:this.labelList,selected:this.select})
  18 + .canLoop(false)
18 .onChange((value: string | string[], index: number | number[]) => { 19 .onChange((value: string | string[], index: number | number[]) => {
19 this.select = index as number 20 this.select = index as number
20 this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number]) 21 this.currentSecondBean = EditInfoViewModel.getAreaListManageModel(this.currentFirst.children[index as number])
@@ -16,6 +16,7 @@ export struct ThirdLevelComponent { @@ -16,6 +16,7 @@ export struct ThirdLevelComponent {
16 Text(this.mTip).fontSize(20) 16 Text(this.mTip).fontSize(20)
17 }else { 17 }else {
18 TextPicker({range:this.labelList,selected:this.select}) 18 TextPicker({range:this.labelList,selected:this.select})
  19 + .canLoop(false)
19 .onChange((value: string | string[], index: number | number[]) => { 20 .onChange((value: string | string[], index: number | number[]) => {
20 this.select = index as number 21 this.select = index as number
21 this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number]) 22 this.currentThirdBean = EditInfoViewModel.getAreaListManageModel(this.currentSecondBean.children[index as number])
@@ -52,7 +52,7 @@ export interface contentListItemParams{ @@ -52,7 +52,7 @@ export interface contentListItemParams{
52 } 52 }
53 53
54 export interface collcetRecordParams { 54 export interface collcetRecordParams {
55 - delAll?: number; 55 + delAll?: number; //是否全部删除
56 56
57 status?: number; 57 status?: number;
58 58
@@ -5,6 +5,8 @@ import HashMap from '@ohos.util.HashMap'; @@ -5,6 +5,8 @@ import HashMap from '@ohos.util.HashMap';
5 import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem'; 5 import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem';
6 import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem'; 6 import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem';
7 import { SearchResultCountItem } from '../viewmodel/SearchResultCountItem'; 7 import { SearchResultCountItem } from '../viewmodel/SearchResultCountItem';
  8 +import { SearchResultContentData } from '../viewmodel/SearchResultContentData';
  9 +import { contentListParams, InteractDataDTO } from 'wdBean/Index';
8 10
9 const TAG = "SearcherAboutDataModel" 11 const TAG = "SearcherAboutDataModel"
10 12
@@ -35,6 +37,11 @@ class SearcherAboutDataModel{ @@ -35,6 +37,11 @@ class SearcherAboutDataModel{
35 public async putSearchHistoryData(content:string){ 37 public async putSearchHistoryData(content:string){
36 let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string 38 let history = SPHelper.default.getSync(this.SEARCH_HISTORY_KEY,"[]") as string
37 this.searchHistoryData = JSON.parse(history) 39 this.searchHistoryData = JSON.parse(history)
  40 + this.searchHistoryData.forEach((element,index) => {
  41 + if (element.searchContent == content) {
  42 + this.searchHistoryData.splice(index,1)
  43 + }
  44 + });
38 this.searchHistoryData.splice(0,0,new SearchHistoryItem(content)) 45 this.searchHistoryData.splice(0,0,new SearchHistoryItem(content))
39 await SPHelper.default.saveSync(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistoryData)); 46 await SPHelper.default.saveSync(this.SEARCH_HISTORY_KEY, JSON.stringify(this.searchHistoryData));
40 } 47 }
@@ -76,6 +83,8 @@ class SearcherAboutDataModel{ @@ -76,6 +83,8 @@ class SearcherAboutDataModel{
76 if(this.searchHistoryData.length>10){ 83 if(this.searchHistoryData.length>10){
77 this.searchHistoryData.splice(10,this.searchHistoryData.length - 10) 84 this.searchHistoryData.splice(10,this.searchHistoryData.length - 10)
78 } 85 }
  86 + // this.putSearchHistoryData("大家")
  87 + // this.putSearchHistoryData("人民")
79 88
80 return this.searchHistoryData 89 return this.searchHistoryData
81 } 90 }
@@ -234,6 +243,83 @@ class SearcherAboutDataModel{ @@ -234,6 +243,83 @@ class SearcherAboutDataModel{
234 return compRes.data 243 return compRes.data
235 } 244 }
236 245
  246 + /**
  247 + * 搜索结果 展示列表
  248 + */
  249 + getSearchResultListData(pageSize:string,pageNum:string,searchType:string,keyword:string,context: Context): Promise<SearchResultContentData> {
  250 + return new Promise<SearchResultContentData>((success, error) => {
  251 + Logger.info(TAG, `getSearchResultListData start`);
  252 + this.fetchSearchResultListData(pageSize,pageNum,searchType,keyword).then((navResDTO: ResponseDTO<SearchResultContentData>) => {
  253 + if (!navResDTO || navResDTO.code != 0) {
  254 + success(this.getSearchResultListDataLocal(context))
  255 + return
  256 + }
  257 + Logger.info(TAG, "getSearchResultListData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
  258 + let navigationBean = navResDTO.data as SearchResultContentData
  259 + success(navigationBean);
  260 + }).catch((err: Error) => {
  261 + Logger.error(TAG, `getSearchResultListData catch, error.name : ${err.name}, error.message:${err.message}`);
  262 + success(this.getSearchResultListDataLocal(context))
  263 + })
  264 + })
  265 + }
  266 +
  267 + fetchSearchResultListData(pageSize:string,pageNum:string,searchType:string,keyword:string) {
  268 + let url = HttpUrlUtils.getSearchResultListDataUrl() + `?pageSize=${pageSize}&pageNum=${pageNum}&searchType=${searchType}&keyword=${keyword}`
  269 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  270 + return WDHttp.get<ResponseDTO<SearchResultContentData>>(url, headers)
  271 + };
  272 +
  273 + async getSearchResultListDataLocal(context: Context): Promise<SearchResultContentData> {
  274 + Logger.info(TAG, `getSearchResultListDataLocal start`);
  275 + let compRes: ResponseDTO<SearchResultContentData> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<SearchResultContentData>>(context,'search_result_list_data.json' );
  276 + if (!compRes || !compRes.data) {
  277 + Logger.info(TAG, `getSearchResultListDataLocal compRes is empty`);
  278 + return new SearchResultContentData()
  279 + }
  280 + Logger.info(TAG, `getSearchResultListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  281 + return compRes.data
  282 + }
  283 +
  284 + /**
  285 + * 搜索结果 展示列表(交互详情 评论收藏点赞分享数量)
  286 + */
  287 + getInteractListData(data : contentListParams,context: Context): Promise<InteractDataDTO[]> {
  288 + return new Promise<InteractDataDTO[]>((success, error) => {
  289 + Logger.info(TAG, `getInteractListData start`);
  290 + this.fetchInteractListData(data).then((navResDTO: ResponseDTO<InteractDataDTO[]>) => {
  291 + if (!navResDTO || navResDTO.code != 0) {
  292 + success(this.getInteractListDataLocal(context))
  293 + return
  294 + }
  295 + Logger.info(TAG, "getInteractListData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
  296 + let navigationBean = navResDTO.data as InteractDataDTO[]
  297 + success(navigationBean);
  298 + }).catch((err: Error) => {
  299 + Logger.error(TAG, `getInteractListData catch, error.name : ${err.name}, error.message:${err.message}`);
  300 + success(this.getInteractListDataLocal(context))
  301 + })
  302 + })
  303 + }
  304 +
  305 + fetchInteractListData(data : contentListParams) {
  306 + let url = HttpUrlUtils.getInteractListDataUrl()
  307 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  308 + return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url,data, headers)
  309 + };
  310 +
  311 + async getInteractListDataLocal(context: Context): Promise<InteractDataDTO[]> {
  312 + Logger.info(TAG, `getInteractListDataLocal start`);
  313 + let compRes: ResponseDTO<InteractDataDTO[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<InteractDataDTO[]>>(context,'search_result_interact_list_data.json' );
  314 + if (!compRes || !compRes.data) {
  315 + Logger.info(TAG, `getInteractListDataLocal compRes is empty`);
  316 + return []
  317 + }
  318 + Logger.info(TAG, `getInteractListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  319 + return compRes.data
  320 + }
  321 +
  322 +
237 } 323 }
238 324
239 const searcherAboutDataModel = SearcherAboutDataModel.getInstance() 325 const searcherAboutDataModel = SearcherAboutDataModel.getInstance()
@@ -4,6 +4,7 @@ import { SearchResultContentItem } from './SearchResultContentItem' @@ -4,6 +4,7 @@ import { SearchResultContentItem } from './SearchResultContentItem'
4 export class SearchResultContentData{ 4 export class SearchResultContentData{
5 list:SearchResultContentItem[] = [] 5 list:SearchResultContentItem[] = []
6 6
  7 +
7 keyword:string = "" 8 keyword:string = ""
8 pageNum: number = 0 9 pageNum: number = 0
9 pageSize: number = 20 10 pageSize: number = 20
1 -import { ContentDTO } from 'wdBean/Index'  
2 1
3 -export interface SearchResultContentItem{  
4 - data:ContentDTO  
5 - resultType:string 2 +export class SearchResultContentItem{
  3 + data:SearchDescription = new SearchDescription()
  4 + dataList:SearchRmhDescription[] = []
  5 + resultType:string = ""
  6 +}
  7 +
  8 +class SearchDescription{
  9 + likeEnable: string = ""
  10 + previewUri: string = ""
  11 + firstFrameImageBucket: string = ""
  12 + appImg: string = ""
  13 + onlineStatus: string = ""
  14 + createUserName: string = ""
  15 + contentCheck: string = ""
  16 + type: string = ""
  17 + titleOsst: string = ""
  18 + coverHImageBucket: string = ""
  19 + shareImageUri: string = ""
  20 + searchTypeInt: string = ""
  21 + authIcon: string = ""
  22 + id: string = ""
  23 + newOld: string = ""
  24 + seoTags: string = ""
  25 + publishTime: string = ""
  26 + feedControl: string = ""
  27 + saveType: string = ""
  28 + userTypeInt: string = ""
  29 + userOrigin: string = ""
  30 + creatorType: string = ""
  31 + planStartTime: string = ""
  32 + waresSwitch: string = ""
  33 + introductionLiteral: string = ""
  34 + topicType: string = ""
  35 + hotFlag: string = ""
  36 + coverUrl: string = ""
  37 + itemId: string = ""
  38 + titleEn: string = ""
  39 + matrixId: string = ""
  40 + tplId: string = ""
  41 + joinActivity: string = ""
  42 + status: string = ""
  43 + headerPhotoUrl: string = ""
  44 + zhSearch: string = ""
  45 + activityControl: string = ""
  46 + city: string = ""
  47 + showTitleIng: string = ""
  48 + shareFlag: string = ""
  49 + creatorName: string = ""
  50 + className: string = ""
  51 + showTitleNo: string = ""
  52 + liveSwitch: string = ""
  53 + likesStyle: string = ""
  54 + dataKey: string = ""
  55 + search: string = ""
  56 + puserId: string = ""
  57 + top: string = ""
  58 + titleLiteral: string = ""
  59 + countryCode: string = ""
  60 + startTime: string = ""
  61 + shareDescription: string = ""
  62 + channelId: string = ""
  63 + openComment: string = ""
  64 + creatorClassify: string = ""
  65 + previewBucket: string = ""
  66 + picCount: string = ""
  67 + recommendControl: string = ""
  68 + creatorNameLiteral: string = ""
  69 + subjects: string = ""
  70 + updateUser: string = ""
  71 + i: string = ""
  72 + updateTime: string = ""
  73 + userId: string = ""
  74 + showTitleEd: string = ""
  75 + authTo: string = ""
  76 + rmhPlatformInt: string = ""
  77 + giftEnable: string = ""
  78 + titleEnosst: string = ""
  79 + shareCoverUrl: string = ""
  80 + deleted: string = ""
  81 + zhOperateFlag: string = ""
  82 + shareTitle: string = ""
  83 + scrollUpdated: string = ""
  84 + createTime: string = ""
  85 + creatorBan: string = ""
  86 + publishTimeInt: string = ""
  87 + organization: string = ""
  88 + channelName: string = ""
  89 + createUser: string = ""
  90 + currentPoliticsFlag: string = ""
  91 + endTime: string = ""
  92 + sourceId: string = ""
  93 + country: string = ""
  94 + secondClassify: string = ""
  95 + createUserId: string = ""
  96 + firstFrameImageUri: string = ""
  97 + pubTime: string = ""
  98 + openLikes: string = ""
  99 + contentText: string = ""
  100 + relType: string = ""
  101 + authImg: string = ""
  102 + roomId: string = ""
  103 + nameLiteral: string = ""
  104 + mainControl: string = ""
  105 + coverVImageBucket: string = ""
  106 + linkUrl: string = ""
  107 + openDownload: string = ""
  108 + zhChannelPageImg: string = ""
  109 + appStandImg: string = ""
  110 + shareSummary: string = ""
  111 + firstPublishTimeInt: string = ""
  112 + rmhPlatform: string = ""
  113 + creatorNameOsst: string = ""
  114 + searchType: string = ""
  115 + author: string = ""
  116 + askAnswerFlag: string = ""
  117 + seoTagName: string = ""
  118 + weight: string = ""
  119 + pageId: string = ""
  120 + firstPublishTime: string = ""
  121 + coverVImageUri: string = ""
  122 + publishType: string = ""
  123 + isVr: string = ""
  124 + name: string = ""
  125 + shareUrl: string = ""
  126 + userType: string = ""
  127 + firstProcessTime: string = ""
  128 + hasRecord: string = ""
  129 + shareTitleOsst: string = ""
  130 + classify: string = ""
  131 + itemType: string = ""
  132 + nameOsst: string = ""
  133 + districtCode: string = ""
  134 + hidden: string = ""
  135 + cityCode: string = ""
  136 + liveType: string = ""
  137 + appStyleImages: string = ""
  138 + titleShow: string = ""
  139 + cornerMark: string = ""
  140 + creatorId: string = ""
  141 + levelScore: string = ""
  142 + description: string = ""
  143 + liveStartTime: string = ""
  144 + likeStyle: string = ""
  145 + title: string = ""
  146 + content: string = ""
  147 + platform: string = ""
  148 + duration: string = "0"
  149 + shareDescriptionLiteral: string = ""
  150 + createTimeInt: string = ""
  151 + liveEndTime: string = ""
  152 + topicTemplate: string = ""
  153 + barrageEnable: string = ""
  154 + introduction: string = ""
  155 + notice: string = ""
  156 + shareTitleLiteral: string = ""
  157 + coverHImageUri: string = ""
  158 + relId: string = ""
  159 + classCode: string = ""
  160 + grayScale: string = ""
  161 + appStyle: number = -1
  162 + authTitle: string = ""
  163 + provinceCode: string = ""
  164 + tenancy: string = ""
  165 + platformId: string = ""
  166 + classSubName: string = ""
  167 + recommended: string = ""
  168 + descriptionLiteral: string = ""
  169 + banControl: string = ""
  170 + auditingStatus: string = ""
  171 + planEndTime: string = ""
  172 + speakControl: string = ""
  173 + sourceName: string = ""
  174 + shareImageBucket: string = ""
  175 + landscape: string = ""
  176 + collectNum: string = ""
  177 + commentNum: string = ""
  178 + likeNum: string= ""
  179 + readNum: string= ""
  180 + shareNum: string= ""
  181 +
  182 +}
6 183
  184 +export class SearchRmhDescription{
  185 + likeEnable: string= ""
  186 + previewUri: string= ""
  187 + firstFrameImageBucket: string= ""
  188 + appImg: string= ""
  189 + onlineStatus: string= ""
  190 + createUserName: string= ""
  191 + contentCheck: string= ""
  192 + type: string= ""
  193 + titleOsst: string= ""
  194 + coverHImageBucket: string= ""
  195 + shareImageUri: string= ""
  196 + searchTypeInt: string= ""
  197 + authIcon: string= ""
  198 + id: string= ""
  199 + newOld: string= ""
  200 + seoTags: string= ""
  201 + publishTime: string= ""
  202 + feedControl: string= ""
  203 + saveType: string= ""
  204 + userTypeInt: string= ""
  205 + userOrigin: string= ""
  206 + creatorType: string= ""
  207 + planStartTime: string= ""
  208 + waresSwitch: string= ""
  209 + introductionLiteral: string= ""
  210 + topicType: string= ""
  211 + hotFlag: string= ""
  212 + coverUrl: string= ""
  213 + itemId: string= ""
  214 + titleEn: string= ""
  215 + matrixId: string= ""
  216 + tplId: string= ""
  217 + joinActivity: string= ""
  218 + status: string= ""
  219 + headerPhotoUrl: string= ""
  220 + zhSearch: string= ""
  221 + activityControl: string= ""
  222 + city: string= ""
  223 + showTitleIng: string= ""
  224 + shareFlag: string= ""
  225 + creatorName: string= ""
  226 + className: string= ""
  227 + showTitleNo: string= ""
  228 + liveSwitch: string= ""
  229 + likesStyle: string= ""
  230 + dataKey: string= ""
  231 + search: string= ""
  232 + puserId: string= ""
  233 + top: string= ""
  234 + titleLiteral: string= ""
  235 + countryCode: string= ""
  236 + startTime: string= ""
  237 + shareDescription: string= ""
  238 + channelId: string= ""
  239 + openComment: string= ""
  240 + creatorClassify: string= ""
  241 + previewBucket: string= ""
  242 + picCount: string= ""
  243 + recommendControl: string= ""
  244 + creatorNameLiteral: string= ""
  245 + subjects: string= ""
  246 + updateUser: string= ""
  247 + i: string= ""
  248 + updateTime: string= ""
  249 + userId: string= ""
  250 + showTitleEd: string= ""
  251 + authTo: string= ""
  252 + rmhPlatformInt: string= ""
  253 + giftEnable: string= ""
  254 + titleEnosst: string= ""
  255 + shareCoverUrl: string= ""
  256 + deleted: string= ""
  257 + zhOperateFlag: string= ""
  258 + shareTitle: string= ""
  259 + scrollUpdated: string= ""
  260 + createTime: string= ""
  261 + creatorBan: string= ""
  262 + publishTimeInt: string= ""
  263 + organization: string= ""
  264 + channelName: string= ""
  265 + createUser: string= ""
  266 + currentPoliticsFlag: string= ""
  267 + endTime: string= ""
  268 + sourceId: string= ""
  269 + country: string= ""
  270 + secondClassify: string= ""
  271 + createUserId: string= ""
  272 + firstFrameImageUri: string= ""
  273 + pubTime: string= ""
  274 + openLikes: string= ""
  275 + contentText: string= ""
  276 + relType: string= ""
  277 + authImg: string= ""
  278 + roomId: string= ""
  279 + nameLiteral: string= ""
  280 + mainControl: string= ""
  281 + coverVImageBucket: string= ""
  282 + linkUrl: string= ""
  283 + openDownload: string= ""
  284 + zhChannelPageImg: string= ""
  285 + appStandImg: string= ""
  286 + shareSummary: string= ""
  287 + firstPublishTimeInt: string= ""
  288 + rmhPlatform: string= ""
  289 + creatorNameOsst: string= ""
  290 + searchType: string= ""
  291 + author: string= ""
  292 + askAnswerFlag: string= ""
  293 + seoTagName: string= ""
  294 + weight: string= ""
  295 + pageId: string= ""
  296 + firstPublishTime: string= ""
  297 + coverVImageUri: string= ""
  298 + publishType: string= ""
  299 + isVr: string= ""
  300 + name: string= ""
  301 + shareUrl: string= ""
  302 + userType: string= ""
  303 + firstProcessTime: string= ""
  304 + hasRecord: string= ""
  305 + shareTitleOsst: string= ""
  306 + classify: string= ""
  307 + itemType: string= ""
  308 + nameOsst: string= ""
  309 + districtCode: string= ""
  310 + hidden: string= ""
  311 + cityCode: string= ""
  312 + liveType: string= ""
  313 + appStyleImages: string= ""
  314 + titleShow: string= ""
  315 + cornerMark: string= ""
  316 + creatorId: string= ""
  317 + levelScore: string= ""
  318 + description: string= ""
  319 + liveStartTime: string= ""
  320 + likeStyle: string= ""
  321 + title: string= ""
  322 + content: string= ""
  323 + platform: string= ""
  324 + duration: string= ""
  325 + shareDescriptionLiteral: string= ""
  326 + createTimeInt: string= ""
  327 + liveEndTime: string= ""
  328 + topicTemplate: string= ""
  329 + barrageEnable: string= ""
  330 + introduction: string= ""
  331 + notice: string= ""
  332 + shareTitleLiteral: string= ""
  333 + coverHImageUri: string= ""
  334 + relId: string= ""
  335 + classCode: string= ""
  336 + grayScale: string= ""
  337 + appStyle: string= ""
  338 + authTitle: string= ""
  339 + provinceCode: string= ""
  340 + tenancy: string= ""
  341 + platformId: string= ""
  342 + classSubName: string= ""
  343 + recommended: string= ""
  344 + descriptionLiteral: string= ""
  345 + banControl: string= ""
  346 + auditingStatus: string= ""
  347 + planEndTime: string= ""
  348 + speakControl: string= ""
  349 + sourceName: string= ""
  350 + shareImageBucket: string= ""
  351 + landscape: string= ""
7 } 352 }
@@ -7,7 +7,9 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/ @@ -7,7 +7,9 @@ import { Params } from '../../../../../../../commons/wdRouter/oh_modules/wdBean/
7 import { WDRouterRule, WDRouterPage } from 'wdRouter'; 7 import { WDRouterRule, WDRouterPage } from 'wdRouter';
8 import { SettingPasswordParams } from './SettingPasswordLayout' 8 import { SettingPasswordParams } from './SettingPasswordLayout'
9 import { Router } from '@ohos.arkui.UIContext' 9 import { Router } from '@ohos.arkui.UIContext'
10 -import { ToastUtils } from 'wdKit/Index' 10 +import { SPHelper, ToastUtils } from 'wdKit/Index'
  11 +import { SpConstants } from 'wdConstant/Index'
  12 +import { emitter } from '@kit.BasicServicesKit'
11 13
12 14
13 const TAG = 'ForgetPasswordPage' 15 const TAG = 'ForgetPasswordPage'
@@ -147,7 +149,34 @@ struct ForgetPasswordPage { @@ -147,7 +149,34 @@ struct ForgetPasswordPage {
147 } 149 }
148 this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{ 150 this.loginViewModel.changeBindPhone(this.phoneContent,this.codeContent).then(()=>{
149 ToastUtils.shortToast('绑定成功') 151 ToastUtils.shortToast('绑定成功')
  152 + this.querySecurity()
  153 + })
  154 + }
  155 +
  156 + querySecurity(){
  157 + this.loginViewModel.querySecurity().then(()=>{
  158 + SPHelper.default.save(SpConstants.USER_PHONE,this.phoneContent)
  159 + this.sendEmitEvent()
150 router.back() 160 router.back()
  161 + }).catch(()=>{
  162 +
151 }) 163 })
152 } 164 }
  165 +
  166 + sendEmitEvent(){
  167 + // 定义一个eventId为1的事件,事件优先级为Low
  168 + let event: emitter.InnerEvent = {
  169 + eventId: 10010,
  170 + priority: emitter.EventPriority.LOW
  171 + };
  172 +
  173 + let eventData: emitter.EventData = {
  174 + data: {
  175 + content: this.phoneContent,
  176 + }
  177 + };
  178 +
  179 + // 发送eventId为1的事件,事件内容为eventData
  180 + emitter.emit(event, eventData);
  181 + }
153 } 182 }
@@ -71,11 +71,11 @@ export class LoginModel { @@ -71,11 +71,11 @@ export class LoginModel {
71 return new Promise<LoginBean>((success, fail) => { 71 return new Promise<LoginBean>((success, fail) => {
72 HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => { 72 HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
73 Logger.debug("LoginViewModel:success2 ", data.message) 73 Logger.debug("LoginViewModel:success2 ", data.message)
74 - if (!data || !data.data) { 74 + if (!data) {
75 fail("数据为空") 75 fail("数据为空")
76 return 76 return
77 } 77 }
78 - if (data.code != 0) { 78 + if (!data.data||data.code != 0) {
79 fail(data.message) 79 fail(data.message)
80 return 80 return
81 } 81 }
@@ -99,11 +99,11 @@ export class LoginModel { @@ -99,11 +99,11 @@ export class LoginModel {
99 return new Promise<LoginBean>((success, fail) => { 99 return new Promise<LoginBean>((success, fail) => {
100 HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => { 100 HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.getAppLoginUrl(), bean, headers).then((data: ResponseDTO<LoginBean>) => {
101 Logger.debug("LoginViewModel:success2 ", data.message) 101 Logger.debug("LoginViewModel:success2 ", data.message)
102 - if (!data || !data.data) { 102 + if (!data) {
103 fail("数据为空") 103 fail("数据为空")
104 return 104 return
105 } 105 }
106 - if (data.code != 0) { 106 + if (!data.data||data.code != 0) {
107 fail(data.message) 107 fail(data.message)
108 return 108 return
109 } 109 }
@@ -268,10 +268,10 @@ export class LoginModel { @@ -268,10 +268,10 @@ export class LoginModel {
268 let bean: Record<string, Object> = {}; 268 let bean: Record<string, Object> = {};
269 bean['phone'] = phone 269 bean['phone'] = phone
270 bean['verifyCode'] = verificationCode 270 bean['verifyCode'] = verificationCode
271 - return new Promise<LoginBean>((success, fail) => {  
272 - HttpRequest.post<ResponseDTO<LoginBean>>(HttpUrlUtils.changeBindPhone(), bean, headers).then((data: ResponseDTO<LoginBean>) => { 271 + return new Promise<object>((success, fail) => {
  272 + HttpRequest.post<ResponseDTO<object>>(HttpUrlUtils.changeBindPhone(), bean, headers).then((data: ResponseDTO<object>) => {
273 Logger.debug("LoginViewModel:success2 ", data.message) 273 Logger.debug("LoginViewModel:success2 ", data.message)
274 - if (!data || !data.data) { 274 + if (!data) {
275 fail("数据为空") 275 fail("数据为空")
276 return 276 return
277 } 277 }
@@ -279,7 +279,29 @@ export class LoginModel { @@ -279,7 +279,29 @@ export class LoginModel {
279 fail(data.message) 279 fail(data.message)
280 return 280 return
281 } 281 }
282 - success(data.data) 282 + success(data)
  283 + }, (error: Error) => {
  284 + fail(error.message)
  285 + Logger.debug("LoginViewModel:error2 ", error.toString())
  286 + })
  287 + })
  288 + }
  289 +
  290 + /**获取用户安全页信息*/
  291 + querySecurity(){
  292 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  293 + return new Promise<object>((success, fail) => {
  294 + HttpRequest.get<ResponseDTO<object>>(HttpUrlUtils.querySecurity(), headers).then((data: ResponseDTO<object>) => {
  295 + Logger.debug("LoginViewModel:success2 ", data.message)
  296 + if (!data) {
  297 + fail("数据为空")
  298 + return
  299 + }
  300 + if (data.code != 0) {
  301 + fail(data.message)
  302 + return
  303 + }
  304 + success(data)
283 }, (error: Error) => { 305 }, (error: Error) => {
284 fail(error.message) 306 fail(error.message)
285 Logger.debug("LoginViewModel:error2 ", error.toString()) 307 Logger.debug("LoginViewModel:error2 ", error.toString())
@@ -312,6 +312,8 @@ struct LoginPage { @@ -312,6 +312,8 @@ struct LoginPage {
312 url: `${WDRouterPage.getBundleInfo()}` 312 url: `${WDRouterPage.getBundleInfo()}`
313 } 313 }
314 ) 314 )
  315 + }).catch((error:string)=>{
  316 + promptAction.showToast({ message: error })
315 }) 317 })
316 } else { 318 } else {
317 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => { 319 this.loginViewModel.appLoginByPassword(this.accountContent, 0, this.passwordContent, "").then((data) => {
@@ -14,18 +14,22 @@ struct LoginProtocolWebview { @@ -14,18 +14,22 @@ struct LoginProtocolWebview {
14 webviewController: webview.WebviewController = new webview.WebviewController() 14 webviewController: webview.WebviewController = new webview.WebviewController()
15 userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html" 15 userProtocol = "https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1005.html"
16 privateProtocol = 'https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1001.html' 16 privateProtocol = 'https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1001.html'
  17 + logoutProtocol = 'https://cdnpeoplefrontuat.aikan.pdnews.cn/rmrb/rmrb-protocol-zh-web/0.0.1/app/protocol-1003.html'
17 18
18 async aboutToAppear() { 19 async aboutToAppear() {
19 if (router.getParams()) { 20 if (router.getParams()) {
20 let params = router.getParams() as Params 21 let params = router.getParams() as Params
21 Logger.info(TAG, 'params.contentID:' + params.contentID); 22 Logger.info(TAG, 'params.contentID:' + params.contentID);
22 - if (params.contentID == "1") {  
23 - this.webUrl = await SPHelper.default.get(SpConstants.USER_PROTOCOL, this.userProtocol) as string 23 + if (params.contentID == "1") { //"人民日报客户端网络服务使用协议"
  24 + this.webUrl = await SPHelper.default.get(SpConstants.NET_SERVICE_PROTOCOL, this.userProtocol) as string
24 this.webviewController.loadUrl(this.webUrl) 25 this.webviewController.loadUrl(this.webUrl)
25 26
26 - } else { 27 + } else if(params.contentID == "2"){ //"人民日报客户端用户隐私协议"
27 this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string 28 this.webUrl = await SPHelper.default.get(SpConstants.PRIVATE_PROTOCOL, this.privateProtocol) as string
28 this.webviewController.loadUrl(this.webUrl) 29 this.webviewController.loadUrl(this.webUrl)
  30 + }else if(params.contentID == "3"){ //注销协议
  31 + this.webUrl = await SPHelper.default.get(SpConstants.LOGOUT_PROTOCOL, this.logoutProtocol) as string
  32 + this.webviewController.loadUrl(this.webUrl)
29 } 33 }
30 } 34 }
31 35
@@ -59,8 +59,8 @@ export class LoginViewModel { @@ -59,8 +59,8 @@ export class LoginViewModel {
59 HttpUrlUtils.setUserType(data.userType+"") 59 HttpUrlUtils.setUserType(data.userType+"")
60 HttpUrlUtils.setUserToken(data.jwtToken) 60 HttpUrlUtils.setUserToken(data.jwtToken)
61 success(data) 61 success(data)
62 - }).catch(() => {  
63 - fail() 62 + }).catch((error:string) => {
  63 + fail(error)
64 }) 64 })
65 }) 65 })
66 } 66 }
@@ -169,8 +169,8 @@ export class LoginViewModel { @@ -169,8 +169,8 @@ export class LoginViewModel {
169 } 169 }
170 170
171 changeBindPhone(phone: string, verificationCode: string) { 171 changeBindPhone(phone: string, verificationCode: string) {
172 - return new Promise<LoginBean>((success, fail) => {  
173 - this.loginModel.changeBindPhone(phone, verificationCode).then((data: LoginBean) => { 172 + return new Promise<object>((success, fail) => {
  173 + this.loginModel.changeBindPhone(phone, verificationCode).then((data: object) => {
174 success(data) 174 success(data)
175 }).catch(() => { 175 }).catch(() => {
176 fail() 176 fail()
@@ -178,7 +178,15 @@ export class LoginViewModel { @@ -178,7 +178,15 @@ export class LoginViewModel {
178 }) 178 })
179 } 179 }
180 180
181 - 181 + querySecurity(){
  182 + return new Promise<object>((success, fail) => {
  183 + this.loginModel.querySecurity().then((data: object) => {
  184 + success(data)
  185 + }).catch(() => {
  186 + fail()
  187 + })
  188 + })
  189 + }
182 190
183 async doMd(content: string): Promise<string> { 191 async doMd(content: string): Promise<string> {
184 let mdAlgName = 'SHA256'; // 摘要算法名 192 let mdAlgName = 'SHA256'; // 摘要算法名
@@ -4,8 +4,8 @@ import UIAbility from '@ohos.app.ability.UIAbility'; @@ -4,8 +4,8 @@ import UIAbility from '@ohos.app.ability.UIAbility';
4 import Want from '@ohos.app.ability.Want'; 4 import Want from '@ohos.app.ability.Want';
5 import window from '@ohos.window'; 5 import window from '@ohos.window';
6 import { registerRouter } from 'wdRouter'; 6 import { registerRouter } from 'wdRouter';
7 -import { SPHelper, WindowModel } from 'wdKit';  
8 -import { WDHttp } from 'wdNetwork' 7 +import { SPHelper, StringUtils, WindowModel } from 'wdKit';
  8 +import { HttpUrlUtils, WDHttp } from 'wdNetwork';
9 9
10 export default class EntryAbility extends UIAbility { 10 export default class EntryAbility extends UIAbility {
11 onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { 11 onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
@@ -13,6 +13,10 @@ export default class EntryAbility extends UIAbility { @@ -13,6 +13,10 @@ export default class EntryAbility extends UIAbility {
13 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); 13 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
14 registerRouter(); 14 registerRouter();
15 WDHttp.initHttpHeader() 15 WDHttp.initHttpHeader()
  16 + const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string
  17 + if (StringUtils.isNotEmpty(spHostUrl)) {
  18 + HttpUrlUtils.hostUrl = spHostUrl
  19 + }
16 } 20 }
17 21
18 onDestroy(): void { 22 onDestroy(): void {
@@ -23,9 +23,19 @@ export class LaunchModel { @@ -23,9 +23,19 @@ export class LaunchModel {
23 //保存数据 23 //保存数据
24 for (let i = 0; i < data.data.length; i++) { 24 for (let i = 0; i < data.data.length; i++) {
25 if (data.data[i].type == 1) { 25 if (data.data[i].type == 1) {
26 - SPHelper.default.save(SpConstants.USER_PROTOCOL, data.data[i].linkUrl) 26 + SPHelper.default.save(SpConstants.NET_SERVICE_PROTOCOL, data.data[i].linkUrl)
27 } else if (data.data[i].type == 2) { 27 } else if (data.data[i].type == 2) {
28 SPHelper.default.save(SpConstants.PRIVATE_PROTOCOL, data.data[i].linkUrl) 28 SPHelper.default.save(SpConstants.PRIVATE_PROTOCOL, data.data[i].linkUrl)
  29 + }else if (data.data[i].type == 4) {
  30 + SPHelper.default.save(SpConstants.LOGOUT_PROTOCOL, data.data[i].linkUrl)
  31 + }else if (data.data[i].type == 5) {
  32 + SPHelper.default.save(SpConstants.MESSAGE_BOARD_USER_PROTOCOL, data.data[i].linkUrl)
  33 + }else if (data.data[i].type == 6) {
  34 + SPHelper.default.save(SpConstants.MESSAGE_BOARD_NOTICE_PROTOCOL, data.data[i].linkUrl)
  35 + }else if (data.data[i].type == 7) {
  36 + SPHelper.default.save(SpConstants.MESSAGE_BOARD_QUESTION_PROTOCOL, data.data[i].linkUrl)
  37 + }else if (data.data[i].type == 8) {
  38 + SPHelper.default.save(SpConstants.MESSAGE_BOARD_PRIVATE_PROTOCOL, data.data[i].linkUrl)
29 } 39 }
30 } 40 }
31 41
  1 +{
  2 + "code": "0",
  3 + "data": {
  4 + "hasNext": 1,
  5 + "list": [{
  6 + "authorLike": 0,
  7 + "avatarFrame": "",
  8 + "checkStatus": 2,
  9 + "commentContent": "好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主好棒的号主",
  10 + "commentContentSensitive": "",
  11 + "commentLevel": 1,
  12 + "commentPics": "",
  13 + "commentSensitive": "",
  14 + "commentType": "2",
  15 + "contentAuthor": 0,
  16 + "createTime": "2024-04-15 14:23:10",
  17 + "creatorFlag": 0,
  18 + "fromCreatorId": "",
  19 + "fromUserHeader": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20220101/a_661756798214074368.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  20 + "fromUserId": "522455831285125",
  21 + "fromUserName": "新志说",
  22 + "fromUserType": 1,
  23 + "h5Url": "",
  24 + "highQualityExpireTime": "2024-04-15T18:32:32+0800",
  25 + "highQualityTime": "2024-04-12T18:32:32+0800",
  26 + "id": 57148720,
  27 + "likeNum": 0,
  28 + "mySelf": 0,
  29 + "pageId": null,
  30 + "parentId": -1,
  31 + "region": "北京",
  32 + "replyNum": 0,
  33 + "rootCommentId": 57148720,
  34 + "sensitiveExist": 0,
  35 + "sensitiveShow": 1,
  36 + "shareInfo": {
  37 + "shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240320/a_955037763411898368.jpeg",
  38 + "shareSummary": "苏东坡的家风里藏着怎样的精神原力?",
  39 + "shareTitle": "苏东坡的家风里藏着怎样的精神原力?",
  40 + "shareUrl": "https://people.pdnews.cn/rmhvideo/30043985346"
  41 + },
  42 + "targetId": "30043985346",
  43 + "targetRelId": "",
  44 + "targetRelObjectId": "",
  45 + "targetRelType": null,
  46 + "targetStatus": 0,
  47 + "targetTitle": "苏东坡的家风里藏着怎样的精神原力?",
  48 + "targetType": 1,
  49 + "toUserContentAuthor": 0,
  50 + "toUserName": "",
  51 + "topFlag": 0,
  52 + "topicType": null,
  53 + "uuid": "267385e2-f333-422a-9552-e67d2043845c",
  54 + "visitorComment": 1
  55 + }, {
  56 + "authorLike": 0,
  57 + "avatarFrame": "",
  58 + "checkStatus": 2,
  59 + "commentContent": "啦啦啦啦",
  60 + "commentContentSensitive": "",
  61 + "commentLevel": 1,
  62 + "commentPics": "",
  63 + "commentSensitive": "",
  64 + "commentType": "2",
  65 + "contentAuthor": 0,
  66 + "createTime": "2024-04-13 14:45:14",
  67 + "creatorFlag": 0,
  68 + "fromCreatorId": "",
  69 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/null20240322/1681921291/1711108111670.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  70 + "fromUserId": "574601020679237",
  71 + "fromUserName": "Zirui",
  72 + "fromUserType": 1,
  73 + "h5Url": "",
  74 + "highQualityExpireTime": "2024-04-15T18:32:27+0800",
  75 + "highQualityTime": "2024-04-12T18:32:27+0800",
  76 + "id": 57027343,
  77 + "likeNum": 0,
  78 + "mySelf": 0,
  79 + "pageId": null,
  80 + "parentId": -1,
  81 + "region": "北京",
  82 + "replyNum": 0,
  83 + "rootCommentId": 57027343,
  84 + "sensitiveExist": 0,
  85 + "sensitiveShow": 1,
  86 + "shareInfo": {
  87 + "shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240330/a_958638228225650688.png",
  88 + "shareSummary": "黄金地块!昌平今年计划供应这7宗住宅用地",
  89 + "shareTitle": "黄金地块!昌平今年计划供应这7宗住宅用地",
  90 + "shareUrl": "https://people.pdnews.cn/rmharticle/30044144003"
  91 + },
  92 + "targetId": "30044144003",
  93 + "targetRelId": "",
  94 + "targetRelObjectId": "",
  95 + "targetRelType": null,
  96 + "targetStatus": 0,
  97 + "targetTitle": "黄金地块!昌平今年计划供应这7宗住宅用地",
  98 + "targetType": 8,
  99 + "toUserContentAuthor": 0,
  100 + "toUserName": "",
  101 + "topFlag": 0,
  102 + "topicType": null,
  103 + "uuid": "b41ba843-f2ff-47e6-8a97-3f70e50b094c",
  104 + "visitorComment": 1
  105 + }, {
  106 + "authorLike": 0,
  107 + "avatarFrame": "",
  108 + "checkStatus": 2,
  109 + "commentContent": "大家好",
  110 + "commentContentSensitive": "",
  111 + "commentLevel": 1,
  112 + "commentPics": "",
  113 + "commentSensitive": "",
  114 + "commentType": "2",
  115 + "contentAuthor": 0,
  116 + "createTime": "2024-04-02 16:05:12",
  117 + "creatorFlag": 1,
  118 + "fromCreatorId": "2495230",
  119 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/vod/content/202404/20240402152130124/mpi.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  120 + "fromUserId": "488915066770949",
  121 + "fromUserName": "极目新闻客户端",
  122 + "fromUserType": 2,
  123 + "h5Url": "",
  124 + "highQualityExpireTime": "2024-04-15T18:32:24+0800",
  125 + "highQualityTime": "2024-04-12T18:32:24+0800",
  126 + "id": 57003773,
  127 + "likeNum": 0,
  128 + "mySelf": 0,
  129 + "pageId": null,
  130 + "parentId": -1,
  131 + "region": "北京",
  132 + "replyNum": 0,
  133 + "rootCommentId": 57003773,
  134 + "sensitiveExist": 0,
  135 + "sensitiveShow": 1,
  136 + "shareInfo": {
  137 + "shareCoverUrl": "",
  138 + "shareSummary": "人民日报,有品质的新闻",
  139 + "shareTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
  140 + "shareUrl": "https://people.pdnews.cn/column/30002004812-500000215456"
  141 + },
  142 + "targetId": "30002004812",
  143 + "targetRelId": "500000215456",
  144 + "targetRelObjectId": "2017",
  145 + "targetRelType": 1,
  146 + "targetStatus": 0,
  147 + "targetTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
  148 + "targetType": 8,
  149 + "toUserContentAuthor": 0,
  150 + "toUserName": "",
  151 + "topFlag": 0,
  152 + "topicType": null,
  153 + "uuid": "045fbe86-7227-447a-a9ea-d991d4c4bb02",
  154 + "visitorComment": 1
  155 + }, {
  156 + "authorLike": 0,
  157 + "avatarFrame": "",
  158 + "checkStatus": 2,
  159 + "commentContent": "大家好",
  160 + "commentContentSensitive": "",
  161 + "commentLevel": 1,
  162 + "commentPics": "",
  163 + "commentSensitive": "",
  164 + "commentType": "2",
  165 + "contentAuthor": 0,
  166 + "createTime": "2024-04-02 16:04:54",
  167 + "creatorFlag": 1,
  168 + "fromCreatorId": "2495230",
  169 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn/vod/content/202404/20240402152130124/mpi.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  170 + "fromUserId": "488915066770949",
  171 + "fromUserName": "极目新闻客户端",
  172 + "fromUserType": 2,
  173 + "h5Url": "",
  174 + "highQualityExpireTime": "2024-04-15T18:32:19+0800",
  175 + "highQualityTime": "2024-04-12T18:32:19+0800",
  176 + "id": 57003731,
  177 + "likeNum": 0,
  178 + "mySelf": 0,
  179 + "pageId": null,
  180 + "parentId": -1,
  181 + "region": "北京",
  182 + "replyNum": 0,
  183 + "rootCommentId": 57003731,
  184 + "sensitiveExist": 0,
  185 + "sensitiveShow": 1,
  186 + "shareInfo": {
  187 + "shareCoverUrl": "",
  188 + "shareSummary": "人民日报,有品质的新闻",
  189 + "shareTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
  190 + "shareUrl": "https://people.pdnews.cn/column/30002004812-500000215456"
  191 + },
  192 + "targetId": "30002004812",
  193 + "targetRelId": "500000215456",
  194 + "targetRelObjectId": "2017",
  195 + "targetRelType": 1,
  196 + "targetStatus": 0,
  197 + "targetTitle": "探索营养新高度 三只小牛推出功能牛奶系列新品",
  198 + "targetType": 8,
  199 + "toUserContentAuthor": 0,
  200 + "toUserName": "",
  201 + "topFlag": 0,
  202 + "topicType": null,
  203 + "uuid": "e98533d4-832c-46fc-b6c8-fcfbcf8dec81",
  204 + "visitorComment": 1
  205 + }, {
  206 + "authorLike": 0,
  207 + "avatarFrame": "",
  208 + "checkStatus": 2,
  209 + "commentContent": "😉",
  210 + "commentContentSensitive": "",
  211 + "commentLevel": 1,
  212 + "commentPics": "",
  213 + "commentSensitive": "",
  214 + "commentType": "2",
  215 + "contentAuthor": 0,
  216 + "createTime": "2024-04-02 09:27:37",
  217 + "creatorFlag": 0,
  218 + "fromCreatorId": "",
  219 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024010916/61A1BB7793074AEFA58F1A6B629B0575.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  220 + "fromUserId": "507102106399685",
  221 + "fromUserName": "小土豆",
  222 + "fromUserType": 1,
  223 + "h5Url": "http://people.pdnews.cn/h/audiotopic/21622-10000002141",
  224 + "highQualityExpireTime": "2024-04-15T18:32:17+0800",
  225 + "highQualityTime": "2024-04-12T18:32:17+0800",
  226 + "id": 56897011,
  227 + "likeNum": 0,
  228 + "mySelf": 0,
  229 + "pageId": 21622,
  230 + "parentId": -1,
  231 + "region": "上海",
  232 + "replyNum": 0,
  233 + "rootCommentId": 56897011,
  234 + "sensitiveExist": 0,
  235 + "sensitiveShow": 1,
  236 + "shareInfo": {
  237 + "shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/upload/seminar_img/201808/rmrb_60441534322948.png",
  238 + "shareSummary": "经典文章",
  239 + "shareTitle": "夜读",
  240 + "shareUrl": "http://people.pdnews.cn/audiotopic/21622-10000002141"
  241 + },
  242 + "targetId": "10000002141",
  243 + "targetRelId": "",
  244 + "targetRelObjectId": "",
  245 + "targetRelType": null,
  246 + "targetStatus": 0,
  247 + "targetTitle": "夜读",
  248 + "targetType": 5,
  249 + "toUserContentAuthor": 0,
  250 + "toUserName": "",
  251 + "topFlag": 0,
  252 + "topicType": 22,
  253 + "uuid": "4dad103a-de92-4db8-9ee4-9c1bb294ea69",
  254 + "visitorComment": 1
  255 + }, {
  256 + "authorLike": 0,
  257 + "avatarFrame": "",
  258 + "checkStatus": 2,
  259 + "commentContent": "2",
  260 + "commentContentSensitive": "",
  261 + "commentLevel": 1,
  262 + "commentPics": "",
  263 + "commentSensitive": "",
  264 + "commentType": "2",
  265 + "contentAuthor": 0,
  266 + "createTime": "2024-04-02 08:59:00",
  267 + "creatorFlag": 0,
  268 + "fromCreatorId": "",
  269 + "fromUserHeader": "https://rmrbcmsonline.peopleapp.com/upload/user_app/202403/rmrb_MqZfPsdm1711510425.jpg?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  270 + "fromUserId": "497856912963077",
  271 + "fromUserName": "李冉冉",
  272 + "fromUserType": 1,
  273 + "h5Url": "",
  274 + "highQualityExpireTime": "2024-04-15T18:32:13+0800",
  275 + "highQualityTime": "2024-04-12T18:32:13+0800",
  276 + "id": 56896568,
  277 + "likeNum": 0,
  278 + "mySelf": 0,
  279 + "pageId": null,
  280 + "parentId": -1,
  281 + "region": "安徽",
  282 + "replyNum": 0,
  283 + "rootCommentId": 56896568,
  284 + "sensitiveExist": 0,
  285 + "sensitiveShow": 1,
  286 + "shareInfo": {
  287 + "shareCoverUrl": "",
  288 + "shareSummary": "人民日报,有品质的新闻",
  289 + "shareTitle": "尺素金声丨净息差20年来最低,背后是银行让利实体经济",
  290 + "shareUrl": "https://people.pdnews.cn/column/30044175615-500005272796"
  291 + },
  292 + "targetId": "30044175615",
  293 + "targetRelId": "500005272796",
  294 + "targetRelObjectId": "2002",
  295 + "targetRelType": 1,
  296 + "targetStatus": 0,
  297 + "targetTitle": "尺素金声丨净息差20年来最低,背后是银行让利实体经济",
  298 + "targetType": 8,
  299 + "toUserContentAuthor": 0,
  300 + "toUserName": "",
  301 + "topFlag": 0,
  302 + "topicType": null,
  303 + "uuid": "959e017c-b84b-4ff3-ae58-0df0e8a14dcc",
  304 + "visitorComment": 1
  305 + }, {
  306 + "authorLike": 0,
  307 + "avatarFrame": "",
  308 + "checkStatus": 2,
  309 + "commentContent": "我中午",
  310 + "commentContentSensitive": "",
  311 + "commentLevel": 1,
  312 + "commentPics": "",
  313 + "commentSensitive": "",
  314 + "commentType": "2",
  315 + "contentAuthor": 0,
  316 + "createTime": "2024-04-01 14:22:48",
  317 + "creatorFlag": 0,
  318 + "fromCreatorId": "",
  319 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  320 + "fromUserId": "574444396143685",
  321 + "fromUserName": "人民日报网友2Ai3yZ",
  322 + "fromUserType": 1,
  323 + "h5Url": "",
  324 + "highQualityExpireTime": "2024-04-15T18:32:09+0800",
  325 + "highQualityTime": "2024-04-12T18:32:09+0800",
  326 + "id": 56792967,
  327 + "likeNum": 1,
  328 + "mySelf": 0,
  329 + "pageId": null,
  330 + "parentId": -1,
  331 + "region": "安徽",
  332 + "replyNum": 0,
  333 + "rootCommentId": 56792967,
  334 + "sensitiveExist": 0,
  335 + "sensitiveShow": 1,
  336 + "shareInfo": {
  337 + "shareCoverUrl": "https://rmrbcmsonline.peopleapp.com/rb_recsys/img/2024/0328/647894_957794402615422976.jpeg",
  338 + "shareSummary": "人民日报,有品质的新闻",
  339 + "shareTitle": "日本小林制药称已有4人因服用其含红曲成分保健品而死亡",
  340 + "shareUrl": "https://people.pdnews.cn/rmharticle/30044103222"
  341 + },
  342 + "targetId": "30044103222",
  343 + "targetRelId": "",
  344 + "targetRelObjectId": "",
  345 + "targetRelType": null,
  346 + "targetStatus": 0,
  347 + "targetTitle": "日本小林制药称已有4人因服用其含红曲成分保健品而死亡",
  348 + "targetType": 8,
  349 + "toUserContentAuthor": 0,
  350 + "toUserName": "",
  351 + "topFlag": 0,
  352 + "topicType": null,
  353 + "uuid": "591871f2-bddf-4dae-9e6e-a003e1f6e718",
  354 + "visitorComment": 1
  355 + }, {
  356 + "authorLike": 0,
  357 + "avatarFrame": "",
  358 + "checkStatus": 2,
  359 + "commentContent": "你好",
  360 + "commentContentSensitive": "",
  361 + "commentLevel": 1,
  362 + "commentPics": "",
  363 + "commentSensitive": "",
  364 + "commentType": "2",
  365 + "contentAuthor": 0,
  366 + "createTime": "2024-04-01 14:22:12",
  367 + "creatorFlag": 0,
  368 + "fromCreatorId": "",
  369 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  370 + "fromUserId": "574444396143685",
  371 + "fromUserName": "人民日报网友2Ai3yZ",
  372 + "fromUserType": 1,
  373 + "h5Url": "",
  374 + "highQualityExpireTime": "2024-04-15T18:26:14+0800",
  375 + "highQualityTime": "2024-04-12T18:26:14+0800",
  376 + "id": 56882995,
  377 + "likeNum": 0,
  378 + "mySelf": 0,
  379 + "pageId": null,
  380 + "parentId": -1,
  381 + "region": "安徽",
  382 + "replyNum": 0,
  383 + "rootCommentId": 56882995,
  384 + "sensitiveExist": 0,
  385 + "sensitiveShow": 1,
  386 + "shareInfo": {
  387 + "shareCoverUrl": "",
  388 + "shareSummary": "努力过好当下,让每一个今天的自己,都比昨天有进步,就是对人生最大的敬意。",
  389 + "shareTitle": "2024年进度条:■■■□□□□□□□□□",
  390 + "shareUrl": "https://people.pdnews.cn/column/30044157156-500005269319"
  391 + },
  392 + "targetId": "30044157156",
  393 + "targetRelId": "500005269319",
  394 + "targetRelObjectId": "2003",
  395 + "targetRelType": 1,
  396 + "targetStatus": 0,
  397 + "targetTitle": "2024年进度条:■■■□□□□□□□□□",
  398 + "targetType": 13,
  399 + "toUserContentAuthor": 0,
  400 + "toUserName": "",
  401 + "topFlag": 0,
  402 + "topicType": null,
  403 + "uuid": "6562a44e-5010-4691-9c06-a31d4dd24b80",
  404 + "visitorComment": 1
  405 + }, {
  406 + "authorLike": 0,
  407 + "avatarFrame": "",
  408 + "checkStatus": 2,
  409 + "commentContent": "你晚上",
  410 + "commentContentSensitive": "",
  411 + "commentLevel": 1,
  412 + "commentPics": "",
  413 + "commentSensitive": "",
  414 + "commentType": "2",
  415 + "contentAuthor": 0,
  416 + "createTime": "2024-04-01 14:22:25",
  417 + "creatorFlag": 0,
  418 + "fromCreatorId": "",
  419 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  420 + "fromUserId": "574444396143685",
  421 + "fromUserName": "人民日报网友2Ai3yZ",
  422 + "fromUserType": 1,
  423 + "h5Url": "",
  424 + "highQualityExpireTime": "2024-04-15T18:26:09+0800",
  425 + "highQualityTime": "2024-04-12T18:26:09+0800",
  426 + "id": 56883010,
  427 + "likeNum": 0,
  428 + "mySelf": 0,
  429 + "pageId": null,
  430 + "parentId": -1,
  431 + "region": "安徽",
  432 + "replyNum": 0,
  433 + "rootCommentId": 56883010,
  434 + "sensitiveExist": 0,
  435 + "sensitiveShow": 1,
  436 + "shareInfo": {
  437 + "shareCoverUrl": "",
  438 + "shareSummary": "行业的健康发展,不能对消费者玩“套路”,凭借质量取胜才是王道。",
  439 + "shareTitle": "微短剧付费“无底洞”跌进了谁",
  440 + "shareUrl": "https://people.pdnews.cn/column/30044103669-500005258426"
  441 + },
  442 + "targetId": "30044103669",
  443 + "targetRelId": "500005258426",
  444 + "targetRelObjectId": "2003",
  445 + "targetRelType": 1,
  446 + "targetStatus": 0,
  447 + "targetTitle": "微短剧付费“无底洞”跌进了谁",
  448 + "targetType": 8,
  449 + "toUserContentAuthor": 0,
  450 + "toUserName": "",
  451 + "topFlag": 0,
  452 + "topicType": null,
  453 + "uuid": "2d16b876-b311-49a7-aa46-c3cf631a992e",
  454 + "visitorComment": 1
  455 + }, {
  456 + "authorLike": 0,
  457 + "avatarFrame": "",
  458 + "checkStatus": 2,
  459 + "commentContent": "外婆企图",
  460 + "commentContentSensitive": "",
  461 + "commentLevel": 1,
  462 + "commentPics": "",
  463 + "commentSensitive": "",
  464 + "commentType": "2",
  465 + "contentAuthor": 0,
  466 + "createTime": "2024-04-01 14:22:37",
  467 + "creatorFlag": 0,
  468 + "fromCreatorId": "",
  469 + "fromUserHeader": "https://cdnjdphoto.aikan.pdnews.cn//zhbj/img/user/2024040114/133af3190cd84eb7a5e70c4c23071881.png?x-oss-process=image/resize,l_100/auto-orient,1/quality,q_90/format,jpg",
  470 + "fromUserId": "574444396143685",
  471 + "fromUserName": "人民日报网友2Ai3yZ",
  472 + "fromUserType": 1,
  473 + "h5Url": "",
  474 + "highQualityExpireTime": "2024-04-15T18:26:05+0800",
  475 + "highQualityTime": "2024-04-12T18:26:05+0800",
  476 + "id": 56792966,
  477 + "likeNum": 0,
  478 + "mySelf": 0,
  479 + "pageId": null,
  480 + "parentId": -1,
  481 + "region": "安徽",
  482 + "replyNum": 0,
  483 + "rootCommentId": 56792966,
  484 + "sensitiveExist": 0,
  485 + "sensitiveShow": 1,
  486 + "shareInfo": {
  487 + "shareCoverUrl": "",
  488 + "shareSummary": "说话的艺术,说到底就是生活的艺术。",
  489 + "shareTitle": "学会这三种说话方式,受益无穷",
  490 + "shareUrl": "https://people.pdnews.cn/column/30044115488-500005262017"
  491 + },
  492 + "targetId": "30044115488",
  493 + "targetRelId": "500005262017",
  494 + "targetRelObjectId": "2003",
  495 + "targetRelType": 1,
  496 + "targetStatus": 0,
  497 + "targetTitle": "学会这三种说话方式,受益无穷",
  498 + "targetType": 13,
  499 + "toUserContentAuthor": 0,
  500 + "toUserName": "",
  501 + "topFlag": 0,
  502 + "topicType": null,
  503 + "uuid": "dcc25c99-8e27-42fc-aa29-861beec958f2",
  504 + "visitorComment": 1
  505 + }],
  506 + "pageNum": 1,
  507 + "pageSize": 10,
  508 + "totalCommentNum": 0,
  509 + "totalCount": 16
  510 + },
  511 + "message": "Success",
  512 + "meta": null,
  513 + "requestId": "",
  514 + "success": true,
  515 + "timestamp": 1713162597102
  516 +}
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "collectNum": 1,
  6 + "commentNum": 1,
  7 + "contentId": "30044118767",
  8 + "contentType": 8,
  9 + "likeNum": 20,
  10 + "readNum": 7839,
  11 + "shareNum": 1
  12 + },
  13 + {
  14 + "collectNum": 0,
  15 + "commentNum": 0,
  16 + "contentId": "30043914123",
  17 + "contentType": 8,
  18 + "likeNum": 20,
  19 + "readNum": 4986,
  20 + "shareNum": 2
  21 + },
  22 + {
  23 + "collectNum": 0,
  24 + "commentNum": 0,
  25 + "contentId": "30044329241",
  26 + "contentType": 8,
  27 + "likeNum": 0,
  28 + "readNum": 416,
  29 + "shareNum": 0
  30 + },
  31 + {
  32 + "collectNum": 0,
  33 + "commentNum": 2,
  34 + "contentId": "30044323528",
  35 + "contentType": 8,
  36 + "likeNum": 3,
  37 + "readNum": 1139,
  38 + "shareNum": 4
  39 + },
  40 + {
  41 + "collectNum": 0,
  42 + "commentNum": 0,
  43 + "contentId": "30044318896",
  44 + "contentType": 8,
  45 + "likeNum": 0,
  46 + "readNum": 1266,
  47 + "shareNum": 1
  48 + },
  49 + {
  50 + "collectNum": 11,
  51 + "commentNum": 13,
  52 + "contentId": "30044318735",
  53 + "contentType": 8,
  54 + "likeNum": 12,
  55 + "readNum": 3842,
  56 + "shareNum": 0
  57 + },
  58 + {
  59 + "collectNum": 0,
  60 + "commentNum": 0,
  61 + "contentId": "30044303875",
  62 + "contentType": 8,
  63 + "likeNum": 0,
  64 + "readNum": 2689,
  65 + "shareNum": 0
  66 + },
  67 + {
  68 + "collectNum": 0,
  69 + "commentNum": 0,
  70 + "contentId": "30044210715",
  71 + "contentType": 8,
  72 + "likeNum": 0,
  73 + "readNum": 173,
  74 + "shareNum": 0
  75 + },
  76 + {
  77 + "collectNum": 0,
  78 + "commentNum": 0,
  79 + "contentId": "30002401426",
  80 + "contentType": 8,
  81 + "likeNum": 0,
  82 + "readNum": 9002,
  83 + "shareNum": 1
  84 + },
  85 + {
  86 + "collectNum": 0,
  87 + "commentNum": 0,
  88 + "contentId": "30044297214",
  89 + "contentType": 8,
  90 + "likeNum": 20,
  91 + "readNum": 3079,
  92 + "shareNum": 6
  93 + },
  94 + {
  95 + "collectNum": 0,
  96 + "commentNum": 0,
  97 + "contentId": "30002735426",
  98 + "contentType": 8,
  99 + "likeNum": 0,
  100 + "readNum": 3816,
  101 + "shareNum": 0
  102 + },
  103 + {
  104 + "collectNum": 5,
  105 + "commentNum": 1,
  106 + "contentId": "30002891779",
  107 + "contentType": 8,
  108 + "likeNum": 2,
  109 + "readNum": 30474,
  110 + "shareNum": 4
  111 + },
  112 + {
  113 + "collectNum": 0,
  114 + "commentNum": 4,
  115 + "contentId": "30044242849",
  116 + "contentType": 8,
  117 + "likeNum": 4,
  118 + "readNum": 1099,
  119 + "shareNum": 4
  120 + },
  121 + {
  122 + "collectNum": 0,
  123 + "commentNum": 0,
  124 + "contentId": "30044064967",
  125 + "contentType": 8,
  126 + "likeNum": 9,
  127 + "readNum": 63139,
  128 + "shareNum": 5
  129 + },
  130 + {
  131 + "collectNum": 0,
  132 + "commentNum": 0,
  133 + "contentId": "30044214313",
  134 + "contentType": 8,
  135 + "likeNum": 1,
  136 + "readNum": 5966,
  137 + "shareNum": 1
  138 + },
  139 + {
  140 + "collectNum": 0,
  141 + "commentNum": 0,
  142 + "contentId": "30044174144",
  143 + "contentType": 8,
  144 + "likeNum": 20,
  145 + "readNum": 5150,
  146 + "shareNum": 0
  147 + },
  148 + {
  149 + "collectNum": 0,
  150 + "commentNum": 0,
  151 + "contentId": "30044036728",
  152 + "contentType": 8,
  153 + "likeNum": 20,
  154 + "readNum": 4217,
  155 + "shareNum": 0
  156 + },
  157 + {
  158 + "collectNum": 3,
  159 + "commentNum": 0,
  160 + "contentId": "30044123091",
  161 + "contentType": 8,
  162 + "likeNum": 20,
  163 + "readNum": 16697,
  164 + "shareNum": 0
  165 + },
  166 + {
  167 + "collectNum": 0,
  168 + "commentNum": 0,
  169 + "contentId": "30044055254",
  170 + "contentType": 8,
  171 + "likeNum": 20,
  172 + "readNum": 11551,
  173 + "shareNum": 0
  174 + },
  175 + {
  176 + "collectNum": 0,
  177 + "commentNum": 0,
  178 + "contentId": "30043994115",
  179 + "contentType": 8,
  180 + "likeNum": 0,
  181 + "readNum": 2370,
  182 + "shareNum": 3
  183 + }
  184 + ],
  185 + "message": "Success",
  186 + "meta": null,
  187 + "requestId": "",
  188 + "success": true,
  189 + "timestamp": 1712889166521
  190 +}
This diff could not be displayed because it is too large.