zhenghy
Showing 66 changed files with 2911 additions and 454 deletions
@@ -45,5 +45,9 @@ export class ContentConstants { @@ -45,5 +45,9 @@ export class ContentConstants {
45 */ 45 */
46 static readonly TYPE_FIFTEEN: string = "15"; 46 static readonly TYPE_FIFTEEN: string = "15";
47 47
  48 + /**
  49 + * 30:金刚位聚合页
  50 + */
  51 + static readonly TYPE_THIRTY: string = "30";
48 52
49 } 53 }
@@ -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 }
1 import { Action } from './Action'; 1 import { Action } from './Action';
2 interface dataObject { 2 interface dataObject {
  3 + // dataSource:
  4 + // 1、图文详情数据
  5 + // 2、英文端跳转推荐内容数据
  6 + // 3、显示图片预览
  7 + // 4、专题pageinfo数据
  8 + // 5、专题comp运营位点击跳转(传给App记录浏览历史)
  9 + // 6、图文详情引用内容跳转
  10 + // 7、专题分享海报图上的数据列表(H5可选第一页前5条运营位数据)
  11 + // 8、活动投稿 文章跳转
  12 + // 9、活动投稿 视频跳转
  13 + // 10、活动投稿 动态跳转
  14 + // 11、活动投稿 图集跳转
3 dataSource: number 15 dataSource: number
4 operateType?: string 16 operateType?: string
5 webViewHeight?: string 17 webViewHeight?: string
@@ -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
@@ -22,6 +22,11 @@ export class Logger { @@ -22,6 +22,11 @@ export class Logger {
22 private static domain: number = 0xFF00; 22 private static domain: number = 0xFF00;
23 private static prefix: string = 'SightApp'; 23 private static prefix: string = 'SightApp';
24 private static format: string = `%{public}s, %{public}s`; 24 private static format: string = `%{public}s, %{public}s`;
  25 + private static format_ext: string = `%{public}s`;
  26 + /**
  27 + * 暂时没找到限制大小相关文档,尝试4000是不行的,3500可以。可以后续优化
  28 + */
  29 + private static CHUNK_SIZE: number = 3500;
25 static isDebug: boolean = true; 30 static isDebug: boolean = true;
26 31
27 /** 32 /**
@@ -36,46 +41,113 @@ export class Logger { @@ -36,46 +41,113 @@ export class Logger {
36 } 41 }
37 42
38 static debug(...args: string[]) { 43 static debug(...args: string[]) {
39 - if(!Logger.isDebug){ 44 + if (!Logger.isDebug) {
40 return 45 return
41 } 46 }
42 - hilog.debug(Logger.domain, Logger.prefix, Logger.format, args); 47 + Logger.logContent(LogLevel.DEBUG, ...args)
43 } 48 }
44 49
45 static info(...args: string[]) { 50 static info(...args: string[]) {
46 - if(!Logger.isDebug){ 51 + if (!Logger.isDebug) {
47 return 52 return
48 } 53 }
49 - hilog.info(Logger.domain, Logger.prefix, Logger.format, args); 54 + Logger.logContent(LogLevel.INFO, ...args)
50 } 55 }
51 56
52 static warn(...args: string[]) { 57 static warn(...args: string[]) {
53 - if(!Logger.isDebug){ 58 + if (!Logger.isDebug) {
54 return 59 return
55 } 60 }
56 - hilog.warn(Logger.domain, Logger.prefix, Logger.format, args); 61 + Logger.logContent(LogLevel.WARN, ...args)
57 } 62 }
58 63
59 static error(...args: string[]) { 64 static error(...args: string[]) {
60 - if(!Logger.isDebug){ 65 + if (!Logger.isDebug) {
61 return 66 return
62 } 67 }
63 - hilog.error(Logger.domain, Logger.prefix, Logger.format, args); 68 + Logger.logContent(LogLevel.ERROR, ...args)
64 } 69 }
65 70
66 static fatal(...args: string[]) { 71 static fatal(...args: string[]) {
67 - if(!Logger.isDebug){ 72 + if (!Logger.isDebug) {
68 return 73 return
69 } 74 }
70 - hilog.fatal(Logger.domain, Logger.prefix, Logger.format, args); 75 + Logger.logContent(LogLevel.FATAL, ...args)
71 } 76 }
72 77
73 static isLoggable(level: LogLevel) { 78 static isLoggable(level: LogLevel) {
74 - if(!Logger.isDebug){ 79 + if (!Logger.isDebug) {
75 return 80 return
76 } 81 }
  82 + // 判断是否打印 TODO
77 hilog.isLoggable(Logger.domain, Logger.prefix, level); 83 hilog.isLoggable(Logger.domain, Logger.prefix, level);
78 } 84 }
  85 +
  86 + static logContent(level: LogLevel, ...args: string[]) {
  87 + let msg = Logger.getMsg(...args)
  88 + let length = msg.length
  89 + if (length < Logger.CHUNK_SIZE) {
  90 + // 不超限,保持原来的打印
  91 + Logger.print(level, ...args)
  92 + } else {
  93 + // 超限,分段打印
  94 + for (let i = 0; i < length; i += Logger.CHUNK_SIZE) {
  95 + let count = Math.min(length - i, Logger.CHUNK_SIZE);
  96 + Logger.printExt(level, msg.substring(i, i + count));
  97 + }
  98 + }
  99 + }
  100 +
  101 + static print(level: LogLevel, ...msg: string[]) {
  102 + switch (level) {
  103 + case LogLevel.DEBUG:
  104 + hilog.debug(Logger.domain, Logger.prefix, Logger.format, msg);
  105 + break
  106 + case LogLevel.INFO:
  107 + hilog.info(Logger.domain, Logger.prefix, Logger.format, msg);
  108 + break
  109 + case LogLevel.WARN:
  110 + hilog.warn(Logger.domain, Logger.prefix, Logger.format, msg);
  111 + break
  112 + case LogLevel.ERROR:
  113 + hilog.error(Logger.domain, Logger.prefix, Logger.format, msg);
  114 + break
  115 + case LogLevel.FATAL:
  116 + hilog.fatal(Logger.domain, Logger.prefix, Logger.format, msg);
  117 + break
  118 + }
  119 + }
  120 +
  121 + static printExt(level: LogLevel, msg: string) {
  122 + switch (level) {
  123 + case LogLevel.DEBUG:
  124 + hilog.debug(Logger.domain, Logger.prefix, Logger.format_ext, msg);
  125 + break
  126 + case LogLevel.INFO:
  127 + hilog.info(Logger.domain, Logger.prefix, Logger.format_ext, msg);
  128 + break
  129 + case LogLevel.WARN:
  130 + hilog.warn(Logger.domain, Logger.prefix, Logger.format_ext, msg);
  131 + break
  132 + case LogLevel.ERROR:
  133 + hilog.error(Logger.domain, Logger.prefix, Logger.format_ext, msg);
  134 + break
  135 + case LogLevel.FATAL:
  136 + hilog.fatal(Logger.domain, Logger.prefix, Logger.format_ext, msg);
  137 + break
  138 + }
  139 + }
  140 +
  141 + static getMsg(...args: string[]): string {
  142 + if (args == null || args.length <= 0) {
  143 + return '';
  144 + }
  145 + let msg = ''
  146 + args.forEach((v) => {
  147 + msg = msg.concat(', ').concat(v)
  148 + })
  149 + return msg.substring(2, msg.length);
  150 + }
79 } 151 }
80 152
81 export default new Logger('SightApp', 0xFF00) 153 export default new Logger('SightApp', 0xFF00)
  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 +}
@@ -26,7 +26,7 @@ export class ResourcesUtils { @@ -26,7 +26,7 @@ export class ResourcesUtils {
26 try { 26 try {
27 let text = buffer.from(content).toString("utf8"); 27 let text = buffer.from(content).toString("utf8");
28 if (text) { 28 if (text) {
29 - Logger.info(TAG, "getResourcesText then text:" + text); 29 + // Logger.info(TAG, "getResourcesText then text:" + text);
30 success(text); 30 success(text);
31 } else { 31 } else {
32 Logger.warn(TAG, "getResourcesText then text is empty"); 32 Logger.warn(TAG, "getResourcesText then text is empty");
@@ -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 }
@@ -12,8 +12,17 @@ export interface ResponseDTO<T = string> { @@ -12,8 +12,17 @@ export interface ResponseDTO<T = string> {
12 12
13 // 响应结果 13 // 响应结果
14 data?: T; 14 data?: T;
  15 +
  16 + /**
  17 + * @deprecated
  18 + */
15 totalCount?: number; 19 totalCount?: number;
  20 + meta?: MetaDTO;
16 21
17 // 请求响应时间戳(unix格式) 22 // 请求响应时间戳(unix格式)
18 timestamp?: number; 23 timestamp?: number;
  24 +}
  25 +
  26 +export interface MetaDTO {
  27 + md5: string;
19 } 28 }
@@ -38,6 +38,7 @@ instance.interceptors.request.use( @@ -38,6 +38,7 @@ instance.interceptors.request.use(
38 } 38 }
39 // 公共请求参数 39 // 公共请求参数
40 // config.params.key = key 40 // config.params.key = key
  41 + Logger.debug('HttpRequest', 'request: ' + config.url)
41 return config; 42 return config;
42 }, 43 },
43 (error: AxiosError) => { 44 (error: AxiosError) => {
@@ -85,9 +86,9 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r @@ -85,9 +86,9 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r
85 // return Promise.reject(new Error(message)) 86 // return Promise.reject(new Error(message))
86 // } 87 // }
87 // const data: ResponseBean<any> = response.data 88 // const data: ResponseBean<any> = response.data
88 - Logger.debug('HttpRequest', 'response ======start======= ') 89 + Logger.debug('HttpRequest', 'response ==============start=================')
89 Logger.debug('HttpRequest', 'response: ' + JSON.stringify(response.data)) 90 Logger.debug('HttpRequest', 'response: ' + JSON.stringify(response.data))
90 - Logger.debug('HttpRequest', 'response ======end======= ') 91 + Logger.debug('HttpRequest', 'response ==============end=================')
91 // 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据 92 // 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据
92 return response.data; 93 return response.data;
93 } else { 94 } else {
@@ -102,7 +103,7 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r @@ -102,7 +103,7 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r
102 // console.log(error.request) 103 // console.log(error.request)
103 // console.log(error.response) 104 // console.log(error.response)
104 // 这里用来处理http常见错误,进行全局提示 105 // 这里用来处理http常见错误,进行全局提示
105 - if(error!=null && error.response!=null ){ 106 + if (error != null && error.response != null) {
106 let message = buildErrorMsg(error.response.status); 107 let message = buildErrorMsg(error.response.status);
107 // 错误消息可以使用全局弹框展示出来 108 // 错误消息可以使用全局弹框展示出来
108 console.log(`httpStatus:${error.response?.status}-${message},请检查网络或联系管理员!`) 109 console.log(`httpStatus:${error.response?.status}-${message},请检查网络或联系管理员!`)
@@ -225,6 +225,10 @@ export class HttpUrlUtils { @@ -225,6 +225,10 @@ export class HttpUrlUtils {
225 */ 225 */
226 static readonly LIVE_APPOINTMENT_PATH: string = "/api/live-center-message/zh/c/live/subscribe"; 226 static readonly LIVE_APPOINTMENT_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
227 /** 227 /**
  228 + * 预约状态
  229 + */
  230 + static readonly LIVE_APPOINTMENT_BATCH_PATH: string = "api/live-center-message/zh/c/live/subscribe/user/batch";
  231 + /**
228 232
229 * 搜索结果 显示tab 数 233 * 搜索结果 显示tab 数
230 */ 234 */
@@ -285,13 +289,17 @@ export class HttpUrlUtils { @@ -285,13 +289,17 @@ export class HttpUrlUtils {
285 * 获取启动页相关数据 289 * 获取启动页相关数据
286 */ 290 */
287 static readonly LAUNCH_PAGE_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/launchPage"; 291 static readonly LAUNCH_PAGE_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/launchPage";
288 -  
289 private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT; 292 private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
290 /** 293 /**
291 * 推荐列表 294 * 推荐列表
292 */ 295 */
293 static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list"; 296 static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
294 297
  298 + /**
  299 + * 搜索推荐
  300 + */
  301 + static readonly SEARCH_SUGGEST_DATA_PATH: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
  302 +
295 public static set hostUrl(value: string) { 303 public static set hostUrl(value: string) {
296 HttpUrlUtils._hostUrl = value; 304 HttpUrlUtils._hostUrl = value;
297 } 305 }
@@ -324,8 +332,9 @@ export class HttpUrlUtils { @@ -324,8 +332,9 @@ export class HttpUrlUtils {
324 headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A') 332 headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A')
325 headers.set('imei', HttpUrlUtils.getImei()) 333 headers.set('imei', HttpUrlUtils.getImei())
326 headers.set('Accept-Language', 'zh') 334 headers.set('Accept-Language', 'zh')
327 - headers.set('city', HttpUrlUtils.getCity())  
328 - headers.set('city_dode', HttpUrlUtils.getCityCode()) 335 + // headers.set('city', HttpUrlUtils.getCity())
  336 + // headers.set('city_dode', HttpUrlUtils.getCityCode())
  337 + HttpUrlUtils.setLocationHeader(headers)
329 // TODO 判断是否登录 338 // TODO 判断是否登录
330 headers.set('userId', HttpUrlUtils.getUserId()) 339 headers.set('userId', HttpUrlUtils.getUserId())
331 headers.set('userType', HttpUrlUtils.getUserType()) 340 headers.set('userType', HttpUrlUtils.getUserType())
@@ -368,6 +377,17 @@ export class HttpUrlUtils { @@ -368,6 +377,17 @@ export class HttpUrlUtils {
368 } 377 }
369 } 378 }
370 379
  380 + static setLocationHeader(headers: HashMap<string, string>) {
  381 + let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string
  382 + if (StringUtils.isNotEmpty(cityName)) {
  383 + headers.set('city', encodeURI(cityName))
  384 + }
  385 + let cityCode = SPHelper.default.getSync(SpConstants.LOCATION_CITY_CODE, '') as string
  386 + if (StringUtils.isNotEmpty(cityCode)) {
  387 + headers.set('city_dode', encodeURI(cityCode))
  388 + }
  389 + }
  390 +
371 static getHost() { 391 static getHost() {
372 return HttpUrlUtils._hostUrl; 392 return HttpUrlUtils._hostUrl;
373 } 393 }
@@ -463,7 +483,7 @@ export class HttpUrlUtils { @@ -463,7 +483,7 @@ export class HttpUrlUtils {
463 return 'Android'; 483 return 'Android';
464 } 484 }
465 485
466 - private static getImei() { 486 + public static getImei() {
467 // TODO 487 // TODO
468 return '8a81226a-cabd-3e1b-b630-b51db4a720ed'; 488 return '8a81226a-cabd-3e1b-b630-b51db4a720ed';
469 } 489 }
@@ -755,6 +775,11 @@ export class HttpUrlUtils { @@ -755,6 +775,11 @@ export class HttpUrlUtils {
755 return url 775 return url
756 } 776 }
757 777
  778 + static getAppointmentStatusUrl() {
  779 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.LIVE_APPOINTMENT_BATCH_PATH
  780 + return url
  781 + }
  782 +
758 static getSearchResultCountDataUrl() { 783 static getSearchResultCountDataUrl() {
759 let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_COUNT_DATA_PATH 784 let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_COUNT_DATA_PATH
760 return url 785 return url
@@ -795,6 +820,17 @@ export class HttpUrlUtils { @@ -795,6 +820,17 @@ export class HttpUrlUtils {
795 let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike"; 820 let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike";
796 return url; 821 return url;
797 } 822 }
  823 + //搜索推荐
  824 + static getSearchSuggestDataUrl() {
  825 + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_SUGGEST_DATA_PATH
  826 + return url
  827 + }
  828 +
  829 + //金刚位聚合页
  830 + static getThemeListUrl() {
  831 + let url = HttpUrlUtils._hostUrl + "/api/rmrb-bff-display-zh/display/zh/c/themeList";
  832 + return url;
  833 + }
798 834
799 // static getYcgCommonHeaders(): HashMap<string, string> { 835 // static getYcgCommonHeaders(): HashMap<string, string> {
800 // let headers: HashMap<string, string> = new HashMap<string, string>() 836 // let headers: HashMap<string, string> = new HashMap<string, string>()
@@ -65,6 +65,8 @@ export function registerRouter() { @@ -65,6 +65,8 @@ export function registerRouter() {
65 return WDRouterPage.audioDetail 65 return WDRouterPage.audioDetail
66 } else if (action.params?.detailPageType == 18) { 66 } else if (action.params?.detailPageType == 18) {
67 return WDRouterPage.multiPictureListPage 67 return WDRouterPage.multiPictureListPage
  68 + }else if (action.params?.detailPageType == 30) {
  69 + return WDRouterPage.themeListPage
68 } 70 }
69 return WDRouterPage.detailPlayVodPage 71 return WDRouterPage.detailPlayVodPage
70 }) 72 })
@@ -118,4 +118,6 @@ export class WDRouterPage { @@ -118,4 +118,6 @@ export class WDRouterPage {
118 static liveMorePage = new WDRouterPage("wdComponent", "ets/components/page/LiveMorePage"); 118 static liveMorePage = new WDRouterPage("wdComponent", "ets/components/page/LiveMorePage");
119 //预约更多页 119 //预约更多页
120 static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage"); 120 static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage");
  121 + //金刚位聚合页
  122 + static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage");
121 } 123 }
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';
5 import { WDRouterRule } from '../router/WDRouterRule'; 5 import { WDRouterRule } from '../router/WDRouterRule';
6 import { ContentConstants } from 'wdConstant'; 6 import { ContentConstants } from 'wdConstant';
  7 +import { common, Want } from '@kit.AbilityKit';
  8 +import { BusinessError } from '@kit.BasicServicesKit';
7 9
8 // import { LiveModel } from '../viewmodel/LiveModel'; 10 // import { LiveModel } from '../viewmodel/LiveModel';
9 11
@@ -58,10 +60,13 @@ export class ProcessUtils { @@ -58,10 +60,13 @@ export class ProcessUtils {
58 break; 60 break;
59 //动态详情页(动态图文) 61 //动态详情页(动态图文)
60 case ContentConstants.TYPE_FOURTEEN: 62 case ContentConstants.TYPE_FOURTEEN:
61 - break; 63 + ProcessUtils.gotoDynamicDetailPage(content);
62 //动态详情页(动态视频) 64 //动态详情页(动态视频)
63 case ContentConstants.TYPE_FIFTEEN: 65 case ContentConstants.TYPE_FIFTEEN:
64 - ProcessUtils.gotoWeb(content); 66 + ProcessUtils.gotoDynamicDetailPage(content);
  67 + break;
  68 + case ContentConstants.TYPE_THIRTY:
  69 + ProcessUtils.gotoThemeListPage(content)
65 break; 70 break;
66 default: 71 default:
67 break; 72 break;
@@ -76,7 +81,7 @@ export class ProcessUtils { @@ -76,7 +81,7 @@ export class ProcessUtils {
76 let taskAction: Action = { 81 let taskAction: Action = {
77 type: 'JUMP_DETAIL_PAGE', 82 type: 'JUMP_DETAIL_PAGE',
78 params: { 83 params: {
79 - detailPageType: 14, 84 + detailPageType: Number.parseInt(content.objectType),
80 contentID: content?.objectId, 85 contentID: content?.objectId,
81 extra: { 86 extra: {
82 relType: content?.relType, 87 relType: content?.relType,
@@ -92,20 +97,18 @@ export class ProcessUtils { @@ -92,20 +97,18 @@ export class ProcessUtils {
92 * 图集详情页 97 * 图集详情页
93 * @param content 98 * @param content
94 * */ 99 * */
95 - private static gotoAtlasDetailPage(content: ContentDTO) { 100 + public static gotoMultiPictureListPage(photoList: PhotoListBean[]) {
96 let taskAction: Action = { 101 let taskAction: Action = {
97 type: 'JUMP_DETAIL_PAGE', 102 type: 'JUMP_DETAIL_PAGE',
98 params: { 103 params: {
99 - detailPageType: 17,  
100 - contentID: content?.objectId, 104 + detailPageType: 18,
101 extra: { 105 extra: {
102 - relType: content?.relType,  
103 - relId: content?.relId, 106 + photoList
104 } as ExtraDTO 107 } as ExtraDTO
105 } as Params, 108 } as Params,
106 }; 109 };
107 WDRouterRule.jumpWithAction(taskAction) 110 WDRouterRule.jumpWithAction(taskAction)
108 - Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`); 111 + Logger.debug(TAG, `gotoMultiPictureListPage`);
109 } 112 }
110 113
111 private static gotoSpecialTopic(content: ContentDTO) { 114 private static gotoSpecialTopic(content: ContentDTO) {
@@ -195,4 +198,62 @@ export class ProcessUtils { @@ -195,4 +198,62 @@ export class ProcessUtils {
195 WDRouterRule.jumpWithAction(taskAction) 198 WDRouterRule.jumpWithAction(taskAction)
196 Logger.debug(TAG, `gotoAudio, ${content.objectId}`); 199 Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
197 } 200 }
198 -}  
  201 +
  202 + /**
  203 + * 金刚位聚合页
  204 + * @param content
  205 + * */
  206 + private static gotoThemeListPage(content: ContentDTO) {
  207 + let taskAction: Action = {
  208 + type: 'JUMP_DETAIL_PAGE',
  209 + params: {
  210 + detailPageType: 30,
  211 + contentID: content?.objectId,
  212 + extra: {
  213 + relType: content?.relType,
  214 + relId: content?.relId,
  215 + } as ExtraDTO
  216 + } as Params,
  217 + };
  218 + WDRouterRule.jumpWithAction(taskAction)
  219 + Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
  220 + }
  221 +
  222 + /**
  223 + * 图片预览页
  224 + * @param content
  225 + * */
  226 + private static gotoAtlasDetailPage(content: ContentDTO) {
  227 + let taskAction: Action = {
  228 + type: 'JUMP_DETAIL_PAGE',
  229 + params: {
  230 + detailPageType: 17,
  231 + contentID: content?.objectId,
  232 + extra: {
  233 + relType: content?.relType,
  234 + relId: content?.relId,
  235 + } as ExtraDTO
  236 + } as Params,
  237 + };
  238 + WDRouterRule.jumpWithAction(taskAction)
  239 + Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
  240 + }
  241 +
  242 + /**
  243 + * 打开外链
  244 + * @param url 外链地址
  245 + */
  246 + public static jumpExternalWebPage(url: string) {
  247 + let context = getContext() as common.UIAbilityContext;
  248 + let wantInfo: Want = {
  249 + action: 'ohos.want.action.viewData',
  250 + entities: ['entity.system.browsable'],
  251 + uri: url
  252 + }
  253 + context.startAbility(wantInfo).then(() => {
  254 + Logger.debug(TAG, 'jumpExternalWebPage success')
  255 + }).catch((err: BusinessError) => {
  256 + Logger.error(TAG, 'jumpExternalWebPage success, error: ' + JSON.stringify(err))
  257 + })
  258 + }
  259 +}
@@ -14,6 +14,7 @@ const TAG = 'JsBridgeBiz' @@ -14,6 +14,7 @@ const TAG = 'JsBridgeBiz'
14 */ 14 */
15 export function performJSCallNative(data: Message, call: Callback) { 15 export function performJSCallNative(data: Message, call: Callback) {
16 Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + JSON.stringify(data.data)) 16 Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + JSON.stringify(data.data))
  17 +
17 switch (data.handlerName) { 18 switch (data.handlerName) {
18 case H5CallNativeType.jsCall_currentPageOperate: 19 case H5CallNativeType.jsCall_currentPageOperate:
19 break; 20 break;
@@ -24,12 +25,13 @@ export function performJSCallNative(data: Message, call: Callback) { @@ -24,12 +25,13 @@ export function performJSCallNative(data: Message, call: Callback) {
24 case H5CallNativeType.jsCall_getArticleDetailBussinessData: 25 case H5CallNativeType.jsCall_getArticleDetailBussinessData:
25 break; 26 break;
26 case H5CallNativeType.jsCall_callAppService: 27 case H5CallNativeType.jsCall_callAppService:
  28 + handleJsCallCallAppService(data)
27 break; 29 break;
28 case H5CallNativeType.jsCall_receiveH5Data: 30 case H5CallNativeType.jsCall_receiveH5Data:
29 - if(data?.data?.dataSource === 5){  
30 - handleH5Data(JSON.parse(data?.data?.dataJson || '{}'))  
31 -  
32 - } 31 + handleJsCallReceiveH5Data(data)
  32 + break;
  33 + case H5CallNativeType.jsCall_appInnerLinkMethod:
  34 + handleJsCallAppInnerLinkMethod(data)
33 break; 35 break;
34 case 'changeNativeMessage': 36 case 'changeNativeMessage':
35 call("this is change Web Message") 37 call("this is change Web Message")
@@ -51,17 +53,35 @@ class AppInfo { @@ -51,17 +53,35 @@ class AppInfo {
51 * 获取App公共信息 53 * 获取App公共信息
52 */ 54 */
53 function getAppPublicInfo(): string { 55 function getAppPublicInfo(): string {
  56 +
54 let info = new AppInfo() 57 let info = new AppInfo()
55 info.plat = 'Phone' 58 info.plat = 'Phone'
56 // 直接用Android,后续适配再新增鸿蒙 59 // 直接用Android,后续适配再新增鸿蒙
57 info.system = 'Android' 60 info.system = 'Android'
58 info.networkStatus = 1 61 info.networkStatus = 1
59 let result = JSON.stringify(info) 62 let result = JSON.stringify(info)
  63 + Logger.debug(TAG, 'getAppPublicInfo: ' + JSON.stringify(info))
  64 +
60 return result; 65 return result;
61 } 66 }
62 67
63 -function handleH5Data(content:ContentDTO) {  
64 - Logger.debug(TAG, 'handleH5Data' + ', content: ' + JSON.stringify(content))  
65 - ProcessUtils.processPage(content) 68 +function handleJsCallReceiveH5Data(data: Message) {
  69 + switch (data?.data?.dataSource) {
  70 + case 5:
  71 + if (data?.data?.dataSource === 5) {
  72 + ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}'))
  73 + }
  74 + break;
  75 + default:
  76 +
  77 + break;
  78 + }
  79 +}
  80 +
  81 +function handleJsCallCallAppService(data: Message) {
  82 +
  83 +}
  84 +
  85 +function handleJsCallAppInnerLinkMethod(data: Message) {
66 } 86 }
67 87
@@ -37,7 +37,6 @@ export { @@ -37,7 +37,6 @@ export {
37 postExecuteCollectRecordParams, 37 postExecuteCollectRecordParams,
38 contentListParams, 38 contentListParams,
39 postInteractAccentionOperateParams, 39 postInteractAccentionOperateParams,
40 - postRecommendListParams,  
41 contentListItem 40 contentListItem
42 } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO'; 41 } from './src/main/ets/bean/detail/MultiPictureDetailPageDTO';
43 42
@@ -119,12 +118,18 @@ export { ArticleListDTO } from './src/main/ets/bean/component/ArticleListDTO'; @@ -119,12 +118,18 @@ export { ArticleListDTO } from './src/main/ets/bean/component/ArticleListDTO';
119 118
120 export { appStyleImagesDTO } from './src/main/ets/bean/content/appStyleImagesDTO'; 119 export { appStyleImagesDTO } from './src/main/ets/bean/content/appStyleImagesDTO';
121 120
122 -export { LiveRoomBean,LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean'; 121 +export { LiveRoomBean, LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean';
123 122
124 export { LiveRoomDataBean } from './src/main/ets/bean/live/LiveRoomDataBean'; 123 export { LiveRoomDataBean } from './src/main/ets/bean/live/LiveRoomDataBean';
125 124
  125 +export { ReserveBean } from './src/main/ets/bean/live/ReserveBean';
  126 +
126 export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO'; 127 export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO';
127 128
  129 +export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams';
  130 +
  131 +export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams';
  132 +
128 export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO'; 133 export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO';
129 134
130 export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO'; 135 export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO';
  1 +
  2 +/**
  3 + * @Description: 信息集合
  4 + * @Author:
  5 + * @Email: liyubing@wondertek.com.cn
  6 + * @CreateDate:
  7 + * @UpdateRemark: 更新说明
  8 + * @Version: 1.0
  9 + */
  10 +export interface AdvertsBean{
  11 +
  12 + /**
  13 + * 广告id
  14 + */
  15 + id:string
  16 +
  17 + /**
  18 + * 广告relId
  19 + */
  20 + relId:string
  21 +
  22 + /**
  23 + * 广告素材名称
  24 + */
  25 + matTitle:string
  26 +
  27 + /**
  28 + * 投放开始时间yyyy-MM-dd HH:mm:ss
  29 + */
  30 + startTime:string
  31 +
  32 + /**
  33 + * 投放结束时间yyyy-MM-dd HH:mm:ss
  34 + */
  35 + endTime:string
  36 +
  37 + /**
  38 + * 展现时段,多组数据:9:00:00-10:00:00|17:00:00-18:00:00
  39 + */
  40 + displayTime:string
  41 +
  42 + /**
  43 + * 展现优先级,数值越小,等级越高
  44 + */
  45 + displayLevel:string
  46 +
  47 + /**
  48 + * 链接跳转类型,0:无连接;1:内链(站内内容);2:外链
  49 + */
  50 + linkType:number;
  51 +
  52 + /**
  53 + * 外链广告外链地址,link_type=2生效
  54 + */
  55 + linkUrl:string
  56 +
  57 + /**
  58 + * 内链内容id 仅link_type=1生效
  59 + */
  60 + contentId:string
  61 +
  62 + /**
  63 + * 对象类型 0:不跳转 1:视频,2:直播,5:专题,6:链接,8:图文,9:组图,10:H5新闻,11:频道
  64 + */
  65 + objectType:string
  66 + /**
  67 + * 内容标题
  68 + */
  69 + contentTitle:string
  70 +
  71 + /**
  72 + * 专题页面id
  73 + */
  74 + topicPageId:string
  75 +
  76 + /**
  77 + * 挂角封面图
  78 + */
  79 + displayUrl:string
  80 +
  81 + /**
  82 + * 页面id
  83 + */
  84 + pageId:string
  85 +
  86 + /**
  87 + * 跳转id
  88 + */
  89 + objectId:string
  90 +
  91 + /**
  92 + * 对象分类 ;频道(1:一级频道,2:二级频道),专题(1:普通专题,2:主题专题,3:作者专题)
  93 + */
  94 + objectLevel:string
  95 +
  96 + /**
  97 + * 底部导航栏 id(用于频道跳转)
  98 + */
  99 + bottomNavId:string
  100 +
  101 +}
  1 +/**
  2 + * @Description: 挂角广告数据
  3 + * @Author:
  4 + * @Email: liyubing@wondertek.com.cn
  5 + * @CreateDate:
  6 + * @UpdateRemark: 更新说明
  7 + * @Version: 1.0
  8 + */
  9 +import { AdvertsBean } from './AdvertsBean';
  10 +import { CompAdvMatInfoBean, CompAdvSlotInfoBean } from './CompAdvInfoBean';
  11 +
  12 +export interface AdvRuleBean {
  13 +
  14 + /**
  15 + * 广告投放位编码
  16 + */
  17 + pos: string;
  18 +
  19 + /**
  20 + * 广告展示顺序,0:随机展示;1列表循环
  21 + */
  22 + displayMode: number
  23 + /**
  24 + * 每间隔刷新n次展示广告
  25 + */
  26 + refreshFrequency: number
  27 + /**
  28 + * 广告信息集合
  29 + */
  30 + advert: AdvertsBean;
  31 +
  32 +}
  33 +
  34 +/**
  35 + * 广告组件数据
  36 + */
  37 +export interface CompAdvBean {
  38 +
  39 + /**
  40 + * 广告订单id
  41 + */
  42 + id: string;
  43 +
  44 + /**
  45 + * 投放开始时间
  46 + */
  47 + startTime: number;
  48 +
  49 + /**
  50 + * 投放结束时间
  51 + */
  52 + endTime: number;
  53 +
  54 + /**
  55 + * 信息流广告素材
  56 + */
  57 + matInfo: CompAdvMatInfoBean
  58 + /**
  59 + * 信息流广告位
  60 + */
  61 + slotInfo: CompAdvSlotInfoBean
  62 + /**
  63 + * 展示优先级
  64 + * 广告A,displayPriority=1
  65 + * 广告B,displayPriority=2
  66 + * 则打开页面时,挂角展示顺序 A->B (优先级升序排列)
  67 + */
  68 + displayPriority: number;
  69 +
  70 + /**
  71 + * 展示的次数
  72 + */
  73 + showCount: number;
  74 +
  75 + /**
  76 + * 页面id
  77 + */
  78 + pageId: String ;
  79 +
  80 + /**
  81 + * 开屏广告-显示时长
  82 + */
  83 + displayDuration: String;
  84 +
  85 + /**
  86 + * 开屏广告-展示轮数
  87 + * 2.launchAdInfo有多个时:
  88 + * 广告A,displayRound=10
  89 + * 广告B,displayRound=5,
  90 + * 每次开机屏展示广告概率
  91 + * 广告A=10/(10+5)
  92 + * 广告B=5/(10+5)
  93 + * 广告A展示10次后,不再展示,
  94 + * 广告B展示5此后,不再展示。
  95 + * 下一轮展示继续上面逻辑。
  96 + */
  97 + displayRound: number;
  98 +}
  1 +/**
  2 + * @Description: 组件广告信息
  3 + * @Author:
  4 + * @Email: liyubing@wondertek.com.cn
  5 + * @CreateDate:
  6 + * @UpdateRemark: 更新说明
  7 + * @Version: 1.0
  8 + */
  9 +
  10 +/*
  11 + 信息流广告素材解析累
  12 + */
  13 +export interface CompAdvMatInfoBean {
  14 +
  15 + /**
  16 + * 广告标题
  17 + */
  18 + advTitle: string
  19 + /**
  20 + * 3:信息流广告
  21 + */
  22 + advType: string
  23 + /**
  24 + * 信息流广告类型(4:轮播图 5:三图广告 6:小图广告 7:长通栏广告 8:大图广告 9:视频广告 10:展会广告 11:冠名广告 12:顶部长通栏广告)
  25 + */
  26 + advSubType: string
  27 + /**
  28 + * 素材图片信息;adv_subtype=4,5,6,7,8,9,12 时使用
  29 + */
  30 + matImageUrl: string[]
  31 + /**
  32 + * 视频广告地址(adv_subtype=9)
  33 + */
  34 + matVideoUrl: string
  35 + /**
  36 + * 扩展信息:advSubType=10,11时使用,字段示例见接口备注。
  37 + */
  38 + extraData: string
  39 + /**
  40 + * 链接类型: 0:无链接;1:内链(文章);2:外链
  41 + */
  42 + linkType: string
  43 + /**
  44 + * 链接跳转类型 :0-没链接,不用打开,1-端内打开,2-端外打开
  45 + */
  46 + openType: string
  47 + /**
  48 + * 广告跳转链接
  49 + */
  50 + linkUrl: string
  51 + /**
  52 + * 素材类型(0:图片 1:视频)
  53 + */
  54 + matType: string
  55 + /**
  56 + * 开屏样式(1:全屏样式 0:底部固定Logo)
  57 + */
  58 + startStyle: string
  59 +}
  60 +
  61 +/**
  62 + * 信息流广告位
  63 + */
  64 +export interface CompAdvSlotInfoBean {
  65 +
  66 +
  67 + /**
  68 + * 组件id
  69 + */
  70 + compId: string;
  71 +
  72 + /**
  73 + * 广告位位置 从1开始
  74 + */
  75 + position: number;
  76 +
  77 + /**
  78 + * 频道id
  79 + */
  80 + channelId: string;
  81 +
  82 +}
@@ -177,14 +177,4 @@ export interface postInteractAccentionOperateParams { @@ -177,14 +177,4 @@ export interface postInteractAccentionOperateParams {
177 // userType: number; 177 // userType: number;
178 // userId: string; 178 // userId: string;
179 status: number; 179 status: number;
180 -}  
181 -  
182 -export interface postRecommendListParams {  
183 - imei: string;  
184 - userId ?: string;  
185 - contentId ?: string;  
186 - relId ?: string;  
187 - contentType ?: number;  
188 - recType: number;  
189 - channelId ? : string  
190 } 180 }
  1 +export interface postRecommendListParams {
  2 + imei: string;
  3 + userId ?: string;
  4 + contentId ?: string;
  5 + relId ?: string;
  6 + contentType ?: number;
  7 + recType: number;
  8 + channelId ? : string
  9 +}
  1 +export interface postThemeListParams {
  2 + sort: number;
  3 + pageNum: number;
  4 + pageSize: number;
  5 +}
  1 +export interface ReserveBean {
  2 + relationId: string,
  3 + liveId: string
  4 +}
1 /** 1 /**
2 * page接口返回的Page数据DTO 2 * page接口返回的Page数据DTO
3 */ 3 */
  4 +import { AdvRuleBean, CompAdvBean } from '../adv/AdvsRuleBean';
  5 +
4 export interface PageInfoDTO { 6 export interface PageInfoDTO {
5 pageId: string; // 页面id 7 pageId: string; // 页面id
6 id: number; // 楼层id 8 id: number; // 楼层id
7 name: string; // 名称 9 name: string; // 名称
8 - hasAdInfo: number;  
9 hasPopUp: number; 10 hasPopUp: number;
10 baselineShow: number; 11 baselineShow: number;
11 groups: GroupInfoDTO[]; 12 groups: GroupInfoDTO[];
12 channelInfo: ChannelInfoDTO; 13 channelInfo: ChannelInfoDTO;
  14 +
  15 + /**
  16 + * 1-有过广告配置,0-没有广告配置
  17 + */
  18 + hasAdInfo: number;
  19 +
  20 + /**
  21 + * 挂角广告数据
  22 + */
  23 + cornersAdv:AdvRuleBean
  24 + /**
  25 + * 广告中心-挂角广告信息
  26 + */
  27 + cornersAdv2:CompAdvBean[]
  28 +
13 } 29 }
14 30
15 export interface ChannelInfoDTO { 31 export interface ChannelInfoDTO {
@@ -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) {
1 -import { AccountManagerUtils, Logger } from 'wdKit'; 1 +import { AccountManagerUtils, Logger, DateTimeUtils } from 'wdKit';
2 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; 2 import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
3 import { ContentDetailDTO,batchLikeAndCollectResult,batchLikeAndCollectParams,postBatchAttentionStatusParams, 3 import { ContentDetailDTO,batchLikeAndCollectResult,batchLikeAndCollectParams,postBatchAttentionStatusParams,
4 PhotoListBean, 4 PhotoListBean,
@@ -10,7 +10,10 @@ import { WDPlayerController } from 'wdPlayer/Index'; @@ -10,7 +10,10 @@ import { WDPlayerController } from 'wdPlayer/Index';
10 import { ContentConstants } from '../constants/ContentConstants'; 10 import { ContentConstants } from '../constants/ContentConstants';
11 import { ProcessUtils } from 'wdRouter'; 11 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 - 13 +import display from '@ohos.display';
  14 +import { BusinessError } from '@ohos.base';
  15 +import { CommonConstants } from 'wdConstant/Index';
  16 +import { CardMediaInfo } from '../components/cardCommon/CardMediaInfo'
14 const TAG = 'DynamicDetailComponent' 17 const TAG = 'DynamicDetailComponent'
15 @Preview 18 @Preview
16 @Component 19 @Component
@@ -38,6 +41,12 @@ export struct DynamicDetailComponent { @@ -38,6 +41,12 @@ export struct DynamicDetailComponent {
38 //跳转 41 //跳转
39 private mJumpInfo: ContentDTO = {} as ContentDTO; 42 private mJumpInfo: ContentDTO = {} as ContentDTO;
40 43
  44 + // 获取当前所有的display对象
  45 + promise: Promise<Array<display.Display>> = display.getAllDisplays()
  46 +
  47 + // 屏幕宽度(单位px)
  48 + @State screenWidth: number = 0;
  49 +
41 async aboutToAppear() { 50 async aboutToAppear() {
42 await this.getContentDetailData() 51 await this.getContentDetailData()
43 } 52 }
@@ -120,8 +129,8 @@ export struct DynamicDetailComponent { @@ -120,8 +129,8 @@ export struct DynamicDetailComponent {
120 }) 129 })
121 } else { 130 } else {
122 Text('已关注') 131 Text('已关注')
123 - .width($r('app.float.margin_60'))  
124 - .height($r('app.float.margin_48')) 132 + .width($r('app.float.margin_54'))
  133 + .height($r('app.float.margin_24'))
125 .borderWidth(1) 134 .borderWidth(1)
126 .textAlign(TextAlign.Center) 135 .textAlign(TextAlign.Center)
127 .fontSize($r('app.float.font_size_12')) 136 .fontSize($r('app.float.font_size_12'))
@@ -148,25 +157,131 @@ export struct DynamicDetailComponent { @@ -148,25 +157,131 @@ export struct DynamicDetailComponent {
148 ,left: $r('app.float.margin_16') 157 ,left: $r('app.float.margin_16')
149 ,right: $r('app.float.margin_16') }) 158 ,right: $r('app.float.margin_16') })
150 .alignSelf(ItemAlign.Start) 159 .alignSelf(ItemAlign.Start)
151 - if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){ 160 + if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
152 //附件内容:图片/视频 161 //附件内容:图片/视频
153 - if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){ 162 + if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
  163 + // 图片-从无图到9图展示
154 GridRow({ 164 GridRow({
155 - columns: { sm: this.contentDetailData.photoList.length  
156 - , md: this.contentDetailData.photoList.length == 1?1:  
157 - this.contentDetailData.photoList.length == 4?2:  
158 - 3 },  
159 - breakpoints: { value: ['320vp', '520vp', '840vp'] } 165 + gutter: { x: 2, y: 2 }
160 }) { 166 }) {
161 ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => { 167 ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => {
162 - GridCol() {  
163 - 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 + }
  204 + }
  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;
  220 + })
  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 + }
164 } 239 }
165 - // .onClick()  
166 }) 240 })
167 } 241 }
168 - }else{  
169 - this.buildItemCard(this.contentDetailData.videoInfo[0].firstFrameImageUri, this.contentDetailData.photoList.length, 0); 242 + .margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
  243 + }
  244 + }else{
  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 + })
170 } 285 }
171 } 286 }
172 //特别声明 287 //特别声明
@@ -223,13 +338,13 @@ export struct DynamicDetailComponent { @@ -223,13 +338,13 @@ export struct DynamicDetailComponent {
223 try { 338 try {
224 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType) 339 let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
225 this.contentDetailData = data[0]; 340 this.contentDetailData = data[0];
226 - this.makeJumpInfo  
227 console.log('动态详情',JSON.stringify(this.contentDetailData)) 341 console.log('动态详情',JSON.stringify(this.contentDetailData))
228 } catch (exception) { 342 } catch (exception) {
229 console.log('请求失败',JSON.stringify(exception)) 343 console.log('请求失败',JSON.stringify(exception))
230 } 344 }
231 - this.getBatchAttentionStatus  
232 - this.getInteractDataStatus 345 + this.getBatchAttentionStatus()
  346 + this.getInteractDataStatus()
  347 + this.makeJumpInfo()
233 } 348 }
234 349
235 // 查询当前登录用户点赞状态 350 // 查询当前登录用户点赞状态
@@ -272,48 +387,6 @@ export struct DynamicDetailComponent { @@ -272,48 +387,6 @@ export struct DynamicDetailComponent {
272 387
273 } 388 }
274 } 389 }
275 - @Builder  
276 - setItemImageStyle(picPath: string,topLeft: number,topRight: number,bottomLeft: number,bottomRight: number){  
277 - //四角圆角  
278 - Image(picPath)  
279 - .width(44).aspectRatio(1 / 1).margin(16).borderRadius({topLeft: topLeft, topRight: topRight, bottomLeft: bottomLeft, bottomRight: bottomRight})  
280 - }  
281 - /**  
282 - * 组件项  
283 - *  
284 - * @param programmeBean item 组件项, 上面icon,下面标题  
285 - */  
286 - @Builder  
287 - buildItemCard(item: string,len: number,index: number) {  
288 - Column() {  
289 - this.setItemImageRoundCorner(len, item, index)  
290 - Flex({ direction: FlexDirection.Row }) {  
291 - Image($r('app.media.icon_long_pic'))  
292 - .width(14)  
293 - .height(14)  
294 - .margin({right: 4})  
295 - Text('长图')  
296 - .fontSize(12)  
297 - .fontWeight(400)  
298 - .fontColor(0xffffff)  
299 - .fontFamily('PingFang SC')  
300 - }  
301 - .width(48)  
302 - .padding({bottom: 9})  
303 - }  
304 - .width('100%')  
305 - .onClick((event: ClickEvent) => {  
306 - if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){  
307 - //fixme 跳转到查看图片页面(带页脚/下载按钮)  
308 - // this.mJumpInfo.objectType = ContentConstants.TYPE_  
309 - ProcessUtils.processPage(this.mJumpInfo)  
310 - }else{  
311 - //fixme 跳转到播放视频页面(点播)  
312 - this.mJumpInfo.objectType = ContentConstants.TYPE_VOD  
313 - ProcessUtils.processPage(this.mJumpInfo)  
314 - }  
315 - })  
316 - }  
317 390
318 //创建跳转信息 391 //创建跳转信息
319 makeJumpInfo(){ 392 makeJumpInfo(){
@@ -322,142 +395,51 @@ export struct DynamicDetailComponent { @@ -322,142 +395,51 @@ export struct DynamicDetailComponent {
322 this.mJumpInfo.objectId = this.contentDetailData.newsId+""; 395 this.mJumpInfo.objectId = this.contentDetailData.newsId+"";
323 this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+""; 396 this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+"";
324 this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+""; 397 this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+"";
  398 + // this.mJumpInfo.objectType = this.contentDetailData.newsType+"";
325 } 399 }
326 400
327 - //设置图片圆角  
328 - @Builder  
329 - setItemImageRoundCorner(len: number, picPath: string, index: number) {  
330 - if (len == 1) {  
331 - //四角圆角  
332 - this.setItemImageStyle(picPath, 4, 4, 4, 4);  
333 - } else if (len == 2) {  
334 - if (index == 0) {  
335 - //左边圆角  
336 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
337 - } else {  
338 - //右边圆角  
339 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
340 - }  
341 - } else if (3 == len) {  
342 - if (index == 0) {  
343 - //左边圆角  
344 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
345 - } else if (index == 1) {  
346 - //直角  
347 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
348 - } else {  
349 - //右边圆角  
350 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
351 - }  
352 - } else if (4 == len) {  
353 - if (index == 0) {  
354 - //左边圆角  
355 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
356 - } else if (index == 1) {  
357 - //右边圆角  
358 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
359 - } else if (index = 2) {  
360 - //左边圆角  
361 - this.setItemImageStyle(picPath, 4, 0, 4, 0);  
362 - } else {  
363 - //右边圆角  
364 - this.setItemImageStyle(picPath, 0, 4, 0, 4);  
365 - }  
366 - } else if (5 == len) {  
367 - if (index == 0) {  
368 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
369 - } else if (index == 1) {  
370 - //直角  
371 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
372 - } else if (index = 2) {  
373 - this.setItemImageStyle(picPath, 4, 4, 4, 4);  
374 - } else if (index = 3) {  
375 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
376 - } else {  
377 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
378 - }  
379 - } else if (6 == len) {  
380 - if (index == 0) {  
381 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
382 - } else if (index == 1) {  
383 - //直角  
384 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
385 - } else if (index = 2) {  
386 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
387 - } else if (index = 3) {  
388 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
389 - } else if (index = 4) {  
390 - //直角  
391 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
392 - } else {  
393 - //右边圆角  
394 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
395 - }  
396 - } else if (7 == len) {  
397 - if (index == 0) {  
398 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
399 - } else if (index == 1) {  
400 - //直角  
401 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
402 - } else if (index = 2) {  
403 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
404 - } else if (index = 3) {  
405 - //直角  
406 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
407 - } else if (index = 4) {  
408 - //直角  
409 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
410 - } else if (index = 5) {  
411 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
412 - } else {  
413 - this.setItemImageStyle(picPath, 0, 0, 4, 4);  
414 - }  
415 - } else if (8 == len) {  
416 - if (index == 0) {  
417 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
418 - } else if (index == 1) {  
419 - //直角  
420 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
421 - } else if (index = 2) {  
422 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
423 - } else if (index = 3) {  
424 - //直角  
425 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
426 - } else if (index = 4) {  
427 - //直角  
428 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
429 - } else if (index = 5) {  
430 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
431 - } else if (index = 6) {  
432 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
433 - } else {  
434 - this.setItemImageStyle(picPath, 0, 0, 0, 4);  
435 - } 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
436 } else { 417 } else {
437 - if (index == 0) {  
438 - this.setItemImageStyle(picPath, 4, 0, 0, 0);  
439 - } else if (index == 1) {  
440 - //直角  
441 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
442 - } else if (index == 2) {  
443 - this.setItemImageStyle(picPath, 0, 4, 0, 0);  
444 - } else if (index == 3) {  
445 - //直角  
446 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
447 - } else if (index == 4) {  
448 - //直角  
449 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
450 - } else if (index == 5) {  
451 - //直角  
452 - this.setItemImageStyle(picPath, 0, 0, 0, 0);  
453 - } else if (index == 6) {  
454 - this.setItemImageStyle(picPath, 0, 0, 4, 0);  
455 - } else if (index == 7) {  
456 - //直角  
457 - this.setItemImageStyle(picPath, 0, 0, 0, 0); 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
  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; //竖长图
458 } else { 431 } else {
459 - this.setItemImageStyle(picPath, 0, 0, 0, 4); 432 + return 3
460 } 433 }
  434 + } else {
  435 + return 3; //普通图
461 } 436 }
462 } 437 }
  438 +}
  439 +
  440 +interface radiusType {
  441 + topLeft: number | Resource;
  442 + topRight: number | Resource;
  443 + bottomLeft: number | Resource;
  444 + bottomRight: number | Resource;
463 } 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%')
@@ -52,48 +52,56 @@ export struct PageComponent { @@ -52,48 +52,56 @@ export struct PageComponent {
52 52
53 @Builder 53 @Builder
54 ListLayout() { 54 ListLayout() {
55 - List() {  
56 - // 下拉刷新  
57 - ListItem() {  
58 - RefreshLayout({  
59 - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage,  
60 - this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight)  
61 - })  
62 - }  
63 55
64 - LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { 56 + RelativeContainer() {
  57 + List() {
  58 + // 下拉刷新
65 ListItem() { 59 ListItem() {
66 - Column() {  
67 - CompParser({ compDTO: compDTO, compIndex: compIndex });  
68 - }  
69 - }  
70 - },  
71 - (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp  
72 - )  
73 -  
74 - // 加载更多  
75 - ListItem() {  
76 - if (this.pageModel.hasMore) {  
77 - LoadMoreLayout({  
78 - refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,  
79 - this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight) 60 + RefreshLayout({
  61 + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage,
  62 + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight)
80 }) 63 })
81 - } else if (!this.pageModel.contentNeedScroll) {  
82 - NoMoreLayout() 64 + }
  65 +
  66 + LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => {
  67 + ListItem() {
  68 + Column() {
  69 + CompParser({ compDTO: compDTO, compIndex: compIndex });
  70 + }
  71 + }
  72 + },
  73 + (compDTO: CompDTO, compIndex: number) => compDTO.id + compIndex.toString() + this.pageModel.timestamp
  74 + )
  75 +
  76 + // 加载更多
  77 + ListItem() {
  78 + if (this.pageModel.hasMore) {
  79 + LoadMoreLayout({
  80 + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
  81 + this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
  82 + })
  83 + } else if (!this.pageModel.contentNeedScroll) {
  84 + NoMoreLayout()
  85 + }
83 } 86 }
84 } 87 }
  88 + // comp自己处理分页,这里设置EdgeEffect.None
  89 + .edgeEffect(this.pageModel.contentNeedScroll ? EdgeEffect.None : EdgeEffect.Spring)
  90 + .scrollBar(BarState.Off)
  91 + .cachedCount(8)
  92 + .height(CommonConstants.FULL_PARENT)
  93 + .onScrollIndex((start: number, end: number) => {
  94 + // Listen to the first index of the current list.
  95 + this.pageModel.startIndex = start;
  96 + // 包含了 头尾item,判断时需要考虑+2
  97 + this.pageModel.endIndex = end;
  98 + })
  99 + .id('page_list')
  100 +
  101 + // 挂角广告
  102 + this.pageHornAd()
  103 +
85 } 104 }
86 - // comp自己处理分页,这里设置EdgeEffect.None  
87 - .edgeEffect(this.pageModel.contentNeedScroll ? EdgeEffect.None : EdgeEffect.Spring)  
88 - .scrollBar(BarState.Off)  
89 - .cachedCount(8)  
90 - .height(CommonConstants.FULL_PARENT)  
91 - .onScrollIndex((start: number, end: number) => {  
92 - // Listen to the first index of the current list.  
93 - this.pageModel.startIndex = start;  
94 - // 包含了 头尾item,判断时需要考虑+2  
95 - this.pageModel.endIndex = end;  
96 - })  
97 } 105 }
98 106
99 @Builder 107 @Builder
@@ -105,6 +113,111 @@ export struct PageComponent { @@ -105,6 +113,111 @@ export struct PageComponent {
105 // }) 113 // })
106 } 114 }
107 115
  116 + /**
  117 + * 页面挂角广告
  118 + */
  119 + @Builder
  120 + pageHornAd() {
  121 +
  122 +
  123 + if (this.pageModel.pageLeftCornerAdv.matInfo != null) {
  124 +
  125 +
  126 + // 页面左挂角
  127 + Image(this.pageModel.pageLeftCornerAdv.matInfo.matImageUrl[0])
  128 + .width($r('app.float.vp_80'))
  129 + .height($r('app.float.vp_80'))
  130 + .id("left_iv")
  131 + .alignRules({
  132 + bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
  133 + left: { anchor: '__container__', align: HorizontalAlign.Start },
  134 + })
  135 + .margin({ bottom: "65vp", left: $r('app.float.card_comp_pagePadding_lf') })
  136 +
  137 + Image($r('app.media.icon_adv_horn_close')).id('left_close').width($r('app.float.vp_16')).alignRules({
  138 + top: { anchor: 'left_iv', align: VerticalAlign.Top },
  139 + left: { anchor: 'left_iv', align: HorizontalAlign.Start },
  140 + }).offset({
  141 + x: -10,
  142 + y: -10
  143 + })
  144 +
  145 + Text($r('app.string.comp_advertisement'))
  146 + .width($r('app.float.vp_28'))
  147 + .height($r('app.float.vp_16'))
  148 + .fontSize($r('app.float.font_size_10'))
  149 + .fontColor(Color.White)
  150 + .id('left_tag')
  151 + .alignRules({
  152 + bottom: { anchor: 'left_iv', align: VerticalAlign.Bottom },
  153 + left: { anchor: 'left_iv', align: HorizontalAlign.Start },
  154 + })
  155 + .textAlign(TextAlign.Center)
  156 + .backgroundColor($r('app.color.res_color_general_000000_30'))
  157 + .borderRadius({
  158 + topLeft: $r('app.float.vp_2'),
  159 + topRight: $r('app.float.vp_2'),
  160 + bottomLeft: $r('app.float.vp_2'),
  161 + bottomRight: $r('app.float.vp_2')
  162 + })
  163 + }
  164 +
  165 + if (this.pageModel.pageRightCornerAdv.matInfo != null && this.pageModel.isShowRightAds) {
  166 + // 页面右边挂角
  167 + Image(this.pageModel.pageRightCornerAdv.matInfo.matImageUrl[0])
  168 + .width($r('app.float.vp_80'))
  169 + .height($r('app.float.vp_80'))
  170 + .id("right_iv")
  171 + .alignRules({
  172 + bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
  173 + right: { anchor: '__container__', align: HorizontalAlign.End },
  174 + })
  175 + .margin({ bottom: "65vp", right: $r('app.float.card_comp_pagePadding_lf') })
  176 + .onClick(()=>{
  177 +
  178 + // 关闭挂角广告
  179 + this.pageModel.isShowLeftAds = false;
  180 +
  181 + })
  182 +
  183 + Image($r('app.media.icon_adv_horn_close'))
  184 + .id('right_close')
  185 + .width($r('app.float.vp_16'))
  186 + .alignRules({
  187 + top: { anchor: 'right_iv', align: VerticalAlign.Top },
  188 + right: { anchor: 'right_iv', align: HorizontalAlign.End },
  189 + })
  190 + .offset({
  191 + x: 10,
  192 + y: -10
  193 + })
  194 + .onClick(() => {
  195 + // 关闭挂角广告
  196 + this.pageModel.isShowRightAds = false;
  197 +
  198 + })
  199 +
  200 + Text($r('app.string.comp_advertisement'))
  201 + .width($r('app.float.vp_28'))
  202 + .height($r('app.float.vp_16'))
  203 + .fontSize($r('app.float.font_size_10'))
  204 + .fontColor(Color.White)
  205 + .id('right_tag')
  206 + .alignRules({
  207 + bottom: { anchor: 'right_iv', align: VerticalAlign.Bottom },
  208 + right: { anchor: 'right_iv', align: HorizontalAlign.End },
  209 + })
  210 + .textAlign(TextAlign.Center)
  211 + .backgroundColor($r('app.color.res_color_general_000000_30'))
  212 + .borderRadius({
  213 + topLeft: $r('app.float.vp_2'),
  214 + topRight: $r('app.float.vp_2'),
  215 + bottomLeft: $r('app.float.vp_2'),
  216 + bottomRight: $r('app.float.vp_2')
  217 + })
  218 + }
  219 + }
  220 +
108 async aboutToAppear() { 221 async aboutToAppear() {
109 // 选中tab,才请求数据。拦截大量接口请求 222 // 选中tab,才请求数据。拦截大量接口请求
110 if (this.navIndex === this.currentTopNavSelectedIndex) { 223 if (this.navIndex === this.currentTopNavSelectedIndex) {
@@ -125,14 +238,15 @@ export struct PageComponent { @@ -125,14 +238,15 @@ export struct PageComponent {
125 this.pageModel.groupId = this.pageId; 238 this.pageModel.groupId = this.pageId;
126 this.pageModel.channelId = this.channelId; 239 this.pageModel.channelId = this.channelId;
127 this.pageModel.currentPage = 1; 240 this.pageModel.currentPage = 1;
128 - let pageInfo = await PageViewModel.getPageInfo(this.pageModel.pageId);  
129 - if (pageInfo == null) {  
130 - this.pageModel.viewType = ViewType.EMPTY;  
131 - return;  
132 - }  
133 - this.pageModel.pageInfo = pageInfo;  
134 - this.pageModel.loadStrategy = 1  
135 - PageHelper.parseGroup(this.pageModel) 241 + PageHelper.getInitData(this.pageModel)
  242 + // let pageInfo = await PageViewModel.getPageInfo(this.pageModel.pageId);
  243 + // if (pageInfo == null) {
  244 + // this.pageModel.viewType = ViewType.EMPTY;
  245 + // return;
  246 + // }
  247 + // this.pageModel.pageInfo = pageInfo;
  248 + // this.pageModel.loadStrategy = 1
  249 + // PageHelper.parseGroup(this.pageModel)
136 } 250 }
137 } 251 }
138 252
1 -import { ContentDTO } from 'wdBean'; 1 +import { ContentDTO, ReserveBean } from 'wdBean';
2 import { ProcessUtils } from 'wdRouter'; 2 import { ProcessUtils } from 'wdRouter';
3 import { CommonConstants } from 'wdConstant/Index'; 3 import { CommonConstants } from 'wdConstant/Index';
4 import PageViewModel from '../../viewmodel/PageViewModel'; 4 import PageViewModel from '../../viewmodel/PageViewModel';
@@ -24,6 +24,7 @@ const TAG: string = 'ReserveMorePage'; @@ -24,6 +24,7 @@ const TAG: string = 'ReserveMorePage';
24 struct ReserveMorePage { 24 struct ReserveMorePage {
25 @State private pageModel: PageModel = new PageModel(); 25 @State private pageModel: PageModel = new PageModel();
26 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 26 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
  27 + reserveBean: ReserveBean[] = []
27 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; 28 topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
28 type: number = 2; 29 type: number = 2;
29 currentPage: number = 1; 30 currentPage: number = 1;
@@ -72,12 +73,32 @@ struct ReserveMorePage { @@ -72,12 +73,32 @@ struct ReserveMorePage {
72 // } 73 // }
73 } as ContentDTO; 74 } as ContentDTO;
74 75
75 - aboutToAppear(): void {  
76 - PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then((liveReviewDTO) => { 76 + async aboutToAppear(): Promise<void> {
  77 + // PageViewModel.get
  78 +
  79 + PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => {
77 // this.operDataList = [] 80 // this.operDataList = []
78 // this.operDataList.push(...liveReviewDTO.list) 81 // this.operDataList.push(...liveReviewDTO.list)
79 this.data.push(...liveReviewDTO.list) 82 this.data.push(...liveReviewDTO.list)
  83 + this.reserveBean = this.transformToLiveDetailsBeans(liveReviewDTO.list)
  84 +
  85 + const apointMentStatus = await LiveModel.getAppointmentStatus(this.reserveBean)
  86 + console.info(`cj2024 ${apointMentStatus.code}`)
80 }) 87 })
  88 +
  89 +
  90 + }
  91 +
  92 + // 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组
  93 + transformToLiveDetailsBeans(list: ContentDTO[]): ReserveBean[] {
  94 + const liveDetailsBeans: ReserveBean[] = [];
  95 + list.forEach(item => {
  96 + liveDetailsBeans.push({
  97 + relationId: item.relId,
  98 + liveId: item.objectId,
  99 + });
  100 + });
  101 + return liveDetailsBeans
81 } 102 }
82 103
83 build() { 104 build() {
@@ -274,6 +295,7 @@ struct ReserveMorePage { @@ -274,6 +295,7 @@ struct ReserveMorePage {
274 // 295 //
275 // }) 296 // })
276 const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false) 297 const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)
  298 + // const liveDetail = await LiveModel.getAppointmentStatus(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)
277 } 299 }
278 300
279 /*导航栏*/ 301 /*导航栏*/
  1 +import { ContentDTO } from 'wdBean';
  2 +import { CommonConstants ,ViewType} from 'wdConstant';
  3 +import PageViewModel from '../../viewmodel/PageViewModel';
  4 +import RefreshLayout from '../page/RefreshLayout';
  5 +import { RefreshLayoutBean } from '../page/RefreshLayoutBean';
  6 +import PageModel from '../../viewmodel/PageModel';
  7 +import { DateTimeUtils, LazyDataSource } from 'wdKit/Index';
  8 +import router from '@ohos.router';
  9 +import { CardParser } from '../CardParser';
  10 +import { channelSkeleton } from '../skeleton/channelSkeleton'
  11 +import { ErrorComponent } from '../view/ErrorComponent';
  12 +import { EmptyComponent } from '../view/EmptyComponent';
  13 +
  14 +const TAG: string = 'ThemeListPage';
  15 +
  16 +@Entry
  17 +@Component
  18 +struct ThemeListPage {
  19 + @State private pageModel: PageModel = new PageModel();
  20 + @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
  21 + sort: number = 1;
  22 + currentPage: number = 1;
  23 + pageSize: number = 20;
  24 + title: string = '金刚位聚合页'
  25 +
  26 + aboutToAppear(): void {
  27 + PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => {
  28 + console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`)
  29 + this.data.push(...liveReviewDTO.list)
  30 + if(this.data.getDataArray().length > 0){
  31 + this.pageModel.viewType = ViewType.LOADED;
  32 + }else{
  33 + this.pageModel.viewType = ViewType.EMPTY
  34 + }
  35 + })
  36 + }
  37 +
  38 + build() {
  39 + Column() {
  40 + this.TabbarNormal()
  41 + if (this.pageModel.viewType == ViewType.LOADING) {
  42 + this.LoadingLayout()
  43 + } else if (this.pageModel.viewType == ViewType.ERROR) {
  44 + ErrorComponent()
  45 + } else if (this.pageModel.viewType == ViewType.EMPTY) {
  46 + EmptyComponent()
  47 + } else {
  48 + this.ListLayout()
  49 + }
  50 + }
  51 + .padding({
  52 + bottom: $r('app.float.card_comp_pagePadding_tb')
  53 + })
  54 + }
  55 + @Builder
  56 + LoadingLayout() {
  57 + channelSkeleton()
  58 + }
  59 + /*导航栏*/
  60 + @Builder
  61 + TabbarNormal() {
  62 + RelativeContainer() {
  63 + //标题栏目
  64 + Image($r('app.media.icon_arrow_left'))
  65 + .width(24)
  66 + .height(24)
  67 + .objectFit(ImageFit.Auto)
  68 + .id("back_icon")
  69 + .alignRules({
  70 + center: { anchor: "__container__", align: VerticalAlign.Center },
  71 + left: { anchor: "__container__", align: HorizontalAlign.Start }
  72 + })
  73 + .onClick(() => {
  74 + router.back()
  75 + })
  76 +
  77 + Text(this.title)// .height('42lpx')
  78 + .maxLines(1)
  79 + .id("title")
  80 + .fontSize('35lpx')
  81 + .fontWeight(400)
  82 + .fontColor($r('app.color.color_222222'))
  83 + .lineHeight('42lpx')
  84 + .alignRules({
  85 + center: { anchor: "__container__", align: VerticalAlign.Center },
  86 + middle: { anchor: "__container__", align: HorizontalAlign.Center }
  87 + })
  88 + }
  89 + .height(44)
  90 + .width('100%')
  91 + .padding({
  92 + left: $r('app.float.card_comp_pagePadding_lf'),
  93 + right: $r('app.float.card_comp_pagePadding_lf'),
  94 + })
  95 + }
  96 +
  97 + @Builder
  98 + ListLayout() {
  99 + List() {
  100 + // 下拉刷新
  101 + ListItem() {
  102 + RefreshLayout({
  103 + refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage,
  104 + this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight)
  105 + })
  106 + }
  107 +
  108 + LazyForEach(this.data, (contentDTO: ContentDTO, contentIndex: number) => {
  109 + ListItem() {
  110 + Column() {
  111 + CardParser({ contentDTO });
  112 + }
  113 + }
  114 + },
  115 + (contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString()
  116 + )
  117 + }
  118 + .scrollBar(BarState.Off)
  119 + .cachedCount(8)
  120 + .height(CommonConstants.FULL_PARENT)
  121 + .onScrollIndex((start: number, end: number) => {
  122 + this.pageModel.startIndex = start;
  123 + this.pageModel.endIndex = end;
  124 + })
  125 + }
  126 +}
@@ -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() {
20 - 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))  
25 - }, (item: string, index: number) => index.toString()) 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 {
  119 + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
  120 + ForEach(this.count, (item: string, index: number) => {
  121 + TabContent() {
  122 + SearchResultContentComponent({ keywords: this.searchText, searchType: item })
  123 + }.tabBar(this.TabBuilder(index, item))
  124 + }, (item: string, index: number) => index.toString())
  125 + }
  126 + .vertical(false)
  127 + .barMode(BarMode.Fixed)
  128 + .barWidth('100%')
  129 + .barHeight('84lpx')
  130 + .animationDuration(0)
  131 + .onChange((index: number) => {
  132 + this.currentIndex = index
  133 + })
  134 + .width('100%')
  135 + .layoutWeight(1)
26 } 136 }
27 - .vertical(false)  
28 - .barMode(BarMode.Fixed)  
29 - .barWidth('100%')  
30 - .barHeight('84lpx')  
31 - .animationDuration(0)  
32 - .onChange((index: number) => {  
33 - this.currentIndex = index  
34 - })  
35 - .width('100%')  
36 - .layoutWeight(1)  
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,14 +82,17 @@ struct MineHomePage { @@ -82,14 +82,17 @@ struct MineHomePage {
82 .lineHeight('50lpx') 82 .lineHeight('50lpx')
83 .fontWeight('500lpx') 83 .fontWeight('500lpx')
84 84
85 - Text(`等级${this.levelId}`)  
86 - .textAlign(TextAlign.Center)  
87 - .fontColor($r('app.color.color_ED2800'))  
88 - .backgroundColor($r('app.color.white'))  
89 - .fontSize('19lpx')  
90 - .width('96lpx')  
91 - .height('35lpx')  
92 - .margin({ left: '10lpx' }) 85 + if(this.levelId>0){
  86 + Text(`等级${this.levelId}`)
  87 + .textAlign(TextAlign.Center)
  88 + .fontColor($r('app.color.color_ED2800'))
  89 + .backgroundColor($r('app.color.white'))
  90 + .fontSize('19lpx')
  91 + .width('96lpx')
  92 + .height('35lpx')
  93 + .margin({ left: '10lpx' })
  94 + }
  95 +
93 Blank() 96 Blank()
94 }.width('507lpx') 97 }.width('507lpx')
95 98
@@ -21,7 +21,8 @@ import { @@ -21,7 +21,8 @@ import {
21 postExecuteCollectRecordParams, 21 postExecuteCollectRecordParams,
22 postExecuteLikeParams, 22 postExecuteLikeParams,
23 postInteractAccentionOperateParams, 23 postInteractAccentionOperateParams,
24 - postRecommendListParams 24 + postRecommendListParams,
  25 + postThemeListParams
25 } from 'wdBean'; 26 } from 'wdBean';
26 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; 27 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
27 28
@@ -422,4 +423,17 @@ export class PageRepository { @@ -422,4 +423,17 @@ export class PageRepository {
422 Logger.info(TAG, "getPageUrl url = " + url) 423 Logger.info(TAG, "getPageUrl url = " + url)
423 return url; 424 return url;
424 } 425 }
  426 +
  427 + /**
  428 + * 获取金刚位聚合页列表
  429 + * https://pdapis.pdnews.cn/api/display/zh/c/themeList
  430 + * @param params
  431 + * @returns
  432 + * */
  433 + static postThemeList(params: postThemeListParams) {
  434 + let url = HttpUrlUtils.getThemeListUrl()
  435 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  436 + Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params))
  437 + return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params, headers)
  438 + };
425 } 439 }
@@ -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 }
@@ -2,7 +2,7 @@ import HashMap from '@ohos.util.HashMap'; @@ -2,7 +2,7 @@ import HashMap from '@ohos.util.HashMap';
2 import { HttpUrlUtils, ResponseDTO } from 'wdNetwork'; 2 import { HttpUrlUtils, ResponseDTO } from 'wdNetwork';
3 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest'; 3 import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
4 import { Logger, ToastUtils } from 'wdKit'; 4 import { Logger, ToastUtils } from 'wdKit';
5 -import { LiveDetailsBean } from 'wdBean/Index'; 5 +import { LiveDetailsBean, ReserveBean } from 'wdBean/Index';
6 6
7 const TAG = 'LiveModel' 7 const TAG = 'LiveModel'
8 8
@@ -66,5 +66,34 @@ export class LiveModel { @@ -66,5 +66,34 @@ export class LiveModel {
66 }) 66 })
67 }) 67 })
68 } 68 }
  69 +
  70 + /**
  71 + * 查询预约状态
  72 + *
  73 + [{"relationId":"500002824823","liveId":"20000120522"},{"relationId":"500002845517","liveId":"20000120782"}]
  74 + * @returns
  75 + * @returns
  76 + */
  77 + static getAppointmentStatus(reserveBean: ReserveBean[]) {
  78 + // let params: Record<string, ArrayList<ReserveBean>> = {};
  79 + // params = reserveBean
  80 + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
  81 + return new Promise<ResponseDTO<string>>((success, fail) => {
  82 + HttpRequest.post<ResponseDTO<string>>(
  83 + HttpUrlUtils.getAppointmentStatusUrl(),
  84 + reserveBean,
  85 + headers).then((data: ResponseDTO<string>) => {
  86 + if (data.code != 0) {
  87 + fail(data.message)
  88 + ToastUtils.shortToast(data.message)
  89 + return
  90 + }
  91 + success(data)
  92 + }, (error: Error) => {
  93 + fail(error.message)
  94 + Logger.debug(TAG + ":error ", error.toString())
  95 + })
  96 + })
  97 + }
69 } 98 }
70 99
@@ -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 }
@@ -5,25 +5,91 @@ import { closeRefresh } from '../utils/PullDownRefresh'; @@ -5,25 +5,91 @@ import { closeRefresh } from '../utils/PullDownRefresh';
5 import PageModel from './PageModel'; 5 import PageModel from './PageModel';
6 import PageViewModel from './PageViewModel'; 6 import PageViewModel from './PageViewModel';
7 import { promptAction } from '@kit.ArkUI'; 7 import { promptAction } from '@kit.ArkUI';
  8 +import { AdvRuleBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
8 9
9 const TAG = 'PageHelper'; 10 const TAG = 'PageHelper';
10 11
11 /** 12 /**
12 * 处理返回后的数据 13 * 处理返回后的数据
13 - * @deprecated  
14 */ 14 */
15 export class PageHelper { 15 export class PageHelper {
  16 + /**
  17 + * 刷新数据
  18 + */
16 async refreshUI(pageModel: PageModel) { 19 async refreshUI(pageModel: PageModel) {
17 pageModel.loadStrategy = 2 20 pageModel.loadStrategy = 2
18 - this.parseGroup(pageModel) 21 + this.getPageInfo(pageModel)
19 } 22 }
20 23
  24 + /**
  25 + * 分页加载
  26 + */
21 async loadMore(pageModel: PageModel) { 27 async loadMore(pageModel: PageModel) {
22 pageModel.loadStrategy = 3 28 pageModel.loadStrategy = 3
23 // 暂只支持comp分页加载,节目分页加载的得完善框架(如直播回看节目数据分页) 29 // 暂只支持comp分页加载,节目分页加载的得完善框架(如直播回看节目数据分页)
24 this.compLoadMore(pageModel) 30 this.compLoadMore(pageModel)
25 } 31 }
26 32
  33 + /**
  34 + * 进页面请求数据
  35 + */
  36 + async getInitData(pageModel: PageModel) {
  37 + pageModel.loadStrategy = 1
  38 + this.getPageInfo(pageModel)
  39 + }
  40 +
  41 + async getPageInfo(pageModel: PageModel) {
  42 + pageModel.currentPage = 1;
  43 + let pageInfo = await PageViewModel.getPageInfo(pageModel.pageId);
  44 + if (pageInfo == null) {
  45 + pageModel.viewType = ViewType.EMPTY;
  46 + return;
  47 + }
  48 + pageModel.pageInfo = pageInfo;
  49 + //解析广告资源
  50 + this.analysisAdvSource(pageModel);
  51 +
  52 + this.parseGroup(pageModel)
  53 +
  54 + }
  55 +
  56 + /**
  57 + * 解析广告资源
  58 + * @param pageInfo
  59 + */
  60 + analysisAdvSource(pageModel: PageModel) {
  61 +
  62 + let pageInfo = pageModel.pageInfo
  63 + if (pageInfo.hasAdInfo === 1 && pageInfo.cornersAdv != null) {
  64 + // 优先展示展现中心广告
  65 + let cornersAdv = pageInfo.cornersAdv
  66 +
  67 + } else if (pageInfo.cornersAdv2 != null && pageInfo.cornersAdv2.length > 0) {
  68 + // 广告中心-挂角广告信息
  69 + let cornersAdv2 = pageInfo.cornersAdv2
  70 + // 获取
  71 + let showCompAdvBean = cornersAdv2[0]
  72 +
  73 + //
  74 + let slotInfo = showCompAdvBean.slotInfo;
  75 + let postion = slotInfo.position
  76 +
  77 + if (postion == 0) {
  78 + //左边挂角
  79 + pageModel.pageLeftCornerAdv = showCompAdvBean
  80 + pageModel.isShowLeftAds = true
  81 + } else {
  82 + // 右边挂角
  83 + pageModel.pageRightCornerAdv = showCompAdvBean
  84 + pageModel.isShowRightAds = true
  85 + }
  86 +
  87 + Logger.error("XXX", JSON.stringify(pageInfo.cornersAdv2))
  88 + }
  89 +
  90 + }
  91 +
  92 +
27 async parseGroup(pageModel: PageModel) { 93 async parseGroup(pageModel: PageModel) {
28 let pageInfo: PageInfoDTO = pageModel.pageInfo 94 let pageInfo: PageInfoDTO = pageModel.pageInfo
29 pageModel.groupList = [] 95 pageModel.groupList = []
@@ -66,7 +132,7 @@ export class PageHelper { @@ -66,7 +132,7 @@ export class PageHelper {
66 } 132 }
67 133
68 //移除音频 和 活动 134 //移除音频 和 活动
69 - this.removeComp(pageModel,pageDto) 135 + this.removeComp(pageModel, pageDto)
70 136
71 // pageModel.compList.push(...pageDto.compList) 137 // pageModel.compList.push(...pageDto.compList)
72 138
@@ -114,7 +180,7 @@ export class PageHelper { @@ -114,7 +180,7 @@ export class PageHelper {
114 let sizeBefore: number = pageModel.compList.size(); 180 let sizeBefore: number = pageModel.compList.size();
115 181
116 //移除音频 和 活动 182 //移除音频 和 活动
117 - this.removeComp(pageModel,data) 183 + this.removeComp(pageModel, data)
118 // 184 //
119 // pageModel.compList.push(...data.compList) 185 // pageModel.compList.push(...data.compList)
120 PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => { 186 PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {
@@ -132,14 +198,14 @@ export class PageHelper { @@ -132,14 +198,14 @@ export class PageHelper {
132 * 移除comp 198 * 移除comp
133 */ 199 */
134 private removeComp(pageModel: PageModel, pageDto: PageDTO) { 200 private removeComp(pageModel: PageModel, pageDto: PageDTO) {
135 - let datas = pageDto.compList 201 + let datas = pageDto.compList
136 for (let index = 0; index < datas.length; index++) { 202 for (let index = 0; index < datas.length; index++) {
137 const element = datas[index]; 203 const element = datas[index];
138 let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0); 204 let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0);
139 //移除音频 和 活动 205 //移除音频 和 活动
140 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { 206 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
141 Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); 207 Logger.debug(TAG, 'getGroupData 移除音频 和 活动');
142 - }else { 208 + } else {
143 pageModel.compList.push(element) 209 pageModel.compList.push(element)
144 } 210 }
145 } 211 }
@@ -4,6 +4,7 @@ import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; @@ -4,6 +4,7 @@ import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType';
4 import { RefreshConstants as Const } from '../utils/RefreshConstants'; 4 import { RefreshConstants as Const } from '../utils/RefreshConstants';
5 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; 5 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
6 import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO'; 6 import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO';
  7 +import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
7 8
8 /** 9 /**
9 * 页面下拉刷新、上拉加载数据bean。 10 * 页面下拉刷新、上拉加载数据bean。
@@ -50,6 +51,15 @@ export default class PageModel { @@ -50,6 +51,15 @@ export default class PageModel {
50 // keyGenerator相关字符串,用于刷新list布局 51 // keyGenerator相关字符串,用于刷新list布局
51 timestamp: String = '1'; 52 timestamp: String = '1';
52 53
  54 + //左右挂角广告对象
  55 + pageLeftCornerAdv:CompAdvBean = {} as CompAdvBean
  56 + isShowLeftAds : boolean = true;
  57 + pageRightCornerAdv:CompAdvBean = {} as CompAdvBean
  58 + isShowRightAds : boolean = true;
  59 +
  60 +
  61 +
  62 +
53 /** 63 /**
54 * 简单复制业务数据 64 * 简单复制业务数据
55 */ 65 */
@@ -358,7 +358,7 @@ export class PageViewModel extends BaseViewModel { @@ -358,7 +358,7 @@ export class PageViewModel extends BaseViewModel {
358 async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> { 358 async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> {
359 return new Promise<LiveReviewDTO>((success, error) => { 359 return new Promise<LiveReviewDTO>((success, error) => {
360 Logger.info(TAG, `getLiveMoreUrl pageInfo start`); 360 Logger.info(TAG, `getLiveMoreUrl pageInfo start`);
361 - PageRepository.fetchLiveMoreUrl(type,pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => { 361 + PageRepository.fetchLiveMoreUrl(type, pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => {
362 if (!resDTO || !resDTO.data) { 362 if (!resDTO || !resDTO.data) {
363 Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty'); 363 Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty');
364 error('resDTO is empty'); 364 error('resDTO is empty');
@@ -378,6 +378,30 @@ export class PageViewModel extends BaseViewModel { @@ -378,6 +378,30 @@ export class PageViewModel extends BaseViewModel {
378 }) 378 })
379 }) 379 })
380 } 380 }
  381 +
  382 + async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> {
  383 + return new Promise<LiveReviewDTO>((success, error) => {
  384 + Logger.info(TAG, `postThemeList pageInfo start`);
  385 + PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => {
  386 + if (!resDTO || !resDTO.data) {
  387 + Logger.error(TAG, 'postThemeList then navResDTO is empty');
  388 + error('resDTO is empty');
  389 + return
  390 + }
  391 + if (resDTO.code != 0) {
  392 + Logger.error(TAG, `postThemeList then code:${resDTO.code}, message:${resDTO.message}`);
  393 + error('resDTO Response Code is failure');
  394 + return
  395 + }
  396 + // let navResStr = JSON.stringify(navResDTO);
  397 + Logger.info(TAG, "postThemeList then,navResDTO.timestamp:" + resDTO.timestamp, `${JSON.stringify(resDTO)}}`);
  398 + success(resDTO.data);
  399 + }).catch((err: Error) => {
  400 + Logger.error(TAG, `postThemeList catch, error.name : ${err.name}, error.message:${err.message}`);
  401 + error(err);
  402 + })
  403 + })
  404 + }
381 } 405 }
382 406
383 407
  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 +}
@@ -121,11 +121,11 @@ @@ -121,11 +121,11 @@
121 "value": "#99636363" 121 "value": "#99636363"
122 }, 122 },
123 { 123 {
124 - "name":"color_648DF2", 124 + "name": "color_648DF2",
125 "value": "#648DF2" 125 "value": "#648DF2"
126 }, 126 },
127 { 127 {
128 - "name":"color_EEEEEE", 128 + "name": "color_EEEEEE",
129 "value": "#EEEEEE" 129 "value": "#EEEEEE"
130 }, 130 },
131 { 131 {
@@ -151,6 +151,10 @@ @@ -151,6 +151,10 @@
151 { 151 {
152 "name": "color_0D000000", 152 "name": "color_0D000000",
153 "value": "#0D000000" 153 "value": "#0D000000"
  154 + },
  155 + {
  156 + "name": "res_color_general_000000_30",
  157 + "value": "#4D000000"
154 } 158 }
155 ] 159 ]
156 } 160 }
@@ -209,6 +209,10 @@ @@ -209,6 +209,10 @@
209 "value": "3vp" 209 "value": "3vp"
210 }, 210 },
211 { 211 {
  212 + "name": "vp_2",
  213 + "value": "2vp"
  214 + },
  215 + {
212 "name": "vp_55", 216 "name": "vp_55",
213 "value": "55vp" 217 "value": "55vp"
214 }, 218 },
@@ -225,6 +229,14 @@ @@ -225,6 +229,14 @@
225 "value": "16vp" 229 "value": "16vp"
226 }, 230 },
227 { 231 {
  232 + "name": "vp_28",
  233 + "value": "28vp"
  234 + },
  235 + {
  236 + "name": "vp_80",
  237 + "value": "80vp"
  238 + },
  239 + {
228 "name": "card_comp_pagePadding_lf", 240 "name": "card_comp_pagePadding_lf",
229 "value": "16fp" 241 "value": "16fp"
230 }, 242 },
@@ -48,5 +48,10 @@ @@ -48,5 +48,10 @@
48 "name": "reason_read_write_media", 48 "name": "reason_read_write_media",
49 "value": "user_grant" 49 "value": "user_grant"
50 } 50 }
  51 + ,
  52 + {
  53 + "name": "comp_advertisement",
  54 + "value": "广告"
  55 + }
51 ] 56 ]
52 } 57 }
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 "components/page/PeopleShipHomePage", 19 "components/page/PeopleShipHomePage",
20 "pages/MultiPictureListPage", 20 "pages/MultiPictureListPage",
21 "components/page/LiveMorePage", 21 "components/page/LiveMorePage",
22 - "components/page/ReserveMorePage" 22 + "components/page/ReserveMorePage",
  23 + "components/page/ThemeListPage"
23 ] 24 ]
24 } 25 }
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 <meta name="apple-mobile-web-app-capable" content="yes" /> 14 <meta name="apple-mobile-web-app-capable" content="yes" />
15 <!-- 设置苹果工具栏颜色 --> 15 <!-- 设置苹果工具栏颜色 -->
16 <meta name="apple-mobile-web-app-status-bar-style" content="black" /> 16 <meta name="apple-mobile-web-app-status-bar-style" content="black" />
17 - <script src="./js/plugin/vconsole.min.js"></script> 17 +<!-- <script src="./js/plugin/vconsole.min.js"></script>-->
18 <script> 18 <script>
19 - new VConsole() 19 + //new VConsole()
20 var hasDetails = false 20 var hasDetails = false
21 21
22 function getTime() { 22 function getTime() {
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 }
@@ -188,15 +188,15 @@ struct LoginPage { @@ -188,15 +188,15 @@ struct LoginPage {
188 .type(InputType.Normal) 188 .type(InputType.Normal)
189 .onChange((content) => { 189 .onChange((content) => {
190 this.accountContent = content 190 this.accountContent = content
191 - this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6) 191 + this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6)
192 }) 192 })
193 193
194 RelativeContainer() { 194 RelativeContainer() {
195 - if (this.passwordSwitch) { 195 + // if (this.passwordSwitch) {
196 this.addPasswordInputLayout() 196 this.addPasswordInputLayout()
197 - } else {  
198 - this.addPasswordInputLayout()  
199 - } 197 + // } else {
  198 + // this.addPasswordInputLayout()
  199 + // }
200 200
201 Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on')) 201 Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on'))
202 .onClick(() => { 202 .onClick(() => {
@@ -237,7 +237,7 @@ struct LoginPage { @@ -237,7 +237,7 @@ struct LoginPage {
237 .onChange((value) => { 237 .onChange((value) => {
238 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent) 238 // Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
239 this.passwordContent = value 239 this.passwordContent = value
240 - this.isSubmit = (this.accountContent.length >= 11 && this.passwordContent.length >= 6) 240 + this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6)
241 }) 241 })
242 .id("password") 242 .id("password")
243 } 243 }
@@ -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,48 +100,105 @@ struct LaunchAdvertisingPage { @@ -62,48 +100,105 @@ struct LaunchAdvertisingPage {
62 } 100 }
63 .width('100%') 101 .width('100%')
64 .height('100%') 102 .height('100%')
65 -  
66 - Button(){  
67 - Row(){  
68 - Text('点击跳转至详情或第三方应用')  
69 - .fontSize('31lpx')  
70 - .fontColor(Color.White)  
71 - .margin({  
72 - left:'55lpx'  
73 - })  
74 - Image($r('app.media.Slice'))  
75 - .width('46lpx')  
76 - .height('46lpx')  
77 - .margin({right:'55lpx'})  
78 - }.alignItems(VerticalAlign.Center) 103 + if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
  104 + //底部logo样式 按钮加载在背景展示图上
  105 + Button(){
  106 + Row(){
  107 + Text('点击跳转至详情或第三方应用')
  108 + .fontSize('31lpx')
  109 + .fontColor(Color.White)
  110 + .margin({
  111 + left:'55lpx'
  112 + })
  113 + Image($r('app.media.Slice'))
  114 + .width('46lpx')
  115 + .height('46lpx')
  116 + .margin({right:'55lpx'})
  117 + }.alignItems(VerticalAlign.Center)
  118 + }
  119 + .width('566lpx')
  120 + .height('111lpx')
  121 + .margin({
  122 + bottom: '51lpx'
  123 + })
  124 + .backgroundColor('#80000000')
  125 + .onClick(()=>{
  126 + this.action()
  127 + })
79 } 128 }
80 - .width('566lpx')  
81 - .height('111lpx')  
82 - .margin({  
83 - bottom: '51lpx'  
84 - })  
85 - .backgroundColor('#80000000')  
86 -  
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
95 - Image($r('app.media.LaunchPage_logo'))  
96 - .width('278lpx')  
97 - .height('154lpx')  
98 - .margin({bottom: '48lpx'}) 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样式
  163 + Image($r('app.media.LaunchPage_logo'))
  164 + .width('278lpx')
  165 + .height('154lpx')
  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)
103 -  
104 } 173 }
105 174
106 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'
  189 + }
  190 + context.startAbility(wantInfo).then(() => {
  191 + // ...
  192 + }).catch((err: BusinessError) => {
  193 + // ...
  194 + })
  195 + }else {
  196 + //端内打开
  197 +
  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则直接跳转到首页
95 - //跳转广告页  
96 - this.jumpToAdvertisingPage(); 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) {
  105 + //跳转广告页
  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 +}