Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhenghy
2024-04-23 18:53:35 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
3d13fe400bf234394865ef8c0ab4770026a73dfa
3d13fe40
2 parents
9d4ea21d
3d21a7d7
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
2826 additions
and
369 deletions
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
sight_harmony/commons/wdJsBridge/src/main/ets/bean/Message.ets
sight_harmony/commons/wdKit/Index.ets
sight_harmony/commons/wdKit/src/main/ets/network/NetworkManager.ets
sight_harmony/commons/wdKit/src/main/ets/network/NetworkType.ets
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
sight_harmony/commons/wdKit/src/main/ets/utils/Logger.ets
sight_harmony/commons/wdKit/src/main/ets/utils/NetworkUtil.ets
sight_harmony/commons/wdKit/src/main/ets/utils/ResourcesUtils.ets
sight_harmony/commons/wdKit/src/main/module.json5
sight_harmony/commons/wdNetwork/src/main/ets/bean/ResponseDTO.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/AxiosRequest.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
sight_harmony/features/wdBean/Index.ets
sight_harmony/features/wdBean/src/main/ets/bean/adv/AdvertsBean.ets
sight_harmony/features/wdBean/src/main/ets/bean/adv/AdvsRuleBean.ets
sight_harmony/features/wdBean/src/main/ets/bean/adv/CompAdvInfoBean.ets
sight_harmony/features/wdBean/src/main/ets/bean/detail/MultiPictureDetailPageDTO.ts
sight_harmony/features/wdBean/src/main/ets/bean/detail/postRecommendListParams.ets
sight_harmony/features/wdBean/src/main/ets/bean/detail/postThemeListParams.ets
sight_harmony/features/wdBean/src/main/ets/bean/live/ReserveBean.ets
sight_harmony/features/wdBean/src/main/ets/bean/navigation/PageInfoDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ReserveMorePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
sight_harmony/features/wdComponent/src/main/ets/model/SearcherAboutDataModel.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/CommentListItem.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineMainSettingFunctionItem.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchSuggestData.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchSuggestRequestItem.ets
sight_harmony/features/wdComponent/src/main/resources/base/element/color.json
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
sight_harmony/features/wdComponent/src/main/resources/base/element/string.json
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_adv_horn_close.png
sight_harmony/features/wdComponent/src/main/resources/base/media/search_suggest_icon.png
sight_harmony/features/wdComponent/src/main/resources/base/profile/main_pages.json
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/index.html
sight_harmony/features/wdHwAbility/src/main/ets/location/HWLocationUtils.ets
sight_harmony/features/wdHwAbility/src/main/module.json5
sight_harmony/features/wdHwAbility/src/main/resources/base/element/string.json
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchDataModel.ets
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchPageModel.ets
sight_harmony/products/phone/src/main/resources/rawfile/search_suggest_data.json
sight_harmony/commons/wdConstant/src/main/ets/constants/ContentConstants.ets
View file @
3d13fe4
...
...
@@ -45,5 +45,9 @@ export class ContentConstants {
*/
static readonly TYPE_FIFTEEN: string = "15";
/**
* 30:金刚位聚合页
*/
static readonly TYPE_THIRTY: string = "30";
}
\ No newline at end of file
...
...
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
View file @
3d13fe4
...
...
@@ -20,10 +20,18 @@ export class SpConstants{
static MESSAGE_BOARD_PRIVATE_PROTOCOL = "message_board_private_protocol" //"留言板-隐私政策"
//设置页面
static SETTING_WIFI_IMAGE_SWITCH = "setting_wifi_switch" //wifi 图片开关
static SETTING_WIFI_VIDEO_SWITCH = "setting_
wifi
_switch" //wifi 视频开关
static SETTING_WIFI_VIDEO_SWITCH = "setting_
video
_switch" //wifi 视频开关
static SETTING_SUSPENSION_SWITCH = "setting_suspension_switch" //悬浮窗 开关
static SETTING_PUSH_SWITCH = "setting_push_switch" //推送 开关
//未登录保存兴趣标签
static PUBLICVISUTORMODE_INTERESTTAGS = 'PublicVisitorMode_InterestTags'
//定位相关
static LOCATION_CITY_NAME = "location_city_name" //定位
static LOCATION_CITY_CODE = "location_city_code" //定位
//启动页数据存储key
static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
}
\ No newline at end of file
...
...
sight_harmony/commons/wdJsBridge/src/main/ets/bean/Message.ets
View file @
3d13fe4
import { Action } from './Action';
interface dataObject {
// dataSource:
// 1、图文详情数据
// 2、英文端跳转推荐内容数据
// 3、显示图片预览
// 4、专题pageinfo数据
// 5、专题comp运营位点击跳转(传给App记录浏览历史)
// 6、图文详情引用内容跳转
// 7、专题分享海报图上的数据列表(H5可选第一页前5条运营位数据)
// 8、活动投稿 文章跳转
// 9、活动投稿 视频跳转
// 10、活动投稿 动态跳转
// 11、活动投稿 图集跳转
dataSource: number
operateType?: string
webViewHeight?: string
...
...
sight_harmony/commons/wdKit/Index.ets
View file @
3d13fe4
...
...
@@ -43,3 +43,9 @@ export { ErrorToastUtils } from './src/main/ets/utils/ErrorToastUtils'
export { EmitterUtils } from './src/main/ets/utils/EmitterUtils'
export { EmitterEventId } from './src/main/ets/utils/EmitterEventId'
export { NetworkUtil } from './src/main/ets/utils/NetworkUtil'
export { NetworkManager } from './src/main/ets/network/NetworkManager'
export { NetworkType } from './src/main/ets/network/NetworkType'
...
...
sight_harmony/commons/wdKit/src/main/ets/network/NetworkManager.ets
0 → 100644
View file @
3d13fe4
import connection from '@ohos.net.connection';
import { BusinessError } from '@ohos.base';
import { Logger } from '../utils/Logger';
import { EmitterUtils } from '../utils/EmitterUtils';
import { EmitterEventId } from '../utils/EmitterEventId';
import { NetworkType } from './NetworkType';
const TAG = 'NetworkManager'
/**
* 网络管理类
*/
export class NetworkManager {
private netCon: connection.NetConnection | null = null;
private static instance: NetworkManager;
private networkType: NetworkType = NetworkType.TYPE_UNKNOWN
public static getInstance(): NetworkManager {
if (!NetworkManager.instance) {
NetworkManager.instance = new NetworkManager();
}
return NetworkManager.instance;
}
public init() {
// 初始化
if (this.netCon) {
// 拦截重复初始化
return
}
this.networkMonitorRegister()
}
public release() {
this.networkMonitorUnregister()
}
private constructor() {
}
private networkMonitorRegister() {
this.netCon = connection.createNetConnection();
this.netCon.register((error) => {
if (error) {
Logger.error(TAG, 'register error:' + error.message);
return;
}
Logger.info(TAG, 'register success');
})
this.netCon.on('netAvailable', (data: connection.NetHandle) => {
Logger.info(TAG, 'netAvailable, data is: ' + JSON.stringify(data))
})
this.netCon.on('netBlockStatusChange', (data: connection.NetBlockStatusInfo) => {
Logger.info(TAG, 'netBlockStatusChange, data is: ' + JSON.stringify(data))
// TODO 网络阻塞,是否创建新的网络、提示
})
this.netCon.on('netCapabilitiesChange', (data: connection.NetCapabilityInfo) => {
Logger.info(TAG, 'netCapabilitiesChange, data is: ' + JSON.stringify(data))
this.parseData(data)
// 可能多次通知
EmitterUtils.sendEvent(EmitterEventId.NETWORK_CONNECTED, JSON.stringify(this.networkType))
})
this.netCon.on('netConnectionPropertiesChange', (data: connection.NetConnectionPropertyInfo) => {
Logger.info(TAG, 'netConnectionPropertiesChange, data is: ' + JSON.stringify(data))
})
this.netCon.on('netUnavailable', ((data: void) => {
Logger.info(TAG, 'netUnavailable, data is: ' + JSON.stringify(data))
}));
this.netCon.on('netLost', ((data: connection.NetHandle) => {
Logger.info(TAG, 'netLost, data is: ' + JSON.stringify(data))
// TODO 断网
EmitterUtils.sendEvent(EmitterEventId.NETWORK_DISCONNECTED)
this.networkType = NetworkType.TYPE_NONE
}))
}
private networkMonitorUnregister() {
if (this.netCon) {
this.netCon.unregister((error: BusinessError) => {
if (error) {
Logger.error(TAG, 'unregister error:' + error.message);
return;
}
Logger.info(TAG, 'unregister success');
})
}
}
/**
* @deprecated
*/
private getNetworkMessage(netHandle: connection.NetHandle) {
connection.getNetCapabilities(netHandle, (error, netCap) => {
if (error) {
Logger.error(TAG, 'getNetCapabilities error:' + error.message);
return;
}
let netType = netCap.bearerTypes;
this.reset(netType)
})
}
private reset(netType: Array<connection.NetBearType>) {
if (netType == null) {
return
}
for (let i = 0; i < netType.length; i++) {
if (netType[i] === 0) {
// 蜂窝网
this.networkType = NetworkType.TYPE_CELLULAR
} else if (netType[i] === 1) {
// Wi-Fi网络
this.networkType = NetworkType.TYPE_WIFI
} else {
// 以太网网络
this.networkType = NetworkType.TYPE_ETHERNET
}
}
}
/**
* 获取网络类型,网络监听网络变化刷新类型,这里优先返回变量
*/
public getNetType(): NetworkType {
if (this.networkType != NetworkType.TYPE_UNKNOWN) {
return this.networkType
}
return this.getNetTypeSync()
}
/**
* 同步获取网络类型,耗时
*/
public getNetTypeSync(): NetworkType {
let netHandle = connection.getDefaultNetSync();
let netCapabilities = connection.getNetCapabilitiesSync(netHandle)
this.reset(netCapabilities.bearerTypes)
return this.networkType;
}
private parseData(data: connection.NetCapabilityInfo) {
// 解析网络信息
this.reset(data.netCap.bearerTypes)
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/ets/network/NetworkType.ets
0 → 100644
View file @
3d13fe4
/**
* 网络管理类
*/
export enum NetworkType {
// 未知
TYPE_UNKNOWN = -1,
// 无网络
TYPE_NONE = 0,
// wifi
TYPE_WIFI = 1,
// 蜂窝网
TYPE_CELLULAR = 2,
// 以太网
TYPE_ETHERNET = 3,
}
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/EmitterEventId.ts
View file @
3d13fe4
...
...
@@ -3,6 +3,10 @@
*/
export
enum
EmitterEventId
{
// 通知登出,事件id
FORCE_USER_LOGIN_OUT
=
1
FORCE_USER_LOGIN_OUT
=
1
,
// 网络连接成功,事件id
NETWORK_CONNECTED
=
2
,
// 网络断开,事件id
NETWORK_DISCONNECTED
=
3
,
}
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/Logger.ets
View file @
3d13fe4
...
...
@@ -22,6 +22,11 @@ export class Logger {
private static domain: number = 0xFF00;
private static prefix: string = 'SightApp';
private static format: string = `%{public}s, %{public}s`;
private static format_ext: string = `%{public}s`;
/**
* 暂时没找到限制大小相关文档,尝试4000是不行的,3500可以。可以后续优化
*/
private static CHUNK_SIZE: number = 3500;
static isDebug: boolean = true;
/**
...
...
@@ -36,46 +41,113 @@ export class Logger {
}
static debug(...args: string[]) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
hilog.debug(Logger.domain, Logger.prefix, Logger.format, args);
Logger.logContent(LogLevel.DEBUG, ...args)
}
static info(...args: string[]) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
hilog.info(Logger.domain, Logger.prefix, Logger.format, args);
Logger.logContent(LogLevel.INFO, ...args)
}
static warn(...args: string[]) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
hilog.warn(Logger.domain, Logger.prefix, Logger.format, args);
Logger.logContent(LogLevel.WARN, ...args)
}
static error(...args: string[]) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
hilog.error(Logger.domain, Logger.prefix, Logger.format, args);
Logger.logContent(LogLevel.ERROR, ...args)
}
static fatal(...args: string[]) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
hilog.fatal(Logger.domain, Logger.prefix, Logger.format, args);
Logger.logContent(LogLevel.FATAL, ...args)
}
static isLoggable(level: LogLevel) {
if
(!Logger.isDebug)
{
if
(!Logger.isDebug)
{
return
}
// 判断是否打印 TODO
hilog.isLoggable(Logger.domain, Logger.prefix, level);
}
static logContent(level: LogLevel, ...args: string[]) {
let msg = Logger.getMsg(...args)
let length = msg.length
if (length < Logger.CHUNK_SIZE) {
// 不超限,保持原来的打印
Logger.print(level, ...args)
} else {
// 超限,分段打印
for (let i = 0; i < length; i += Logger.CHUNK_SIZE) {
let count = Math.min(length - i, Logger.CHUNK_SIZE);
Logger.printExt(level, msg.substring(i, i + count));
}
}
}
static print(level: LogLevel, ...msg: string[]) {
switch (level) {
case LogLevel.DEBUG:
hilog.debug(Logger.domain, Logger.prefix, Logger.format, msg);
break
case LogLevel.INFO:
hilog.info(Logger.domain, Logger.prefix, Logger.format, msg);
break
case LogLevel.WARN:
hilog.warn(Logger.domain, Logger.prefix, Logger.format, msg);
break
case LogLevel.ERROR:
hilog.error(Logger.domain, Logger.prefix, Logger.format, msg);
break
case LogLevel.FATAL:
hilog.fatal(Logger.domain, Logger.prefix, Logger.format, msg);
break
}
}
static printExt(level: LogLevel, msg: string) {
switch (level) {
case LogLevel.DEBUG:
hilog.debug(Logger.domain, Logger.prefix, Logger.format_ext, msg);
break
case LogLevel.INFO:
hilog.info(Logger.domain, Logger.prefix, Logger.format_ext, msg);
break
case LogLevel.WARN:
hilog.warn(Logger.domain, Logger.prefix, Logger.format_ext, msg);
break
case LogLevel.ERROR:
hilog.error(Logger.domain, Logger.prefix, Logger.format_ext, msg);
break
case LogLevel.FATAL:
hilog.fatal(Logger.domain, Logger.prefix, Logger.format_ext, msg);
break
}
}
static getMsg(...args: string[]): string {
if (args == null || args.length <= 0) {
return '';
}
let msg = ''
args.forEach((v) => {
msg = msg.concat(', ').concat(v)
})
return msg.substring(2, msg.length);
}
}
export default new Logger('SightApp', 0xFF00)
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/NetworkUtil.ets
0 → 100644
View file @
3d13fe4
import { NetworkManager } from '../network/NetworkManager'
import { NetworkType } from '../network/NetworkType'
/**
* 网络相关工具类
* 要实时监听网络,需要添加注册函数{例:src/main/ets/entryability/EntryAbility.ets:32}
*/
export class NetworkUtil {
/**
* 网络环境:0:无网 1:WiFi 2:2G 3:3G 4:4G 5:5G,暂时只识别出蜂窝网
* 扩展6-以太网
*/
static TYPE_NONE = '0'
static TYPE_WIFI = '1'
static TYPE_CELLULAR = '5'
// TODO 以太网,手机不涉及
static TYPE_ETHERNET = '6'
static getNetworkType(): string {
let type = NetworkManager.getInstance().getNetType()
return NetworkUtil.parseType(type)
}
static parseType(type: NetworkType): string {
switch (type) {
case NetworkType.TYPE_UNKNOWN:
case NetworkType.TYPE_NONE:
return NetworkUtil.TYPE_NONE;
case NetworkType.TYPE_WIFI:
return NetworkUtil.TYPE_WIFI;
case NetworkType.TYPE_CELLULAR:
return NetworkUtil.TYPE_CELLULAR;
case NetworkType.TYPE_ETHERNET:
return NetworkUtil.TYPE_ETHERNET;
default:
return NetworkUtil.TYPE_NONE;
}
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdKit/src/main/ets/utils/ResourcesUtils.ets
View file @
3d13fe4
...
...
@@ -26,7 +26,7 @@ export class ResourcesUtils {
try {
let text = buffer.from(content).toString("utf8");
if (text) {
Logger.info(TAG, "getResourcesText then text:" + text);
//
Logger.info(TAG, "getResourcesText then text:" + text);
success(text);
} else {
Logger.warn(TAG, "getResourcesText then text is empty");
...
...
sight_harmony/commons/wdKit/src/main/module.json5
View file @
3d13fe4
...
...
@@ -8,6 +8,11 @@
"tablet"
,
"2in1"
],
"deliveryWithInstall"
:
true
"deliveryWithInstall"
:
true
,
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.GET_NETWORK_INFO"
}
]
}
}
\ No newline at end of file
...
...
sight_harmony/commons/wdNetwork/src/main/ets/bean/ResponseDTO.ets
View file @
3d13fe4
...
...
@@ -12,8 +12,17 @@ export interface ResponseDTO<T = string> {
// 响应结果
data?: T;
/**
* @deprecated
*/
totalCount?: number;
meta?: MetaDTO;
// 请求响应时间戳(unix格式)
timestamp?: number;
}
export interface MetaDTO {
md5: string;
}
\ No newline at end of file
...
...
sight_harmony/commons/wdNetwork/src/main/ets/http/AxiosRequest.ets
View file @
3d13fe4
...
...
@@ -38,6 +38,7 @@ instance.interceptors.request.use(
}
// 公共请求参数
// config.params.key = key
Logger.debug('HttpRequest', 'request: ' + config.url)
return config;
},
(error: AxiosError) => {
...
...
@@ -85,9 +86,9 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r
// return Promise.reject(new Error(message))
// }
// const data: ResponseBean<any> = response.data
Logger.debug('HttpRequest', 'response ======
start=======
')
Logger.debug('HttpRequest', 'response ======
========start=================
')
Logger.debug('HttpRequest', 'response: ' + JSON.stringify(response.data))
Logger.debug('HttpRequest', 'response ======
end=======
')
Logger.debug('HttpRequest', 'response ======
========end=================
')
// 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据
return response.data;
} else {
...
...
@@ -102,7 +103,7 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r
// console.log(error.request)
// console.log(error.response)
// 这里用来处理http常见错误,进行全局提示
if
(error!=null && error.response!=null )
{
if
(error != null && error.response != null)
{
let message = buildErrorMsg(error.response.status);
// 错误消息可以使用全局弹框展示出来
console.log(`httpStatus:${error.response?.status}-${message},请检查网络或联系管理员!`)
...
...
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
View file @
3d13fe4
...
...
@@ -225,6 +225,10 @@ export class HttpUrlUtils {
*/
static readonly LIVE_APPOINTMENT_PATH: string = "/api/live-center-message/zh/c/live/subscribe";
/**
* 预约状态
*/
static readonly LIVE_APPOINTMENT_BATCH_PATH: string = "api/live-center-message/zh/c/live/subscribe/user/batch";
/**
* 搜索结果 显示tab 数
*/
...
...
@@ -285,13 +289,17 @@ export class HttpUrlUtils {
* 获取启动页相关数据
*/
static readonly LAUNCH_PAGE_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/launchPage";
private static _hostUrl: string = HttpUrlUtils.HOST_PRODUCT;
/**
* 推荐列表
*/
static readonly RECOMMEND_LIST: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
/**
* 搜索推荐
*/
static readonly SEARCH_SUGGEST_DATA_PATH: string = "/api/rmrb-bff-display-zh/recommend/zh/c/list";
public static set hostUrl(value: string) {
HttpUrlUtils._hostUrl = value;
}
...
...
@@ -324,8 +332,9 @@ export class HttpUrlUtils {
headers.set('EagleEye-TraceID', 'D539562E48554A60977AF4BECB6D6C7A')
headers.set('imei', HttpUrlUtils.getImei())
headers.set('Accept-Language', 'zh')
headers.set('city', HttpUrlUtils.getCity())
headers.set('city_dode', HttpUrlUtils.getCityCode())
// headers.set('city', HttpUrlUtils.getCity())
// headers.set('city_dode', HttpUrlUtils.getCityCode())
HttpUrlUtils.setLocationHeader(headers)
// TODO 判断是否登录
headers.set('userId', HttpUrlUtils.getUserId())
headers.set('userType', HttpUrlUtils.getUserType())
...
...
@@ -368,6 +377,17 @@ export class HttpUrlUtils {
}
}
static setLocationHeader(headers: HashMap<string, string>) {
let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string
if (StringUtils.isNotEmpty(cityName)) {
headers.set('city', encodeURI(cityName))
}
let cityCode = SPHelper.default.getSync(SpConstants.LOCATION_CITY_CODE, '') as string
if (StringUtils.isNotEmpty(cityCode)) {
headers.set('city_dode', encodeURI(cityCode))
}
}
static getHost() {
return HttpUrlUtils._hostUrl;
}
...
...
@@ -463,7 +483,7 @@ export class HttpUrlUtils {
return 'Android';
}
p
rivate
static getImei() {
p
ublic
static getImei() {
// TODO
return '8a81226a-cabd-3e1b-b630-b51db4a720ed';
}
...
...
@@ -755,6 +775,11 @@ export class HttpUrlUtils {
return url
}
static getAppointmentStatusUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.LIVE_APPOINTMENT_BATCH_PATH
return url
}
static getSearchResultCountDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_RESULT_COUNT_DATA_PATH
return url
...
...
@@ -795,6 +820,17 @@ export class HttpUrlUtils {
let url = HttpUrlUtils._hostUrl + "/api/rmrb-interact/interact/zh/c/like/executeLike";
return url;
}
//搜索推荐
static getSearchSuggestDataUrl() {
let url = HttpUrlUtils._hostUrl + HttpUrlUtils.SEARCH_SUGGEST_DATA_PATH
return url
}
//金刚位聚合页
static getThemeListUrl() {
let url = HttpUrlUtils._hostUrl + "/api/rmrb-bff-display-zh/display/zh/c/themeList";
return url;
}
// static getYcgCommonHeaders(): HashMap<string, string> {
// let headers: HashMap<string, string> = new HashMap<string, string>()
...
...
sight_harmony/commons/wdRouter/src/main/ets/router/Action2Page.ets
View file @
3d13fe4
...
...
@@ -65,6 +65,8 @@ export function registerRouter() {
return WDRouterPage.audioDetail
} else if (action.params?.detailPageType == 18) {
return WDRouterPage.multiPictureListPage
}else if (action.params?.detailPageType == 30) {
return WDRouterPage.themeListPage
}
return WDRouterPage.detailPlayVodPage
})
...
...
sight_harmony/commons/wdRouter/src/main/ets/router/WDRouterPage.ets
View file @
3d13fe4
...
...
@@ -118,4 +118,6 @@ export class WDRouterPage {
static liveMorePage = new WDRouterPage("wdComponent", "ets/components/page/LiveMorePage");
//预约更多页
static reserveMorePage = new WDRouterPage("wdComponent", "ets/components/page/ReserveMorePage");
//金刚位聚合页
static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage");
}
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
3d13fe4
import { Action, ContentDTO, Params } from 'wdBean';
import { Action, ContentDTO, Params
, PhotoListBean
} from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { Logger } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import { WDRouterRule } from '../router/WDRouterRule';
import { ContentConstants } from 'wdConstant';
import { common, Want } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
// import { LiveModel } from '../viewmodel/LiveModel';
...
...
@@ -58,10 +60,13 @@ export class ProcessUtils {
break;
//动态详情页(动态图文)
case ContentConstants.TYPE_FOURTEEN:
break
;
ProcessUtils.gotoDynamicDetailPage(content)
;
//动态详情页(动态视频)
case ContentConstants.TYPE_FIFTEEN:
ProcessUtils.gotoWeb(content);
ProcessUtils.gotoDynamicDetailPage(content);
break;
case ContentConstants.TYPE_THIRTY:
ProcessUtils.gotoThemeListPage(content)
break;
default:
break;
...
...
@@ -76,7 +81,7 @@ export class ProcessUtils {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType:
14
,
detailPageType:
Number.parseInt(content.objectType)
,
contentID: content?.objectId,
extra: {
relType: content?.relType,
...
...
@@ -92,20 +97,18 @@ export class ProcessUtils {
* 图集详情页
* @param content
* */
p
rivate static gotoAtlasDetailPage(content: ContentDTO
) {
p
ublic static gotoMultiPictureListPage(photoList: PhotoListBean[]
) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 17,
contentID: content?.objectId,
detailPageType: 18,
extra: {
relType: content?.relType,
relId: content?.relId,
photoList
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `goto
AtlasDetailPage, ${content.objectId}
`);
Logger.debug(TAG, `goto
MultiPictureListPage
`);
}
private static gotoSpecialTopic(content: ContentDTO) {
...
...
@@ -195,4 +198,62 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
}
/**
* 金刚位聚合页
* @param content
* */
private static gotoThemeListPage(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 30,
contentID: content?.objectId,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
}
/**
* 图片预览页
* @param content
* */
private static gotoAtlasDetailPage(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 17,
contentID: content?.objectId,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
}
/**
* 打开外链
* @param url 外链地址
*/
public static jumpExternalWebPage(url: string) {
let context = getContext() as common.UIAbilityContext;
let wantInfo: Want = {
action: 'ohos.want.action.viewData',
entities: ['entity.system.browsable'],
uri: url
}
context.startAbility(wantInfo).then(() => {
Logger.debug(TAG, 'jumpExternalWebPage success')
}).catch((err: BusinessError) => {
Logger.error(TAG, 'jumpExternalWebPage success, error: ' + JSON.stringify(err))
})
}
}
...
...
sight_harmony/commons/wdWebComponent/src/main/ets/pages/JsBridgeBiz.ets
View file @
3d13fe4
...
...
@@ -14,6 +14,7 @@ const TAG = 'JsBridgeBiz'
*/
export function performJSCallNative(data: Message, call: Callback) {
Logger.debug(TAG, 'performJSCallNative handlerName: ' + data.handlerName + ', data: ' + JSON.stringify(data.data))
switch (data.handlerName) {
case H5CallNativeType.jsCall_currentPageOperate:
break;
...
...
@@ -24,12 +25,13 @@ export function performJSCallNative(data: Message, call: Callback) {
case H5CallNativeType.jsCall_getArticleDetailBussinessData:
break;
case H5CallNativeType.jsCall_callAppService:
handleJsCallCallAppService(data)
break;
case H5CallNativeType.jsCall_receiveH5Data:
if(data?.data?.dataSource === 5){
handleH5Data(JSON.parse(data?.data?.dataJson || '{}'))
}
handleJsCallReceiveH5Data(data)
break;
case H5CallNativeType.jsCall_appInnerLinkMethod:
handleJsCallAppInnerLinkMethod(data)
break;
case 'changeNativeMessage':
call("this is change Web Message")
...
...
@@ -51,17 +53,35 @@ class AppInfo {
* 获取App公共信息
*/
function getAppPublicInfo(): string {
let info = new AppInfo()
info.plat = 'Phone'
// 直接用Android,后续适配再新增鸿蒙
info.system = 'Android'
info.networkStatus = 1
let result = JSON.stringify(info)
Logger.debug(TAG, 'getAppPublicInfo: ' + JSON.stringify(info))
return result;
}
function handleH5Data(content:ContentDTO) {
Logger.debug(TAG, 'handleH5Data' + ', content: ' + JSON.stringify(content))
ProcessUtils.processPage(content)
function handleJsCallReceiveH5Data(data: Message) {
switch (data?.data?.dataSource) {
case 5:
if (data?.data?.dataSource === 5) {
ProcessUtils.processPage(JSON.parse(data?.data?.dataJson || '{}'))
}
break;
default:
break;
}
}
function handleJsCallCallAppService(data: Message) {
}
function handleJsCallAppInnerLinkMethod(data: Message) {
}
...
...
sight_harmony/features/wdBean/Index.ets
View file @
3d13fe4
...
...
@@ -37,7 +37,6 @@ export {
postExecuteCollectRecordParams,
contentListParams,
postInteractAccentionOperateParams,
postRecommendListParams,
contentListItem
} from './src/main/ets/bean/detail/MultiPictureDetailPageDTO';
...
...
@@ -119,12 +118,18 @@ export { ArticleListDTO } from './src/main/ets/bean/component/ArticleListDTO';
export { appStyleImagesDTO } from './src/main/ets/bean/content/appStyleImagesDTO';
export { LiveRoomBean,LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean';
export { LiveRoomBean,
LiveRoomItemBean } from './src/main/ets/bean/live/LiveRoomBean';
export { LiveRoomDataBean } from './src/main/ets/bean/live/LiveRoomDataBean';
export { ReserveBean } from './src/main/ets/bean/live/ReserveBean';
export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO';
export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams';
export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams';
export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO';
export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO';
...
...
sight_harmony/features/wdBean/src/main/ets/bean/adv/AdvertsBean.ets
0 → 100644
View file @
3d13fe4
/**
* @Description: 信息集合
* @Author:
* @Email: liyubing@wondertek.com.cn
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
export interface AdvertsBean{
/**
* 广告id
*/
id:string
/**
* 广告relId
*/
relId:string
/**
* 广告素材名称
*/
matTitle:string
/**
* 投放开始时间yyyy-MM-dd HH:mm:ss
*/
startTime:string
/**
* 投放结束时间yyyy-MM-dd HH:mm:ss
*/
endTime:string
/**
* 展现时段,多组数据:9:00:00-10:00:00|17:00:00-18:00:00
*/
displayTime:string
/**
* 展现优先级,数值越小,等级越高
*/
displayLevel:string
/**
* 链接跳转类型,0:无连接;1:内链(站内内容);2:外链
*/
linkType:number;
/**
* 外链广告外链地址,link_type=2生效
*/
linkUrl:string
/**
* 内链内容id 仅link_type=1生效
*/
contentId:string
/**
* 对象类型 0:不跳转 1:视频,2:直播,5:专题,6:链接,8:图文,9:组图,10:H5新闻,11:频道
*/
objectType:string
/**
* 内容标题
*/
contentTitle:string
/**
* 专题页面id
*/
topicPageId:string
/**
* 挂角封面图
*/
displayUrl:string
/**
* 页面id
*/
pageId:string
/**
* 跳转id
*/
objectId:string
/**
* 对象分类 ;频道(1:一级频道,2:二级频道),专题(1:普通专题,2:主题专题,3:作者专题)
*/
objectLevel:string
/**
* 底部导航栏 id(用于频道跳转)
*/
bottomNavId:string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/adv/AdvsRuleBean.ets
0 → 100644
View file @
3d13fe4
/**
* @Description: 挂角广告数据
* @Author:
* @Email: liyubing@wondertek.com.cn
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
import { AdvertsBean } from './AdvertsBean';
import { CompAdvMatInfoBean, CompAdvSlotInfoBean } from './CompAdvInfoBean';
export interface AdvRuleBean {
/**
* 广告投放位编码
*/
pos: string;
/**
* 广告展示顺序,0:随机展示;1列表循环
*/
displayMode: number
/**
* 每间隔刷新n次展示广告
*/
refreshFrequency: number
/**
* 广告信息集合
*/
advert: AdvertsBean;
}
/**
* 广告组件数据
*/
export interface CompAdvBean {
/**
* 广告订单id
*/
id: string;
/**
* 投放开始时间
*/
startTime: number;
/**
* 投放结束时间
*/
endTime: number;
/**
* 信息流广告素材
*/
matInfo: CompAdvMatInfoBean
/**
* 信息流广告位
*/
slotInfo: CompAdvSlotInfoBean
/**
* 展示优先级
* 广告A,displayPriority=1
* 广告B,displayPriority=2
* 则打开页面时,挂角展示顺序 A->B (优先级升序排列)
*/
displayPriority: number;
/**
* 展示的次数
*/
showCount: number;
/**
* 页面id
*/
pageId: String ;
/**
* 开屏广告-显示时长
*/
displayDuration: String;
/**
* 开屏广告-展示轮数
* 2.launchAdInfo有多个时:
* 广告A,displayRound=10
* 广告B,displayRound=5,
* 每次开机屏展示广告概率
* 广告A=10/(10+5)
* 广告B=5/(10+5)
* 广告A展示10次后,不再展示,
* 广告B展示5此后,不再展示。
* 下一轮展示继续上面逻辑。
*/
displayRound: number;
}
...
...
sight_harmony/features/wdBean/src/main/ets/bean/adv/CompAdvInfoBean.ets
0 → 100644
View file @
3d13fe4
/**
* @Description: 组件广告信息
* @Author:
* @Email: liyubing@wondertek.com.cn
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
/*
信息流广告素材解析累
*/
export interface CompAdvMatInfoBean {
/**
* 广告标题
*/
advTitle: string
/**
* 3:信息流广告
*/
advType: string
/**
* 信息流广告类型(4:轮播图 5:三图广告 6:小图广告 7:长通栏广告 8:大图广告 9:视频广告 10:展会广告 11:冠名广告 12:顶部长通栏广告)
*/
advSubType: string
/**
* 素材图片信息;adv_subtype=4,5,6,7,8,9,12 时使用
*/
matImageUrl: string[]
/**
* 视频广告地址(adv_subtype=9)
*/
matVideoUrl: string
/**
* 扩展信息:advSubType=10,11时使用,字段示例见接口备注。
*/
extraData: string
/**
* 链接类型: 0:无链接;1:内链(文章);2:外链
*/
linkType: string
/**
* 链接跳转类型 :0-没链接,不用打开,1-端内打开,2-端外打开
*/
openType: string
/**
* 广告跳转链接
*/
linkUrl: string
/**
* 素材类型(0:图片 1:视频)
*/
matType: string
/**
* 开屏样式(1:全屏样式 0:底部固定Logo)
*/
startStyle: string
}
/**
* 信息流广告位
*/
export interface CompAdvSlotInfoBean {
/**
* 组件id
*/
compId: string;
/**
* 广告位位置 从1开始
*/
position: number;
/**
* 频道id
*/
channelId: string;
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/MultiPictureDetailPageDTO.ts
View file @
3d13fe4
...
...
@@ -178,13 +178,3 @@ export interface postInteractAccentionOperateParams {
// userId: string;
status
:
number
;
}
\ No newline at end of file
export
interface
postRecommendListParams
{
imei
:
string
;
userId
?:
string
;
contentId
?:
string
;
relId
?:
string
;
contentType
?:
number
;
recType
:
number
;
channelId
?
:
string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/postRecommendListParams.ets
0 → 100644
View file @
3d13fe4
export interface postRecommendListParams {
imei: string;
userId ?: string;
contentId ?: string;
relId ?: string;
contentType ?: number;
recType: number;
channelId ? : string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/postThemeListParams.ets
0 → 100644
View file @
3d13fe4
export interface postThemeListParams {
sort: number;
pageNum: number;
pageSize: number;
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/live/ReserveBean.ets
0 → 100644
View file @
3d13fe4
export interface ReserveBean {
relationId: string,
liveId: string
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/navigation/PageInfoDTO.ets
View file @
3d13fe4
/**
* page接口返回的Page数据DTO
*/
import { AdvRuleBean, CompAdvBean } from '../adv/AdvsRuleBean';
export interface PageInfoDTO {
pageId: string; // 页面id
id: number; // 楼层id
name: string; // 名称
hasAdInfo: number;
hasPopUp: number;
baselineShow: number;
groups: GroupInfoDTO[];
channelInfo: ChannelInfoDTO;
/**
* 1-有过广告配置,0-没有广告配置
*/
hasAdInfo: number;
/**
* 挂角广告数据
*/
cornersAdv:AdvRuleBean
/**
* 广告中心-挂角广告信息
*/
cornersAdv2:CompAdvBean[]
}
export interface ChannelInfoDTO {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
3d13fe4
...
...
@@ -20,7 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
import { Card5Component } from './cardview/Card5Component'
import { Card5Component } from './cardview/Card5Component';
import { Card2Component } from './cardview/Card2Component';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
/**
...
...
@@ -71,6 +72,9 @@ export struct CompParser {
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: compDTO.operDataList[0] })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ contentDTO: compDTO.operDataList[0] })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
View file @
3d13fe4
import { AccountManagerUtils, Logger } from 'wdKit';
import { AccountManagerUtils, Logger
, DateTimeUtils
} from 'wdKit';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import { ContentDetailDTO,batchLikeAndCollectResult,batchLikeAndCollectParams,postBatchAttentionStatusParams,
PhotoListBean,
...
...
@@ -10,7 +10,10 @@ import { WDPlayerController } from 'wdPlayer/Index';
import { ContentConstants } from '../constants/ContentConstants';
import { ProcessUtils } from 'wdRouter';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import display from '@ohos.display';
import { BusinessError } from '@ohos.base';
import { CommonConstants } from 'wdConstant/Index';
import { CardMediaInfo } from '../components/cardCommon/CardMediaInfo'
const TAG = 'DynamicDetailComponent'
@Preview
@Component
...
...
@@ -38,6 +41,12 @@ export struct DynamicDetailComponent {
//跳转
private mJumpInfo: ContentDTO = {} as ContentDTO;
// 获取当前所有的display对象
promise: Promise<Array<display.Display>> = display.getAllDisplays()
// 屏幕宽度(单位px)
@State screenWidth: number = 0;
async aboutToAppear() {
await this.getContentDetailData()
}
...
...
@@ -120,8 +129,8 @@ export struct DynamicDetailComponent {
})
} else {
Text('已关注')
.width($r('app.float.margin_60'))
.height($r('app.float.margin_48'))
.width($r('app.float.margin_54'))
.height($r('app.float.margin_24'))
.borderWidth(1)
.textAlign(TextAlign.Center)
.fontSize($r('app.float.font_size_12'))
...
...
@@ -148,25 +157,131 @@ export struct DynamicDetailComponent {
,left: $r('app.float.margin_16')
,right: $r('app.float.margin_16') })
.alignSelf(ItemAlign.Start)
if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
//附件内容:图片/视频
if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
//附件内容:图片/视频
if(this.contentDetailData.photoList!= null && this.contentDetailData.photoList.length>0){
// 图片-从无图到9图展示
GridRow({
columns: { sm: this.contentDetailData.photoList.length
, md: this.contentDetailData.photoList.length == 1?1:
this.contentDetailData.photoList.length == 4?2:
3 },
breakpoints: { value: ['320vp', '520vp', '840vp'] }
gutter: { x: 2, y: 2 }
}) {
ForEach(this.contentDetailData.photoList, (item: PhotoListBean, index: number) => {
GridCol() {
this.buildItemCard(item.picPath,this.contentDetailData.photoList.length, index);
if (this.contentDetailData.photoList.length === 1) {
if (this.getPicType(item) !== 3) {
GridCol({
span: this.getPicType(item) === 1 ? 12 : 8
}){
Stack({
alignContent: Alignment.BottomEnd
}) {
if (this.getPicType(item) === 1) {
Image(item.picPath)
.width('100%')
.height(172)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType(item) === 2) {
Image(item.picPath)
.width('100%')
.height(305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
}
Flex({ direction: FlexDirection.Row }) {
Image($r('app.media.icon_long_pic'))
.width(14)
.height(14)
.margin({right: 4})
Text('长图')
.fontSize(12)
.fontWeight(400)
.fontColor(0xffffff)
.fontFamily('PingFang SC')
}
.width(48)
.padding({bottom: 9})
}
}
.onClick((event: ClickEvent) => {
ProcessUtils.gotoMultiPictureListPage(this.contentDetailData.photoList)
})
} else {
GridCol({
span: { xs: 8 }
}) {
Image(item.picPath)
.width('100%')
.borderRadius(this.caclImageRadius(index))
.autoResize(true)
.opacity(!item.width && !item.height ? 0 : 1)
.onComplete(callback => {
item.width = callback?.width || 0;
item.height = callback?.height || 0;
})
}
}
} else if (this.contentDetailData.photoList.length === 4) {
GridCol({
span: { xs: 4 }
}) {
Image(item.picPath)
.aspectRatio(1)
.borderRadius(this.caclImageRadius(index))
}
} else {
GridCol({
span: { sm: 4, lg: 3 }
}) {
Image(item.picPath)
.aspectRatio(1)
.borderRadius(this.caclImageRadius(index))
}
}
// .onClick()
})
}
.margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
}
}else{
this.buildItemCard(this.contentDetailData.videoInfo[0].firstFrameImageUri, this.contentDetailData.photoList.length, 0);
if(this.contentDetailData.videoInfo!= null && this.contentDetailData.videoInfo.length>0){
GridRow() {
if (this.contentDetailData.videoInfo[0].videoLandScape === 1) {
// 横屏
GridCol({
span: { xs: 12 }
}) {
Stack() {
Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
this.contentDetailData.fullColumnImgUrls[0].url:
this.contentDetailData.videoInfo[0].firstFrameImageUri)
.width(CommonConstants.FULL_WIDTH)
.aspectRatio(16 / 9)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.mJumpInfo })
}
.align(Alignment.BottomEnd)
}
} else {
// 竖图显示,宽度占50%,高度自适应
GridCol({
span: { xs: 6 }
}) {
Stack() {
Image(this.contentDetailData.fullColumnImgUrls!= null && this.contentDetailData.fullColumnImgUrls.length>0&&!StringUtils.isEmpty(this.contentDetailData.fullColumnImgUrls[0].url)?
this.contentDetailData.fullColumnImgUrls[0].url:
this.contentDetailData.videoInfo[0].firstFrameImageUri)
.width(CommonConstants.FULL_WIDTH)
.borderRadius($r('app.float.image_border_radius'))
CardMediaInfo({ contentDTO: this.mJumpInfo })
}
.align(Alignment.BottomEnd)
}
}
}
.margin({ left: $r('app.float.margin_16'),right: $r('app.float.margin_16'),top: $r('app.float.margin_8')})
.onClick((event: ClickEvent) => {
this.mJumpInfo.objectType = ContentConstants.TYPE_VOD;
ProcessUtils.processPage(this.mJumpInfo)
})
}
}
//特别声明
...
...
@@ -223,13 +338,13 @@ export struct DynamicDetailComponent {
try {
let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
this.contentDetailData = data[0];
this.makeJumpInfo
console.log('动态详情',JSON.stringify(this.contentDetailData))
} catch (exception) {
console.log('请求失败',JSON.stringify(exception))
}
this.getBatchAttentionStatus
this.getInteractDataStatus
this.getBatchAttentionStatus()
this.getInteractDataStatus()
this.makeJumpInfo()
}
// 查询当前登录用户点赞状态
...
...
@@ -272,48 +387,6 @@ export struct DynamicDetailComponent {
}
}
@Builder
setItemImageStyle(picPath: string,topLeft: number,topRight: number,bottomLeft: number,bottomRight: number){
//四角圆角
Image(picPath)
.width(44).aspectRatio(1 / 1).margin(16).borderRadius({topLeft: topLeft, topRight: topRight, bottomLeft: bottomLeft, bottomRight: bottomRight})
}
/**
* 组件项
*
* @param programmeBean item 组件项, 上面icon,下面标题
*/
@Builder
buildItemCard(item: string,len: number,index: number) {
Column() {
this.setItemImageRoundCorner(len, item, index)
Flex({ direction: FlexDirection.Row }) {
Image($r('app.media.icon_long_pic'))
.width(14)
.height(14)
.margin({right: 4})
Text('长图')
.fontSize(12)
.fontWeight(400)
.fontColor(0xffffff)
.fontFamily('PingFang SC')
}
.width(48)
.padding({bottom: 9})
}
.width('100%')
.onClick((event: ClickEvent) => {
if(this.contentDetailData.newsType+"" == ContentConstants.TYPE_FOURTEEN){
//fixme 跳转到查看图片页面(带页脚/下载按钮)
// this.mJumpInfo.objectType = ContentConstants.TYPE_
ProcessUtils.processPage(this.mJumpInfo)
}else{
//fixme 跳转到播放视频页面(点播)
this.mJumpInfo.objectType = ContentConstants.TYPE_VOD
ProcessUtils.processPage(this.mJumpInfo)
}
})
}
//创建跳转信息
makeJumpInfo(){
...
...
@@ -322,142 +395,51 @@ export struct DynamicDetailComponent {
this.mJumpInfo.objectId = this.contentDetailData.newsId+"";
this.mJumpInfo.relType = this.contentDetailData.reLInfo?.relType+"";
this.mJumpInfo.relId = this.contentDetailData.reLInfo?.relId+"";
// this.mJumpInfo.objectType = this.contentDetailData.newsType+"";
}
//设置图片圆角
@Builder
setItemImageRoundCorner(len: number, picPath: string, index: number) {
if (len == 1) {
//四角圆角
this.setItemImageStyle(picPath, 4, 4, 4, 4);
} else if (len == 2) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (3 == len) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (4 == len) {
if (index == 0) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else if (index == 1) {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
} else if (index = 2) {
//左边圆角
this.setItemImageStyle(picPath, 4, 0, 4, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 4, 0, 4);
}
} else if (5 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 4, 4, 4, 4);
} else if (index = 3) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
}
} else if (6 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
//右边圆角
this.setItemImageStyle(picPath, 0, 0, 0, 4);
}
} else if (7 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 5) {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
} else {
this.setItemImageStyle(picPath, 0, 0, 4, 4);
}
} else if (8 == len) {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index = 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index = 5) {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
} else if (index = 6) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
caclImageRadius(index: number) {
let radius: radiusType = {
topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
topRight: 0,
bottomLeft: 0,
bottomRight: 0,
}
if (this.contentDetailData.photoList.length === 1) {
radius.topRight = index === 0 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 0 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 0 ? $r('app.float.image_border_radius') : 0
} else if (this.contentDetailData.photoList.length === 5 && !this.contentDetailData.photoList[2].fullUrl) {
radius.topRight = index === 1 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 3 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 4 ? $r('app.float.image_border_radius') : 0
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
radius.topRight = index === 2 ? $r('app.float.image_border_radius') : 0
radius.bottomLeft = index === 6 ? $r('app.float.image_border_radius') : 0
radius.bottomRight = index === 8 ? $r('app.float.image_border_radius') : 0
}
return radius
}
getPicType(item: PhotoListBean){
if (item.width && item.width) {
if (item.width / item.height > 343/172) {
return 1; //横长图
} else if (item.height / item.width > 305/228) {
return 2; //竖长图
} else {
if (index == 0) {
this.setItemImageStyle(picPath, 4, 0, 0, 0);
} else if (index == 1) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 2) {
this.setItemImageStyle(picPath, 0, 4, 0, 0);
} else if (index == 3) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 4) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 5) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else if (index == 6) {
this.setItemImageStyle(picPath, 0, 0, 4, 0);
} else if (index == 7) {
//直角
this.setItemImageStyle(picPath, 0, 0, 0, 0);
} else {
this.setItemImageStyle(picPath, 0, 0, 0, 4);
return 3
}
} else {
return 3; //普通图
}
}
}
interface radiusType {
topLeft: number | Resource;
topRight: number | Resource;
bottomLeft: number | Resource;
bottomRight: number | Resource;
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomComponent.ets
View file @
3d13fe4
import { Params } from 'wdBean';
import {
ContentDTO,
Params } from 'wdBean';
import { DateTimeUtils, LazyDataSource, SPHelper,UserDataLocal } from 'wdKit';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import {
ProcessUtils,
WDRouterPage, WDRouterRule } from 'wdRouter';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailItem } from '../../../viewmodel/FollowListDetailItem';
...
...
@@ -265,7 +265,7 @@ export struct HomePageBottomComponent{
}else{
value.list.forEach((value)=>{
let publishTime = DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(value.createTime,DateTimeUtils.PATTERN_DATE_TIME_HYPHEN))
this.data_comment.push(new CommentListItem(value.fromUserHeader,value.fromUserName,value.targetTitle,publishTime,value.commentContent,value.likeNum,0,value.id,value.targetId,value.targetType))
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
))
})
this.data_comment.notifyDataReload()
this.count = this.data_comment.totalCount()
...
...
@@ -365,6 +365,14 @@ struct ChildCommentComponent {
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
.onClick(()=>{
ProcessUtils.processPage(
{objectId: this.data.targetId,
relType:this.data.targetRelType+"",
relId:this.data.targetRelId,
objectType:this.data.targetType+"",
} as ContentDTO )
})
if(!this.isLastItem){
Divider().width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
3d13fe4
...
...
@@ -6,6 +6,8 @@ import { ListHasNoMoreDataUI } from '../../reusable/ListHasNoMoreDataUI';
import { MineCommentListDetailItem } from '../../../viewmodel/MineCommentListDetailItem';
import { OtherUserCommentLikeStatusRequestItem } from '../../../viewmodel/OtherUserCommentLikeStatusRequestItem';
import { CommentLikeOperationRequestItem } from '../../../viewmodel/CommentLikeOperationRequestItem';
import { ProcessUtils } from 'wdRouter/Index';
import { ContentDTO } from 'wdBean/Index';
const TAG = "HomePageBottomComponent"
@Component
...
...
@@ -107,7 +109,7 @@ export struct OtherHomePageBottomCommentComponent{
let data : CommentListItem[] = []
value.list.forEach((item)=>{
status.commentIdList.push(item.id)
data.push(new CommentListItem(item.fromUserHeader,item.fromUserName,item.targetTitle,item.createTime,item.commentContent,item.likeNum,0,item.id,item.targetId,item.targetType))
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
))
})
MinePageDatasModel.getOtherUserCommentLikeStatusData(status,getContext(this)).then((newValue)=>{
...
...
@@ -120,7 +122,7 @@ export struct OtherHomePageBottomCommentComponent{
})
data.forEach((item)=>{
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))
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
))
})
this.data_comment.notifyDataReload()
...
...
@@ -237,6 +239,14 @@ struct ChildCommentComponent {
.width('662lpx')
.backgroundColor($r('app.color.color_F5F5F5'))
.margin({top:'19lpx',bottom:'31lpx'})
.onClick(()=>{
ProcessUtils.processPage(
{objectId: this.data.targetId,
relType:this.data.targetRelType+"",
relId:this.data.targetRelId,
objectType:this.data.targetType+"",
} as ContentDTO )
})
if(!this.isLastItem){
Divider().width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
3d13fe4
...
...
@@ -52,6 +52,8 @@ export struct PageComponent {
@Builder
ListLayout() {
RelativeContainer() {
List() {
// 下拉刷新
ListItem() {
...
...
@@ -94,6 +96,12 @@ export struct PageComponent {
// 包含了 头尾item,判断时需要考虑+2
this.pageModel.endIndex = end;
})
.id('page_list')
// 挂角广告
this.pageHornAd()
}
}
@Builder
...
...
@@ -105,6 +113,111 @@ export struct PageComponent {
// })
}
/**
* 页面挂角广告
*/
@Builder
pageHornAd() {
if (this.pageModel.pageLeftCornerAdv.matInfo != null) {
// 页面左挂角
Image(this.pageModel.pageLeftCornerAdv.matInfo.matImageUrl[0])
.width($r('app.float.vp_80'))
.height($r('app.float.vp_80'))
.id("left_iv")
.alignRules({
bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
left: { anchor: '__container__', align: HorizontalAlign.Start },
})
.margin({ bottom: "65vp", left: $r('app.float.card_comp_pagePadding_lf') })
Image($r('app.media.icon_adv_horn_close')).id('left_close').width($r('app.float.vp_16')).alignRules({
top: { anchor: 'left_iv', align: VerticalAlign.Top },
left: { anchor: 'left_iv', align: HorizontalAlign.Start },
}).offset({
x: -10,
y: -10
})
Text($r('app.string.comp_advertisement'))
.width($r('app.float.vp_28'))
.height($r('app.float.vp_16'))
.fontSize($r('app.float.font_size_10'))
.fontColor(Color.White)
.id('left_tag')
.alignRules({
bottom: { anchor: 'left_iv', align: VerticalAlign.Bottom },
left: { anchor: 'left_iv', align: HorizontalAlign.Start },
})
.textAlign(TextAlign.Center)
.backgroundColor($r('app.color.res_color_general_000000_30'))
.borderRadius({
topLeft: $r('app.float.vp_2'),
topRight: $r('app.float.vp_2'),
bottomLeft: $r('app.float.vp_2'),
bottomRight: $r('app.float.vp_2')
})
}
if (this.pageModel.pageRightCornerAdv.matInfo != null && this.pageModel.isShowRightAds) {
// 页面右边挂角
Image(this.pageModel.pageRightCornerAdv.matInfo.matImageUrl[0])
.width($r('app.float.vp_80'))
.height($r('app.float.vp_80'))
.id("right_iv")
.alignRules({
bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
right: { anchor: '__container__', align: HorizontalAlign.End },
})
.margin({ bottom: "65vp", right: $r('app.float.card_comp_pagePadding_lf') })
.onClick(()=>{
// 关闭挂角广告
this.pageModel.isShowLeftAds = false;
})
Image($r('app.media.icon_adv_horn_close'))
.id('right_close')
.width($r('app.float.vp_16'))
.alignRules({
top: { anchor: 'right_iv', align: VerticalAlign.Top },
right: { anchor: 'right_iv', align: HorizontalAlign.End },
})
.offset({
x: 10,
y: -10
})
.onClick(() => {
// 关闭挂角广告
this.pageModel.isShowRightAds = false;
})
Text($r('app.string.comp_advertisement'))
.width($r('app.float.vp_28'))
.height($r('app.float.vp_16'))
.fontSize($r('app.float.font_size_10'))
.fontColor(Color.White)
.id('right_tag')
.alignRules({
bottom: { anchor: 'right_iv', align: VerticalAlign.Bottom },
right: { anchor: 'right_iv', align: HorizontalAlign.End },
})
.textAlign(TextAlign.Center)
.backgroundColor($r('app.color.res_color_general_000000_30'))
.borderRadius({
topLeft: $r('app.float.vp_2'),
topRight: $r('app.float.vp_2'),
bottomLeft: $r('app.float.vp_2'),
bottomRight: $r('app.float.vp_2')
})
}
}
async aboutToAppear() {
// 选中tab,才请求数据。拦截大量接口请求
if (this.navIndex === this.currentTopNavSelectedIndex) {
...
...
@@ -125,14 +238,15 @@ export struct PageComponent {
this.pageModel.groupId = this.pageId;
this.pageModel.channelId = this.channelId;
this.pageModel.currentPage = 1;
let pageInfo = await PageViewModel.getPageInfo(this.pageModel.pageId);
if (pageInfo == null) {
this.pageModel.viewType = ViewType.EMPTY;
return;
}
this.pageModel.pageInfo = pageInfo;
this.pageModel.loadStrategy = 1
PageHelper.parseGroup(this.pageModel)
PageHelper.getInitData(this.pageModel)
// let pageInfo = await PageViewModel.getPageInfo(this.pageModel.pageId);
// if (pageInfo == null) {
// this.pageModel.viewType = ViewType.EMPTY;
// return;
// }
// this.pageModel.pageInfo = pageInfo;
// this.pageModel.loadStrategy = 1
// PageHelper.parseGroup(this.pageModel)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ReserveMorePage.ets
View file @
3d13fe4
import { ContentDTO } from 'wdBean';
import { ContentDTO
, ReserveBean
} from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import { CommonConstants } from 'wdConstant/Index';
import PageViewModel from '../../viewmodel/PageViewModel';
...
...
@@ -24,6 +24,7 @@ const TAG: string = 'ReserveMorePage';
struct ReserveMorePage {
@State private pageModel: PageModel = new PageModel();
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
reserveBean: ReserveBean[] = []
topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
type: number = 2;
currentPage: number = 1;
...
...
@@ -72,12 +73,32 @@ struct ReserveMorePage {
// }
} as ContentDTO;
aboutToAppear(): void {
PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then((liveReviewDTO) => {
async aboutToAppear(): Promise<void> {
// PageViewModel.get
PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => {
// this.operDataList = []
// this.operDataList.push(...liveReviewDTO.list)
this.data.push(...liveReviewDTO.list)
this.reserveBean = this.transformToLiveDetailsBeans(liveReviewDTO.list)
const apointMentStatus = await LiveModel.getAppointmentStatus(this.reserveBean)
console.info(`cj2024 ${apointMentStatus.code}`)
})
}
// 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组
transformToLiveDetailsBeans(list: ContentDTO[]): ReserveBean[] {
const liveDetailsBeans: ReserveBean[] = [];
list.forEach(item => {
liveDetailsBeans.push({
relationId: item.relId,
liveId: item.objectId,
});
});
return liveDetailsBeans
}
build() {
...
...
@@ -274,6 +295,7 @@ struct ReserveMorePage {
//
// })
const liveDetail = await LiveModel.liveAppointment(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)
// const liveDetail = await LiveModel.getAppointmentStatus(item?.relId || '', item?.objectId || '', this.isAppointmentLive || false)
}
/*导航栏*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
0 → 100644
View file @
3d13fe4
import { ContentDTO } from 'wdBean';
import { CommonConstants ,ViewType} from 'wdConstant';
import PageViewModel from '../../viewmodel/PageViewModel';
import RefreshLayout from '../page/RefreshLayout';
import { RefreshLayoutBean } from '../page/RefreshLayoutBean';
import PageModel from '../../viewmodel/PageModel';
import { DateTimeUtils, LazyDataSource } from 'wdKit/Index';
import router from '@ohos.router';
import { CardParser } from '../CardParser';
import { channelSkeleton } from '../skeleton/channelSkeleton'
import { ErrorComponent } from '../view/ErrorComponent';
import { EmptyComponent } from '../view/EmptyComponent';
const TAG: string = 'ThemeListPage';
@Entry
@Component
struct ThemeListPage {
@State private pageModel: PageModel = new PageModel();
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
sort: number = 1;
currentPage: number = 1;
pageSize: number = 20;
title: string = '金刚位聚合页'
aboutToAppear(): void {
PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => {
console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`)
this.data.push(...liveReviewDTO.list)
if(this.data.getDataArray().length > 0){
this.pageModel.viewType = ViewType.LOADED;
}else{
this.pageModel.viewType = ViewType.EMPTY
}
})
}
build() {
Column() {
this.TabbarNormal()
if (this.pageModel.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.pageModel.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.pageModel.viewType == ViewType.EMPTY) {
EmptyComponent()
} else {
this.ListLayout()
}
}
.padding({
bottom: $r('app.float.card_comp_pagePadding_tb')
})
}
@Builder
LoadingLayout() {
channelSkeleton()
}
/*导航栏*/
@Builder
TabbarNormal() {
RelativeContainer() {
//标题栏目
Image($r('app.media.icon_arrow_left'))
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.id("back_icon")
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.onClick(() => {
router.back()
})
Text(this.title)// .height('42lpx')
.maxLines(1)
.id("title")
.fontSize('35lpx')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('42lpx')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
}
.height(44)
.width('100%')
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
})
}
@Builder
ListLayout() {
List() {
// 下拉刷新
ListItem() {
RefreshLayout({
refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullDown, this.pageModel.pullDownRefreshImage,
this.pageModel.pullDownRefreshText, this.pageModel.pullDownRefreshHeight)
})
}
LazyForEach(this.data, (contentDTO: ContentDTO, contentIndex: number) => {
ListItem() {
Column() {
CardParser({ contentDTO });
}
}
},
(contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString()
)
}
.scrollBar(BarState.Off)
.cachedCount(8)
.height(CommonConstants.FULL_PARENT)
.onScrollIndex((start: number, end: number) => {
this.pageModel.startIndex = start;
this.pageModel.endIndex = end;
})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchComponent.ets
View file @
3d13fe4
...
...
@@ -112,7 +112,7 @@ export struct SearchComponent {
} else {
if (this.hasChooseSearch) {
//搜索结果
SearchResultComponent({count:this.count,searchText:this.searchText})
SearchResultComponent({count:this.count,searchText:this.searchText
,isInit:true
})
} else {
//联想搜索
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText})
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultComponent.ets
View file @
3d13fe4
import { ContentDTO } from 'wdBean/Index'
import { LazyDataSource, UserDataLocal } from 'wdKit/Index'
import { HttpUrlUtils } from 'wdNetwork/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { SearchSuggestRequestItem } from '../../viewmodel/SearchSuggestRequestItem'
import { CardParser } from '../CardParser'
import { EmptyComponent } from '../view/EmptyComponent'
import { SearchResultContentComponent } from './SearchResultContentComponent'
const TAG = "SearchResultComponent"
/**
* 搜索结果
* 搜索结果为null(空布局 + 为你推荐)
*/
@Component
export struct SearchResultComponent{
@Prop count:string[] = []
export struct SearchResultComponent {
@Prop count: string[]
@Prop searchText: string
@State isInit:boolean = false;
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
fontColor: string = '#999999'
selectedFontColor: string = '#000000'
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
@State suggest_count: number = 0;
@State isLoading: boolean = false
scroller: Scroller = new Scroller()
aboutToAppear(): void {
if (this.count.length === 0 && this.isInit == true) {
this.getSuggestData()
}
}
getSuggestData() {
this.isLoading = true
let request: SearchSuggestRequestItem = new SearchSuggestRequestItem(2, "", "", HttpUrlUtils.getImei(), UserDataLocal.userId, 8, "")
SearcherAboutDataModel.getSearchSuggestData(request, getContext(this)).then((value) => {
value.forEach((item) => {
this.data.push({
appStyle: item.appStyle,
channelId: item.channelId + "",
coverType: item.coverType,
coverUrl: item.coverUrl,
newsTitle: item.newsTitle,
objectId: item.objectId,
publishTime: item.publishTime,
relId: item.relId + "",
relType: item.relType + "",
source: item.source,
} as ContentDTO)
})
this.data.notifyDataReload()
this.suggest_count = this.data.totalCount()
this.isLoading = false
})
}
build() {
Column() {
if (this.count != null && this.count.length === 0 && this.isInit == true) {
List() {
ListItem() {
//缺省图
EmptyComponent({emptyType:4})
.height('612lpx')
.width('100%')
}
if(this.suggest_count > 0){
ListItem() {
Row() {
Image($r('app.media.search_suggest_icon'))
.width('6lpx')
.height('31lpx')
.objectFit(ImageFit.Cover)
.interpolation(ImageInterpolation.High)
.margin({ right: '10lpx' })
Text("为你推荐")
.textAlign(TextAlign.Start)
.fontWeight('600lpx')
.fontSize('33lpx')
.lineHeight('46lpx')
.fontColor($r('app.color.color_222222'))
}.height('84lpx')
.padding({ left: '31lpx', right: '31lpx' })
.width('100%')
.alignItems(VerticalAlign.Center)
}
}
LazyForEach(this.data, (item: ContentDTO, index: number) => {
ListItem() {
Column() {
CardParser({contentDTO:item})
if (index != this.data.totalCount() - 1) {
Divider()
.width('100%')
.height('1lpx')
.color($r('app.color.color_F5F5F5'))
.strokeWidth('1lpx')
}
}
}
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.height('100%')
.onReachEnd(() => {
if (!this.isLoading) {
this.getSuggestData()
}
})
} else {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.count, (item: string, index: number ) => {
TabContent(){
SearchResultContentComponent({keywords:this.searchText,searchType:item})
}.tabBar(this.TabBuilder(index,item))
ForEach(this.count, (item: string, index: number) => {
TabContent() {
SearchResultContentComponent({ keywords: this.searchText, searchType: item })
}.tabBar(this.TabBuilder(index, item))
}, (item: string, index: number) => index.toString())
}
.vertical(false)
...
...
@@ -34,12 +133,14 @@ export struct SearchResultComponent{
})
.width('100%')
.layoutWeight(1)
}
}.width('100%')
.margin({ top: '12lpx' })
}
@Builder TabBuilder(index: number, item: string) {
Stack(){
@Builder
TabBuilder(index: number, item: string) {
Stack() {
Text(item)
.height('38lpx')
.fontSize('33lpx')
...
...
@@ -47,22 +148,21 @@ export struct SearchResultComponent{
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight('38lpx')
if
(this.currentIndex === index)
{
if
(this.currentIndex === index)
{
Divider()
.width('31lpx')
.height('4lpx')
.color('#ED2800')
.strokeWidth('4lpx')
.margin({
top:'50lpx'
})
.margin({
top: '50lpx'
})
.id("divTag")
}
}.onClick(()
=>
{
}.onClick(()
=>
{
this.currentIndex = index
this.controller.changeIndex(this.currentIndex)
})
.height('100%')
.margin({right:'9lpx'})
.padding({left:'31lpx',right:index === this.count.length-1?"31lpx":"0lpx"})
.margin({ right: '9lpx' })
.padding({ left: '31lpx', right: index === this.count.length - 1 ? "31lpx" : "0lpx" })
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/setting/MineSettingComponent.ets
View file @
3d13fe4
...
...
@@ -200,20 +200,23 @@ export struct MineSettingComponent {
// 右侧文案和右箭头
Row() {
Toggle({ type: ToggleType.Switch, isOn:
fals
e })
Toggle({ type: ToggleType.Switch, isOn:
item.switchStat
e })
.height('50lpx')
.margin({ left: '81lpx', right: '29lpx' })
.selectedColor(Color.Pink)
.onChange((isOn: boolean) => {
if(item.
title=='接收推送
'){
if(item.
itemType=='push_switch
'){
//推送
SPHelper.default.save(SpConstants.SETTING_PUSH_SWITCH,isOn)
}else if(item.
title=='仅WiFi网络加载图片
'){
}else if(item.
itemType=='wifi_switch
'){
//wifi 图片
SPHelper.default.save(SpConstants.SETTING_WIFI_IMAGE_SWITCH,isOn)
}else if(item.
title=='WiFi网络情况下自动播放视频
'){
}else if(item.
itemType=='video_switch
'){
//wifi 视频
SPHelper.default.save(SpConstants.SETTING_WIFI_VIDEO_SWITCH,isOn)
}else if(item.itemType=='suspensionState_switch'){
//悬浮窗
SPHelper.default.save(SpConstants.SETTING_SUSPENSION_SWITCH,isOn)
}
})
}.width('40%')
...
...
@@ -248,7 +251,7 @@ export struct MineSettingComponent {
// 右侧文案和右箭头
Row() {
Text((item.
title=='清除缓存
') ? this.cacheSize.toFixed(2) + 'MB' : '')
Text((item.
itemType=='clear_cache
') ? this.cacheSize.toFixed(2) + 'MB' : '')
.fontColor('#999999')
.maxLines(1)
Image($r('app.media.mine_user_arrow'))
...
...
@@ -267,14 +270,14 @@ export struct MineSettingComponent {
}
.height('54lpx')
.onClick(() => {
if (item.
title == '账户与安全
') {
if (item.
itemType == 'account
') {
let params: Params = {
pageID: 'AccountAndSecurityLayout'
}
WDRouterRule.jumpWithPage(WDRouterPage.settingPage, params)
} else if (item.
title == '隐私设罝
') {
} else if (item.
itemType == 'private_setting
') {
WDRouterRule.jumpWithPage(WDRouterPage.privacySettingPage)
} else if (item.
title == '清除缓存
') {
} else if (item.
itemType == 'clear_cache
') {
this.dialogController.open()
}
})
...
...
sight_harmony/features/wdComponent/src/main/ets/model/MineSettingDatasModel.ets
View file @
3d13fe4
import HashMap from '@ohos.util.HashMap';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { Logger } from 'wdKit';
import { Logger
, SPHelper
} from 'wdKit';
import { MineMainSettingFunctionItem } from '../viewmodel/MineMainSettingFunctionItem';
import { SpConstants } from 'wdConstant/Index';
const TAG = "MineSettingDatasModel"
...
...
@@ -40,15 +41,19 @@ class MineSettingDatasModel{
return this.mainSettingData
}
this.mainSettingData = []
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '账户与安全', '18888888888', 0, false,"account"))
let pushState=SPHelper.default.getSync(SpConstants.SETTING_PUSH_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '接收推送', null, 1, pushState,"push_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '隐私设罝', null, 0, false,"private_setting"))
let wifiState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_IMAGE_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '仅WiFi网络加载图片', null, 1, wifiState,"wifi_switch"))
let videoState=SPHelper.default.getSync(SpConstants.SETTING_WIFI_VIDEO_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, 'WiFi网络情况下自动播放视频', null, 1, videoState,"video_switch"))
let suspensionState=SPHelper.default.getSync(SpConstants.SETTING_SUSPENSION_SWITCH,false) as boolean
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '开启播放器悬浮窗', null, 1, suspensionState,"suspensionState_switch"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '清除缓存', '32MB', 0, false,"clear_cache"))
this.mainSettingData.push(new MineMainSettingFunctionItem(null, '评价我们', null, 0, false,""))
return this.mainSettingData
}
...
...
@@ -62,16 +67,16 @@ class MineSettingDatasModel{
return this.accountAndSecurityData
}
this.accountAndSecurityData = []
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '更换手机号', '18888888888', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '设置密码', null, 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_qqicon'), '绑定QQ', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_wechaticon'), '绑定微信', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_weiboicon'), '绑定新浪微博', '立即绑定', 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem($r('app.media.account_appleicon'), 'Apple ID', null, 0, false,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, null, null, 2, null,""))
this.accountAndSecurityData.push(new MineMainSettingFunctionItem(null, '注销账号', null, 0, false,""))
return this.accountAndSecurityData
}
...
...
sight_harmony/features/wdComponent/src/main/ets/model/SearcherAboutDataModel.ets
View file @
3d13fe4
...
...
@@ -9,6 +9,8 @@ import { SearchResultContentData } from '../viewmodel/SearchResultContentData';
import { contentListParams, InteractDataDTO } from 'wdBean/Index';
import { CreatorDetailRequestItem } from '../viewmodel/CreatorDetailRequestItem';
import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem';
import { SearchSuggestData } from '../viewmodel/SearchSuggestData';
import { SearchSuggestRequestItem } from '../viewmodel/SearchSuggestRequestItem';
const TAG = "SearcherAboutDataModel"
...
...
@@ -349,6 +351,45 @@ class SearcherAboutDataModel{
return WDHttp.post<ResponseDTO<CreatorDetailResponseItem[]>>(url,object, headers)
};
/**
* 搜索推荐 展示列表
*/
getSearchSuggestData(object:SearchSuggestRequestItem,context: Context): Promise<SearchSuggestData[]> {
return new Promise<SearchSuggestData[]>((success, error) => {
Logger.info(TAG, `getSearchSuggestData start`);
this.fetchSearchSuggestData(object).then((navResDTO: ResponseDTO<SearchSuggestData[]>) => {
if (!navResDTO || navResDTO.code != 0 /*|| navResDTO.data == null*/) {
// success(this.getSearchSuggestDataLocal(context))
success([])
return
}
Logger.info(TAG, "getSearchSuggestData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data as SearchSuggestData[]
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `getSearchSuggestData catch, error.name : ${err.name}, error.message:${err.message}`);
// success(this.getSearchSuggestDataLocal(context))
success([])
})
})
}
fetchSearchSuggestData(object:SearchSuggestRequestItem) {
let url = HttpUrlUtils.getSearchSuggestDataUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return WDHttp.post<ResponseDTO<SearchSuggestData[]>>(url,object, headers)
};
async getSearchSuggestDataLocal(context: Context): Promise<SearchSuggestData[]> {
Logger.info(TAG, `getInteractListDataLocal start`);
let compRes: ResponseDTO<SearchSuggestData[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<SearchSuggestData[]>>(context,'search_suggest_data.json' );
if (!compRes || !compRes.data) {
Logger.info(TAG, `getInteractListDataLocal compRes is empty`);
return []
}
Logger.info(TAG, `getInteractListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
3d13fe4
...
...
@@ -82,6 +82,7 @@ struct MineHomePage {
.lineHeight('50lpx')
.fontWeight('500lpx')
if(this.levelId>0){
Text(`等级${this.levelId}`)
.textAlign(TextAlign.Center)
.fontColor($r('app.color.color_ED2800'))
...
...
@@ -90,6 +91,8 @@ struct MineHomePage {
.width('96lpx')
.height('35lpx')
.margin({ left: '10lpx' })
}
Blank()
}.width('507lpx')
...
...
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
View file @
3d13fe4
...
...
@@ -21,7 +21,8 @@ import {
postExecuteCollectRecordParams,
postExecuteLikeParams,
postInteractAccentionOperateParams,
postRecommendListParams
postRecommendListParams,
postThemeListParams
} from 'wdBean';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
...
...
@@ -422,4 +423,17 @@ export class PageRepository {
Logger.info(TAG, "getPageUrl url = " + url)
return url;
}
/**
* 获取金刚位聚合页列表
* https://pdapis.pdnews.cn/api/display/zh/c/themeList
* @param params
* @returns
* */
static postThemeList(params: postThemeListParams) {
let url = HttpUrlUtils.getThemeListUrl()
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params))
return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params, headers)
};
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/CommentListItem.ets
View file @
3d13fe4
...
...
@@ -2,19 +2,46 @@
@Observed
export class CommentListItem{
fromUserHeader:string = ""
fromUserName:string = ""
commentContent:string = ""
targetTitle:string = ""
createTime:string = ""
likeNum:number = 0
like_status:number = 0
id:number = 0
targetId:string = ""
targetType:number = 0
avatarFrame: string = ""
checkStatus: number = -1
commentContent: string = ""
commentContentSensitive: string = ""
commentLevel: number = -1
commentPics: string = ""
commentSensitive: string = ""
commentType: string = ""
createTime: string = ""
fromCreatorId: string = ""
fromDeviceId: string = ""
fromUserHeader: string = ""
fromUserId: string = ""
fromUserName: string = ""
fromUserType: number = -1
h5Url: string = ""
id: number = 0
keyArticle: number = -1
likeNum: number = 0
// pageId: null
// parentCommentVo: null
parentId: number = -1
rootCommentId: number = -1
sensitiveExist: number = -1
sensitiveShow: number = -1
// shareInfo: ShareInfo$1Type
targetId: string = ""
targetType: number = 0
targetRelId: string = ""
targetRelObjectId: string = ""
targetRelType: number = -1
targetStatus: number = -1
targetTitle: string = ""
// topicType: null
uuid: string = ""
constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number) {
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,) {
this.fromUserHeader = fromUserHeader
this.fromUserName = fromUserName
this.commentContent = commentContent
...
...
@@ -25,5 +52,9 @@ export class CommentListItem{
this.id = id
this.targetId = targetId
this.targetType = targetType
this.targetRelId = targetRelId
this.targetRelObjectId = targetRelObjectId
this.targetRelType = targetRelType
this.targetStatus = targetStatus
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/LiveModel.ets
View file @
3d13fe4
...
...
@@ -2,7 +2,7 @@ import HashMap from '@ohos.util.HashMap';
import { HttpUrlUtils, ResponseDTO } from 'wdNetwork';
import { HttpRequest } from 'wdNetwork/src/main/ets/http/HttpRequest';
import { Logger, ToastUtils } from 'wdKit';
import { LiveDetailsBean } from 'wdBean/Index';
import { LiveDetailsBean
, ReserveBean
} from 'wdBean/Index';
const TAG = 'LiveModel'
...
...
@@ -66,5 +66,34 @@ export class LiveModel {
})
})
}
/**
* 查询预约状态
*
[{"relationId":"500002824823","liveId":"20000120522"},{"relationId":"500002845517","liveId":"20000120782"}]
* @returns
* @returns
*/
static getAppointmentStatus(reserveBean: ReserveBean[]) {
// let params: Record<string, ArrayList<ReserveBean>> = {};
// params = reserveBean
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<ResponseDTO<string>>((success, fail) => {
HttpRequest.post<ResponseDTO<string>>(
HttpUrlUtils.getAppointmentStatusUrl(),
reserveBean,
headers).then((data: ResponseDTO<string>) => {
if (data.code != 0) {
fail(data.message)
ToastUtils.shortToast(data.message)
return
}
success(data)
}, (error: Error) => {
fail(error.message)
Logger.debug(TAG + ":error ", error.toString())
})
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MineMainSettingFunctionItem.ets
View file @
3d13fe4
...
...
@@ -6,9 +6,10 @@ export class MineMainSettingFunctionItem {
subTitle?:string // 副标题
type?:number // 数据类型 0默认箭头类型,1右侧switch按钮类型
switchState?:boolean // 右侧switch按钮状态
itemType?:string //条目类型
constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null){
constructor(imgSrc:Resource|null,title:string|null,subTitle:string|null,type:number|null,switchState:boolean|null
,itemType:string
){
if (imgSrc) {
this.imgSrc = imgSrc
}
...
...
@@ -24,6 +25,9 @@ export class MineMainSettingFunctionItem {
if (switchState != null) {
this.switchState = switchState
}
if (itemType != null) {
this.itemType = itemType
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
3d13fe4
...
...
@@ -5,25 +5,91 @@ import { closeRefresh } from '../utils/PullDownRefresh';
import PageModel from './PageModel';
import PageViewModel from './PageViewModel';
import { promptAction } from '@kit.ArkUI';
import { AdvRuleBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
const TAG = 'PageHelper';
/**
* 处理返回后的数据
* @deprecated
*/
export class PageHelper {
/**
* 刷新数据
*/
async refreshUI(pageModel: PageModel) {
pageModel.loadStrategy = 2
this.
parseGroup
(pageModel)
this.
getPageInfo
(pageModel)
}
/**
* 分页加载
*/
async loadMore(pageModel: PageModel) {
pageModel.loadStrategy = 3
// 暂只支持comp分页加载,节目分页加载的得完善框架(如直播回看节目数据分页)
this.compLoadMore(pageModel)
}
/**
* 进页面请求数据
*/
async getInitData(pageModel: PageModel) {
pageModel.loadStrategy = 1
this.getPageInfo(pageModel)
}
async getPageInfo(pageModel: PageModel) {
pageModel.currentPage = 1;
let pageInfo = await PageViewModel.getPageInfo(pageModel.pageId);
if (pageInfo == null) {
pageModel.viewType = ViewType.EMPTY;
return;
}
pageModel.pageInfo = pageInfo;
//解析广告资源
this.analysisAdvSource(pageModel);
this.parseGroup(pageModel)
}
/**
* 解析广告资源
* @param pageInfo
*/
analysisAdvSource(pageModel: PageModel) {
let pageInfo = pageModel.pageInfo
if (pageInfo.hasAdInfo === 1 && pageInfo.cornersAdv != null) {
// 优先展示展现中心广告
let cornersAdv = pageInfo.cornersAdv
} else if (pageInfo.cornersAdv2 != null && pageInfo.cornersAdv2.length > 0) {
// 广告中心-挂角广告信息
let cornersAdv2 = pageInfo.cornersAdv2
// 获取
let showCompAdvBean = cornersAdv2[0]
//
let slotInfo = showCompAdvBean.slotInfo;
let postion = slotInfo.position
if (postion == 0) {
//左边挂角
pageModel.pageLeftCornerAdv = showCompAdvBean
pageModel.isShowLeftAds = true
} else {
// 右边挂角
pageModel.pageRightCornerAdv = showCompAdvBean
pageModel.isShowRightAds = true
}
Logger.error("XXX", JSON.stringify(pageInfo.cornersAdv2))
}
}
async parseGroup(pageModel: PageModel) {
let pageInfo: PageInfoDTO = pageModel.pageInfo
pageModel.groupList = []
...
...
@@ -66,7 +132,7 @@ export class PageHelper {
}
//移除音频 和 活动
this.removeComp(pageModel,pageDto)
this.removeComp(pageModel,
pageDto)
// pageModel.compList.push(...pageDto.compList)
...
...
@@ -114,7 +180,7 @@ export class PageHelper {
let sizeBefore: number = pageModel.compList.size();
//移除音频 和 活动
this.removeComp(pageModel,data)
this.removeComp(pageModel,
data)
//
// pageModel.compList.push(...data.compList)
PageViewModel.getInteractData(data.compList).then((data: CompDTO[]) => {
...
...
@@ -139,7 +205,7 @@ export class PageHelper {
//移除音频 和 活动
if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
Logger.debug(TAG, 'getGroupData 移除音频 和 活动');
}else {
}
else {
pageModel.compList.push(element)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageModel.ets
View file @
3d13fe4
...
...
@@ -4,6 +4,7 @@ import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType';
import { RefreshConstants as Const } from '../utils/RefreshConstants';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
import { GroupInfoDTO, PageInfoDTO } from 'wdBean/src/main/ets/bean/navigation/PageInfoDTO';
import { CompAdvBean } from 'wdBean/src/main/ets/bean/adv/AdvsRuleBean';
/**
* 页面下拉刷新、上拉加载数据bean。
...
...
@@ -50,6 +51,15 @@ export default class PageModel {
// keyGenerator相关字符串,用于刷新list布局
timestamp: String = '1';
//左右挂角广告对象
pageLeftCornerAdv:CompAdvBean = {} as CompAdvBean
isShowLeftAds : boolean = true;
pageRightCornerAdv:CompAdvBean = {} as CompAdvBean
isShowRightAds : boolean = true;
/**
* 简单复制业务数据
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageViewModel.ets
View file @
3d13fe4
...
...
@@ -358,7 +358,7 @@ export class PageViewModel extends BaseViewModel {
async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> {
return new Promise<LiveReviewDTO>((success, error) => {
Logger.info(TAG, `getLiveMoreUrl pageInfo start`);
PageRepository.fetchLiveMoreUrl(type,pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => {
PageRepository.fetchLiveMoreUrl(type,
pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty');
error('resDTO is empty');
...
...
@@ -378,6 +378,30 @@ export class PageViewModel extends BaseViewModel {
})
})
}
async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> {
return new Promise<LiveReviewDTO>((success, error) => {
Logger.info(TAG, `postThemeList pageInfo start`);
PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'postThemeList then navResDTO is empty');
error('resDTO is empty');
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `postThemeList then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
return
}
// let navResStr = JSON.stringify(navResDTO);
Logger.info(TAG, "postThemeList then,navResDTO.timestamp:" + resDTO.timestamp, `${JSON.stringify(resDTO)}}`);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `postThemeList catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchSuggestData.ets
0 → 100644
View file @
3d13fe4
@Observed
export class SearchSuggestData{
// activityExt: null
appStyle: string = ""
// askInfo: null
axisColor: string = ""
// bestNoticer: null
// bottomNavId: null
cardItemId: string = ""
channelId: number = -1
// commentInfo: null
corner: string = ""
coverSize: string = ""
coverType: number = -1
coverUrl: string = ""
expIds: string = ""
extra: string = ""
fullColumnImgUrls: Array<FullColumnImgUrls> = []
// hasMore: null
itemId: string = ""
itemType: string = ""
itemTypeCode: string = ""
keyArticle: number = -1
// landscape: null
// likeStyle: null
linkUrl: string = ""
// liveInfo: null
menuShow: number = -1
newTags: string = ""
newsAuthor: string = ""
newsSubTitle: string = ""
newsSummary: string = ""
newsTitle: string = ""
newsTitleColor: string = ""
objectId: string = ""
objectLevel: string = ""
objectType: string = ""
// openComment: null
// openLikes: null
pageId: string = ""
// photoNum: null
// position: null
// productNum: null
publishTime: string = ""
// pushTime: null
// pushUnqueId: null
readFlag: number = -1
recommend: number = -1
relId: number = -1
relObjectId: string = ""
relType: number = -1
// rmhInfo: null
rmhPlatform: number = -1
sceneId: string = ""
// shareInfo: null
// slideShows: Array< unknown >
// sortValue: null
source: string = ""
subObjectType: string = ""
subSceneId: string = ""
// tagIds: Array< unknown >
// tagWord: null
// titleShow: null
// titleShowPolicy: null
// topicTemplate: null
traceId: string = ""
traceInfo: string = ""
// userInfo: null
videoInfo: VideoInfo = new VideoInfo()
visitorComment: number = -1
// voiceInfo: null
}
class FullColumnImgUrls{
// format: null
fullUrl: string = ""
height: number = -1
landscape: number = -1
size: number = -1
url: string = ""
weight: number = -1
}
class VideoInfo{
firstFrameImageUri: string = ""
videoDuration: number = -1
videoLandscape: number = -1
videoUrl: string = ""
}
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/SearchSuggestRequestItem.ets
0 → 100644
View file @
3d13fe4
export class SearchSuggestRequestItem{
recType: number = 0
relId: string = ""
contentId: string = ""
imei: string = ""
userId: string = ""
contentType: number = 0
channelId: string = ""
constructor(recType: number, relId: string , contentId: string , imei: string ,userId: string ,
contentType: number,channelId: string ) {
this.recType = recType
this.relId = relId
this.contentId = contentId
this.imei = imei
this.userId = userId
this.contentType = contentType
this.channelId = channelId
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/color.json
View file @
3d13fe4
...
...
@@ -121,11 +121,11 @@
"value"
:
"#99636363"
},
{
"name"
:
"color_648DF2"
,
"name"
:
"color_648DF2"
,
"value"
:
"#648DF2"
},
{
"name"
:
"color_EEEEEE"
,
"name"
:
"color_EEEEEE"
,
"value"
:
"#EEEEEE"
},
{
...
...
@@ -151,6 +151,10 @@
{
"name"
:
"color_0D000000"
,
"value"
:
"#0D000000"
},
{
"name"
:
"res_color_general_000000_30"
,
"value"
:
"#4D000000"
}
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
View file @
3d13fe4
...
...
@@ -209,6 +209,10 @@
"value"
:
"3vp"
},
{
"name"
:
"vp_2"
,
"value"
:
"2vp"
},
{
"name"
:
"vp_55"
,
"value"
:
"55vp"
},
...
...
@@ -225,6 +229,14 @@
"value"
:
"16vp"
},
{
"name"
:
"vp_28"
,
"value"
:
"28vp"
},
{
"name"
:
"vp_80"
,
"value"
:
"80vp"
},
{
"name"
:
"card_comp_pagePadding_lf"
,
"value"
:
"16fp"
},
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/string.json
View file @
3d13fe4
...
...
@@ -48,5 +48,10 @@
"name"
:
"reason_read_write_media"
,
"value"
:
"user_grant"
}
,
{
"name"
:
"comp_advertisement"
,
"value"
:
"广告"
}
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_adv_horn_close.png
0 → 100644
View file @
3d13fe4
2.02 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/search_suggest_icon.png
0 → 100644
View file @
3d13fe4
288 Bytes
sight_harmony/features/wdComponent/src/main/resources/base/profile/main_pages.json
View file @
3d13fe4
...
...
@@ -19,6 +19,7 @@
"components/page/PeopleShipHomePage"
,
"pages/MultiPictureListPage"
,
"components/page/LiveMorePage"
,
"components/page/ReserveMorePage"
"components/page/ReserveMorePage"
,
"components/page/ThemeListPage"
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/resources/rawfile/apph5/index.html
View file @
3d13fe4
...
...
@@ -14,9 +14,9 @@
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<!-- 设置苹果工具栏颜色 -->
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<script
src=
"./js/plugin/vconsole.min.js"
></script
>
<!-- <script src="./js/plugin/vconsole.min.js"></script>--
>
<script>
new
VConsole
()
//
new VConsole()
var
hasDetails
=
false
function
getTime
()
{
...
...
sight_harmony/features/wdHwAbility/src/main/ets/location/HWLocationUtils.ets
View file @
3d13fe4
import { abilityAccessCtrl, bundleManager, Permissions } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { geoLocationManager } from '@kit.LocationKit';
import { SpConstants } from 'wdConstant/Index';
import { Logger, PermissionUtils, ResourcesUtils, SPHelper } from 'wdKit/Index';
import { ResponseDTO } from 'wdNetwork/Index';
/**
* 系统定位服务实现
* */
export class HWLocationUtils {
//d定位相关
static LOCATION_CITY_NAME = "location_city_name" //定位
static LOCATION_CITY_CODE = "location_city_code" //定位
static LOCATION: Permissions = 'ohos.permission.LOCATION'
...
...
@@ -107,10 +106,14 @@ export class HWLocationUtils {
Logger.debug('location :' + JSON.stringify(data))
if (data[0] && data[0].administrativeArea && data[0].subAdministrativeArea) {
let cityName = data[0].subAdministrativeArea;
let name = await SPHelper.default.get(SpConstants.LOCATION_CITY_NAME, '') as string
if (cityName == name) {
return
}
let code = await HWLocationUtils.getCityCode(data[0].administrativeArea, data[0].subAdministrativeArea)
if (code) {
SPHelper.default.save(HWLocationUtils.LOCATION_CITY_NAME, cityName)
SPHelper.default.save(HWLocationUtils.LOCATION_CITY_CODE, code)
SPHelper.default.save(SpConstants.LOCATION_CITY_NAME, cityName)
SPHelper.default.save(SpConstants.LOCATION_CITY_CODE, code)
}
}
}
...
...
@@ -151,23 +154,6 @@ export class HWLocationUtils {
}
}
interface ResponseDTO<T> {
success: boolean;
// 服务请求响应值/微服务响应状态码”
code: number;
// 服务请求响应说明
message: string;
// 响应结果
data?: T;
totalCount?: number;
// 请求响应时间戳(unix格式)
timestamp?: number;
}
interface LocalData {
"code": string,
"id": string,
...
...
sight_harmony/features/wdHwAbility/src/main/module.json5
View file @
3d13fe4
...
...
@@ -9,6 +9,18 @@
"2in1"
],
"deliveryWithInstall"
:
true
,
"pages"
:
"$profile:main_pages"
"pages"
:
"$profile:main_pages"
,
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.APPROXIMATELY_LOCATION"
,
"reason"
:
"$string:location_reason"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
],
"when"
:
"inuse"
}
}
]
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdHwAbility/src/main/resources/base/element/string.json
View file @
3d13fe4
...
...
@@ -3,6 +3,10 @@
{
"name"
:
"shared_desc"
,
"value"
:
"description"
},
{
"name"
:
"location_reason"
,
"value"
:
" "
}
]
}
\ No newline at end of file
...
...
sight_harmony/features/wdLogin/src/main/ets/pages/login/LoginPage.ets
View file @
3d13fe4
...
...
@@ -188,15 +188,15 @@ struct LoginPage {
.type(InputType.Normal)
.onChange((content) => {
this.accountContent = content
this.isSubmit = (this.accountContent.length >= 1
1
&& this.passwordContent.length >= 6)
this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6)
})
RelativeContainer() {
if (this.passwordSwitch) {
//
if (this.passwordSwitch) {
this.addPasswordInputLayout()
} else {
this.addPasswordInputLayout()
}
// } else {
// this.addPasswordInputLayout()
// }
Image(this.passwordSwitch ? $r('app.media.login_password_off') : $r('app.media.login_password_on'))
.onClick(() => {
...
...
@@ -237,7 +237,7 @@ struct LoginPage {
.onChange((value) => {
// Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
this.passwordContent = value
this.isSubmit = (this.accountContent.length >= 1
1
&& this.passwordContent.length >= 6)
this.isSubmit = (this.accountContent.length >= 1 && this.passwordContent.length >= 6)
})
.id("password")
}
...
...
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
View file @
3d13fe4
...
...
@@ -4,7 +4,16 @@ import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
import { registerRouter } from 'wdRouter';
import { SPHelper, StringUtils, WindowModel } from 'wdKit';
import {
EmitterEventId,
EmitterUtils,
Logger,
NetworkManager,
NetworkType,
SPHelper,
StringUtils,
WindowModel
} from 'wdKit';
import { HttpUrlUtils, WDHttp } from 'wdNetwork';
export default class EntryAbility extends UIAbility {
...
...
@@ -12,15 +21,30 @@ export default class EntryAbility extends UIAbility {
SPHelper.init(this.context);
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
registerRouter();
NetworkManager.getInstance().init()
WDHttp.initHttpHeader()
const spHostUrl = SPHelper.default.getSync('hostUrl', '') as string
if (StringUtils.isNotEmpty(spHostUrl)) {
HttpUrlUtils.hostUrl = spHostUrl
}
// 注册监听网络连接
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_CONNECTED, ((str?: string) => {
let type: NetworkType | null = null
if (str) {
type = JSON.parse(str) as NetworkType
}
Logger.info('network connected: ' + type?.toString())
}))
// 注册监听网络断开
EmitterUtils.receiveEvent(EmitterEventId.NETWORK_DISCONNECTED, (() => {
Logger.info('network disconnected')
}))
}
onDestroy(): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
NetworkManager.getInstance().release()
}
onWindowStageCreate(windowStage: window.WindowStage): void {
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
3d13fe4
import router from '@ohos.router'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { LaunchModel } from '../viewModel/LaunchModel';
import { ifaa } from '@kit.OnlineAuthenticationKit';
import common from '@ohos.app.ability.common';
import Want from '@ohos.app.ability.Want';
import { BusinessError } from '@ohos.base';
@Entry
@Component
struct LaunchAdvertisingPage {
@State time: number = 4
timer :number = -1
@State model : LaunchDataModel = {} as LaunchDataModel
enter() {
// router.replaceUrl({
...
...
@@ -15,7 +28,22 @@ struct LaunchAdvertisingPage {
clearInterval(this.timer)
}
aboutToAppear(): void {
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
this.model = dataModel
console.log(dataModelStr)
if(this.model.launchAdInfo.length){
//设置倒计时时间
this.time = this.model.launchAdInfo[0].displayDuration
}
}
onPageShow(){
this.timer = setInterval(() => {
this.time--
if (this.time < 1) {
...
...
@@ -32,10 +60,20 @@ struct LaunchAdvertisingPage {
Stack({alignContent:Alignment.Bottom}){
Column(){
Image($r('app.media.app_icon'))
.margin({
top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
})
if(!(this.model.launchAdInfo[0].matInfo.matType == '1')){
//显示图片
Image(this.model.launchAdInfo[0].matInfo.matImageUrl[0])
.width('100%')
.height('100%')
// .margin({
// top:'128lpx',left:'48lpx',right:'48lpx',bottom:'128lpx'
// })
}else {
//显示视频播放
}
}
.justifyContent(FlexAlign.Center)
.width('100%')
...
...
@@ -62,7 +100,8 @@ struct LaunchAdvertisingPage {
}
.width('100%')
.height('100%')
if(!(this.model.launchAdInfo[0].matInfo.startStyle == 1)){
//底部logo样式 按钮加载在背景展示图上
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
...
...
@@ -83,27 +122,83 @@ struct LaunchAdvertisingPage {
bottom: '51lpx'
})
.backgroundColor('#80000000')
.onClick(()=>{
this.action()
})
}
}
}
.width('100%')
.height('84%')
.backgroundColor('#FF6C75')
.margin({top:'0'})
if(this.model.launchAdInfo[0].matInfo.startStyle == 1){
//全屏样式,底部无logo 按钮放在原底部logo位置
Button(){
Row(){
Text('点击跳转至详情或第三方应用')
.fontSize('31lpx')
.fontColor(Color.White)
.margin({
left:'55lpx'
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
}.alignItems(VerticalAlign.Center)
}
.width('566lpx')
.height('111lpx')
.margin({
top: '28lpx'
})
.backgroundColor('#80000000')
.onClick(()=>{
this.action()
})
}else {
//底部logo样式
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({bottom: '48lpx'})
.margin({top: '28lpx'})
}
}
.width('100%')
.height('100%')
.backgroundColor(Color.White)
}
action(){
//跳转 url linkUrl https://news.bjd.com.cn/2024/03/19/10724331.shtml
// openType 端外 端内 打开
if (this.model.launchAdInfo[0].matInfo.openType == '2') {
//端外打开
let context = getContext(this) as common.UIAbilityContext;
let wantInfo: Want = {
// uncomment line below if wish to implicitly query only in the specific bundle.
// bundleName: 'com.example.myapplication',
action: 'ohos.want.action.viewData',
// entities can be omitted.
entities: ['entity.system.browsable'],
uri: 'https://news.bjd.com.cn/2024/03/19/10724331.shtml'
}
context.startAbility(wantInfo).then(() => {
// ...
}).catch((err: BusinessError) => {
// ...
})
}else {
//端内打开
}
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
3d13fe4
...
...
@@ -10,6 +10,9 @@ import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
import { LaunchModel } from '../viewModel/LaunchModel'
import { LaunchPageModel } from '../viewModel/LaunchPageModel'
import LaunchDataModel from '../viewModel/LaunchDataModel'
import { Logger, SPHelper } from 'wdKit/Index';
import { SpConstants } from 'wdConstant/Index';
@Entry
@Component
...
...
@@ -92,8 +95,19 @@ struct LaunchPage {
// }
} else {
//需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页
//获取本地存储的启动页数据
let dataModelStr : string = SPHelper.default.getSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,'') as string
let dataModel : LaunchDataModel = JSON.parse(dataModelStr)
console.log(dataModelStr)
if (dataModel.launchAdInfo.length) {
//跳转广告页
this.jumpToAdvertisingPage();
}else {
//直接跳转首页
WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
}
//同意隐私协议后每次启动app请求启动页相关数据,并更新数据
this.requestLaunchPageData();
}
...
...
@@ -161,7 +175,6 @@ struct LaunchPage {
//请求启动页相关接口数据并保存
let launchPageModel = new LaunchPageModel()
launchPageModel.getLaunchPageData()
}
aboutToAppear(): void {
...
...
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchDataModel.ets
View file @
3d13fe4
...
...
@@ -40,6 +40,7 @@ export interface NetLayerLauncherADInfoModel{
startTime : number
endTime : number
displayDuration : number
displayPriority : number
displayRound : number
matInfo : NetLayerLauncherADMaterialModel
...
...
sight_harmony/products/phone/src/main/ets/pages/viewModel/LaunchPageModel.ets
View file @
3d13fe4
...
...
@@ -11,7 +11,7 @@ import { SpConstants } from 'wdConstant/Index';
export class LaunchPageModel {
getLaunchPageData() {
getLaunchPageData()
: Promise<LaunchDataModel>
{
let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders();
return new Promise<LaunchDataModel>((success, fail) => {
HttpRequest.get<ResponseDTO<LaunchDataModel>>(HttpUrlUtils.getLaunchPageDataUrl(), headers).then((data: ResponseDTO<LaunchDataModel>) => {
...
...
@@ -26,8 +26,9 @@ export class LaunchPageModel {
Logger.debug("LaunchPageModel获取启动相关数据获取成功:success ", JSON.stringify(data))
success(data.data);
//存储数据
let obj : string = JSON.stringify(data.data)
console.log(obj)
SPHelper.default.saveSync(SpConstants.APP_LAUNCH_PAGE_DATA_MODEL,obj)
}, (error: Error) => {
Logger.debug("LaunchPageModel获取启动相关数据获取失败:error ", error.toString())
...
...
sight_harmony/products/phone/src/main/resources/rawfile/search_suggest_data.json
0 → 100644
View file @
3d13fe4
{
"code"
:
"0"
,
"data"
:
[
{
"activityExt"
:
null
,
"appStyle"
:
"11"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2029
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
""
,
"coverType"
:
null
,
"coverUrl"
:
""
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
],
"hasMore"
:
null
,
"itemId"
:
"500005310685_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
1
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"2024天津·宝坻体育旅游嘉年华活动启动"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044378753"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713145459000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005310685
,
"relObjectId"
:
"2029"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"人民日报客户端天津频道"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005310685_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"11"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2032
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
""
,
"coverType"
:
null
,
"coverUrl"
:
""
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
],
"hasMore"
:
null
,
"itemId"
:
"500005305865_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"内蒙古扎赉特旗: “书记项目”添动能 “头雁引领”聚合力"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044342646"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1712913646000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005305865
,
"relObjectId"
:
"2032"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"扎赉特旗融媒体中心"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005305865_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"2"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2002
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"828*466"
,
"coverType"
:
1
,
"coverUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
466
,
"landscape"
:
1
,
"size"
:
1
,
"url"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404141745321527.png?x-oss-process=image/resize,m_fill,h_450,w_800/quality,q_90"
,
"weight"
:
828
}
],
"hasMore"
:
null
,
"itemId"
:
"500005310405_video_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"video"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
1
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"华丽绚烂!看了洛阳牡丹才知国色天香"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044374037"
,
"objectLevel"
:
""
,
"objectType"
:
"1"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713095130000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005310405
,
"relObjectId"
:
"2002"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"荔枝风景线微博"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005310405_video_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
{
"firstFrameImageUri"
:
""
,
"videoDuration"
:
19
,
"videoLandscape"
:
1
,
"videoUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/video/mp4/202404/17130877420e174c2c6c260ac9.mp4"
},
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2002
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"619*466"
,
"coverType"
:
1
,
"coverUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
466
,
"landscape"
:
1
,
"size"
:
1
,
"url"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181712303737.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"weight"
:
619
}
],
"hasMore"
:
null
,
"itemId"
:
"500005324157_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
"祝福“中国天眼”!怀念南老先生!"
,
"newsTitle"
:
"这超900颗新脉冲星,多希望他能看到啊"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044454971"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713431569000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005324157
,
"relObjectId"
:
"2002"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"新华社微信公号"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005324157_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2037
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"700*525"
,
"coverType"
:
1
,
"coverUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
525
,
"landscape"
:
1
,
"size"
:
1
,
"url"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404181118592822.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"weight"
:
700
}
],
"hasMore"
:
null
,
"itemId"
:
"500005322754_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
1
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"神舟十八号船箭组合体转运至发射区 计划近日择机实施发射"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044447518"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713433480000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005322754
,
"relObjectId"
:
"2037"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"人民日报客户端"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005322754_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2050
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"619*466"
,
"coverType"
:
1
,
"coverUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
466
,
"landscape"
:
1
,
"size"
:
1
,
"url"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404121822152009.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"weight"
:
619
}
],
"hasMore"
:
null
,
"itemId"
:
"500005306852_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
1
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"罕见!贵州梵净山再现“佛光”奇观"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044345083"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1712934235000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005306852
,
"relObjectId"
:
"2050"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"微铜仁"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005306852_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2028
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"1103*621"
,
"coverType"
:
1
,
"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"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
621
,
"landscape"
:
1
,
"size"
:
1
,
"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"
,
"weight"
:
1103
}
],
"hasMore"
:
null
,
"itemId"
:
"500005310563_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"行知读书会分享松江方塔园背后的故事"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044377688"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713108215000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005310563
,
"relObjectId"
:
"2028"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"人民日报客户端上海频道"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005310563_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2002
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"619*466"
,
"coverType"
:
1
,
"coverUrl"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
466
,
"landscape"
:
1
,
"size"
:
1
,
"url"
:
"https://rmrbcmsonline.peopleapp.com/upload/image/202404/202404220932238253.png?x-oss-process=image/resize,m_fill,h_160,w_240/quality,q_90"
,
"weight"
:
619
}
],
"hasMore"
:
null
,
"itemId"
:
"500005332338_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
"送别老人!"
,
"newsTitle"
:
"93岁南京大屠杀幸存者刘素珍去世"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044516097"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713750664000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005332338
,
"relObjectId"
:
"2002"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"侵华日军南京大屠杀遇难同胞纪念馆"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005332338_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"11"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2037
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
""
,
"coverType"
:
null
,
"coverUrl"
:
""
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
],
"hasMore"
:
null
,
"itemId"
:
"500005320193_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"高能级科创平台如何赋能衢州高质量发展?这些成果令人瞩目"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044430493"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713339049000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005320193
,
"relObjectId"
:
"2037"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"人民日报客户端浙江频道"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005320193_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
},
{
"activityExt"
:
null
,
"appStyle"
:
"13"
,
"askInfo"
:
null
,
"axisColor"
:
""
,
"bestNoticer"
:
null
,
"bottomNavId"
:
null
,
"cardItemId"
:
""
,
"channelId"
:
2037
,
"commentInfo"
:
null
,
"corner"
:
""
,
"coverSize"
:
"600*400"
,
"coverType"
:
1
,
"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"
,
"expIds"
:
"105"
,
"extra"
:
""
,
"fullColumnImgUrls"
:
[
{
"format"
:
null
,
"fullUrl"
:
""
,
"height"
:
400
,
"landscape"
:
1
,
"size"
:
1
,
"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"
,
"weight"
:
600
}
],
"hasMore"
:
null
,
"itemId"
:
"500005318711_article_r"
,
"itemType"
:
""
,
"itemTypeCode"
:
"article"
,
"keyArticle"
:
0
,
"landscape"
:
null
,
"likeStyle"
:
null
,
"linkUrl"
:
""
,
"liveInfo"
:
null
,
"menuShow"
:
2
,
"newTags"
:
""
,
"newsAuthor"
:
""
,
"newsSubTitle"
:
""
,
"newsSummary"
:
""
,
"newsTitle"
:
"增长缘何“超预期”?三个维度读懂"
,
"newsTitleColor"
:
""
,
"objectId"
:
"30044422916"
,
"objectLevel"
:
""
,
"objectType"
:
"8"
,
"openComment"
:
null
,
"openLikes"
:
null
,
"pageId"
:
""
,
"photoNum"
:
null
,
"position"
:
null
,
"productNum"
:
null
,
"publishTime"
:
"1713319371000"
,
"pushTime"
:
null
,
"pushUnqueId"
:
null
,
"readFlag"
:
0
,
"recommend"
:
1
,
"relId"
:
500005318711
,
"relObjectId"
:
"2037"
,
"relType"
:
1
,
"rmhInfo"
:
null
,
"rmhPlatform"
:
0
,
"sceneId"
:
"54"
,
"shareInfo"
:
null
,
"slideShows"
:
[
],
"sortValue"
:
null
,
"source"
:
"央视新闻客户端"
,
"subObjectType"
:
""
,
"subSceneId"
:
""
,
"tagIds"
:
[
],
"tagWord"
:
null
,
"titleShow"
:
null
,
"titleShowPolicy"
:
null
,
"topicTemplate"
:
null
,
"traceId"
:
"a20b09c58479b22f-500005318711_article_r"
,
"traceInfo"
:
""
,
"userInfo"
:
null
,
"videoInfo"
:
null
,
"visitorComment"
:
1
,
"voiceInfo"
:
null
}
],
"message"
:
"Success"
,
"meta"
:
null
,
"requestId"
:
""
,
"success"
:
true
,
"timestamp"
:
1713752234695
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment