liyubing

Merge remote-tracking branch 'origin/main'

Showing 33 changed files with 1831 additions and 324 deletions
@@ -20,10 +20,18 @@ export class SpConstants{ @@ -20,10 +20,18 @@ export class SpConstants{
20 static MESSAGE_BOARD_PRIVATE_PROTOCOL = "message_board_private_protocol" //"留言板-隐私政策" 20 static MESSAGE_BOARD_PRIVATE_PROTOCOL = "message_board_private_protocol" //"留言板-隐私政策"
21 //设置页面 21 //设置页面
22 static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关 22 static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关
23 - static SETTING_WIFI_VIDEO_SWITCH = "setting_wifi_switch" //wifi 视频开关 23 + static SETTING_WIFI_VIDEO_SWITCH = "setting_video_switch" //wifi 视频开关
24 static SETTING_SUSPENSION_SWITCH = "setting_suspension_switch" //悬浮窗 开关 24 static SETTING_SUSPENSION_SWITCH = "setting_suspension_switch" //悬浮窗 开关
25 static SETTING_PUSH_SWITCH = "setting_push_switch" //推送 开关 25 static SETTING_PUSH_SWITCH = "setting_push_switch" //推送 开关
26 26
27 //未登录保存兴趣标签 27 //未登录保存兴趣标签
28 static PUBLICVISUTORMODE_INTERESTTAGS = 'PublicVisitorMode_InterestTags' 28 static PUBLICVISUTORMODE_INTERESTTAGS = 'PublicVisitorMode_InterestTags'
  29 +
  30 + //定位相关
  31 + static LOCATION_CITY_NAME = "location_city_name" //定位
  32 + static LOCATION_CITY_CODE = "location_city_code" //定位
  33 +
  34 + //启动页数据存储key
  35 + static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
  36 +
29 } 37 }
@@ -43,3 +43,9 @@ export { ErrorToastUtils } from './src/main/ets/utils/ErrorToastUtils' @@ -43,3 +43,9 @@ export { ErrorToastUtils } from './src/main/ets/utils/ErrorToastUtils'
43 export { EmitterUtils } from './src/main/ets/utils/EmitterUtils' 43 export { EmitterUtils } from './src/main/ets/utils/EmitterUtils'
44 44
45 export { EmitterEventId } from './src/main/ets/utils/EmitterEventId' 45 export { EmitterEventId } from './src/main/ets/utils/EmitterEventId'
  46 +
  47 +export { NetworkUtil } from './src/main/ets/utils/NetworkUtil'
  48 +
  49 +export { NetworkManager } from './src/main/ets/network/NetworkManager'
  50 +
  51 +export { NetworkType } from './src/main/ets/network/NetworkType'
  1 +import connection from '@ohos.net.connection';
  2 +import { BusinessError } from '@ohos.base';
  3 +import { Logger } from '../utils/Logger';
  4 +import { EmitterUtils } from '../utils/EmitterUtils';
  5 +import { EmitterEventId } from '../utils/EmitterEventId';
  6 +import { NetworkType } from './NetworkType';
  7 +
  8 +const TAG = 'NetworkManager'
  9 +
  10 +/**
  11 + * 网络管理类
  12 + */
  13 +export class NetworkManager {
  14 + private netCon: connection.NetConnection | null = null;
  15 + private static instance: NetworkManager;
  16 + private networkType: NetworkType = NetworkType.TYPE_UNKNOWN
  17 +
  18 + public static getInstance(): NetworkManager {
  19 + if (!NetworkManager.instance) {
  20 + NetworkManager.instance = new NetworkManager();
  21 + }
  22 + return NetworkManager.instance;
  23 + }
  24 +
  25 + public init() {
  26 + // 初始化
  27 + if (this.netCon) {
  28 + // 拦截重复初始化
  29 + return
  30 + }
  31 + this.networkMonitorRegister()
  32 + }
  33 +
  34 + public release() {
  35 + this.networkMonitorUnregister()
  36 + }
  37 +
  38 + private constructor() {
  39 + }
  40 +
  41 + private networkMonitorRegister() {
  42 + this.netCon = connection.createNetConnection();
  43 + this.netCon.register((error) => {
  44 + if (error) {
  45 + Logger.error(TAG, 'register error:' + error.message);
  46 + return;
  47 + }
  48 + Logger.info(TAG, 'register success');
  49 + })
  50 + this.netCon.on('netAvailable', (data: connection.NetHandle) => {
  51 + Logger.info(TAG, 'netAvailable, data is: ' + JSON.stringify(data))
  52 + })
  53 + this.netCon.on('netBlockStatusChange', (data: connection.NetBlockStatusInfo) => {
  54 + Logger.info(TAG, 'netBlockStatusChange, data is: ' + JSON.stringify(data))
  55 + // TODO 网络阻塞,是否创建新的网络、提示
  56 + })
  57 + this.netCon.on('netCapabilitiesChange', (data: connection.NetCapabilityInfo) => {
  58 + Logger.info(TAG, 'netCapabilitiesChange, data is: ' + JSON.stringify(data))
  59 + this.parseData(data)
  60 + // 可能多次通知
  61 + EmitterUtils.sendEvent(EmitterEventId.NETWORK_CONNECTED, JSON.stringify(this.networkType))
  62 + })
  63 + this.netCon.on('netConnectionPropertiesChange', (data: connection.NetConnectionPropertyInfo) => {
  64 + Logger.info(TAG, 'netConnectionPropertiesChange, data is: ' + JSON.stringify(data))
  65 + })
  66 +
  67 + this.netCon.on('netUnavailable', ((data: void) => {
  68 + Logger.info(TAG, 'netUnavailable, data is: ' + JSON.stringify(data))
  69 + }));
  70 + this.netCon.on('netLost', ((data: connection.NetHandle) => {
  71 + Logger.info(TAG, 'netLost, data is: ' + JSON.stringify(data))
  72 + // TODO 断网
  73 + EmitterUtils.sendEvent(EmitterEventId.NETWORK_DISCONNECTED)
  74 + this.networkType = NetworkType.TYPE_NONE
  75 + }))
  76 + }
  77 +
  78 + private networkMonitorUnregister() {
  79 + if (this.netCon) {
  80 + this.netCon.unregister((error: BusinessError) => {
  81 + if (error) {
  82 + Logger.error(TAG, 'unregister error:' + error.message);
  83 + return;
  84 + }
  85 + Logger.info(TAG, 'unregister success');
  86 + })
  87 + }
  88 + }
  89 +
  90 + /**
  91 + * @deprecated
  92 + */
  93 + private getNetworkMessage(netHandle: connection.NetHandle) {
  94 + connection.getNetCapabilities(netHandle, (error, netCap) => {
  95 + if (error) {
  96 + Logger.error(TAG, 'getNetCapabilities error:' + error.message);
  97 + return;
  98 + }
  99 + let netType = netCap.bearerTypes;
  100 + this.reset(netType)
  101 + })
  102 + }
  103 +
  104 + private reset(netType: Array<connection.NetBearType>) {
  105 + if (netType == null) {
  106 + return
  107 + }
  108 + for (let i = 0; i < netType.length; i++) {
  109 + if (netType[i] === 0) {
  110 + // 蜂窝网
  111 + this.networkType = NetworkType.TYPE_CELLULAR
  112 + } else if (netType[i] === 1) {
  113 + // Wi-Fi网络
  114 + this.networkType = NetworkType.TYPE_WIFI
  115 + } else {
  116 + // 以太网网络
  117 + this.networkType = NetworkType.TYPE_ETHERNET
  118 + }
  119 + }
  120 + }
  121 +
  122 + /**
  123 + * 获取网络类型,网络监听网络变化刷新类型,这里优先返回变量
  124 + */
  125 + public getNetType(): NetworkType {
  126 + if (this.networkType != NetworkType.TYPE_UNKNOWN) {
  127 + return this.networkType
  128 + }
  129 + return this.getNetTypeSync()
  130 + }
  131 +
  132 + /**
  133 + * 同步获取网络类型,耗时
  134 + */
  135 + public getNetTypeSync(): NetworkType {
  136 + let netHandle = connection.getDefaultNetSync();
  137 + let netCapabilities = connection.getNetCapabilitiesSync(netHandle)
  138 + this.reset(netCapabilities.bearerTypes)
  139 + return this.networkType;
  140 + }
  141 +
  142 + private parseData(data: connection.NetCapabilityInfo) {
  143 + // 解析网络信息
  144 + this.reset(data.netCap.bearerTypes)
  145 + }
  146 +}
  1 +/**
  2 + * 网络管理类
  3 + */
  4 +export enum NetworkType {
  5 + // 未知
  6 + TYPE_UNKNOWN = -1,
  7 + // 无网络
  8 + TYPE_NONE = 0,
  9 + // wifi
  10 + TYPE_WIFI = 1,
  11 + // 蜂窝网
  12 + TYPE_CELLULAR = 2,
  13 + // 以太网
  14 + TYPE_ETHERNET = 3,
  15 +}
@@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@
3 */ 3 */
4 export enum EmitterEventId { 4 export enum EmitterEventId {
5 // 通知登出,事件id 5 // 通知登出,事件id
6 - FORCE_USER_LOGIN_OUT = 1 6 + FORCE_USER_LOGIN_OUT = 1,
  7 + // 网络连接成功,事件id
  8 + NETWORK_CONNECTED = 2,
  9 + // 网络断开,事件id
  10 + NETWORK_DISCONNECTED = 3,
7 } 11 }
8 12
  1 +import { NetworkManager } from '../network/NetworkManager'
  2 +import { NetworkType } from '../network/NetworkType'
  3 +
  4 +/**
  5 + * 网络相关工具类
  6 + * 要实时监听网络,需要添加注册函数{例:src/main/ets/entryability/EntryAbility.ets:32}
  7 + */
  8 +export class NetworkUtil {
  9 + /**
  10 + * 网络环境:0:无网 1:WiFi 2:2G 3:3G 4:4G 5:5G,暂时只识别出蜂窝网
  11 + * 扩展6-以太网
  12 + */
  13 + static TYPE_NONE = '0'
  14 + static TYPE_WIFI = '1'
  15 + static TYPE_CELLULAR = '5'
  16 + // TODO 以太网,手机不涉及
  17 + static TYPE_ETHERNET = '6'
  18 +
  19 + static getNetworkType(): string {
  20 + let type = NetworkManager.getInstance().getNetType()
  21 + return NetworkUtil.parseType(type)
  22 + }
  23 +
  24 + static parseType(type: NetworkType): string {
  25 + switch (type) {
  26 + case NetworkType.TYPE_UNKNOWN:
  27 + case NetworkType.TYPE_NONE:
  28 + return NetworkUtil.TYPE_NONE;
  29 + case NetworkType.TYPE_WIFI:
  30 + return NetworkUtil.TYPE_WIFI;
  31 + case NetworkType.TYPE_CELLULAR:
  32 + return NetworkUtil.TYPE_CELLULAR;
  33 + case NetworkType.TYPE_ETHERNET:
  34 + return NetworkUtil.TYPE_ETHERNET;
  35 + default:
  36 + return NetworkUtil.TYPE_NONE;
  37 + }
  38 + }
  39 +}
@@ -8,6 +8,11 @@ @@ -8,6 +8,11 @@
8 "tablet", 8 "tablet",
9 "2in1" 9 "2in1"
10 ], 10 ],
11 - "deliveryWithInstall": true 11 + "deliveryWithInstall": true,
  12 + "requestPermissions": [
  13 + {
  14 + "name": "ohos.permission.GET_NETWORK_INFO"
  15 + }
  16 + ]
12 } 17 }
13 } 18 }
@@ -292,6 +292,11 @@ export class HttpUrlUtils { @@ -292,6 +292,11 @@ export class HttpUrlUtils {
292 */ 292 */
293 static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list"; 293 static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
294 294
  295 + /**
  296 + * 搜索推荐
  297 + */
  298 + static readonly SEARCH_SUGGEST_DATA_PATH: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
  299 +
295 public static set hostUrl(value: string) { 300 public static set hostUrl(value: string) {
296 HttpUrlUtils._hostUrl = value; 301 HttpUrlUtils._hostUrl = value;
297 } 302 }
@@ -324,8 +329,9 @@ export class HttpUrlUtils { @@ -324,8 +329,9 @@ export class HttpUrlUtils {
324 headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A') 329 headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A')
325 headers.set('imei', HttpUrlUtils.getImei()) 330 headers.set('imei', HttpUrlUtils.getImei())
326 headers.set('Accept-Language', 'zh') 331 headers.set('Accept-Language', 'zh')
327 - headers.set('city', HttpUrlUtils.getCity())  
328 - headers.set('city_dode', HttpUrlUtils.getCityCode()) 332 + // headers.set('city', HttpUrlUtils.getCity())
  333 + // headers.set('city_dode', HttpUrlUtils.getCityCode())
  334 + HttpUrlUtils.setLocationHeader(headers)
329 // TODO 判断是否登录 335 // TODO 判断是否登录
330 headers.set('userId', HttpUrlUtils.getUserId()) 336 headers.set('userId', HttpUrlUtils.getUserId())
331 headers.set('userType', HttpUrlUtils.getUserType()) 337 headers.set('userType', HttpUrlUtils.getUserType())
@@ -368,6 +374,17 @@ export class HttpUrlUtils { @@ -368,6 +374,17 @@ export class HttpUrlUtils {
368 } 374 }
369 } 375 }
370 376
  377 + static setLocationHeader(headers: HashMap<string, string>) {
  378 + let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string
  379 + if (StringUtils.isNotEmpty(cityName)) {
  380 + headers.set('city', encodeURI(cityName))
  381 + }
  382 + let cityCode = SPHelper.default.getSync(SpConstants.LOCATION_CITY_CODE, '') as string
  383 + if (StringUtils.isNotEmpty(cityCode)) {
  384 + headers.set('city_dode', encodeURI(cityCode))
  385 + }
  386 + }
  387 +
371 static getHost() { 388 static getHost() {
372 return HttpUrlUtils._hostUrl; 389 return HttpUrlUtils._hostUrl;
373 } 390 }
@@ -463,7 +480,7 @@ export class HttpUrlUtils { @@ -463,7 +480,7 @@ export class HttpUrlUtils {
463 return 'Android'; 480 return 'Android';
464 } 481 }
465 482
466 - private static getImei() { 483 + public static getImei() {
467 // TODO 484 // TODO
468 return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; 485 return '8a81226a-cabd-3e1b-b630-b51db4a720ed';
469 } 486 }
@@ -795,6 +812,11 @@ export class HttpUrlUtils { @@ -795,6 +812,11 @@ export class HttpUrlUtils {
795 let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike"; 812 let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike";
796 return url; 813 return url;
797 } 814 }
  815 + //搜索推荐
  816 + static getSearchSuggestDataUrl() {
  817 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_SUGGEST_DATA_PATH
  818 + return url
  819 + }
798 820
799 // static getYcgCommonHeaders(): HashMap<string, string> { 821 // static getYcgCommonHeaders(): HashMap<string, string> {
800 // let headers: HashMap<string, string> = new HashMap<string, string>() 822 // let headers: HashMap<string, string> = new HashMap<string, string>()
1 -import { Action, ContentDTO, Params } from 'wdBean'; 1 +import { Action, ContentDTO, Params, PhotoListBean } from 'wdBean';
2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'; 2 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
3 import { Logger } from 'wdKit'; 3 import { Logger } from 'wdKit';
4 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; 4 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
@@ -58,6 +58,7 @@ export class ProcessUtils { @@ -58,6 +58,7 @@ export class ProcessUtils {
58 break; 58 break;
59 //动态详情页(动态图文) 59 //动态详情页(动态图文)
60 case ContentConstants.TYPE_FOURTEEN: 60 case ContentConstants.TYPE_FOURTEEN:
  61 + ProcessUtils.gotoDynamicDetailPage(content);
61 //动态详情页(动态视频) 62 //动态详情页(动态视频)
62 case ContentConstants.TYPE_FIFTEEN: 63 case ContentConstants.TYPE_FIFTEEN:
63 ProcessUtils.gotoDynamicDetailPage(content); 64 ProcessUtils.gotoDynamicDetailPage(content);
@@ -91,20 +92,18 @@ export class ProcessUtils { @@ -91,20 +92,18 @@ export class ProcessUtils {
91 * 图集详情页 92 * 图集详情页
92 * @param content 93 * @param content
93 * */ 94 * */
94 - private static gotoAtlasDetailPage(content: ContentDTO) { 95 + public static gotoMultiPictureListPage(photoList: PhotoListBean[]) {
95 let taskAction: Action = { 96 let taskAction: Action = {
96 type: 'JUMP_DETAIL_PAGE', 97 type: 'JUMP_DETAIL_PAGE',
97 params: { 98 params: {
98 - detailPageType: 17,  
99 - contentID: content?.objectId, 99 + detailPageType: 18,
100 extra: { 100 extra: {
101 - relType: content?.relType,  
102 - relId: content?.relId, 101 + photoList
103 } as ExtraDTO 102 } as ExtraDTO
104 } as Params, 103 } as Params,
105 }; 104 };
106 WDRouterRule.jumpWithAction(taskAction) 105 WDRouterRule.jumpWithAction(taskAction)
107 - Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`); 106 + Logger.debug(TAG, `gotoMultiPictureListPage`);
108 } 107 }
109 108
110 private static gotoSpecialTopic(content: ContentDTO) { 109 private static gotoSpecialTopic(content: ContentDTO) {
@@ -194,4 +193,24 @@ export class ProcessUtils { @@ -194,4 +193,24 @@ export class ProcessUtils {
194 WDRouterRule.jumpWithAction(taskAction) 193 WDRouterRule.jumpWithAction(taskAction)
195 Logger.debug(TAG, `gotoAudio, ${content.objectId}`); 194 Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
196 } 195 }
  196 +
  197 + /**
  198 + * 图片预览页
  199 + * @param content
  200 + * */
  201 + private static gotoAtlasDetailPage(content: ContentDTO) {
  202 + let taskAction: Action = {
  203 + type: 'JUMP_DETAIL_PAGE',
  204 + params: {
  205 + detailPageType: 17,
  206 + contentID: content?.objectId,
  207 + extra: {
  208 + relType: content?.relType,
  209 + relId: content?.relId,
  210 + } as ExtraDTO
  211 + } as Params,
  212 + };
  213 + WDRouterRule.jumpWithAction(taskAction)
  214 + Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
  215 + }
197 } 216 }
@@ -20,7 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01'; @@ -20,7 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
20 import { CardParser } from './CardParser'; 20 import { CardParser } from './CardParser';
21 import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent'; 21 import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
22 import { ZhGridLayout02 } from './compview/ZhGridLayout02'; 22 import { ZhGridLayout02 } from './compview/ZhGridLayout02';
23 -import { Card5Component } from './cardview/Card5Component' 23 +import { Card5Component } from './cardview/Card5Component';
  24 +import { Card2Component } from './cardview/Card2Component';
24 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 25 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
25 26
26 /** 27 /**
@@ -71,6 +72,9 @@ export struct CompParser { @@ -71,6 +72,9 @@ export struct CompParser {
71 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 72 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
72 //头图卡 和comStyle 2相同, 73 //头图卡 和comStyle 2相同,
73 Card5Component({ contentDTO: compDTO.operDataList[0] }) 74 Card5Component({ contentDTO: compDTO.operDataList[0] })
  75 + } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
  76 + // 大图卡
  77 + Card2Component({ contentDTO: compDTO.operDataList[0] })
74 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) { 78 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
75 ZhSingleColumn04({ compDTO: compDTO }) 79 ZhSingleColumn04({ compDTO: compDTO })
76 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) { 80 } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
@@ -12,7 +12,8 @@ import { ProcessUtils } from 'wdRouter'; @@ -12,7 +12,8 @@ import { ProcessUtils } from 'wdRouter';
12 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils'; 12 import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
13 import display from '@ohos.display'; 13 import display from '@ohos.display';
14 import { BusinessError } from '@ohos.base'; 14 import { BusinessError } from '@ohos.base';
15 - 15 +import { CommonConstants } from 'wdConstant/Index';
  16 +import { CardMediaInfo } from '../components/cardCommon/CardMediaInfo'
16 const TAG = 'DynamicDetailComponent' 17 const TAG = 'DynamicDetailComponent'
17 @Preview 18 @Preview
18 @Component 19 @Component
@@ -44,7 +45,7 @@ export struct DynamicDetailComponent { @@ -44,7 +45,7 @@ export struct DynamicDetailComponent {
44 promise: Promise<Array<display.Display>> = display.getAllDisplays() 45 promise: Promise<Array<display.Display>> = display.getAllDisplays()
45 46
46 // 屏幕宽度(单位px) 47 // 屏幕宽度(单位px)
47 - screenWidth: number = 0; 48 + @State screenWidth: number = 0;
48 49
49 async aboutToAppear() { 50 async aboutToAppear() {
50 await this.getContentDetailData() 51 await this.getContentDetailData()
@@ -156,25 +157,131 @@ export struct DynamicDetailComponent { @@ -156,25 +157,131 @@ export struct DynamicDetailComponent {
156 ,left: $r('app.float.margin_16') 157 ,left: $r('app.float.margin_16')
157 ,right: $r('app.float.margin_16') }) 158 ,right: $r('app.float.margin_16') })
158 .alignSelf(ItemAlign.Start) 159 .alignSelf(ItemAlign.Start)
159 - if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){  
160 - //附件内容:图片/视频  
161 if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){ 160 if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
  161 + //附件内容:图片/视频
  162 + if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
  163 + // 图片-从无图到9图展示
162 GridRow({ 164 GridRow({
163 - columns: { sm: this.contentDetailData.photoList.length  
164 - , md: this.contentDetailData.photoList.length == 1?1:  
165 - this.contentDetailData.photoList.length == 4?2:  
166 - 3 },  
167 - breakpoints: { value: ['320vp', '520vp', '840vp'] } 165 + gutter: { x: 2, y: 2 }
168 }) { 166 }) {
169 ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => { 167 ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => {
170 - GridCol() {  
171 - this.buildItemCard(item.picPath,this.contentDetailData.photoList.length, index); 168 + if (this.contentDetailData.photoList.length === 1) {
  169 + if (this.getPicType(item) !== 3) {
  170 + GridCol({
  171 + span: this.getPicType(item) === 1 ? 12 : 8
  172 + }){
  173 + Stack({
  174 + alignContent: Alignment.BottomEnd
  175 + }) {
  176 + if (this.getPicType(item) === 1) {
  177 + Image(item.picPath)
  178 + .width('100%')
  179 + .height(172)
  180 + .autoResize(true)
  181 + .borderRadius(this.caclImageRadius(index))
  182 + } else if (this.getPicType(item) === 2) {
  183 + Image(item.picPath)
  184 + .width('100%')
  185 + .height(305)
  186 + .autoResize(true)
  187 + .borderRadius(this.caclImageRadius(index))
  188 + }
  189 + Flex({ direction: FlexDirection.Row }) {
  190 + Image($r('app.media.icon_long_pic'))
  191 + .width(14)
  192 + .height(14)
  193 + .margin({right: 4})
  194 + Text('长图')
  195 + .fontSize(12)
  196 + .fontWeight(400)
  197 + .fontColor(0xffffff)
  198 + .fontFamily('PingFang SC')
  199 + }
  200 + .width(48)
  201 + .padding({bottom: 9})
  202 +
  203 + }
172 } 204 }
173 - // .onClick() 205 + .onClick((event: ClickEvent) => {
  206 + ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList)
  207 + })
  208 + } else {
  209 + GridCol({
  210 + span: { xs: 8 }
  211 + }) {
  212 + Image(item.picPath)
  213 + .width('100%')
  214 + .borderRadius(this.caclImageRadius(index))
  215 + .autoResize(true)
  216 + .opacity(!item.width && !item.height ? 0 : 1)
  217 + .onComplete(callback => {
  218 + item.width = callback?.width || 0;
  219 + item.height = callback?.height || 0;
174 }) 220 })
175 } 221 }
  222 + }
  223 + } else if (this.contentDetailData.photoList.length === 4) {
  224 + GridCol({
  225 + span: { xs: 4 }
  226 + }) {
  227 + Image(item.picPath)
  228 + .aspectRatio(1)
  229 + .borderRadius(this.caclImageRadius(index))
  230 + }
  231 + } else {
  232 + GridCol({
  233 + span: { sm: 4, lg: 3 }
  234 + }) {
  235 + Image(item.picPath)
  236 + .aspectRatio(1)
  237 + .borderRadius(this.caclImageRadius(index))
  238 + }
  239 + }
  240 + })
  241 + }
  242 + .margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
  243 + }
176 }else{ 244 }else{
177 - this.buildItemCard(this.contentDetailData.videoInfo[0].firstFrameImageUri, 1, 0); 245 + if(this.contentDetailData.videoInfo!= null && this.contentDetailData.videoInfo.length>0){
  246 + GridRow() {
  247 + if (this.contentDetailData.videoInfo[0].videoLandScape === 1) {
  248 + // 横屏
  249 + GridCol({
  250 + span: { xs: 12 }
  251 + }) {
  252 + Stack() {
  253 + Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
  254 + this.contentDetailData.fullColumnImgUrls[0].url:
  255 + this.contentDetailData.videoInfo[0].firstFrameImageUri)
  256 + .width(CommonConstants.FULL_WIDTH)
  257 + .aspectRatio(16 / 9)
  258 + .borderRadius($r('app.float.image_border_radius'))
  259 + CardMediaInfo({ contentDTO: this.mJumpInfo })
  260 + }
  261 + .align(Alignment.BottomEnd)
  262 + }
  263 + } else {
  264 + // 竖图显示,宽度占50%,高度自适应
  265 + GridCol({
  266 + span: { xs: 6 }
  267 + }) {
  268 + Stack() {
  269 + Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
  270 + this.contentDetailData.fullColumnImgUrls[0].url:
  271 + this.contentDetailData.videoInfo[0].firstFrameImageUri)
  272 + .width(CommonConstants.FULL_WIDTH)
  273 + .borderRadius($r('app.float.image_border_radius'))
  274 + CardMediaInfo({ contentDTO: this.mJumpInfo })
  275 + }
  276 + .align(Alignment.BottomEnd)
  277 + }
  278 + }
  279 + }
  280 + .margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
  281 + .onClick((event: ClickEvent) => {
  282 + this.mJumpInfo.objectType = ContentConstants.TYPE_VOD;
  283 + ProcessUtils.processPage(this.mJumpInfo)
  284 + })
178 } 285 }
179 } 286 }
180 //特别声明 287 //特别声明
@@ -231,14 +338,13 @@ export struct DynamicDetailComponent { @@ -231,14 +338,13 @@ export struct DynamicDetailComponent {
231 try { 338 try {
232 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) 339 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
233 this.contentDetailData = data[0]; 340 this.contentDetailData = data[0];
234 - this.makeJumpInfo  
235 console.log('动态详情',JSON.stringify(this.contentDetailData)) 341 console.log('动态详情',JSON.stringify(this.contentDetailData))
236 } catch (exception) { 342 } catch (exception) {
237 console.log('请求失败',JSON.stringify(exception)) 343 console.log('请求失败',JSON.stringify(exception))
238 } 344 }
239 - this.getBatchAttentionStatus  
240 - this.getInteractDataStatus  
241 - this.getScreenWidth 345 + this.getBatchAttentionStatus()
  346 + this.getInteractDataStatus()
  347 + this.makeJumpInfo()
242 } 348 }
243 349
244 // 查询当前登录用户点赞状态 350 // 查询当前登录用户点赞状态
@@ -281,64 +387,6 @@ export struct DynamicDetailComponent { @@ -281,64 +387,6 @@ export struct DynamicDetailComponent {
281 387
282 } 388 }
283 } 389 }
284 - @Builder  
285 - setItemImageStyle(picPath: string,topLeft: number,topRight: number,bottomLeft: number,bottomRight: number){  
286 - //四角圆角  
287 - Image(picPath)  
288 - .width('100%')  
289 - .height('100%')  
290 - .borderRadius({topLeft: topLeft, topRight: topRight,  
291 - bottomLeft: bottomLeft, bottomRight: bottomRight})  
292 - }  
293 - /**  
294 - * 组件项  
295 - *  
296 - * @param programmeBean item 组件项, 上面icon,下面标题  
297 - */  
298 - @Builder  
299 - buildItemCard(item: string,len: number,index: number) {  
300 - Column() {  
301 - this.setItemImageRoundCorner(len, item, index)  
302 - Flex({ direction: FlexDirection.Row }) {  
303 - Image($r('app.media.icon_long_pic'))  
304 - .width(14)  
305 - .height(14)  
306 - .margin({right: 4})  
307 - Text('长图')  
308 - .fontSize(12)  
309 - .fontWeight(400)  
310 - .fontColor(0xffffff)  
311 - .fontFamily('PingFang SC')  
312 - }  
313 - .width(48)  
314 - .padding({bottom: 9})  
315 - }  
316 - .width(  
317 - //图片类型  
318 - this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN?'100%'  
319 - //视频横屏 横版16:9  
320 - :this.contentDetailData.videoInfo[0].videoLandScape == 1?this.screenWidth-32  
321 - //视频竖屏 竖版3:4  
322 - :(this.screenWidth-32)/2)  
323 - .height(  
324 - //图片类型  
325 - this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN?'100%'  
326 - //视频横屏 横版16:9  
327 - :this.contentDetailData.videoInfo[0].videoLandScape == 1?(this.screenWidth-32)*9/16  
328 - //视频竖屏 竖版3:4  
329 - :(this.screenWidth-32)/2*4/3)  
330 - .onClick((event: ClickEvent) => {  
331 - if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){  
332 - //fixme 跳转到查看图片页面(带页脚/下载按钮)  
333 - // this.mJumpInfo.objectType = ContentConstants.TYPE_  
334 - ProcessUtils.processPage(this.mJumpInfo)  
335 - }else{  
336 - //fixme 跳转到播放视频页面(点播)  
337 - this.mJumpInfo.objectType = ContentConstants.TYPE_VOD  
338 - ProcessUtils.processPage(this.mJumpInfo)  
339 - }  
340 - })  
341 - }  
342 390
343 //创建跳转信息 391 //创建跳转信息
344 makeJumpInfo(){ 392 makeJumpInfo(){
@@ -347,152 +395,51 @@ export struct DynamicDetailComponent { @@ -347,152 +395,51 @@ export struct DynamicDetailComponent {
347 this.mJumpInfo.objectId = this.contentDetailData.newsId+""; 395 this.mJumpInfo.objectId = this.contentDetailData.newsId+"";
348 this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+""; 396 this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+"";
349 this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+""; 397 this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+"";
  398 + // this.mJumpInfo.objectType = this.contentDetailData.newsType+"";
350 } 399 }
351 400
352 - //设置图片圆角  
353 - @Builder  
354 - setItemImageRoundCorner(len: number, picPath: string, index: number) {  
355 - if (len == 1) {  
356 - //四角圆角  
357 - this.setItemImageStyle(picPath, 4, 4, 4, 4);  
358 - } else if (len == 2) {  
359 - if (index == 0) {  
360 - //左边圆角  
361 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
362 - } else {  
363 - //右边圆角  
364 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
365 - }  
366 - } else if (3 == len) {  
367 - if (index == 0) {  
368 - //左边圆角  
369 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
370 - } else if (index == 1) {  
371 - //直角  
372 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
373 - } else {  
374 - //右边圆角  
375 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
376 - }  
377 - } else if (4 == len) {  
378 - if (index == 0) {  
379 - //左边圆角  
380 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
381 - } else if (index == 1) {  
382 - //右边圆角  
383 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
384 - } else if (index = 2) {  
385 - //左边圆角  
386 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
387 - } else {  
388 - //右边圆角  
389 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
390 - }  
391 - } else if (5 == len) {  
392 - if (index == 0) {  
393 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
394 - } else if (index == 1) {  
395 - //直角  
396 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
397 - } else if (index = 2) {  
398 - this.setItemImageStyle(picPath, 4, 4, 4, 4);  
399 - } else if (index = 3) {  
400 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
401 - } else {  
402 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
403 - }  
404 - } else if (6 == len) {  
405 - if (index == 0) {  
406 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
407 - } else if (index == 1) {  
408 - //直角  
409 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
410 - } else if (index = 2) {  
411 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
412 - } else if (index = 3) {  
413 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
414 - } else if (index = 4) {  
415 - //直角  
416 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
417 - } else {  
418 - //右边圆角  
419 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
420 - }  
421 - } else if (7 == len) {  
422 - if (index == 0) {  
423 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
424 - } else if (index == 1) {  
425 - //直角  
426 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
427 - } else if (index = 2) {  
428 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
429 - } else if (index = 3) {  
430 - //直角  
431 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
432 - } else if (index = 4) {  
433 - //直角  
434 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
435 - } else if (index = 5) {  
436 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
437 - } else {  
438 - this.setItemImageStyle(picPath, 0, 0, 4, 4);  
439 - }  
440 - } else if (8 == len) {  
441 - if (index == 0) {  
442 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
443 - } else if (index == 1) {  
444 - //直角  
445 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
446 - } else if (index = 2) {  
447 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
448 - } else if (index = 3) {  
449 - //直角  
450 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
451 - } else if (index = 4) {  
452 - //直角  
453 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
454 - } else if (index = 5) {  
455 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
456 - } else if (index = 6) {  
457 - this.setItemImageStyle(picPath, 0, 0, 4, 0); 401 +
  402 + caclImageRadius(index: number) {
  403 + let radius: radiusType = {
  404 + topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
  405 + topRight: 0,
  406 + bottomLeft: 0,
  407 + bottomRight: 0,
  408 + }
  409 + if (this.contentDetailData.photoList.length === 1) {
  410 + radius.topRight = index === 0 ? $r('app.float.image_border_radius') : 0
  411 + radius.bottomLeft = index === 0 ? $r('app.float.image_border_radius') : 0
  412 + radius.bottomRight = index === 0 ? $r('app.float.image_border_radius') : 0
  413 + } else if (this.contentDetailData.photoList.length === 5 && !this.contentDetailData.photoList[2].fullUrl) {
  414 + radius.topRight = index === 1 ? $r('app.float.image_border_radius') : 0
  415 + radius.bottomLeft = index === 3 ? $r('app.float.image_border_radius') : 0
  416 + radius.bottomRight = index === 4 ? $r('app.float.image_border_radius') : 0
458 } else { 417 } else {
459 - this.setItemImageStyle(picPath, 0, 0, 0, 4); 418 + radius.topRight = index === 2 ? $r('app.float.image_border_radius') : 0
  419 + radius.bottomLeft = index === 6 ? $r('app.float.image_border_radius') : 0
  420 + radius.bottomRight = index === 8 ? $r('app.float.image_border_radius') : 0
460 } 421 }
  422 + return radius
  423 + }
  424 +
  425 + getPicType(item: PhotoListBean){
  426 + if (item.width && item.width) {
  427 + if (item.width / item.height > 343/172) {
  428 + return 1; //横长图
  429 + } else if (item.height / item.width > 305/228) {
  430 + return 2; //竖长图
461 } else { 431 } else {
462 - if (index == 0) {  
463 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
464 - } else if (index == 1) {  
465 - //直角  
466 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
467 - } else if (index == 2) {  
468 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
469 - } else if (index == 3) {  
470 - //直角  
471 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
472 - } else if (index == 4) {  
473 - //直角  
474 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
475 - } else if (index == 5) {  
476 - //直角  
477 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
478 - } else if (index == 6) {  
479 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
480 - } else if (index == 7) {  
481 - //直角  
482 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
483 - } else {  
484 - this.setItemImageStyle(picPath, 0, 0, 0, 4); 432 + return 3
485 } 433 }
  434 + } else {
  435 + return 3; //普通图
486 } 436 }
487 } 437 }
  438 +}
488 439
489 - getScreenWidth(){  
490 - this.promise.then((data: Array<display.Display>) => {  
491 - console.log(`所有的屏幕信息:${JSON.stringify(data)}`)  
492 - //单位为像素  
493 - this.screenWidth = data[0]["width"]  
494 - }).catch((err: BusinessError) => {  
495 - console.error(`Failed to obtain all the display objects. Code: ${JSON.stringify(err)}`)  
496 - })  
497 - } 440 +interface radiusType {
  441 + topLeft: number | Resource;
  442 + topRight: number | Resource;
  443 + bottomLeft: number | Resource;
  444 + bottomRight: number | Resource;
498 } 445 }
1 -import { Params } from 'wdBean'; 1 +import { ContentDTO, Params } from 'wdBean';
2 import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit'; 2 import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit';
3 -import { WDRouterPage, WDRouterRule } from 'wdRouter'; 3 +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
4 import MinePageDatasModel from '../../../model/MinePageDatasModel'; 4 import MinePageDatasModel from '../../../model/MinePageDatasModel';
5 import { CommentListItem } from '../../../viewmodel/CommentListItem'; 5 import { CommentListItem } from '../../../viewmodel/CommentListItem';
6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem'; 6 import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
@@ -265,7 +265,7 @@ export struct HomePageBottomComponent{ @@ -265,7 +265,7 @@ export struct HomePageBottomComponent{
265 }else{ 265 }else{
266 value.list.forEach((value)=>{ 266 value.list.forEach((value)=>{
267 let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) 267 let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
268 - this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType)) 268 + this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType,value.targetRelId,value.targetRelObjectId,value.targetRelType,value.targetStatus))
269 }) 269 })
270 this.data_comment.notifyDataReload() 270 this.data_comment.notifyDataReload()
271 this.count = this.data_comment.totalCount() 271 this.count = this.data_comment.totalCount()
@@ -365,6 +365,14 @@ struct ChildCommentComponent { @@ -365,6 +365,14 @@ struct ChildCommentComponent {
365 .width('662lpx') 365 .width('662lpx')
366 .backgroundColor($r('app.color.color_F5F5F5')) 366 .backgroundColor($r('app.color.color_F5F5F5'))
367 .margin({top:'19lpx',bottom:'31lpx'}) 367 .margin({top:'19lpx',bottom:'31lpx'})
  368 + .onClick(()=>{
  369 + ProcessUtils.processPage(
  370 + {objectId: this.data.targetId,
  371 + relType:this.data.targetRelType+"",
  372 + relId:this.data.targetRelId,
  373 + objectType:this.data.targetType+"",
  374 + } as ContentDTO )
  375 + })
368 376
369 if(!this.isLastItem){ 377 if(!this.isLastItem){
370 Divider().width('100%') 378 Divider().width('100%')
@@ -6,6 +6,8 @@ import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI'; @@ -6,6 +6,8 @@ import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
6 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem'; 6 import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
7 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem'; 7 import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
8 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem'; 8 import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem';
  9 +import { ProcessUtils } from 'wdRouter/Index';
  10 +import { ContentDTO } from 'wdBean/Index';
9 11
10 const TAG = "HomePageBottomComponent" 12 const TAG = "HomePageBottomComponent"
11 @Component 13 @Component
@@ -107,7 +109,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -107,7 +109,7 @@ export struct OtherHomePageBottomCommentComponent{
107 let data : CommentListItem[] = [] 109 let data : CommentListItem[] = []
108 value.list.forEach((item)=>{ 110 value.list.forEach((item)=>{
109 status.commentIdList.push(item.id) 111 status.commentIdList.push(item.id)
110 - data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType)) 112 + data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus))
111 }) 113 })
112 114
113 MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{ 115 MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
@@ -120,7 +122,7 @@ export struct OtherHomePageBottomCommentComponent{ @@ -120,7 +122,7 @@ export struct OtherHomePageBottomCommentComponent{
120 }) 122 })
121 123
122 data.forEach((item)=>{ 124 data.forEach((item)=>{
123 - this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType)) 125 + this.data_comment.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,item.like_status,item.id,item.targetId,item.targetType,item.targetRelId,item.targetRelObjectId,item.targetRelType,item.targetStatus))
124 }) 126 })
125 127
126 this.data_comment.notifyDataReload() 128 this.data_comment.notifyDataReload()
@@ -237,6 +239,14 @@ struct ChildCommentComponent { @@ -237,6 +239,14 @@ struct ChildCommentComponent {
237 .width('662lpx') 239 .width('662lpx')
238 .backgroundColor($r('app.color.color_F5F5F5')) 240 .backgroundColor($r('app.color.color_F5F5F5'))
239 .margin({top:'19lpx',bottom:'31lpx'}) 241 .margin({top:'19lpx',bottom:'31lpx'})
  242 + .onClick(()=>{
  243 + ProcessUtils.processPage(
  244 + {objectId: this.data.targetId,
  245 + relType:this.data.targetRelType+"",
  246 + relId:this.data.targetRelId,
  247 + objectType:this.data.targetType+"",
  248 + } as ContentDTO )
  249 + })
240 250
241 if(!this.isLastItem){ 251 if(!this.isLastItem){
242 Divider().width('100%') 252 Divider().width('100%')
@@ -112,7 +112,7 @@ export struct SearchComponent { @@ -112,7 +112,7 @@ export struct SearchComponent {
112 } else { 112 } else {
113 if (this.hasChooseSearch) { 113 if (this.hasChooseSearch) {
114 //搜索结果 114 //搜索结果
115 - SearchResultComponent({count:this.count,searchText:this.searchText}) 115 + SearchResultComponent({count:this.count,searchText:this.searchText,isInit:true})
116 } else { 116 } else {
117 //联想搜索 117 //联想搜索
118 SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText}) 118 SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
  1 +import { ContentDTO } from 'wdBean/Index'
  2 +import { LazyDataSource, UserDataLocal } from 'wdKit/Index'
  3 +import { HttpUrlUtils } from 'wdNetwork/Index'
  4 +import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
  5 +import { SearchSuggestRequestItem } from '../../viewmodel/SearchSuggestRequestItem'
  6 +import { CardParser } from '../CardParser'
  7 +import { EmptyComponent } from '../view/EmptyComponent'
1 import { SearchResultContentComponent } from './SearchResultContentComponent' 8 import { SearchResultContentComponent } from './SearchResultContentComponent'
2 9
3 const TAG = "SearchResultComponent" 10 const TAG = "SearchResultComponent"
  11 +
4 /** 12 /**
5 * 搜索结果 13 * 搜索结果
6 * 搜索结果为null(空布局 + 为你推荐) 14 * 搜索结果为null(空布局 + 为你推荐)
7 */ 15 */
8 @Component 16 @Component
9 -export struct SearchResultComponent{  
10 - @Prop count:string[] = [] 17 +export struct SearchResultComponent {
  18 + @Prop count: string[]
11 @Prop searchText: string 19 @Prop searchText: string
12 - 20 + @State isInit:boolean = false;
13 @State currentIndex: number = 0 21 @State currentIndex: number = 0
14 private controller: TabsController = new TabsController() 22 private controller: TabsController = new TabsController()
15 fontColor: string = '#999999' 23 fontColor: string = '#999999'
16 selectedFontColor: string = '#000000' 24 selectedFontColor: string = '#000000'
  25 + @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
  26 + @State suggest_count: number = 0;
  27 + @State isLoading: boolean = false
  28 + scroller: Scroller = new Scroller()
  29 +
  30 + aboutToAppear(): void {
  31 + if (this.count.length === 0 && this.isInit == true) {
  32 + this.getSuggestData()
  33 + }
  34 + }
  35 +
  36 + getSuggestData() {
  37 + this.isLoading = true
  38 +
  39 + let request: SearchSuggestRequestItem = new SearchSuggestRequestItem(2, "", "", HttpUrlUtils.getImei(), UserDataLocal.userId, 8, "")
  40 +
  41 + SearcherAboutDataModel.getSearchSuggestData(request, getContext(this)).then((value) => {
  42 + value.forEach((item) => {
  43 + this.data.push({
  44 + appStyle: item.appStyle,
  45 + channelId: item.channelId + "",
  46 + coverType: item.coverType,
  47 + coverUrl: item.coverUrl,
  48 + newsTitle: item.newsTitle,
  49 + objectId: item.objectId,
  50 + publishTime: item.publishTime,
  51 + relId: item.relId + "",
  52 + relType: item.relType + "",
  53 + source: item.source,
  54 + } as ContentDTO)
  55 + })
  56 + this.data.notifyDataReload()
  57 + this.suggest_count = this.data.totalCount()
  58 + this.isLoading = false
  59 + })
  60 + }
17 61
18 build() { 62 build() {
19 Column() { 63 Column() {
  64 + if (this.count != null && this.count.length === 0 && this.isInit == true) {
  65 + List() {
  66 + ListItem() {
  67 + //缺省图
  68 + EmptyComponent({emptyType:4})
  69 + .height('612lpx')
  70 + .width('100%')
  71 + }
  72 + if(this.suggest_count > 0){
  73 + ListItem() {
  74 + Row() {
  75 + Image($r('app.media.search_suggest_icon'))
  76 + .width('6lpx')
  77 + .height('31lpx')
  78 + .objectFit(ImageFit.Cover)
  79 + .interpolation(ImageInterpolation.High)
  80 + .margin({ right: '10lpx' })
  81 + Text("为你推荐")
  82 + .textAlign(TextAlign.Start)
  83 + .fontWeight('600lpx')
  84 + .fontSize('33lpx')
  85 + .lineHeight('46lpx')
  86 + .fontColor($r('app.color.color_222222'))
  87 + }.height('84lpx')
  88 + .padding({ left: '31lpx', right: '31lpx' })
  89 + .width('100%')
  90 + .alignItems(VerticalAlign.Center)
  91 + }
  92 + }
  93 +
  94 + LazyForEach(this.data, (item: ContentDTO, index: number) => {
  95 + ListItem() {
  96 + Column() {
  97 + CardParser({contentDTO:item})
  98 + if (index != this.data.totalCount() - 1) {
  99 + Divider()
  100 + .width('100%')
  101 + .height('1lpx')
  102 + .color($r('app.color.color_F5F5F5'))
  103 + .strokeWidth('1lpx')
  104 + }
  105 + }
  106 + }
  107 + })
  108 + }
  109 + .cachedCount(6)
  110 + .edgeEffect(EdgeEffect.None)
  111 + .scrollBar(BarState.Off)
  112 + .height('100%')
  113 + .onReachEnd(() => {
  114 + if (!this.isLoading) {
  115 + this.getSuggestData()
  116 + }
  117 + })
  118 + } else {
20 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { 119 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
21 - ForEach(this.count, (item: string, index: number ) => {  
22 - TabContent(){  
23 - SearchResultContentComponent({keywords:this.searchText,searchType:item})  
24 - }.tabBar(this.TabBuilder(index,item)) 120 + ForEach(this.count, (item: string, index: number) => {
  121 + TabContent() {
  122 + SearchResultContentComponent({ keywords: this.searchText, searchType: item })
  123 + }.tabBar(this.TabBuilder(index, item))
25 }, (item: string, index: number) => index.toString()) 124 }, (item: string, index: number) => index.toString())
26 } 125 }
27 .vertical(false) 126 .vertical(false)
@@ -34,12 +133,14 @@ export struct SearchResultComponent{ @@ -34,12 +133,14 @@ export struct SearchResultComponent{
34 }) 133 })
35 .width('100%') 134 .width('100%')
36 .layoutWeight(1) 135 .layoutWeight(1)
  136 + }
37 }.width('100%') 137 }.width('100%')
38 .margin({ top: '12lpx' }) 138 .margin({ top: '12lpx' })
39 } 139 }
40 140
41 - @Builder TabBuilder(index: number, item: string) {  
42 - Stack(){ 141 + @Builder
  142 + TabBuilder(index: number, item: string) {
  143 + Stack() {
43 Text(item) 144 Text(item)
44 .height('38lpx') 145 .height('38lpx')
45 .fontSize('33lpx') 146 .fontSize('33lpx')
@@ -47,22 +148,21 @@ export struct SearchResultComponent{ @@ -47,22 +148,21 @@ export struct SearchResultComponent{
47 .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) 148 .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
48 .lineHeight('38lpx') 149 .lineHeight('38lpx')
49 150
50 - if(this.currentIndex === index){ 151 + if (this.currentIndex === index) {
51 Divider() 152 Divider()
52 .width('31lpx') 153 .width('31lpx')
53 .height('4lpx') 154 .height('4lpx')
54 .color('#ED2800') 155 .color('#ED2800')
55 .strokeWidth('4lpx') 156 .strokeWidth('4lpx')
56 - .margin({top:'50lpx'}) 157 + .margin({ top: '50lpx' })
57 .id("divTag") 158 .id("divTag")
58 } 159 }
59 - }.onClick(()=>{ 160 + }.onClick(() => {
60 this.currentIndex = index 161 this.currentIndex = index
61 this.controller.changeIndex(this.currentIndex) 162 this.controller.changeIndex(this.currentIndex)
62 }) 163 })
63 .height('100%') 164 .height('100%')
64 - .margin({right:'9lpx'})  
65 - .padding({left:'31lpx',right:index === this.count.length-1?"31lpx":"0lpx"}) 165 + .margin({ right: '9lpx' })
  166 + .padding({ left: '31lpx', right: index === this.count.length - 1 ? "31lpx" : "0lpx" })
66 } 167 }
67 -  
68 } 168 }
@@ -200,20 +200,23 @@ export struct MineSettingComponent { @@ -200,20 +200,23 @@ export struct MineSettingComponent {
200 200
201 // 右侧文案和右箭头 201 // 右侧文案和右箭头
202 Row() { 202 Row() {
203 - Toggle({ type: ToggleType.Switch, isOn: false }) 203 + Toggle({ type: ToggleType.Switch, isOn: item.switchState })
204 .height('50lpx') 204 .height('50lpx')
205 .margin({ left: '81lpx', right: '29lpx' }) 205 .margin({ left: '81lpx', right: '29lpx' })
206 .selectedColor(Color.Pink) 206 .selectedColor(Color.Pink)
207 .onChange((isOn: boolean) => { 207 .onChange((isOn: boolean) => {
208 - if(item.title=='接收推送'){ 208 + if(item.itemType=='push_switch'){
209 //推送 209 //推送
210 SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn) 210 SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn)
211 - }else if(item.title=='仅WiFi网络加载图片'){ 211 + }else if(item.itemType=='wifi_switch'){
212 //wifi 图片 212 //wifi 图片
213 SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn) 213 SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn)
214 - }else if(item.title=='WiFi网络情况下自动播放视频'){ 214 + }else if(item.itemType=='video_switch'){
215 //wifi 视频 215 //wifi 视频
216 SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn) 216 SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn)
  217 + }else if(item.itemType=='suspensionState_switch'){
  218 + //悬浮窗
  219 + SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn)
217 } 220 }
218 }) 221 })
219 }.width('40%') 222 }.width('40%')
@@ -248,7 +251,7 @@ export struct MineSettingComponent { @@ -248,7 +251,7 @@ export struct MineSettingComponent {
248 251
249 // 右侧文案和右箭头 252 // 右侧文案和右箭头
250 Row() { 253 Row() {
251 - Text((item.title=='清除缓存') ? this.cacheSize.toFixed(2) + 'MB' : '') 254 + Text((item.itemType=='clear_cache') ? this.cacheSize.toFixed(2) + 'MB' : '')
252 .fontColor('#999999') 255 .fontColor('#999999')
253 .maxLines(1) 256 .maxLines(1)
254 Image($r('app.media.mine_user_arrow')) 257 Image($r('app.media.mine_user_arrow'))
@@ -267,14 +270,14 @@ export struct MineSettingComponent { @@ -267,14 +270,14 @@ export struct MineSettingComponent {
267 } 270 }
268 .height('54lpx') 271 .height('54lpx')
269 .onClick(() => { 272 .onClick(() => {
270 - if (item.title == '账户与安全') { 273 + if (item.itemType == 'account') {
271 let params: Params = { 274 let params: Params = {
272 pageID: 'AccountAndSecurityLayout' 275 pageID: 'AccountAndSecurityLayout'
273 } 276 }
274 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params) 277 WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
275 - } else if (item.title == '隐私设罝') { 278 + } else if (item.itemType == 'private_setting') {
276 WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage) 279 WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage)
277 - } else if (item.title == '清除缓存') { 280 + } else if (item.itemType == 'clear_cache') {
278 this.dialogController.open() 281 this.dialogController.open()
279 } 282 }
280 }) 283 })
1 1
2 import HashMap from '@ohos.util.HashMap'; 2 import HashMap from '@ohos.util.HashMap';
3 import { ResponseDTO, WDHttp } from 'wdNetwork'; 3 import { ResponseDTO, WDHttp } from 'wdNetwork';
4 -import { Logger } from 'wdKit'; 4 +import { Logger, SPHelper } from 'wdKit';
5 import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem'; 5 import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem';
  6 +import { SpConstants } from 'wdConstant/Index';
6 7
7 8
8 const TAG = "MineSettingDatasModel" 9 const TAG = "MineSettingDatasModel"
@@ -40,15 +41,19 @@ class MineSettingDatasModel{ @@ -40,15 +41,19 @@ class MineSettingDatasModel{
40 return this.mainSettingData 41 return this.mainSettingData
41 } 42 }
42 this.mainSettingData = [] 43 this.mainSettingData = []
43 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))  
44 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))  
45 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))  
46 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))  
47 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))  
48 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, false))  
49 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))  
50 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))  
51 - this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false)) 44 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account"))
  45 + let pushState=SPHelper.default.getSync(SpConstants.SETTING_PUSH_SWITCH,false) as boolean
  46 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
  47 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
  48 + let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean
  49 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, wifiState,"wifi_switch"))
  50 + let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean
  51 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, videoState,"video_switch"))
  52 + let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
  53 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
  54 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
  55 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false,"clear_cache"))
  56 + this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
52 57
53 return this.mainSettingData 58 return this.mainSettingData
54 } 59 }
@@ -62,16 +67,16 @@ class MineSettingDatasModel{ @@ -62,16 +67,16 @@ class MineSettingDatasModel{
62 return this.accountAndSecurityData 67 return this.accountAndSecurityData
63 } 68 }
64 this.accountAndSecurityData = [] 69 this.accountAndSecurityData = []
65 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))  
66 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))  
67 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))  
68 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false))  
69 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false))  
70 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false))  
71 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false))  
72 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))  
73 -  
74 - this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false)) 70 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
  71 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
  72 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
  73 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
  74 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
  75 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
  76 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
  77 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
  78 +
  79 + this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
75 80
76 return this.accountAndSecurityData 81 return this.accountAndSecurityData
77 } 82 }
@@ -9,6 +9,8 @@ import { SearchResultContentData } from '../viewmodel/SearchResultContentData'; @@ -9,6 +9,8 @@ import { SearchResultContentData } from '../viewmodel/SearchResultContentData';
9 import { contentListParams, InteractDataDTO } from 'wdBean/Index'; 9 import { contentListParams, InteractDataDTO } from 'wdBean/Index';
10 import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem'; 10 import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem';
11 import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem'; 11 import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem';
  12 +import { SearchSuggestData } from '../viewmodel/SearchSuggestData';
  13 +import { SearchSuggestRequestItem } from '../viewmodel/SearchSuggestRequestItem';
12 14
13 const TAG = "SearcherAboutDataModel" 15 const TAG = "SearcherAboutDataModel"
14 16
@@ -349,6 +351,45 @@ class SearcherAboutDataModel{ @@ -349,6 +351,45 @@ class SearcherAboutDataModel{
349 return WDHttp.post<ResponseDTO<CreatorDetailResponseItem[]>>(url,object, headers) 351 return WDHttp.post<ResponseDTO<CreatorDetailResponseItem[]>>(url,object, headers)
350 }; 352 };
351 353
  354 + /**
  355 + * 搜索推荐 展示列表
  356 + */
  357 + getSearchSuggestData(object:SearchSuggestRequestItem,context: Context): Promise<SearchSuggestData[]> {
  358 + return new Promise<SearchSuggestData[]>((success, error) => {
  359 + Logger.info(TAG, `getSearchSuggestData start`);
  360 + this.fetchSearchSuggestData(object).then((navResDTO: ResponseDTO<SearchSuggestData[]>) => {
  361 + if (!navResDTO || navResDTO.code != 0 /*|| navResDTO.data == null*/) {
  362 + // success(this.getSearchSuggestDataLocal(context))
  363 + success([])
  364 + return
  365 + }
  366 + Logger.info(TAG, "getSearchSuggestData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
  367 + let navigationBean = navResDTO.data as SearchSuggestData[]
  368 + success(navigationBean);
  369 + }).catch((err: Error) => {
  370 + Logger.error(TAG, `getSearchSuggestData catch, error.name : ${err.name}, error.message:${err.message}`);
  371 + // success(this.getSearchSuggestDataLocal(context))
  372 + success([])
  373 + })
  374 + })
  375 + }
  376 +
  377 + fetchSearchSuggestData(object:SearchSuggestRequestItem) {
  378 + let url = HttpUrlUtils.getSearchSuggestDataUrl()
  379 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  380 + return WDHttp.post<ResponseDTO<SearchSuggestData[]>>(url,object, headers)
  381 + };
  382 +
  383 + async getSearchSuggestDataLocal(context: Context): Promise<SearchSuggestData[]> {
  384 + Logger.info(TAG, `getInteractListDataLocal start`);
  385 + let compRes: ResponseDTO<SearchSuggestData[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<SearchSuggestData[]>>(context,'search_suggest_data.json' );
  386 + if (!compRes || !compRes.data) {
  387 + Logger.info(TAG, `getInteractListDataLocal compRes is empty`);
  388 + return []
  389 + }
  390 + Logger.info(TAG, `getInteractListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
  391 + return compRes.data
  392 + }
352 393
353 394
354 395
@@ -82,6 +82,7 @@ struct MineHomePage { @@ -82,6 +82,7 @@ struct MineHomePage {
82 .lineHeight('50lpx') 82 .lineHeight('50lpx')
83 .fontWeight('500lpx') 83 .fontWeight('500lpx')
84 84
  85 + if(this.levelId>0){
85 Text(`等级${this.levelId}`) 86 Text(`等级${this.levelId}`)
86 .textAlign(TextAlign.Center) 87 .textAlign(TextAlign.Center)
87 .fontColor($r('app.color.color_ED2800')) 88 .fontColor($r('app.color.color_ED2800'))
@@ -90,6 +91,8 @@ struct MineHomePage { @@ -90,6 +91,8 @@ struct MineHomePage {
90 .width('96lpx') 91 .width('96lpx')
91 .height('35lpx') 92 .height('35lpx')
92 .margin({ left: '10lpx' }) 93 .margin({ left: '10lpx' })
  94 + }
  95 +
93 Blank() 96 Blank()
94 }.width('507lpx') 97 }.width('507lpx')
95 98
@@ -2,19 +2,46 @@ @@ -2,19 +2,46 @@
2 2
3 @Observed 3 @Observed
4 export class CommentListItem{ 4 export class CommentListItem{
5 - fromUserHeader:string = ""  
6 - fromUserName:string = ""  
7 - commentContent:string = ""  
8 - targetTitle:string = ""  
9 - createTime:string = ""  
10 - likeNum:number = 0  
11 like_status:number = 0 5 like_status:number = 0
12 - id:number = 0  
13 - targetId:string = ""  
14 - targetType:number = 0  
15 6
  7 + avatarFrame: string = ""
  8 + checkStatus: number = -1
  9 + commentContent: string = ""
  10 + commentContentSensitive: string = ""
  11 + commentLevel: number = -1
  12 + commentPics: string = ""
  13 + commentSensitive: string = ""
  14 + commentType: string = ""
  15 + createTime: string = ""
  16 + fromCreatorId: string = ""
  17 + fromDeviceId: string = ""
  18 + fromUserHeader: string = ""
  19 + fromUserId: string = ""
  20 + fromUserName: string = ""
  21 + fromUserType: number = -1
  22 + h5Url: string = ""
  23 + id: number = 0
  24 + keyArticle: number = -1
  25 + likeNum: number = 0
  26 + // pageId: null
  27 + // parentCommentVo: null
  28 + parentId: number = -1
  29 + rootCommentId: number = -1
  30 + sensitiveExist: number = -1
  31 + sensitiveShow: number = -1
  32 + // shareInfo: ShareInfo$1Type
  33 + targetId: string = ""
  34 + targetType: number = 0
  35 + targetRelId: string = ""
  36 + targetRelObjectId: string = ""
  37 + targetRelType: number = -1
  38 + targetStatus: number = -1
  39 + targetTitle: string = ""
  40 + // topicType: null
  41 + uuid: string = ""
16 42
17 - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) { 43 +
  44 + constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number,targetRelId: string,targetRelObjectId: string,targetRelType: number,targetStatus: number,) {
18 this.fromUserHeader = fromUserHeader 45 this.fromUserHeader = fromUserHeader
19 this.fromUserName = fromUserName 46 this.fromUserName = fromUserName
20 this.commentContent = commentContent 47 this.commentContent = commentContent
@@ -25,5 +52,9 @@ export class CommentListItem{ @@ -25,5 +52,9 @@ export class CommentListItem{
25 this.id = id 52 this.id = id
26 this.targetId = targetId 53 this.targetId = targetId
27 this.targetType = targetType 54 this.targetType = targetType
  55 + this.targetRelId = targetRelId
  56 + this.targetRelObjectId = targetRelObjectId
  57 + this.targetRelType = targetRelType
  58 + this.targetStatus = targetStatus
28 } 59 }
29 } 60 }
@@ -6,9 +6,10 @@ export class MineMainSettingFunctionItem { @@ -6,9 +6,10 @@ export class MineMainSettingFunctionItem {
6 subTitle?:string // 副标题 6 subTitle?:string // 副标题
7 type?:number // 数据类型 0默认箭头类型,1右侧switch按钮类型 7 type?:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
8 switchState?:boolean // 右侧switch按钮状态 8 switchState?:boolean // 右侧switch按钮状态
  9 + itemType?:string //条目类型
9 10
10 11
11 - constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null){ 12 + constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null,itemType:string){
12 if (imgSrc) { 13 if (imgSrc) {
13 this.imgSrc = imgSrc 14 this.imgSrc = imgSrc
14 } 15 }
@@ -24,6 +25,9 @@ export class MineMainSettingFunctionItem { @@ -24,6 +25,9 @@ export class MineMainSettingFunctionItem {
24 if (switchState != null) { 25 if (switchState != null) {
25 this.switchState = switchState 26 this.switchState = switchState
26 } 27 }
  28 + if (itemType != null) {
  29 + this.itemType = itemType
  30 + }
27 31
28 } 32 }
29 } 33 }
  1 +@Observed
  2 +export class SearchSuggestData{
  3 + // activityExt: null
  4 + appStyle: string = ""
  5 + // askInfo: null
  6 + axisColor: string = ""
  7 + // bestNoticer: null
  8 + // bottomNavId: null
  9 + cardItemId: string = ""
  10 + channelId: number = -1
  11 + // commentInfo: null
  12 + corner: string = ""
  13 + coverSize: string = ""
  14 + coverType: number = -1
  15 + coverUrl: string = ""
  16 + expIds: string = ""
  17 + extra: string = ""
  18 + fullColumnImgUrls: Array<FullColumnImgUrls> = []
  19 + // hasMore: null
  20 + itemId: string = ""
  21 + itemType: string = ""
  22 + itemTypeCode: string = ""
  23 + keyArticle: number = -1
  24 + // landscape: null
  25 + // likeStyle: null
  26 + linkUrl: string = ""
  27 + // liveInfo: null
  28 + menuShow: number = -1
  29 + newTags: string = ""
  30 + newsAuthor: string = ""
  31 + newsSubTitle: string = ""
  32 + newsSummary: string = ""
  33 + newsTitle: string = ""
  34 + newsTitleColor: string = ""
  35 + objectId: string = ""
  36 + objectLevel: string = ""
  37 + objectType: string = ""
  38 + // openComment: null
  39 + // openLikes: null
  40 + pageId: string = ""
  41 + // photoNum: null
  42 + // position: null
  43 + // productNum: null
  44 + publishTime: string = ""
  45 + // pushTime: null
  46 + // pushUnqueId: null
  47 + readFlag: number = -1
  48 + recommend: number = -1
  49 + relId: number = -1
  50 + relObjectId: string = ""
  51 + relType: number = -1
  52 + // rmhInfo: null
  53 + rmhPlatform: number = -1
  54 + sceneId: string = ""
  55 + // shareInfo: null
  56 + // slideShows: Array< unknown >
  57 + // sortValue: null
  58 + source: string = ""
  59 + subObjectType: string = ""
  60 + subSceneId: string = ""
  61 + // tagIds: Array< unknown >
  62 + // tagWord: null
  63 + // titleShow: null
  64 + // titleShowPolicy: null
  65 + // topicTemplate: null
  66 + traceId: string = ""
  67 + traceInfo: string = ""
  68 + // userInfo: null
  69 + videoInfo: VideoInfo = new VideoInfo()
  70 + visitorComment: number = -1
  71 + // voiceInfo: null
  72 +}
  73 +
  74 +class FullColumnImgUrls{
  75 + // format: null
  76 + fullUrl: string = ""
  77 + height: number = -1
  78 + landscape: number = -1
  79 + size: number = -1
  80 + url: string = ""
  81 + weight: number = -1
  82 +}
  83 +
  84 +class VideoInfo{
  85 + firstFrameImageUri: string = ""
  86 + videoDuration: number = -1
  87 + videoLandscape: number = -1
  88 + videoUrl: string = ""
  89 +}
  90 +
  1 +export class SearchSuggestRequestItem{
  2 + recType: number = 0
  3 + relId: string = ""
  4 + contentId: string = ""
  5 + imei: string = ""
  6 + userId: string = ""
  7 + contentType: number = 0
  8 + channelId: string = ""
  9 +
  10 + constructor(recType: number, relId: string , contentId: string , imei: string ,userId: string ,
  11 + contentType: number,channelId: string ) {
  12 + this.recType = recType
  13 + this.relId = relId
  14 + this.contentId = contentId
  15 + this.imei = imei
  16 + this.userId = userId
  17 + this.contentType = contentType
  18 + this.channelId = channelId
  19 + }
  20 +}
1 import { abilityAccessCtrl, bundleManager, Permissions } from '@kit.AbilityKit'; 1 import { abilityAccessCtrl, bundleManager, Permissions } from '@kit.AbilityKit';
2 import { BusinessError } from '@kit.BasicServicesKit'; 2 import { BusinessError } from '@kit.BasicServicesKit';
3 import { geoLocationManager } from '@kit.LocationKit'; 3 import { geoLocationManager } from '@kit.LocationKit';
  4 +import { SpConstants } from 'wdConstant/Index';
4 import { Logger, PermissionUtils, ResourcesUtils, SPHelper } from 'wdKit/Index'; 5 import { Logger, PermissionUtils, ResourcesUtils, SPHelper } from 'wdKit/Index';
  6 +import { ResponseDTO } from 'wdNetwork/Index';
5 7
6 /** 8 /**
7 * 系统定位服务实现 9 * 系统定位服务实现
8 * */ 10 * */
9 export class HWLocationUtils { 11 export class HWLocationUtils {
10 - //d定位相关  
11 - static LOCATION_CITY_NAME = "location_city_name" //定位  
12 - static LOCATION_CITY_CODE = "location_city_code" //定位  
13 12
14 13
15 static LOCATION: Permissions = 'ohos.permission.LOCATION' 14 static LOCATION: Permissions = 'ohos.permission.LOCATION'
@@ -107,10 +106,14 @@ export class HWLocationUtils { @@ -107,10 +106,14 @@ export class HWLocationUtils {
107 Logger.debug('location :' + JSON.stringify(data)) 106 Logger.debug('location :' + JSON.stringify(data))
108 if (data[0] && data[0].administrativeArea && data[0].subAdministrativeArea) { 107 if (data[0] && data[0].administrativeArea && data[0].subAdministrativeArea) {
109 let cityName = data[0].subAdministrativeArea; 108 let cityName = data[0].subAdministrativeArea;
  109 + let name = await SPHelper.default.get(SpConstants.LOCATION_CITY_NAME, '') as string
  110 + if (cityName == name) {
  111 + return
  112 + }
110 let code = await HWLocationUtils.getCityCode(data[0].administrativeArea, data[0].subAdministrativeArea) 113 let code = await HWLocationUtils.getCityCode(data[0].administrativeArea, data[0].subAdministrativeArea)
111 if (code) { 114 if (code) {
112 - SPHelper.default.save(HWLocationUtils.LOCATION_CITY_NAME, cityName)  
113 - SPHelper.default.save(HWLocationUtils.LOCATION_CITY_CODE, code) 115 + SPHelper.default.save(SpConstants.LOCATION_CITY_NAME, cityName)
  116 + SPHelper.default.save(SpConstants.LOCATION_CITY_CODE, code)
114 } 117 }
115 } 118 }
116 } 119 }
@@ -151,23 +154,6 @@ export class HWLocationUtils { @@ -151,23 +154,6 @@ export class HWLocationUtils {
151 } 154 }
152 } 155 }
153 156
154 -interface ResponseDTO<T> {  
155 - success: boolean;  
156 -  
157 - // 服务请求响应值/微服务响应状态码”  
158 - code: number;  
159 -  
160 - // 服务请求响应说明  
161 - message: string;  
162 -  
163 - // 响应结果  
164 - data?: T;  
165 - totalCount?: number;  
166 -  
167 - // 请求响应时间戳(unix格式)  
168 - timestamp?: number;  
169 -}  
170 -  
171 interface LocalData { 157 interface LocalData {
172 "code": string, 158 "code": string,
173 "id": string, 159 "id": string,
@@ -9,6 +9,18 @@ @@ -9,6 +9,18 @@
9 "2in1" 9 "2in1"
10 ], 10 ],
11 "deliveryWithInstall": true, 11 "deliveryWithInstall": true,
12 - "pages": "$profile:main_pages" 12 + "pages": "$profile:main_pages",
  13 + "requestPermissions": [
  14 + {
  15 + "name": "ohos.permission.APPROXIMATELY_LOCATION",
  16 + "reason": "$string:location_reason",
  17 + "usedScene": {
  18 + "abilities": [
  19 + "FormAbility"
  20 + ],
  21 + "when": "inuse"
  22 + }
  23 + }
  24 + ]
13 } 25 }
14 } 26 }
@@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@
3 { 3 {
4 "name": "shared_desc", 4 "name": "shared_desc",
5 "value": "description" 5 "value": "description"
  6 + },
  7 + {
  8 + "name": "location_reason",
  9 + "value": " "
6 } 10 }
7 ] 11 ]
8 } 12 }
@@ -4,7 +4,16 @@ import UIAbility from '@ohos.app.ability.UIAbility'; @@ -4,7 +4,16 @@ 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, StringUtils, WindowModel } from 'wdKit'; 7 +import {
  8 + EmitterEventId,
  9 + EmitterUtils,
  10 + Logger,
  11 + NetworkManager,
  12 + NetworkType,
  13 + SPHelper,
  14 + StringUtils,
  15 + WindowModel
  16 +} from 'wdKit';
8 import { HttpUrlUtils, WDHttp } from 'wdNetwork'; 17 import { HttpUrlUtils, WDHttp } from 'wdNetwork';
9 18
10 export default class EntryAbility extends UIAbility { 19 export default class EntryAbility extends UIAbility {
@@ -12,15 +21,30 @@ export default class EntryAbility extends UIAbility { @@ -12,15 +21,30 @@ export default class EntryAbility extends UIAbility {
12 SPHelper.init(this.context); 21 SPHelper.init(this.context);
13 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); 22 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
14 registerRouter(); 23 registerRouter();
  24 + NetworkManager.getInstance().init()
15 WDHttp.initHttpHeader() 25 WDHttp.initHttpHeader()
16 const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string 26 const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string
17 if (StringUtils.isNotEmpty(spHostUrl)) { 27 if (StringUtils.isNotEmpty(spHostUrl)) {
18 HttpUrlUtils.hostUrl = spHostUrl 28 HttpUrlUtils.hostUrl = spHostUrl
19 } 29 }
  30 +
  31 + // 注册监听网络连接
  32 + EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, ((str?: string) => {
  33 + let type: NetworkType | null = null
  34 + if (str) {
  35 + type = JSON.parse(str) as NetworkType
  36 + }
  37 + Logger.info('network connected: ' + type?.toString())
  38 + }))
  39 + // 注册监听网络断开
  40 + EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => {
  41 + Logger.info('network disconnected')
  42 + }))
20 } 43 }
21 44
22 onDestroy(): void { 45 onDestroy(): void {
23 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); 46 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
  47 + NetworkManager.getInstance().release()
24 } 48 }
25 49
26 onWindowStageCreate(windowStage: window.WindowStage): void { 50 onWindowStageCreate(windowStage: window.WindowStage): void {
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 import { WDRouterRule } from 'wdRouter'; 2 import { WDRouterRule } from 'wdRouter';
3 import { WDRouterPage } from 'wdRouter'; 3 import { WDRouterPage } from 'wdRouter';
  4 +import { Logger, SPHelper } from 'wdKit/Index';
  5 +import { SpConstants } from 'wdConstant/Index';
  6 +import LaunchDataModel from '../viewModel/LaunchDataModel'
  7 +import { LaunchModel } from '../viewModel/LaunchModel';
  8 +import { ifaa } from '@kit.OnlineAuthenticationKit';
  9 +
  10 +import common from '@ohos.app.ability.common';
  11 +import Want from '@ohos.app.ability.Want';
  12 +import { BusinessError } from '@ohos.base';
  13 +
  14 +
4 @Entry 15 @Entry
5 @Component 16 @Component
6 struct LaunchAdvertisingPage { 17 struct LaunchAdvertisingPage {
7 @State time: number = 4 18 @State time: number = 4
8 timer :number = -1 19 timer :number = -1
  20 + @State model : LaunchDataModel = {} as LaunchDataModel
  21 +
9 22
10 enter() { 23 enter() {
11 // router.replaceUrl({ 24 // router.replaceUrl({
@@ -15,7 +28,22 @@ struct LaunchAdvertisingPage { @@ -15,7 +28,22 @@ struct LaunchAdvertisingPage {
15 clearInterval(this.timer) 28 clearInterval(this.timer)
16 } 29 }
17 30
  31 + aboutToAppear(): void {
  32 +
  33 + let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
  34 + let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
  35 + this.model = dataModel
  36 + console.log(dataModelStr)
  37 + if(this.model.launchAdInfo.length){
  38 + //设置倒计时时间
  39 + this.time = this.model.launchAdInfo[0].displayDuration
  40 + }
  41 +
  42 + }
  43 +
  44 +
18 onPageShow(){ 45 onPageShow(){
  46 +
19 this.timer = setInterval(() => { 47 this.timer = setInterval(() => {
20 this.time-- 48 this.time--
21 if (this.time < 1) { 49 if (this.time < 1) {
@@ -32,10 +60,20 @@ struct LaunchAdvertisingPage { @@ -32,10 +60,20 @@ struct LaunchAdvertisingPage {
32 60
33 Stack({alignContent:Alignment.Bottom}){ 61 Stack({alignContent:Alignment.Bottom}){
34 Column(){ 62 Column(){
35 - Image($r('app.media.app_icon'))  
36 - .margin({  
37 - top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'  
38 - }) 63 + if(!(this.model.launchAdInfo[0].matInfo.matType == '1')){
  64 + //显示图片
  65 + Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0])
  66 + .width('100%')
  67 + .height('100%')
  68 + // .margin({
  69 + // top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
  70 + // })
  71 + }else {
  72 + //显示视频播放
  73 +
  74 +
  75 + }
  76 +
39 } 77 }
40 .justifyContent(FlexAlign.Center) 78 .justifyContent(FlexAlign.Center)
41 .width('100%') 79 .width('100%')
@@ -62,7 +100,8 @@ struct LaunchAdvertisingPage { @@ -62,7 +100,8 @@ struct LaunchAdvertisingPage {
62 } 100 }
63 .width('100%') 101 .width('100%')
64 .height('100%') 102 .height('100%')
65 - 103 + if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
  104 + //底部logo样式 按钮加载在背景展示图上
66 Button(){ 105 Button(){
67 Row(){ 106 Row(){
68 Text('点击跳转至详情或第三方应用') 107 Text('点击跳转至详情或第三方应用')
@@ -83,27 +122,83 @@ struct LaunchAdvertisingPage { @@ -83,27 +122,83 @@ struct LaunchAdvertisingPage {
83 bottom: '51lpx' 122 bottom: '51lpx'
84 }) 123 })
85 .backgroundColor('#80000000') 124 .backgroundColor('#80000000')
86 - 125 + .onClick(()=>{
  126 + this.action()
  127 + })
  128 + }
87 } 129 }
88 130
89 } 131 }
90 .width('100%') 132 .width('100%')
91 .height('84%') 133 .height('84%')
92 - .backgroundColor('#FF6C75')  
93 .margin({top:'0'}) 134 .margin({top:'0'})
94 135
  136 + if(this.model.launchAdInfo[0].matInfo.startStyle == 1){
  137 + //全屏样式,底部无logo 按钮放在原底部logo位置
  138 + Button(){
  139 + Row(){
  140 + Text('点击跳转至详情或第三方应用')
  141 + .fontSize('31lpx')
  142 + .fontColor(Color.White)
  143 + .margin({
  144 + left:'55lpx'
  145 + })
  146 + Image($r('app.media.Slice'))
  147 + .width('46lpx')
  148 + .height('46lpx')
  149 + .margin({right:'55lpx'})
  150 + }.alignItems(VerticalAlign.Center)
  151 + }
  152 + .width('566lpx')
  153 + .height('111lpx')
  154 + .margin({
  155 + top: '28lpx'
  156 + })
  157 + .backgroundColor('#80000000')
  158 + .onClick(()=>{
  159 + this.action()
  160 + })
  161 + }else {
  162 + //底部logo样式
95 Image($r('app.media.LaunchPage_logo')) 163 Image($r('app.media.LaunchPage_logo'))
96 .width('278lpx') 164 .width('278lpx')
97 .height('154lpx') 165 .height('154lpx')
98 - .margin({bottom: '48lpx'}) 166 + .margin({top: '28lpx'})
  167 + }
  168 +
99 } 169 }
100 .width('100%') 170 .width('100%')
101 .height('100%') 171 .height('100%')
102 .backgroundColor(Color.White) 172 .backgroundColor(Color.White)
  173 + }
  174 +
103 175
  176 + action(){
  177 + //跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
  178 + // openType 端外 端内 打开
  179 + if (this.model.launchAdInfo[0].matInfo.openType == '2') {
  180 + //端外打开
  181 + let context = getContext(this) as common.UIAbilityContext;
  182 + let wantInfo: Want = {
  183 + // uncomment line below if wish to implicitly query only in the specific bundle.
  184 + // bundleName: 'com.example.myapplication',
  185 + action: 'ohos.want.action.viewData',
  186 + // entities can be omitted.
  187 + entities: ['entity.system.browsable'],
  188 + uri: 'https://news.bjd.com.cn/2024/03/19/10724331.shtml'
104 } 189 }
  190 + context.startAbility(wantInfo).then(() => {
  191 + // ...
  192 + }).catch((err: BusinessError) => {
  193 + // ...
  194 + })
  195 + }else {
  196 + //端内打开
105 197
106 198
  199 + }
  200 + }
  201 +
107 202
108 203
109 } 204 }
@@ -10,6 +10,9 @@ import { WDRouterRule } from 'wdRouter'; @@ -10,6 +10,9 @@ import { WDRouterRule } from 'wdRouter';
10 import { WDRouterPage } from 'wdRouter'; 10 import { WDRouterPage } from 'wdRouter';
11 import { LaunchModel } from '../viewModel/LaunchModel' 11 import { LaunchModel } from '../viewModel/LaunchModel'
12 import { LaunchPageModel } from '../viewModel/LaunchPageModel' 12 import { LaunchPageModel } from '../viewModel/LaunchPageModel'
  13 +import LaunchDataModel from '../viewModel/LaunchDataModel'
  14 +import { Logger, SPHelper } from 'wdKit/Index';
  15 +import { SpConstants } from 'wdConstant/Index';
13 16
14 @Entry 17 @Entry
15 @Component 18 @Component
@@ -92,8 +95,19 @@ struct LaunchPage { @@ -92,8 +95,19 @@ struct LaunchPage {
92 // } 95 // }
93 } else { 96 } else {
94 //需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页 97 //需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页
  98 + //获取本地存储的启动页数据
  99 +
  100 + let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
  101 + let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
  102 + console.log(dataModelStr)
  103 +
  104 + if (dataModel.launchAdInfo.length) {
95 //跳转广告页 105 //跳转广告页
96 this.jumpToAdvertisingPage(); 106 this.jumpToAdvertisingPage();
  107 + }else {
  108 + //直接跳转首页
  109 + WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
  110 + }
97 //同意隐私协议后每次启动app请求启动页相关数据,并更新数据 111 //同意隐私协议后每次启动app请求启动页相关数据,并更新数据
98 this.requestLaunchPageData(); 112 this.requestLaunchPageData();
99 } 113 }
@@ -161,7 +175,6 @@ struct LaunchPage { @@ -161,7 +175,6 @@ struct LaunchPage {
161 //请求启动页相关接口数据并保存 175 //请求启动页相关接口数据并保存
162 let launchPageModel = new LaunchPageModel() 176 let launchPageModel = new LaunchPageModel()
163 launchPageModel.getLaunchPageData() 177 launchPageModel.getLaunchPageData()
164 -  
165 } 178 }
166 179
167 aboutToAppear(): void { 180 aboutToAppear(): void {
@@ -40,6 +40,7 @@ export interface NetLayerLauncherADInfoModel{ @@ -40,6 +40,7 @@ export interface NetLayerLauncherADInfoModel{
40 startTime : number 40 startTime : number
41 endTime : number 41 endTime : number
42 displayDuration : number 42 displayDuration : number
  43 + displayPriority : number
43 displayRound : number 44 displayRound : number
44 matInfo : NetLayerLauncherADMaterialModel 45 matInfo : NetLayerLauncherADMaterialModel
45 46
@@ -11,7 +11,7 @@ import { SpConstants } from 'wdConstant/Index'; @@ -11,7 +11,7 @@ import { SpConstants } from 'wdConstant/Index';
11 11
12 export class LaunchPageModel { 12 export class LaunchPageModel {
13 13
14 - getLaunchPageData() { 14 + getLaunchPageData(): Promise<LaunchDataModel> {
15 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); 15 let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
16 return new Promise<LaunchDataModel>((success, fail) => { 16 return new Promise<LaunchDataModel>((success, fail) => {
17 HttpRequest.get<ResponseDTO<LaunchDataModel>>(HttpUrlUtils.getLaunchPageDataUrl(), headers).then((data: ResponseDTO<LaunchDataModel>) => { 17 HttpRequest.get<ResponseDTO<LaunchDataModel>>(HttpUrlUtils.getLaunchPageDataUrl(), headers).then((data: ResponseDTO<LaunchDataModel>) => {
@@ -26,8 +26,9 @@ export class LaunchPageModel { @@ -26,8 +26,9 @@ export class LaunchPageModel {
26 Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data)) 26 Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
27 success(data.data); 27 success(data.data);
28 //存储数据 28 //存储数据
29 -  
30 - 29 + let obj : string = JSON.stringify(data.data)
  30 + console.log(obj)
  31 + SPHelper.default.saveSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,obj)
31 32
32 }, (error: Error) => { 33 }, (error: Error) => {
33 Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString()) 34 Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
  1 +{
  2 + "code": "0",
  3 + "data": [
  4 + {
  5 + "activityExt": null,
  6 + "appStyle": "11",
  7 + "askInfo": null,
  8 + "axisColor": "",
  9 + "bestNoticer": null,
  10 + "bottomNavId": null,
  11 + "cardItemId": "",
  12 + "channelId": 2029,
  13 + "commentInfo": null,
  14 + "corner": "",
  15 + "coverSize": "",
  16 + "coverType": null,
  17 + "coverUrl": "",
  18 + "expIds": "105",
  19 + "extra": "",
  20 + "fullColumnImgUrls": [
  21 +
  22 + ],
  23 + "hasMore": null,
  24 + "itemId": "500005310685_article_r",
  25 + "itemType": "",
  26 + "itemTypeCode": "article",
  27 + "keyArticle": 0,
  28 + "landscape": null,
  29 + "likeStyle": null,
  30 + "linkUrl": "",
  31 + "liveInfo": null,
  32 + "menuShow": 1,
  33 + "newTags": "",
  34 + "newsAuthor": "",
  35 + "newsSubTitle": "",
  36 + "newsSummary": "",
  37 + "newsTitle": "2024天津·宝坻体育旅游嘉年华活动启动",
  38 + "newsTitleColor": "",
  39 + "objectId": "30044378753",
  40 + "objectLevel": "",
  41 + "objectType": "8",
  42 + "openComment": null,
  43 + "openLikes": null,
  44 + "pageId": "",
  45 + "photoNum": null,
  46 + "position": null,
  47 + "productNum": null,
  48 + "publishTime": "1713145459000",
  49 + "pushTime": null,
  50 + "pushUnqueId": null,
  51 + "readFlag": 0,
  52 + "recommend": 1,
  53 + "relId": 500005310685,
  54 + "relObjectId": "2029",
  55 + "relType": 1,
  56 + "rmhInfo": null,
  57 + "rmhPlatform": 0,
  58 + "sceneId": "54",
  59 + "shareInfo": null,
  60 + "slideShows": [
  61 +
  62 + ],
  63 + "sortValue": null,
  64 + "source": "人民日报客户端天津频道",
  65 + "subObjectType": "",
  66 + "subSceneId": "",
  67 + "tagIds": [
  68 +
  69 + ],
  70 + "tagWord": null,
  71 + "titleShow": null,
  72 + "titleShowPolicy": null,
  73 + "topicTemplate": null,
  74 + "traceId": "a20b09c58479b22f-500005310685_article_r",
  75 + "traceInfo": "",
  76 + "userInfo": null,
  77 + "videoInfo": null,
  78 + "visitorComment": 1,
  79 + "voiceInfo": null
  80 + },
  81 + {
  82 + "activityExt": null,
  83 + "appStyle": "11",
  84 + "askInfo": null,
  85 + "axisColor": "",
  86 + "bestNoticer": null,
  87 + "bottomNavId": null,
  88 + "cardItemId": "",
  89 + "channelId": 2032,
  90 + "commentInfo": null,
  91 + "corner": "",
  92 + "coverSize": "",
  93 + "coverType": null,
  94 + "coverUrl": "",
  95 + "expIds": "105",
  96 + "extra": "",
  97 + "fullColumnImgUrls": [
  98 +
  99 + ],
  100 + "hasMore": null,
  101 + "itemId": "500005305865_article_r",
  102 + "itemType": "",
  103 + "itemTypeCode": "article",
  104 + "keyArticle": 0,
  105 + "landscape": null,
  106 + "likeStyle": null,
  107 + "linkUrl": "",
  108 + "liveInfo": null,
  109 + "menuShow": 2,
  110 + "newTags": "",
  111 + "newsAuthor": "",
  112 + "newsSubTitle": "",
  113 + "newsSummary": "",
  114 + "newsTitle": "内蒙古扎赉特旗: “书记项目”添动能 “头雁引领”聚合力",
  115 + "newsTitleColor": "",
  116 + "objectId": "30044342646",
  117 + "objectLevel": "",
  118 + "objectType": "8",
  119 + "openComment": null,
  120 + "openLikes": null,
  121 + "pageId": "",
  122 + "photoNum": null,
  123 + "position": null,
  124 + "productNum": null,
  125 + "publishTime": "1712913646000",
  126 + "pushTime": null,
  127 + "pushUnqueId": null,
  128 + "readFlag": 0,
  129 + "recommend": 1,
  130 + "relId": 500005305865,
  131 + "relObjectId": "2032",
  132 + "relType": 1,
  133 + "rmhInfo": null,
  134 + "rmhPlatform": 0,
  135 + "sceneId": "54",
  136 + "shareInfo": null,
  137 + "slideShows": [
  138 +
  139 + ],
  140 + "sortValue": null,
  141 + "source": "扎赉特旗融媒体中心",
  142 + "subObjectType": "",
  143 + "subSceneId": "",
  144 + "tagIds": [
  145 +
  146 + ],
  147 + "tagWord": null,
  148 + "titleShow": null,
  149 + "titleShowPolicy": null,
  150 + "topicTemplate": null,
  151 + "traceId": "a20b09c58479b22f-500005305865_article_r",
  152 + "traceInfo": "",
  153 + "userInfo": null,
  154 + "videoInfo": null,
  155 + "visitorComment": 1,
  156 + "voiceInfo": null
  157 + },
  158 + {
  159 + "activityExt": null,
  160 + "appStyle": "2",
  161 + "askInfo": null,
  162 + "axisColor": "",
  163 + "bestNoticer": null,
  164 + "bottomNavId": null,
  165 + "cardItemId": "",
  166 + "channelId": 2002,
  167 + "commentInfo": null,
  168 + "corner": "",
  169 + "coverSize": "828*466",
  170 + "coverType": 1,
  171 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90",
  172 + "expIds": "105",
  173 + "extra": "",
  174 + "fullColumnImgUrls": [
  175 + {
  176 + "format": null,
  177 + "fullUrl": "",
  178 + "height": 466,
  179 + "landscape": 1,
  180 + "size": 1,
  181 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90",
  182 + "weight": 828
  183 + }
  184 + ],
  185 + "hasMore": null,
  186 + "itemId": "500005310405_video_r",
  187 + "itemType": "",
  188 + "itemTypeCode": "video",
  189 + "keyArticle": 0,
  190 + "landscape": null,
  191 + "likeStyle": null,
  192 + "linkUrl": "",
  193 + "liveInfo": null,
  194 + "menuShow": 1,
  195 + "newTags": "",
  196 + "newsAuthor": "",
  197 + "newsSubTitle": "",
  198 + "newsSummary": "",
  199 + "newsTitle": "华丽绚烂!看了洛阳牡丹才知国色天香",
  200 + "newsTitleColor": "",
  201 + "objectId": "30044374037",
  202 + "objectLevel": "",
  203 + "objectType": "1",
  204 + "openComment": null,
  205 + "openLikes": null,
  206 + "pageId": "",
  207 + "photoNum": null,
  208 + "position": null,
  209 + "productNum": null,
  210 + "publishTime": "1713095130000",
  211 + "pushTime": null,
  212 + "pushUnqueId": null,
  213 + "readFlag": 0,
  214 + "recommend": 1,
  215 + "relId": 500005310405,
  216 + "relObjectId": "2002",
  217 + "relType": 1,
  218 + "rmhInfo": null,
  219 + "rmhPlatform": 0,
  220 + "sceneId": "54",
  221 + "shareInfo": null,
  222 + "slideShows": [
  223 +
  224 + ],
  225 + "sortValue": null,
  226 + "source": "荔枝风景线微博",
  227 + "subObjectType": "",
  228 + "subSceneId": "",
  229 + "tagIds": [
  230 +
  231 + ],
  232 + "tagWord": null,
  233 + "titleShow": null,
  234 + "titleShowPolicy": null,
  235 + "topicTemplate": null,
  236 + "traceId": "a20b09c58479b22f-500005310405_video_r",
  237 + "traceInfo": "",
  238 + "userInfo": null,
  239 + "videoInfo": {
  240 + "firstFrameImageUri": "",
  241 + "videoDuration": 19,
  242 + "videoLandscape": 1,
  243 + "videoUrl": "https://rmrbcmsonline.peopleapp.com/upload/video/mp4/202404/17130877420e174c2c6c260ac9.mp4"
  244 + },
  245 + "visitorComment": 1,
  246 + "voiceInfo": null
  247 + },
  248 + {
  249 + "activityExt": null,
  250 + "appStyle": "13",
  251 + "askInfo": null,
  252 + "axisColor": "",
  253 + "bestNoticer": null,
  254 + "bottomNavId": null,
  255 + "cardItemId": "",
  256 + "channelId": 2002,
  257 + "commentInfo": null,
  258 + "corner": "",
  259 + "coverSize": "619*466",
  260 + "coverType": 1,
  261 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  262 + "expIds": "105",
  263 + "extra": "",
  264 + "fullColumnImgUrls": [
  265 + {
  266 + "format": null,
  267 + "fullUrl": "",
  268 + "height": 466,
  269 + "landscape": 1,
  270 + "size": 1,
  271 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  272 + "weight": 619
  273 + }
  274 + ],
  275 + "hasMore": null,
  276 + "itemId": "500005324157_article_r",
  277 + "itemType": "",
  278 + "itemTypeCode": "article",
  279 + "keyArticle": 0,
  280 + "landscape": null,
  281 + "likeStyle": null,
  282 + "linkUrl": "",
  283 + "liveInfo": null,
  284 + "menuShow": 2,
  285 + "newTags": "",
  286 + "newsAuthor": "",
  287 + "newsSubTitle": "",
  288 + "newsSummary": "祝福“中国天眼”!怀念南老先生!",
  289 + "newsTitle": "这超900颗新脉冲星,多希望他能看到啊",
  290 + "newsTitleColor": "",
  291 + "objectId": "30044454971",
  292 + "objectLevel": "",
  293 + "objectType": "8",
  294 + "openComment": null,
  295 + "openLikes": null,
  296 + "pageId": "",
  297 + "photoNum": null,
  298 + "position": null,
  299 + "productNum": null,
  300 + "publishTime": "1713431569000",
  301 + "pushTime": null,
  302 + "pushUnqueId": null,
  303 + "readFlag": 0,
  304 + "recommend": 1,
  305 + "relId": 500005324157,
  306 + "relObjectId": "2002",
  307 + "relType": 1,
  308 + "rmhInfo": null,
  309 + "rmhPlatform": 0,
  310 + "sceneId": "54",
  311 + "shareInfo": null,
  312 + "slideShows": [
  313 +
  314 + ],
  315 + "sortValue": null,
  316 + "source": "新华社微信公号",
  317 + "subObjectType": "",
  318 + "subSceneId": "",
  319 + "tagIds": [
  320 +
  321 + ],
  322 + "tagWord": null,
  323 + "titleShow": null,
  324 + "titleShowPolicy": null,
  325 + "topicTemplate": null,
  326 + "traceId": "a20b09c58479b22f-500005324157_article_r",
  327 + "traceInfo": "",
  328 + "userInfo": null,
  329 + "videoInfo": null,
  330 + "visitorComment": 1,
  331 + "voiceInfo": null
  332 + },
  333 + {
  334 + "activityExt": null,
  335 + "appStyle": "13",
  336 + "askInfo": null,
  337 + "axisColor": "",
  338 + "bestNoticer": null,
  339 + "bottomNavId": null,
  340 + "cardItemId": "",
  341 + "channelId": 2037,
  342 + "commentInfo": null,
  343 + "corner": "",
  344 + "coverSize": "700*525",
  345 + "coverType": 1,
  346 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  347 + "expIds": "105",
  348 + "extra": "",
  349 + "fullColumnImgUrls": [
  350 + {
  351 + "format": null,
  352 + "fullUrl": "",
  353 + "height": 525,
  354 + "landscape": 1,
  355 + "size": 1,
  356 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  357 + "weight": 700
  358 + }
  359 + ],
  360 + "hasMore": null,
  361 + "itemId": "500005322754_article_r",
  362 + "itemType": "",
  363 + "itemTypeCode": "article",
  364 + "keyArticle": 0,
  365 + "landscape": null,
  366 + "likeStyle": null,
  367 + "linkUrl": "",
  368 + "liveInfo": null,
  369 + "menuShow": 1,
  370 + "newTags": "",
  371 + "newsAuthor": "",
  372 + "newsSubTitle": "",
  373 + "newsSummary": "",
  374 + "newsTitle": "神舟十八号船箭组合体转运至发射区 计划近日择机实施发射",
  375 + "newsTitleColor": "",
  376 + "objectId": "30044447518",
  377 + "objectLevel": "",
  378 + "objectType": "8",
  379 + "openComment": null,
  380 + "openLikes": null,
  381 + "pageId": "",
  382 + "photoNum": null,
  383 + "position": null,
  384 + "productNum": null,
  385 + "publishTime": "1713433480000",
  386 + "pushTime": null,
  387 + "pushUnqueId": null,
  388 + "readFlag": 0,
  389 + "recommend": 1,
  390 + "relId": 500005322754,
  391 + "relObjectId": "2037",
  392 + "relType": 1,
  393 + "rmhInfo": null,
  394 + "rmhPlatform": 0,
  395 + "sceneId": "54",
  396 + "shareInfo": null,
  397 + "slideShows": [
  398 +
  399 + ],
  400 + "sortValue": null,
  401 + "source": "人民日报客户端",
  402 + "subObjectType": "",
  403 + "subSceneId": "",
  404 + "tagIds": [
  405 +
  406 + ],
  407 + "tagWord": null,
  408 + "titleShow": null,
  409 + "titleShowPolicy": null,
  410 + "topicTemplate": null,
  411 + "traceId": "a20b09c58479b22f-500005322754_article_r",
  412 + "traceInfo": "",
  413 + "userInfo": null,
  414 + "videoInfo": null,
  415 + "visitorComment": 1,
  416 + "voiceInfo": null
  417 + },
  418 + {
  419 + "activityExt": null,
  420 + "appStyle": "13",
  421 + "askInfo": null,
  422 + "axisColor": "",
  423 + "bestNoticer": null,
  424 + "bottomNavId": null,
  425 + "cardItemId": "",
  426 + "channelId": 2050,
  427 + "commentInfo": null,
  428 + "corner": "",
  429 + "coverSize": "619*466",
  430 + "coverType": 1,
  431 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  432 + "expIds": "105",
  433 + "extra": "",
  434 + "fullColumnImgUrls": [
  435 + {
  436 + "format": null,
  437 + "fullUrl": "",
  438 + "height": 466,
  439 + "landscape": 1,
  440 + "size": 1,
  441 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  442 + "weight": 619
  443 + }
  444 + ],
  445 + "hasMore": null,
  446 + "itemId": "500005306852_article_r",
  447 + "itemType": "",
  448 + "itemTypeCode": "article",
  449 + "keyArticle": 0,
  450 + "landscape": null,
  451 + "likeStyle": null,
  452 + "linkUrl": "",
  453 + "liveInfo": null,
  454 + "menuShow": 1,
  455 + "newTags": "",
  456 + "newsAuthor": "",
  457 + "newsSubTitle": "",
  458 + "newsSummary": "",
  459 + "newsTitle": "罕见!贵州梵净山再现“佛光”奇观",
  460 + "newsTitleColor": "",
  461 + "objectId": "30044345083",
  462 + "objectLevel": "",
  463 + "objectType": "8",
  464 + "openComment": null,
  465 + "openLikes": null,
  466 + "pageId": "",
  467 + "photoNum": null,
  468 + "position": null,
  469 + "productNum": null,
  470 + "publishTime": "1712934235000",
  471 + "pushTime": null,
  472 + "pushUnqueId": null,
  473 + "readFlag": 0,
  474 + "recommend": 1,
  475 + "relId": 500005306852,
  476 + "relObjectId": "2050",
  477 + "relType": 1,
  478 + "rmhInfo": null,
  479 + "rmhPlatform": 0,
  480 + "sceneId": "54",
  481 + "shareInfo": null,
  482 + "slideShows": [
  483 +
  484 + ],
  485 + "sortValue": null,
  486 + "source": "微铜仁",
  487 + "subObjectType": "",
  488 + "subSceneId": "",
  489 + "tagIds": [
  490 +
  491 + ],
  492 + "tagWord": null,
  493 + "titleShow": null,
  494 + "titleShowPolicy": null,
  495 + "topicTemplate": null,
  496 + "traceId": "a20b09c58479b22f-500005306852_article_r",
  497 + "traceInfo": "",
  498 + "userInfo": null,
  499 + "videoInfo": null,
  500 + "visitorComment": 1,
  501 + "voiceInfo": null
  502 + },
  503 + {
  504 + "activityExt": null,
  505 + "appStyle": "13",
  506 + "askInfo": null,
  507 + "axisColor": "",
  508 + "bestNoticer": null,
  509 + "bottomNavId": null,
  510 + "cardItemId": "",
  511 + "channelId": 2028,
  512 + "commentInfo": null,
  513 + "corner": "",
  514 + "coverSize": "1103*621",
  515 + "coverType": 1,
  516 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_58921713104730.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  517 + "expIds": "105",
  518 + "extra": "",
  519 + "fullColumnImgUrls": [
  520 + {
  521 + "format": null,
  522 + "fullUrl": "",
  523 + "height": 621,
  524 + "landscape": 1,
  525 + "size": 1,
  526 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/rmrb_58921713104730.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  527 + "weight": 1103
  528 + }
  529 + ],
  530 + "hasMore": null,
  531 + "itemId": "500005310563_article_r",
  532 + "itemType": "",
  533 + "itemTypeCode": "article",
  534 + "keyArticle": 0,
  535 + "landscape": null,
  536 + "likeStyle": null,
  537 + "linkUrl": "",
  538 + "liveInfo": null,
  539 + "menuShow": 2,
  540 + "newTags": "",
  541 + "newsAuthor": "",
  542 + "newsSubTitle": "",
  543 + "newsSummary": "",
  544 + "newsTitle": "行知读书会分享松江方塔园背后的故事",
  545 + "newsTitleColor": "",
  546 + "objectId": "30044377688",
  547 + "objectLevel": "",
  548 + "objectType": "8",
  549 + "openComment": null,
  550 + "openLikes": null,
  551 + "pageId": "",
  552 + "photoNum": null,
  553 + "position": null,
  554 + "productNum": null,
  555 + "publishTime": "1713108215000",
  556 + "pushTime": null,
  557 + "pushUnqueId": null,
  558 + "readFlag": 0,
  559 + "recommend": 1,
  560 + "relId": 500005310563,
  561 + "relObjectId": "2028",
  562 + "relType": 1,
  563 + "rmhInfo": null,
  564 + "rmhPlatform": 0,
  565 + "sceneId": "54",
  566 + "shareInfo": null,
  567 + "slideShows": [
  568 +
  569 + ],
  570 + "sortValue": null,
  571 + "source": "人民日报客户端上海频道",
  572 + "subObjectType": "",
  573 + "subSceneId": "",
  574 + "tagIds": [
  575 +
  576 + ],
  577 + "tagWord": null,
  578 + "titleShow": null,
  579 + "titleShowPolicy": null,
  580 + "topicTemplate": null,
  581 + "traceId": "a20b09c58479b22f-500005310563_article_r",
  582 + "traceInfo": "",
  583 + "userInfo": null,
  584 + "videoInfo": null,
  585 + "visitorComment": 1,
  586 + "voiceInfo": null
  587 + },
  588 + {
  589 + "activityExt": null,
  590 + "appStyle": "13",
  591 + "askInfo": null,
  592 + "axisColor": "",
  593 + "bestNoticer": null,
  594 + "bottomNavId": null,
  595 + "cardItemId": "",
  596 + "channelId": 2002,
  597 + "commentInfo": null,
  598 + "corner": "",
  599 + "coverSize": "619*466",
  600 + "coverType": 1,
  601 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  602 + "expIds": "105",
  603 + "extra": "",
  604 + "fullColumnImgUrls": [
  605 + {
  606 + "format": null,
  607 + "fullUrl": "",
  608 + "height": 466,
  609 + "landscape": 1,
  610 + "size": 1,
  611 + "url": "https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  612 + "weight": 619
  613 + }
  614 + ],
  615 + "hasMore": null,
  616 + "itemId": "500005332338_article_r",
  617 + "itemType": "",
  618 + "itemTypeCode": "article",
  619 + "keyArticle": 0,
  620 + "landscape": null,
  621 + "likeStyle": null,
  622 + "linkUrl": "",
  623 + "liveInfo": null,
  624 + "menuShow": 2,
  625 + "newTags": "",
  626 + "newsAuthor": "",
  627 + "newsSubTitle": "",
  628 + "newsSummary": "送别老人!",
  629 + "newsTitle": "93岁南京大屠杀幸存者刘素珍去世",
  630 + "newsTitleColor": "",
  631 + "objectId": "30044516097",
  632 + "objectLevel": "",
  633 + "objectType": "8",
  634 + "openComment": null,
  635 + "openLikes": null,
  636 + "pageId": "",
  637 + "photoNum": null,
  638 + "position": null,
  639 + "productNum": null,
  640 + "publishTime": "1713750664000",
  641 + "pushTime": null,
  642 + "pushUnqueId": null,
  643 + "readFlag": 0,
  644 + "recommend": 1,
  645 + "relId": 500005332338,
  646 + "relObjectId": "2002",
  647 + "relType": 1,
  648 + "rmhInfo": null,
  649 + "rmhPlatform": 0,
  650 + "sceneId": "54",
  651 + "shareInfo": null,
  652 + "slideShows": [
  653 +
  654 + ],
  655 + "sortValue": null,
  656 + "source": "侵华日军南京大屠杀遇难同胞纪念馆",
  657 + "subObjectType": "",
  658 + "subSceneId": "",
  659 + "tagIds": [
  660 +
  661 + ],
  662 + "tagWord": null,
  663 + "titleShow": null,
  664 + "titleShowPolicy": null,
  665 + "topicTemplate": null,
  666 + "traceId": "a20b09c58479b22f-500005332338_article_r",
  667 + "traceInfo": "",
  668 + "userInfo": null,
  669 + "videoInfo": null,
  670 + "visitorComment": 1,
  671 + "voiceInfo": null
  672 + },
  673 + {
  674 + "activityExt": null,
  675 + "appStyle": "11",
  676 + "askInfo": null,
  677 + "axisColor": "",
  678 + "bestNoticer": null,
  679 + "bottomNavId": null,
  680 + "cardItemId": "",
  681 + "channelId": 2037,
  682 + "commentInfo": null,
  683 + "corner": "",
  684 + "coverSize": "",
  685 + "coverType": null,
  686 + "coverUrl": "",
  687 + "expIds": "105",
  688 + "extra": "",
  689 + "fullColumnImgUrls": [
  690 +
  691 + ],
  692 + "hasMore": null,
  693 + "itemId": "500005320193_article_r",
  694 + "itemType": "",
  695 + "itemTypeCode": "article",
  696 + "keyArticle": 0,
  697 + "landscape": null,
  698 + "likeStyle": null,
  699 + "linkUrl": "",
  700 + "liveInfo": null,
  701 + "menuShow": 2,
  702 + "newTags": "",
  703 + "newsAuthor": "",
  704 + "newsSubTitle": "",
  705 + "newsSummary": "",
  706 + "newsTitle": "高能级科创平台如何赋能衢州高质量发展?这些成果令人瞩目",
  707 + "newsTitleColor": "",
  708 + "objectId": "30044430493",
  709 + "objectLevel": "",
  710 + "objectType": "8",
  711 + "openComment": null,
  712 + "openLikes": null,
  713 + "pageId": "",
  714 + "photoNum": null,
  715 + "position": null,
  716 + "productNum": null,
  717 + "publishTime": "1713339049000",
  718 + "pushTime": null,
  719 + "pushUnqueId": null,
  720 + "readFlag": 0,
  721 + "recommend": 1,
  722 + "relId": 500005320193,
  723 + "relObjectId": "2037",
  724 + "relType": 1,
  725 + "rmhInfo": null,
  726 + "rmhPlatform": 0,
  727 + "sceneId": "54",
  728 + "shareInfo": null,
  729 + "slideShows": [
  730 +
  731 + ],
  732 + "sortValue": null,
  733 + "source": "人民日报客户端浙江频道",
  734 + "subObjectType": "",
  735 + "subSceneId": "",
  736 + "tagIds": [
  737 +
  738 + ],
  739 + "tagWord": null,
  740 + "titleShow": null,
  741 + "titleShowPolicy": null,
  742 + "topicTemplate": null,
  743 + "traceId": "a20b09c58479b22f-500005320193_article_r",
  744 + "traceInfo": "",
  745 + "userInfo": null,
  746 + "videoInfo": null,
  747 + "visitorComment": 1,
  748 + "voiceInfo": null
  749 + },
  750 + {
  751 + "activityExt": null,
  752 + "appStyle": "13",
  753 + "askInfo": null,
  754 + "axisColor": "",
  755 + "bestNoticer": null,
  756 + "bottomNavId": null,
  757 + "cardItemId": "",
  758 + "channelId": 2037,
  759 + "commentInfo": null,
  760 + "corner": "",
  761 + "coverSize": "600*400",
  762 + "coverType": 1,
  763 + "coverUrl": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240417/a_965028022405033985.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  764 + "expIds": "105",
  765 + "extra": "",
  766 + "fullColumnImgUrls": [
  767 + {
  768 + "format": null,
  769 + "fullUrl": "",
  770 + "height": 400,
  771 + "landscape": 1,
  772 + "size": 1,
  773 + "url": "https://rmrbcmsonline.peopleapp.com/upload/ueditor/image/20240417/a_965028022405033985.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90",
  774 + "weight": 600
  775 + }
  776 + ],
  777 + "hasMore": null,
  778 + "itemId": "500005318711_article_r",
  779 + "itemType": "",
  780 + "itemTypeCode": "article",
  781 + "keyArticle": 0,
  782 + "landscape": null,
  783 + "likeStyle": null,
  784 + "linkUrl": "",
  785 + "liveInfo": null,
  786 + "menuShow": 2,
  787 + "newTags": "",
  788 + "newsAuthor": "",
  789 + "newsSubTitle": "",
  790 + "newsSummary": "",
  791 + "newsTitle": "增长缘何“超预期”?三个维度读懂",
  792 + "newsTitleColor": "",
  793 + "objectId": "30044422916",
  794 + "objectLevel": "",
  795 + "objectType": "8",
  796 + "openComment": null,
  797 + "openLikes": null,
  798 + "pageId": "",
  799 + "photoNum": null,
  800 + "position": null,
  801 + "productNum": null,
  802 + "publishTime": "1713319371000",
  803 + "pushTime": null,
  804 + "pushUnqueId": null,
  805 + "readFlag": 0,
  806 + "recommend": 1,
  807 + "relId": 500005318711,
  808 + "relObjectId": "2037",
  809 + "relType": 1,
  810 + "rmhInfo": null,
  811 + "rmhPlatform": 0,
  812 + "sceneId": "54",
  813 + "shareInfo": null,
  814 + "slideShows": [
  815 +
  816 + ],
  817 + "sortValue": null,
  818 + "source": "央视新闻客户端",
  819 + "subObjectType": "",
  820 + "subSceneId": "",
  821 + "tagIds": [
  822 +
  823 + ],
  824 + "tagWord": null,
  825 + "titleShow": null,
  826 + "titleShowPolicy": null,
  827 + "topicTemplate": null,
  828 + "traceId": "a20b09c58479b22f-500005318711_article_r",
  829 + "traceInfo": "",
  830 + "userInfo": null,
  831 + "videoInfo": null,
  832 + "visitorComment": 1,
  833 + "voiceInfo": null
  834 + }
  835 + ],
  836 + "message": "Success",
  837 + "meta": null,
  838 + "requestId": "",
  839 + "success": true,
  840 + "timestamp": 1713752234695
  841 +}