fanmingyou3_wd

人民日报-init:

模块:
entry:入口模块
wdKit:工具类模块
wdConstant:全局常量模块,包括枚举值
wdComponent:基础组件模块
wdNetwork:网络模块
Showing 118 changed files with 6796 additions and 0 deletions
/node_modules
/oh_modules
/local.properties
/.idea
**/build
/.hvigor
.cxx
/.clangd
/.clang-format
/.clang-tidy
**/.test
\ No newline at end of file
... ...
{
"app": {
"bundleName": "com.wondertek.daily",
"vendor": "$string:app_vendor",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}
... ...
{
"string": [
{
"name": "app_name",
"value": "People's Daily"
},
{
"name": "app_desc",
"value": "The People's Daily is an organ newspaper of the Central Committee of the CPC."
},
{
"name": "app_vendor",
"value": "Wonder Tek"
},
{
"name": "load_net_data_loading",
"value": "loading..."
},
{
"name": "load_net_data_failed",
"value": "load net data failed"
},
{
"name": "load_net_data_none",
"value": "no data"
}
]
}
... ...
{
"string": [
{
"name": "app_name",
"value": "人民日报"
},
{
"name": "app_desc",
"value": "人民日报是中国共产党中央委员会机关报"
},
{
"name": "app_vendor",
"value": "网达"
},
{
"name": "load_net_data_loading",
"value": "加载中..."
},
{
"name": "load_net_data_failed",
"value": "加载网络数据失败"
},
{
"name": "load_net_data_none",
"value": "很抱歉,未能找到相关内容"
}
]
}
... ...
{
"app": {
"signingConfigs": [
{
"name": "default",
"type": "HarmonyOS",
"material": {
"certpath": "C:\\Users\\PC\\.ohos\\config\\auto_debug_PeopleDaily_Harmony_com.wondertek.daily_70086000309521319.cer",
"storePassword": "0000001ABBB4B3A70A2A7E171D3468CC9AB106807B092C8862455C201E82C1FCDEA1A52B3EC568DC298B",
"keyAlias": "debugKey",
"keyPassword": "0000001AB7E69A7BECBCDBDFA55535E64932F5C9485CF9199F6CE3978C196EDDD7E66759C3F6BEE770DE",
"profile": "C:\\Users\\PC\\.ohos\\config\\auto_debug_PeopleDaily_Harmony_com.wondertek.daily_70086000309521319.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "C:\\Users\\PC\\.ohos\\config\\auto_debug_PeopleDaily_Harmony_com.wondertek.daily_70086000309521319.p12"
}
}
],
"compileSdkVersion": 9,
"compatibleSdkVersion": 9,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdKit",
"srcPath": "./wdKit",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdConstant",
"srcPath": "./wdConstant",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdNetwork",
"srcPath": "./wdNetwork",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdComponent",
"srcPath": "./wdComponent",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
\ No newline at end of file
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
},
{
"name": "ohosTest",
}
]
}
\ No newline at end of file
... ...
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { hapTasks } from '@ohos/hvigor-ohos-plugin';
... ...
{
"license": "",
"devDependencies": {},
"author": "",
"name": "entry",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {
"wdKit": "file:../wdKit",
"wdConstant": "file:../wdConstant",
"wdNetwork": "file:../wdNetwork",
"wdComponent": "file:../wdComponent"
}
}
... ...
import UIAbility from '@ohos.app.ability.UIAbility';
import hilog from '@ohos.hilog';
import window from '@ohos.window';
export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
}
onDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage) {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
windowStage.loadContent('pages/MainPage', (err, data) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
});
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
}
onForeground() {
// Ability has brought to foreground
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
}
onBackground() {
// Ability has back to background
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
}
}
... ...
import { Logger } from 'wdKit';
import { CompStyle } from 'wdConstant';
import { ResponseDTO, WDHttp } from 'wdNetwork';
import http from '@ohos.net.http';
const TAG = 'Index';
@Entry
@Component
struct Index {
@State message: string = 'Hello World'
fetchData(url: string): Promise<string> {
return new Promise<string>((success, error) => {
Logger.info(TAG, `getNavData start`);
WDHttp.get<string>(url).then((resDTO: string) => {
if (!resDTO) {
Logger.error(TAG, 'getNavData then navResDTO is empty');
error('resDTO is empty');
return
}
success(resDTO);
}).catch((err: Error) => {
Logger.error(TAG, `fetchNavigationDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
aboutToAppear() {
Logger.info(TAG, `aboutToAppear ${CompStyle.Label_03}`);
this.message = CompStyle.Label_03
// let url = 'https://app-sc.miguvideo.com/app-management/v1/staticcache/settings-type/miguvideo/GLOBAL2'
let url = 'https://app-sc.miguvideo.com/app-management/v4/staticcache/navigation-list/miguvideo/android/02'
this.fetchData(url).then((navResDTO: string) => {
Logger.info(TAG, "fetchData then,navResDTO:" + navResDTO);
})
.catch((err: Error) => {
Logger.error(TAG, `fetchData catch, error.name : ${err.name}, error.message:${err.message}`);
})
}
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
import { BottomNavigationComponent} from 'wdComponent';
import { Logger } from 'wdKit';
const TAG = 'Index';
@Entry
@Component
struct MainPage {
aboutToAppear() {
Logger.info(TAG, `aboutToAppear `);
}
aboutToDisappear() {
Logger.info(TAG, 'aboutToDisappear');
}
onPageShow() {
Logger.info(TAG, 'onPageShow');
}
onPageHide() {
Logger.info(TAG, 'onPageHide');
}
onBackPress() {
Logger.info(TAG, 'onBackPress');
}
build() {
Column() {
BottomNavigationComponent()
}
}
}
\ No newline at end of file
... ...
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ts",
"description": "$string:EntryAbility_desc",
"icon": "$media:app_icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:app_icon",
"startWindowBackground": "$color:start_window_background",
"exported": true,
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
]
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "$string:app_desc"
},
{
"name": "EntryAbility_label",
"value": "$string:app_name"
}
]
}
\ No newline at end of file
... ...
{
"src": [
"pages/Index",
"pages/MainPage"
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "module_desc",
"value": "module description"
},
{
"name": "EntryAbility_desc",
"value": "$string:app_desc"
},
{
"name": "EntryAbility_label",
"value": "$string:app_name"
}
]
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"backgroundColor": "#FFFFFF",
"bottomNavList": [
{
"backgroundUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/2e1d5f235d1a44cfb9fc120e8596c56b.png",
"channelChooseActionUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231227/vod/display/7c92f5b2a08b4a65aa9da13e66d5ad4a.pag",
"channelChooseCColor": "#666666",
"channelChooseColor": "#222222",
"channelMoreColor": "#666666",
"extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}",
"homePageColor": "#FFFFF",
"icon": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/0dc20f38da09405ea0ab675d700bc2ce.png",
"iconC": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/e162a5d3401045f298c237f1c795c015.gif",
"id": 201,
"immersiveIconCUrl": "",
"immersiveIconUrl": "",
"immersiveNameCColor": "#FFFFFF",
"immersiveNameColor": "#FFFFFF",
"logoUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231229/image/display/51d568f9af05421f9754a2c08906dc42.png",
"morningAndEveningUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/0f37cc0c86194c969d2143f85c056c9c.png",
"name": "新闻",
"nameCColor": "#ED2800",
"nameColor": "#999999",
"nightIconCUrl": "",
"nightIconUrl": "",
"nightNameCColor": "",
"nightNameColor": "",
"noticeColor": "#FFFFFF",
"pageId": null,
"pageType": null,
"searchBothColor": "#666666",
"searchUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/2f2a9b3af5334eac8d7c3b6007240b83.png",
"sortValue": 1,
"statusBarColor": 1,
"topNavChannelList": [
{
"channelId": 2002,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 1,
"delPermitted": 0,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 0,
"myChannel": "0",
"name": "热点",
"num": 1,
"pageId": 20012,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2001,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 1,
"delPermitted": 0,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 0,
"myChannel": "0",
"name": "推荐",
"num": 2,
"pageId": 20011,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2009,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "社会",
"num": 3,
"pageId": 20019,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2066,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "播报",
"num": 4,
"pageId": 21003,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2012,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 0,
"myChannel": "0",
"name": "文化",
"num": 5,
"pageId": 20022,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2007,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "镜头",
"num": 6,
"pageId": 20017,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2006,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "版面",
"num": 7,
"pageId": 20016,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2015,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "210*60",
"iconUrl": "",
"iconUrlSize": "210*60",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "科技",
"num": 8,
"pageId": 20025,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2063,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 0,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "两会",
"num": 9,
"pageId": 21000,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2064,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "二十大",
"num": 10,
"pageId": 21001,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2003,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "锐评",
"num": 11,
"pageId": 20013,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2011,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "体育",
"num": 12,
"pageId": 20021,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2005,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "文件",
"num": 14,
"pageId": 20015,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2065,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "三农",
"num": 15,
"pageId": 21002,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2016,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "乡村振兴",
"num": 16,
"pageId": 20026,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2010,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "财经",
"num": 18,
"pageId": 20020,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2013,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "教育",
"num": 19,
"pageId": 20023,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2017,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "健康",
"num": 20,
"pageId": 20027,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2014,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "军事",
"num": 21,
"pageId": 20024,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2018,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "汽车",
"num": 22,
"pageId": 20028,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2019,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "房产",
"num": 23,
"pageId": 20029,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2027,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "北京",
"num": 24,
"pageId": 20037,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2029,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "天津",
"num": 25,
"pageId": 20039,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2030,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "河北",
"num": 26,
"pageId": 20040,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2031,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "山西",
"num": 27,
"pageId": 20041,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2032,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "内蒙古",
"num": 28,
"pageId": 20042,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2033,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "辽宁",
"num": 29,
"pageId": 20043,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2034,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "吉林",
"num": 30,
"pageId": 20044,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2035,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "黑龙江",
"num": 31,
"pageId": 20045,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2028,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "上海",
"num": 32,
"pageId": 20038,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2036,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "江苏",
"num": 33,
"pageId": 20046,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2037,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "浙江",
"num": 34,
"pageId": 20047,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2038,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "安徽",
"num": 35,
"pageId": 20048,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2039,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "福建",
"num": 36,
"pageId": 20049,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2040,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "江西",
"num": 37,
"pageId": 20050,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2041,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "山东",
"num": 38,
"pageId": 20051,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2042,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "河南",
"num": 39,
"pageId": 20052,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2043,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "湖北",
"num": 40,
"pageId": 20053,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2044,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "湖南",
"num": 41,
"pageId": 20054,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2045,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "广东",
"num": 42,
"pageId": 20055,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2046,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "广西",
"num": 43,
"pageId": 20056,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2047,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "海南",
"num": 44,
"pageId": 20057,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2048,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "重庆",
"num": 45,
"pageId": 20058,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2049,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "四川",
"num": 46,
"pageId": 20059,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2050,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "贵州",
"num": 47,
"pageId": 20060,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2051,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "云南",
"num": 48,
"pageId": 20061,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2052,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "西藏",
"num": 49,
"pageId": 20062,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2053,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "陕西",
"num": 50,
"pageId": 20063,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2054,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "甘肃",
"num": 51,
"pageId": 20064,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2055,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "青海",
"num": 52,
"pageId": 20065,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2056,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "宁夏",
"num": 53,
"pageId": 20066,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2057,
"channelStyle": 2,
"channelType": 2,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "新疆",
"num": 54,
"pageId": 20067,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2020,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "国际",
"num": 57,
"pageId": 20030,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2021,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "法治",
"num": 58,
"pageId": 20031,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2022,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "生活",
"num": 59,
"pageId": 20032,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2092,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 0,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "设计",
"num": 68,
"pageId": 21063,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2098,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 0,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 0,
"myChannel": "0",
"name": "设计组件",
"num": 72,
"pageId": 21299,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2099,
"channelStyle": 2,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 0,
"fontCColor": "",
"fontColor": "",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "设计号",
"num": 73,
"pageId": 21736,
"pageType": "",
"underlineCColor": ""
}
],
"topStyle": "11",
"type": "1"
},
{
"backgroundUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/2e1d5f235d1a44cfb9fc120e8596c56b.png",
"channelChooseActionUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231227/vod/display/3835f09a973443cb824af179e30e87ed.pag",
"channelChooseCColor": "#666666",
"channelChooseColor": "#222222",
"channelMoreColor": "",
"extraData": "{\"haveSearch\":\"0\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}",
"homePageColor": "#FFFFFF",
"icon": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/460f61a48c6a4993af442d54aedb682b.png",
"iconC": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/9aa759f72ccb4848b3ded2dee9502c25.gif",
"id": 202,
"immersiveIconCUrl": "",
"immersiveIconUrl": "",
"immersiveNameCColor": "#FFFFFF",
"immersiveNameColor": "#FFFFFF",
"logoUrl": "",
"morningAndEveningUrl": "",
"name": "人民号",
"nameCColor": "#ED2800",
"nameColor": "#999999",
"nightIconCUrl": "",
"nightIconUrl": "",
"nightNameCColor": "",
"nightNameColor": "",
"noticeColor": "#FFFFFF",
"pageId": null,
"pageType": null,
"searchBothColor": "#222222",
"searchUrl": "",
"sortValue": 2,
"statusBarColor": 1,
"topNavChannelList": [
{
"channelId": 2058,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "推荐",
"num": 1,
"pageId": 20068,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2059,
"channelStyle": 3,
"channelType": 3,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "关注",
"num": 2,
"pageId": 20069,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2073,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "活动",
"num": 3,
"pageId": 21010,
"pageType": "",
"underlineCColor": ""
}
],
"topStyle": "12",
"type": "1"
},
{
"backgroundUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/2e1d5f235d1a44cfb9fc120e8596c56b.png",
"channelChooseActionUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/vod/display/65c6eb2ca91849c582d057adc9e76d46.pag",
"channelChooseCColor": "#666666",
"channelChooseColor": "#222222",
"channelMoreColor": "",
"extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}",
"homePageColor": "#FFFFFF",
"icon": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/image/display/bf77561966654001a538857ebef8a15c.png",
"iconC": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231224/image/display/1a42d5b8183a4eb1a044ddd64223c687.png",
"id": 203,
"immersiveIconCUrl": "",
"immersiveIconUrl": "",
"immersiveNameCColor": "#FFFFFF",
"immersiveNameColor": "#FFFFFF",
"logoUrl": "",
"morningAndEveningUrl": "",
"name": "视频",
"nameCColor": "#ED2800",
"nameColor": "#999999",
"nightIconCUrl": "",
"nightIconUrl": "",
"nightNameCColor": "",
"nightNameColor": "",
"noticeColor": "#FFFFFF",
"pageId": null,
"pageType": null,
"searchBothColor": "#222222",
"searchUrl": "",
"sortValue": 3,
"statusBarColor": 1,
"topNavChannelList": [
{
"channelId": 2060,
"channelStyle": 1,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "视频",
"num": 1,
"pageId": 20070,
"pageType": "",
"underlineCColor": ""
},
{
"channelId": 2061,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "直播",
"num": 2,
"pageId": 20071,
"pageType": "",
"underlineCColor": ""
}
],
"topStyle": "13",
"type": "1"
},
{
"backgroundUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/2e1d5f235d1a44cfb9fc120e8596c56b.png",
"channelChooseActionUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/vod/display/65c6eb2ca91849c582d057adc9e76d46.pag",
"channelChooseCColor": "#666666",
"channelChooseColor": "#222222",
"channelMoreColor": "",
"extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}",
"homePageColor": "#FFFFFF",
"icon": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/5a6cf95f7b9e489390ec73faf458b58a.png",
"iconC": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/1b075ed30a6b43d2ae319e5d892c66e4.gif",
"id": 204,
"immersiveIconCUrl": "",
"immersiveIconUrl": "",
"immersiveNameCColor": "#FFFFFF",
"immersiveNameColor": "#FFFFFF",
"logoUrl": "",
"morningAndEveningUrl": "",
"name": "服务",
"nameCColor": "#ED2800",
"nameColor": "#999999",
"nightIconCUrl": "",
"nightIconUrl": "",
"nightNameCColor": "",
"nightNameColor": "",
"noticeColor": "#FFFFFF",
"pageId": null,
"pageType": null,
"searchBothColor": "#222222",
"searchUrl": "",
"sortValue": 4,
"statusBarColor": 1,
"topNavChannelList": [
{
"channelId": 2062,
"channelStyle": 3,
"channelType": 1,
"defaultPermitted": 0,
"delPermitted": 1,
"fontCColor": "#FFFFFF",
"fontColor": "#F9AB99",
"headlinesOn": 0,
"homeChannel": "0",
"iconCUrl": "",
"iconCUrlSize": "",
"iconUrl": "",
"iconUrlSize": "",
"localChannel": "0",
"moreChannel": "0",
"movePermitted": 1,
"myChannel": "0",
"name": "服务",
"num": 1,
"pageId": 20072,
"pageType": "",
"underlineCColor": ""
}
],
"topStyle": "14",
"type": "1"
},
{
"backgroundUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231214/image/display/3e1f4fe85b0445b6a0be24f3759d0ff6.png",
"channelChooseActionUrl": "",
"channelChooseCColor": "#FFFFFF",
"channelChooseColor": "#FFFFFF",
"channelMoreColor": "",
"extraData": "{\"haveSearch\":\"0\",\"haveTopNav\":\"0\"}",
"homePageColor": "#222222",
"icon": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/f55f0ac25b764809bc8285c284adb147.png",
"iconC": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231220/image/display/3b5cff54d2a546f5b523a8aa8c33352e.gif",
"id": 205,
"immersiveIconCUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/inen-20230403/image/display/9f22b579db15497797e8204b1ec12d14.png",
"immersiveIconUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/inen-20230403/image/display/5be23055a4dc4d869be2139e9deb7a55.png",
"immersiveNameCColor": "#FFFFFF",
"immersiveNameColor": "#FFFFFF",
"logoUrl": "",
"morningAndEveningUrl": "",
"name": "我的",
"nameCColor": "#ED2800",
"nameColor": "#999999",
"nightIconCUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/inen-20230403/image/display/9d584ddcfdf74e3ea8e445d102127b97.png",
"nightIconUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/inen-20230403/image/display/1f79063b6ecb493c95703e45529d3a5f.png",
"nightNameCColor": "#DA1C1C",
"nightNameColor": "#6A6B75",
"noticeColor": "#ED2800",
"pageId": null,
"pageType": null,
"searchBothColor": "#FFFFFF",
"searchUrl": "",
"sortValue": 5,
"statusBarColor": 1,
"topNavChannelList": [],
"topStyle": "",
"type": "2"
}
],
"greyBottomNav": {
"bottomNavList": [],
"greyUserList": []
},
"immersiveBackgroundColor": "",
"nightBackgroundColor": ""
},
"message": "Success",
"meta": {
"md5": "e2942dbcd76710d1bac0d98f9a0a9d0a"
},
"requestId": "",
"success": true,
"timestamp": 1704765430031
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"compAdList": [
],
"compList": [
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Carousel_Layout-01",
"compType": "CAROUSEL_LAYOUT",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 31,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "为你推荐feed",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"description": "畅通国内大循环,2023年中国经济高质量发展",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231208/image/display/d4496925a1264a749975ae9b01a4ef46.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "http://livewatch-prod.aikan.pdnews.cn/tr_lud/5404912f99bf4703ab070752b507cc64_origin.m3u8?auth_key=1705628416-0-0-c7f5854d6cbe801578009bfa44757f0d",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003744",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-19 09:00:00",
"subType": "",
"subtitle": "",
"title": "畅通国内大循环,2023年中国经济高质量发展",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/41e6079d95ff459a9adcf1a16ae0b004.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"description": "内容榜单",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240104/image/display/c4a9b526e0994d1bbd3ac8450f5cfc6c.jpg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003614",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-07 09:00:00",
"subType": "",
"subtitle": "",
"title": "内容榜单",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231206/image/live/bbe6d821e92b48919d90c7dadfd1f05a.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240108/image/display/c7790c3c880b4b8a88082f4d224487b8.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"description": "贴错门牌致业主装修了隔壁,开发商承担装修费",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240108/image/display/c7790c3c880b4b8a88082f4d224487b8.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003394",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-12 13:50:48",
"subType": "",
"subtitle": "",
"title": "贴错门牌致业主装修了隔壁,开发商承担装修费",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231109/image/live/102e6eb9356b4ef19405b04c1f6ff875.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 2,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Label-03",
"compType": "LABEL",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "{\"titleIconUrl\":\"\",\"title\":\"今日推荐\"}",
"hasAdInfo": 0,
"id": 11,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "今日推荐",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 5,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Grid_Layout-01",
"compType": "GRID_LAYOUT",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 7080,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "横宫格",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "3840*2160",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/62bdbbb35dbd45689e00790c81f04c4b.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 88,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/7fe1345d9c7244359106c2e7de3b8f7a_opt.mp4"
},
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4"
}
],
"programAuth": "4265498",
"programId": "30001364983",
"programName": "每日一曲《李香兰》",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "每日一曲《李香兰》",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/62bdbbb35dbd45689e00790c81f04c4b.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg"
},
{
"cityCode": "",
"coverSize": "3840*2160",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/f79bbaa5a33b4bd88176071c4f797ff6.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 88,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/7fe1345d9c7244359106c2e7de3b8f7a_opt.mp4"
},
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4"
}
],
"programAuth": "4265498",
"programId": "30001364983",
"programName": "如约而至!中越两党总书记实现第三轮互访",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "如约而至!中越两党总书记实现第三轮互访",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/f79bbaa5a33b4bd88176071c4f797ff6.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg"
},
{
"cityCode": "",
"coverSize": "3840*2160",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/2c1d917009584ce2bb4a35cbb3a860a0.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 88,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/7fe1345d9c7244359106c2e7de3b8f7a_opt.mp4"
},
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4"
}
],
"programAuth": "4265498",
"programId": "30001364983",
"programName": "人间烟火,温暖着所有怀有希望的晚归人。",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "人间烟火,温暖着所有怀有希望的晚归人。",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231218/image/display/2c1d917009584ce2bb4a35cbb3a860a0.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg"
},
{
"cityCode": "",
"coverSize": "3840*2160",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231222/image/display/117dc516ca5c42d5843c0d32050c9fc6.jpeg?x-oss-process=image/resize,w_240/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 88,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/7fe1345d9c7244359106c2e7de3b8f7a_opt.mp4"
},
{
"clarity": 1,
"duration": 88,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4"
}
],
"programAuth": "4265498",
"programId": "30001364983",
"programName": "时政微观察丨推进乡村全面振兴是“三农”工作总抓手",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "时政微观察丨推进乡村全面振兴是“三农”工作总抓手",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231222/image/display/117dc516ca5c42d5843c0d32050c9fc6.jpeg?x-oss-process=image/resize,w_240/quality,q_90/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 4,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Single_Column-01",
"compType": "SINGLE_COLUMN",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 6772,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "测试",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "620100",
"coverSize": "",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "540102",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231228/image/display/90a2db4077d44a1f887f068fc659d977.jpeg?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 91,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 3,
"duration": 91,
"landscape": 1,
"resolutionHeight": 1080,
"resolutionWidth": 1920,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4"
}
],
"programAuth": "4255335",
"programId": "30001335003",
"programName": "美方再次宣布对台售武,外交部答澎湃:将对参与企业采取反制措施",
"programSource": 4,
"programType": 1,
"provinceCode": "620000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "美方再次宣布对台售武,外交部答澎湃:将对参与企业采取反制措施",
"vImageUrl": ""
},
{
"cityCode": "620100",
"coverSize": "",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "540102",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20240108/image/display/b832ff05a97542c69bcea69fcf5d7204.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 91,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 3,
"duration": 91,
"landscape": 1,
"resolutionHeight": 1080,
"resolutionWidth": 1920,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4"
}
],
"programAuth": "4255335",
"programId": "30001335003",
"programName": "2023年12月暴雪突袭",
"programSource": 4,
"programType": 1,
"provinceCode": "620000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "2023年12月暴雪突袭",
"vImageUrl": ""
},
{
"cityCode": "620100",
"coverSize": "",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "540102",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231106/image/display/5890a13a259a4dd0b283284dafb38843.png?x-oss-process=image/resize,w_550/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 91,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 3,
"duration": 91,
"landscape": 1,
"resolutionHeight": 1080,
"resolutionWidth": 1920,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4"
}
],
"programAuth": "4255335",
"programId": "30001335003",
"programName": "山东青州:花卉种植助增收,花卉种植助增收",
"programSource": 4,
"programType": 1,
"provinceCode": "620000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "山东青州:花卉种植助增收,花卉种植助增收",
"vImageUrl": ""
},
{
"cityCode": "620100",
"coverSize": "",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "540102",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/f60b/image/content/20231109/cce56a2cc7.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 91,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 3,
"duration": 91,
"landscape": 1,
"resolutionHeight": 1080,
"resolutionWidth": 1920,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4"
}
],
"programAuth": "4255335",
"programId": "30001335003",
"programName": "“追梦”女孩足球节兰州站顺利开幕",
"programSource": 4,
"programType": 1,
"provinceCode": "620000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "“追梦”女孩足球节兰州站顺利开幕",
"vImageUrl": ""
},
{
"cityCode": "110100",
"coverSize": "1524*857",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/16187cd251844430b42a8fc604065652.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "霜降,是秋季的最后一个节气,意味着冬天即将开始。《月令七十二候集解》记载:“九月中,气肃而凝,露结为霜矣。”此时节,树叶经过秋霜洗礼,有的变成深红色,有的变成金黄色,呈现出一幅幅绝美的“大地画卷”。登山赏叶,漫步乡野,徜徉海岸,尽享多彩美景不负秋日好时光",
"districtCode": "不限",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/16187cd251844430b42a8fc604065652.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/vod/live/51c30859550d4ebeba50e09e18186b92.mp4",
"pageId": "",
"playUrls": [
],
"programAuth": "2004545",
"programId": "20000092968",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "110000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-21 16:59:42",
"subType": "",
"subtitle": "",
"title": "1120回归推流直播1",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/4ccdec179fea44bba19a4304ab6af756.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "869*489",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/live/61c783d70c924f019052f56592a78eb7.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/live/61c783d70c924f019052f56592a78eb7.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/0ea32bdda95548f0a3d25a94fbad03f5_lud/123003.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "4251160",
"programId": "20000092995",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-21 23:59:59",
"subType": "",
"subtitle": "",
"title": "贵州黔南州翁安县建中镇",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/live/9f91b916c74c4ef6bd0c0b46aaf3fea4.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "110100",
"coverSize": "",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/7bd6c3b52bdb4b68970e97810e2bb2b3.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "霜降,是秋季的最后一个节气,意味着冬天即将开始。《月令七十二候集解》记载:“九月中,气肃而凝,露结为霜矣。”此时节,树叶经过秋霜洗礼,有的变成深红色,有的变成金黄色,呈现出一幅幅绝美的“大地画卷”。登山赏叶,漫步乡野,徜徉海岸,尽享多彩美景不负秋日好时光",
"districtCode": "不限",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/7bd6c3b52bdb4b68970e97810e2bb2b3.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/1d86a015ac5a480ea58b7f63e06a1d1f_lud/122895.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004545",
"programId": "20000092888",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "110000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-14 17:34:17",
"subType": "",
"subtitle": "",
"title": "1113回归露凝为霜 秋色深深",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/image/live/bb7b4de5986a400a90cf1a8530e6335a.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/c4b3/image/content/20231121/c7899f3074.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 65,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/a940/vod/content/20231121/85056be2e6.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 3,
"duration": 65,
"landscape": 1,
"resolutionHeight": 1080,
"resolutionWidth": 1920,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/a940/vod/content/20231121/85056be2e6.mp4"
}
],
"programAuth": "4255737",
"programId": "30001353022",
"programName": "吉林省发布“十佳返乡入乡创业就业带头人”及“十大劳务品牌”",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "吉林省发布“十佳返乡入乡创业就业带头人”及“十大劳务品牌”",
"vImageUrl": ""
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 2,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Single_Column-02",
"compType": "SINGLE_COLUMN",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 12,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "为你推荐feed",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/image/display/552162a3774f4ecf9a809142959e318c.png?x-oss-process=image/resize,w_240/quality,q_90/format,jpg",
"description": "陕西被叫做“地质明珠”的小众景区,不仅风景优美,而且全年免费",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/image/display/552162a3774f4ecf9a809142959e318c.png?x-oss-process=image/resize,w_240/quality,q_90/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/e77d054073f543ffbc8f296d4975189f_lud/5362.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003739",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-19 12:00:00",
"subType": "",
"subtitle": "",
"title": "陕西被叫做“地质明珠”的小众景区,不仅风景优美,而且全年免费",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231221/image/display/552162a3774f4ecf9a809142959e318c.png?x-oss-process=image/resize,w_240/quality,q_90/format,jpg"
},
{
"cityCode": "",
"coverSize": "2271*1278",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/f9b81f10f9d0430194f690a845c6912c.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "“弦韵乌审,暖才于心”,通过马头琴管弦乐、原生态组合曲、传统民歌合唱、马头琴独奏等多种艺术表现形式,充分展现马头琴音乐的悠扬之美、力量之美,为高校师生带来一场别开生面的音乐盛宴。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/f9b81f10f9d0430194f690a845c6912c.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003702",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "“弦韵乌审,暖才于心”中国•乌审马头琴交响乐团走进高校",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/d0326a10b7504a34964aff0962d5ad7d.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "600*338",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/4f67db4b26f34ac5853cb2f25b55d1d4.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "国务院新闻办公室于2023年12月18日(星期一)下午3时举行国务院政策例行吹风会,请商务部副部长盛秋平和海关总署、市场监管总局、金融监管总局有关负责人介绍加快内外贸一体化发展有关情况,并答记者问。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/4f67db4b26f34ac5853cb2f25b55d1d4.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003737",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-18 15:09:00",
"subType": "",
"subtitle": "",
"title": "国新办发布会|介绍加快内外贸一体化发展有关情况",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/3160f19a3247405ea7151604fd87f0e7.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1600*900",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/038c195d6dd84a47bb7962bd2e897c87.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "云上看呆萌“滚滚”的日常,一起来看国宝大熊猫的精彩生活、搞笑瞬间和治愈时刻。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/038c195d6dd84a47bb7962bd2e897c87.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003715",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-18 10:38:00",
"subType": "",
"subtitle": "",
"title": "云逛奇妙动物园:国宝大熊猫的欢乐日常",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/b60fbd785822476daca4af0c8da4ce9a.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "942*530",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/047cc7d270114b8da8ad1b98522741a7.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "“老伴你帮我看看血压器是不是坏掉了,怎么两只手测量不一样呀?”高血压是一种常见的心血管疾病,如果血压没有得到有效控制,会增加心脑血管疾病的风险。正确测量血压对于掌握健康状况至关重要。本次直播,复旦大学附属华山医院护理部护师须倩雯将详细介绍正确的测量血压的步骤、测量前的准备工作,以及常见的测量误区。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/047cc7d270114b8da8ad1b98522741a7.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/634c575b859d49f7bcf65bb318c84e86_lud/5346.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003723",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-18 12:00:38",
"subType": "",
"subtitle": "",
"title": "医点就通 | 如何正确测量血压,你做对了吗?",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/ce56e30873a64eb78659959519238d0a.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/6f884c0982114592808ee3d7c25fb4d1.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "乡村篮球菁英友谊赛将于12月17-18日在海南琼海举办。届时,村BA总决赛MVP李衍均、得分王吴中庆、栏板王、助攻王马鹏,沙溪跑车刘炜祺、山东飞人申守法,宁夏三营杨家三兄弟等村BA顶流将悉数登场;村BA功勋教练赵仁斌、姬晓现场指导;更有中国篮球名宿、96黄金一代球员巩晓彬,北京篮球名宿“玉面少侠”焦健,现身赛场,为乡村篮球代言。三分大战、技巧大战、扣篮大战也将精彩上演。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/6f884c0982114592808ee3d7c25fb4d1.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003734",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 19:07:00",
"subType": "",
"subtitle": "",
"title": "上视界 看村赛|星耀村BA 激情菁英赛",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/405bb1303e2640d3931780122da0c9e3.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1280*720",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/0a1f327943984c02abfd335dbca80d03.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "为深入贯彻党的二十大精神,落实《全面加强和改进新时代学生心理健康工作专项行动计划(2023-2025)和江苏省教育厅“润心”行动工作要求,健全社会心理服务体系体制机制的建设,提升社会公众心理健康意识和素养,充分发挥以乐润心,以心育德的重要功能。南京审计大学心理健康教育教学部与浦口区社会心理健康服务指导中心联合举办“以乐润心 因爱同行”音乐会。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/0a1f327943984c02abfd335dbca80d03.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003662",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 19:03:18",
"subType": "",
"subtitle": "",
"title": "《以乐润心 音爱同行 ——新年音乐会》",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/66d2363592d5462b89972f558a97debe.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "942*530",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/f59c2e841a9042819c052f142d2e6fa6.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "“音为梦响 乐动华章”哈工大第二十五届校园十大歌手大赛决赛,27首歌曲唱响冬日的哈工大,邀你共同见证本届十大歌手的荣耀时刻。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/f59c2e841a9042819c052f142d2e6fa6.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003730",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 18:56:00",
"subType": "",
"subtitle": "",
"title": "“音为梦响 乐动华章”哈工大第二十五届校园十大歌手大赛决赛",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231217/image/live/2cae8628c9e64aa8850b48c28f7aeb73.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/4d307ca9d99e41cfb617404d669ef9be.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "纺织在我国有着几千年的历史,作为传统产业具有重要地位。经过多年积累,我国逐步从纺织业大国成长为全球纺织业强国。从一根纤维到最后的成衣,国内已经形成了全球最完备的纺织产业链。纺织行业是国民经济与社会发展的支柱产业,是解决民生与美化生活的基础产业,是国际合作与融合发展的优势产业,正朝着“科技、时尚、绿色”方向不断发展。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/4d307ca9d99e41cfb617404d669ef9be.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/f9ec8eda59174f4b8dc4d074ca8fd43d_lud/5327.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003710",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 19:00:00",
"subType": "",
"subtitle": "",
"title": "我的青春主场|教育部公益直播课:纺织行业发展趋势和职业机会",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/69f282dc5c524c60958728cea05c25cd.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "942*530",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/3d6ce5810ded4e319e04ad92e0bb20bd.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "近期一股强寒潮将从新疆开始自西向东、自北向南影响我国。深圳气温将出现断崖式下降,周末“小冰人”登场,急冻模式开启,17日最低气温降至10℃左右。深圳广电集团第一现场将与新疆、西藏、广西派驻记者连线,展示南北气温差异;同时,记者将登上深圳梧桐山测量山顶最低气温;气象局、医院、供电部门也作出相关提醒及防寒准备措施。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/3d6ce5810ded4e319e04ad92e0bb20bd.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003726",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 08:06:38",
"subType": "",
"subtitle": "",
"title": "今年最强寒潮来袭 深圳或开启急冻模式",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/50b224ea12ec4c6f93563959ed4405dd.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 6,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Masonry_Layout-01",
"compType": "MASONRY_LAYOUT",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 12,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "为你推荐feed",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/20f07cb26ccc41ed8c5ca9ffd88ff5e3.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "随着生活水平的提高和女性乳腺疾病宣传的深入,很多女性朋友不再是“发现疾病后才去就医”,而是越来越重视乳腺的定期检查,而钼靶检查也因为其简便快速等优点被多数人选择。本次直播,复旦大学附属华山医院放射科技师王益芳将针对患者常问的相关问题进行解答。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/20f07cb26ccc41ed8c5ca9ffd88ff5e3.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/e77d054073f543ffbc8f296d4975189f_lud/5362.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003739",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-19 12:00:00",
"subType": "",
"subtitle": "",
"title": "医点就通 | 关爱女性健康,聊聊乳腺钼靶检查",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/a51c97be4472435f919b9d347a69442d.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"screenType":"1"
},
{
"cityCode": "",
"coverSize": "600*338",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/4f67db4b26f34ac5853cb2f25b55d1d4.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "国务院新闻办公室于2023年12月18日(星期一)下午3时举行国务院政策例行吹风会,请商务部副部长盛秋平和海关总署、市场监管总局、金融监管总局有关负责人介绍加快内外贸一体化发展有关情况,并答记者问。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/4f67db4b26f34ac5853cb2f25b55d1d4.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003737",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-18 15:09:00",
"subType": "",
"subtitle": "",
"title": "国新办发布会|介绍加快内外贸一体化发展有关情况",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/3160f19a3247405ea7151604fd87f0e7.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"screenType":"2"
},
{
"cityCode": "",
"coverSize": "942*530",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/047cc7d270114b8da8ad1b98522741a7.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "“老伴你帮我看看血压器是不是坏掉了,怎么两只手测量不一样呀?”高血压是一种常见的心血管疾病,如果血压没有得到有效控制,会增加心脑血管疾病的风险。正确测量血压对于掌握健康状况至关重要。本次直播,复旦大学附属华山医院护理部护师须倩雯将详细介绍正确的测量血压的步骤、测量前的准备工作,以及常见的测量误区。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/047cc7d270114b8da8ad1b98522741a7.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/634c575b859d49f7bcf65bb318c84e86_lud/5346.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003723",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-18 12:00:38",
"subType": "",
"subtitle": "",
"title": "医点就通 | 如何正确测量血压,你做对了吗?",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231216/image/live/ce56e30873a64eb78659959519238d0a.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"screenType":"1"
},
{
"cityCode": "",
"coverSize": "1280*720",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/0a1f327943984c02abfd335dbca80d03.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "为深入贯彻党的二十大精神,落实《全面加强和改进新时代学生心理健康工作专项行动计划(2023-2025)和江苏省教育厅“润心”行动工作要求,健全社会心理服务体系体制机制的建设,提升社会公众心理健康意识和素养,充分发挥以乐润心,以心育德的重要功能。南京审计大学心理健康教育教学部与浦口区社会心理健康服务指导中心联合举办“以乐润心 因爱同行”音乐会。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/0a1f327943984c02abfd335dbca80d03.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": null,
"linkUrl": "",
"openLikes": 0,
"openUrl": "",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003662",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-17 19:03:18",
"subType": "",
"subtitle": "",
"title": "《以乐润心 音爱同行 ——新年音乐会》",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231214/image/live/66d2363592d5462b89972f558a97debe.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"screenType":"2"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 6,
"subType": ""
}
],
"id": 5,
"name": "今日热点",
"pageId": "2"
},
"message": "Success",
"meta": {
"md5": "yZstaJZxCm+YdypyQpuQyA=="
},
"requestId": "",
"success": true,
"timestamp": 1702881464711
}
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.
{
"string": [
{
"name": "module_desc",
"value": "模块描述"
},
{
"name": "EntryAbility_desc",
"value": "$string:app_desc"
},
{
"name": "EntryAbility_label",
"value": "$string:app_name"
}
]
}
\ No newline at end of file
... ...
import hilog from '@ohos.hilog';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function abilityTest() {
describe('ActsAbilityTest', function () {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(function () {
// Presets an action, which is performed only once before all test cases of the test suite start.
// This API supports only one parameter: preset action function.
})
beforeEach(function () {
// Presets an action, which is performed before each unit test case starts.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: preset action function.
})
afterEach(function () {
// Presets a clear action, which is performed after each unit test case ends.
// The number of execution times is the same as the number of test cases defined by **it**.
// This API supports only one parameter: clear action function.
})
afterAll(function () {
// Presets a clear action, which is performed after all test cases of the test suite end.
// This API supports only one parameter: clear action function.
})
it('assertContain',0, function () {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
hilog.info(0x0000, 'testTag', '%{public}s', 'it begin');
let a = 'abc'
let b = 'b'
// Defines a variety of assertion methods, which are used to declare expected boolean conditions.
expect(a).assertContain(b)
expect(a).assertEqual(a)
})
})
}
\ No newline at end of file
... ...
import abilityTest from './Ability.test'
export default function testsuite() {
abilityTest()
}
\ No newline at end of file
... ...
import UIAbility from '@ohos.app.ability.UIAbility';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
import hilog from '@ohos.hilog';
import { Hypium } from '@ohos/hypium';
import testsuite from '../test/List.test';
import window from '@ohos.window';
export default class TestAbility extends UIAbility {
onCreate(want, launchParam) {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:'+ JSON.stringify(launchParam) ?? '');
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}
onDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage) {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
windowStage.loadContent('testability/pages/Index', (err, data) => {
if (err.code) {
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
return;
}
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s',
JSON.stringify(data) ?? '');
});
}
onWindowStageDestroy() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
}
onForeground() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
}
onBackground() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
}
}
\ No newline at end of file
... ...
import hilog from '@ohos.hilog';
@Entry
@Component
struct Index {
aboutToAppear() {
hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear');
}
@State message: string = 'Hello World'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('35%')
.height('5%')
.onClick(()=>{
})
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
... ...
import hilog from '@ohos.hilog';
import TestRunner from '@ohos.application.testRunner';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
var abilityDelegator = undefined
var abilityDelegatorArguments = undefined
async function onAbilityCreateCallback() {
hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
}
async function addAbilityMonitorCallback(err: any) {
hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
}
export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
onPrepare() {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
}
async onRun() {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility'
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName
var debug = abilityDelegatorArguments.parameters['-D']
if (debug == 'true')
{
cmd += ' -D'
}
hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd);
abilityDelegator.executeShellCommand(cmd,
(err: any, d: any) => {
hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? '');
})
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
}
}
\ No newline at end of file
... ...
{
"module": {
"name": "entry_test",
"type": "feature",
"description": "$string:module_test_desc",
"mainElement": "TestAbility",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:test_pages",
"abilities": [
{
"name": "TestAbility",
"srcEntry": "./ets/testability/TestAbility.ets",
"description": "$string:TestAbility_desc",
"icon": "$media:icon",
"label": "$string:TestAbility_label",
"exported": true,
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:start_window_background",
"skills": [
{
"actions": [
"action.system.home"
],
"entities": [
"entity.system.home"
]
}
]
}
]
}
}
... ...
{
"color": [
{
"name": "start_window_background",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "module_test_desc",
"value": "test ability description"
},
{
"name": "TestAbility_desc",
"value": "the test ability"
},
{
"name": "TestAbility_label",
"value": "test label"
}
]
}
\ No newline at end of file
... ...
{
"hvigorVersion": "2.4.2",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "2.4.2"
}
}
... ...
This diff could not be displayed because it is too large.
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
export { appTasks } from '@ohos/hvigor-ohos-plugin';
\ No newline at end of file
... ...
#!/bin/bash
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
error() {
echo ""
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
fail() {
error "$@"
exit 1
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi
else
EXECUTABLE_NODE="node"
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
fi
# Check hvigor wrapper script
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
fi
# start hvigor-wrapper script
exec "${EXECUTABLE_NODE}" \
"${HVIGOR_WRAPPER_SCRIPT}" "$@"
... ...
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Hvigor startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
set NODE_EXE=node.exe
goto start
:start
@rem Find node.exe
if defined NODE_HOME goto findNodeFromNodeHome
%NODE_EXE% --version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:findNodeFromNodeHome
set NODE_HOME=%NODE_HOME:"=%
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
if exist "%NODE_EXE_PATH%" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:execute
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
if "%ERRORLEVEL%" == "0" goto hvigorwEnd
:fail
exit /b 1
:hvigorwEnd
if "%OS%" == "Windows_NT" endlocal
:end
... ...
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
}
}
}
\ No newline at end of file
... ...
{
"license": "",
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"author": "",
"name": "peopledaily_harmony",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {}
}
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
}
]
}
\ No newline at end of file
... ...
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hspTasks
... ...
{
"name": "wdcomponent",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "./src/main/ets/Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
}
}
\ No newline at end of file
... ...
export { PageViewModel } from "./viewmodel/PageViewModel"
export { EmptyComponent } from "./components/EmptyComponent"
export { ErrorComponent } from "./components/ErrorComponent"
export { LoadingComponent } from "./components/LoadingComponent"
export { PageComponent } from "./components/PageComponent"
export { BottomNavigationComponent } from "./components/BottomNavigationComponent"
export { TopNavigationComponent } from "./components/TopNavigationComponent"
export { LabelComponent } from "./components/LabelComponent"
\ No newline at end of file
... ...
import { BottomNavi, CommonConstants } from 'wdConstant';
import { LazyDataSource, Logger } from 'wdKit';
import { TopNavigationComponent } from './TopNavigationComponent';
import { PageComponent } from './PageComponent';
import { BottomNavDTO } from '../repository/bean/BottomNavDTO';
import { PageViewModel } from '../Index';
const TAG = 'BottomNavigationComponent';
/**
* 底部页签导航栏/底导
*/
@Component
export struct BottomNavigationComponent {
// 底导/顶导全部数据
@State @Watch('onBottomNavigationDataUpdated') bottomNavList: BottomNavDTO[] = []
// 底导当前选中/焦点下标
@Provide currentNavIndex: number = BottomNavi.NEWS;
// 底导TabsController
private navController: TabsController = new TabsController();
readonly ASPECT_RATIO_1_1: number = 1 / 1; // 底导图片宽高比
/**
* Component opacity value: 1.
*/
readonly FULL_OPACITY: number = 1;
/**
* Component opacity value: 0.6.
*/
readonly SIXTY_OPACITY: number = 0.6;
async aboutToAppear() {
Logger.info(TAG, `aboutToAppear currentNavIndex: ${this.currentNavIndex}`);
let bottomNav = await PageViewModel.getBottomNavData(getContext(this))
if (bottomNav) {
Logger.info(TAG, `aboutToAppear, bottomNav.length: ${bottomNav.length}`);
this.bottomNavList = bottomNav
}
}
aboutToDisappear() {
Logger.info(TAG, `aboutToDisappear, this.currentNavIndex: ${this.currentNavIndex}`);
}
build() {
Tabs({ barPosition: BarPosition.End, index: this.currentNavIndex, controller: this.navController }) {
ForEach(this.bottomNavList, (navItem: BottomNavDTO, index: number) => {
TabContent() {
Column() {
if (navItem.topNavChannelList && navItem.topNavChannelList.length == 0 && navItem.name == '我的') {
PageComponent({ compList: new LazyDataSource() }) // todo:我的页面组件数据列表
} else {
TopNavigationComponent({ topNavList: navItem.topNavChannelList })
}
}
}
.tabBar(this.tabBarBuilder(navItem, index))
});
}
.barHeight($r('app.float.bottom_navigation_barHeight'))
.barMode(BarMode.Fixed)
.onChange((index: number) => {
Logger.info(TAG, `onChange, index: ${index}`);
this.currentNavIndex = index;
// this.onBottomNavigationIndexChange()
})
}
@Builder
tabBarBuilder(navItem: BottomNavDTO, index: number) {
Stack({ alignContent: Alignment.Bottom }) {
Image(this.currentNavIndex === index ? navItem.iconC : navItem.icon)
.height(CommonConstants.FULL_PARENT)
.padding({ bottom: 15, left: 10, right: 10, top: 2 })
.aspectRatio(this.ASPECT_RATIO_1_1)
Text(navItem.name)
.margin({ bottom: $r('app.float.bottom_navigation_margin_bottom') })
.fontWeight(this.currentNavIndex === index ? FontWeight.Bold : FontWeight.Normal)
.textAlign(TextAlign.Center)
.fontSize($r('app.float.font_size_10'))
.fontColor(this.currentNavIndex === index ? Color.Red : Color.Gray)
.opacity(this.currentNavIndex === index ? this.FULL_OPACITY : this.SIXTY_OPACITY)
}
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
// .justifyContent(FlexAlign.Center)
// .onClick(() => {
// Logger.info(TAG, `onClick, index: ${index}`);
// this.currentNavIndex = index ?? 0;
// this.navController.changeIndex(this.currentNavIndex);
// })
}
// 底导切换函数
onBottomNavigationIndexChange() {
Logger.info(TAG, `onBottomNavigationIndexChange this.currentNavIndex: ${this.currentNavIndex}`);
// 请求顶导数据(参数):
}
onBottomNavigationDataUpdated() {
// Logger.info(TAG, `onBottomNavigationDataUpdated currentNavIndex: ${this.currentNavIndex},length:${this.bottomNavItemList.length}`);
this.onBottomNavigationIndexChange()
}
}
\ No newline at end of file
... ...
import { CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
const TAG = 'EmptyComponent';
/**
* 空数据/无数据
*/
@Component
export struct EmptyComponent {
// private emptySize: SizeOptions = {};
@State emptyWidth: string | number = CommonConstants.FULL_PARENT;
@State emptyHeight: string | number = CommonConstants.FULL_PARENT;
/**
* The empty image width percentage setting.
*/
readonly EMPTY_IMAGE_WIDTH: string = '50%';
/**
* The empty image height percentage setting.
*/
readonly EMPTY_IMAGE_HEIGHT: string = '30%';
/**
* The empty data text component margin top.
*/
readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%';
/**
* The empty data text opacity.
*/
readonly TEXT_OPACITY: number = 0.4;
build() {
this.noProgrammeData();
}
/**
* 无数据,空白view组件
*/
@Builder
noProgrammeData() {
Column() {
// Image($r('app.media.icon_no_content'))
// .width(this.EMPTY_IMAGE_WIDTH)
// .height(this.EMPTY_IMAGE_HEIGHT)
// .objectFit(ImageFit.Contain)
// // .border({ width: 1, color: Color.Red, radius: 6 })
Text(this.buildNoDataTip())
.fontSize($r('app.float.normal_text_size'))
.fontColor('#B2B2B2')
.fontWeight(FontWeight.Normal)
.opacity(this.TEXT_OPACITY)
.margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP })
.onClick((event: ClickEvent) => {
Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`);
})
}
.justifyContent(FlexAlign.Center)
.width(this.emptyWidth)
.height(this.emptyHeight)
}
buildNoDataTip(): Resource | string {
Logger.info(TAG, "buildNoDataTip");
return $r('app.string.load_net_data_none')
}
}
\ No newline at end of file
... ...
import { CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
const TAG = 'ErrorComponent';
/**
* failed失败/出错页面
*/
@Component
export struct ErrorComponent {
// private emptySize: SizeOptions = {};
@State emptyWidth: string | number = CommonConstants.FULL_PARENT;
@State emptyHeight: string | number = CommonConstants.FULL_PARENT;
/**
* The empty image width percentage setting.
*/
readonly EMPTY_IMAGE_WIDTH: string = '50%';
/**
* The empty image height percentage setting.
*/
readonly EMPTY_IMAGE_HEIGHT: string = '30%';
/**
* The empty data text component margin top.
*/
readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%';
/**
* The empty data text opacity.
*/
readonly TEXT_OPACITY: number = 0.4;
build() {
this.errorView();
}
/**
* 失败view
*/
@Builder
errorView() {
Column() {
// Image($r('app.media.ic_no_data'))
// .width(this.EMPTY_IMAGE_WIDTH)
// .height(this.EMPTY_IMAGE_HEIGHT)
// .objectFit(ImageFit.Contain)
// // .border({ width: 1, color: Color.Red, radius: 6 })
Text(this.buildFailedTip())
.fontSize($r('app.float.normal_text_size'))
.fontColor(Color.Black)
.fontWeight(FontWeight.Normal)
.opacity(this.TEXT_OPACITY)
.margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP })
.onClick((event: ClickEvent) => {
Logger.info(TAG, `errorView onClick event.source: ${event.source}`);
})
}
.justifyContent(FlexAlign.Center)
.width(this.emptyWidth)
.height(this.emptyHeight)
}
buildFailedTip(): Resource | string {
Logger.info(TAG, "buildFailedTip");
return $r('app.string.load_net_data_failed')
}
}
\ No newline at end of file
... ...
import { CommonConstants } from 'wdConstant';
import { CompDTO } from '../repository/bean/CompDTO';
import { CompUtils } from '../utils/CompUtils';
const TAG = 'LabelComponent';
/**
* 标题/标签组件(暂时仅展示主标题,不展示子标题)
* Label-03
* 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/
*/
@Entry
@Component
export struct LabelComponent {
@State compDTO: CompDTO = {} as CompDTO
build() {
Row() {
Text(CompUtils.getLabelTitle(this.compDTO.extraData))
.width(CommonConstants.FULL_PARENT)
.padding({
left: $r('app.float.main_margin'),
right: $r('app.float.main_margin'),
top: $r('app.float.label_margin_top'),
bottom: $r('app.float.label_margin_bottom')
})
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(1)// .backgroundColor(Color.Yellow)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
}
.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.Start)
}
}
\ No newline at end of file
... ...
import { CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
const TAG = 'LoadingComponent';
/**
* Loading/网络数据加载中
*/
@Component
export struct LoadingComponent {
@State emptyWidth: string | number = CommonConstants.FULL_PARENT;
@State emptyHeight: string | number = CommonConstants.FULL_PARENT;
/**
* The empty image width percentage setting.
*/
readonly EMPTY_IMAGE_WIDTH: string = '50%';
/**
* The empty image height percentage setting.
*/
readonly EMPTY_IMAGE_HEIGHT: string = '30%';
/**
* The empty data text component margin top.
*/
readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%';
/**
* The empty data text opacity.
*/
readonly TEXT_OPACITY: number = 0.4;
build() {
this.loadingView();
}
/**
* loading
*/
@Builder
loadingView() {
Column() {
// Image($r('app.media.ic_no_data'))
// .width(this.EMPTY_IMAGE_WIDTH)
// .height(this.EMPTY_IMAGE_HEIGHT)
// .objectFit(ImageFit.Contain)
// .border({ width: 1, color: Color.Red, radius: 6 })
Text(this.buildLoadingTip())
.fontSize($r('app.float.normal_text_size'))
.fontColor(Color.Black)
.fontWeight(FontWeight.Normal)
.opacity(this.TEXT_OPACITY)
.margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP })
.onClick((event: ClickEvent) => {
Logger.info(TAG, `loadingView onClick event.source: ${event.source}`);
})
}
.justifyContent(FlexAlign.Center)
.width(this.emptyWidth)
.height(this.emptyHeight)
}
buildLoadingTip(): Resource | string {
Logger.info(TAG, "buildLoadingTip");
return $r('app.string.load_net_data_loading')
}
}
\ No newline at end of file
... ...
import { CommonConstants, CompStyle, ViewType } from 'wdConstant';
import { LazyDataSource, Logger } from 'wdKit';
import { CompDTO } from '../repository/bean/CompDTO';
import { PageViewModel } from '../viewmodel/PageViewModel';
import { EmptyComponent } from './EmptyComponent';
import { ErrorComponent } from './ErrorComponent';
import { LabelComponent } from './LabelComponent';
import { LoadingComponent } from './LoadingComponent';
const TAG = 'PageComponent';
@Component
export struct PageComponent {
@State viewType: number = ViewType.LOADED;
// Group数据及子组件数据
@State compList: LazyDataSource<CompDTO> = new LazyDataSource();
@State currentTopNavSelectedIndex: number = 0;
build() {
if (this.viewType == ViewType.LOADING) {
LoadingComponent()
} else if (this.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.viewType == ViewType.EMPTY) {
EmptyComponent()
} else {
List() {
LazyForEach(this.compList, (compDTO: CompDTO, compIndex: number) => {
ListItem() {
Column() {
this.componentBuilder(compDTO, compIndex)
}
}
})
}
.cachedCount(5)
.height(CommonConstants.FULL_PARENT)
}
}
@Builder
componentBuilder(compDTO: CompDTO, compIndex: number) {
if (compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: compDTO })
} else {
// todo:组件未实现 / Component Not Implemented
Text(compDTO.compStyle)
.width(CommonConstants.FULL_PARENT)
.padding(10)
// .backgroundColor(Color.Brown) // 展示本页未实现的compStyle
}
}
async aboutToAppear() {
Logger.info(TAG, `aboutToAppear, this.pageId: ${this.viewType} this.currentTopNavSelectedIndex: ${this.currentTopNavSelectedIndex}`);
if (this.currentTopNavSelectedIndex === 1) { // 顶导tab的第0个item是【热点】,第1个item是【推荐】
this.compList.replaceAll()
let pageDto = await PageViewModel.getPageData2(getContext(this))
if (pageDto && pageDto.compList) {
this.compList.push(...pageDto.compList)
}
} else {
let pageDto = await PageViewModel.getPageData1(getContext(this))
if (pageDto && pageDto.compList) {
this.compList.push(...pageDto.compList)
}
}
}
}
... ...
import { LazyDataSource, Logger } from 'wdKit';
import { CompDTO } from '../repository/bean/CompDTO';
import { TopNavDTO } from '../repository/bean/TopNavDTO';
import { PageComponent } from './PageComponent';
const TAG = 'TopNavigationComponent';
/**
* 顶部页签导航栏/顶导
*/
@Component
export struct TopNavigationComponent {
// 顶导当前选中/焦点下标
@State currentTopNavSelectedIndex: number = 0;
// 顶导数据
@State @Watch('onTopNavigationDataUpdated') topNavList: TopNavDTO[] = []
@State compList: LazyDataSource<CompDTO> = new LazyDataSource();
readonly MAX_LINE: number = 1;
build() {
Tabs() {
ForEach(this.topNavList, (navItem: TopNavDTO, index: number) => {
TabContent() {
PageComponent({ currentTopNavSelectedIndex: index })
}
.tabBar(this.tabBarBuilder(navItem, index))
}, (navItem: TopNavDTO) => JSON.stringify(navItem));
}
.barHeight($r('app.float.top_tab_bar_height'))
.barMode(BarMode.Scrollable)
.vertical(false)
.onChange((index: number) => {
Logger.info(TAG, `onChange index : ${index}`);
this.currentTopNavSelectedIndex = index;
})
}
@Builder
tabBarBuilder(item: TopNavDTO, index: number) {
Column() {
Text(item.name)
.fontSize(this.currentTopNavSelectedIndex === index ? $r('app.float.selected_text_size') : $r('app.float.normal_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(Color.Black)
.padding({ top: $r('app.float.top_tab_item_padding_top') })
.maxLines(this.MAX_LINE)
Divider()
.width(16)
.strokeWidth(2) // 分割线粗细度。
.padding({ top: 2 })
.color(Color.Red)
.opacity(this.currentTopNavSelectedIndex === index ? 1 : 0)
}
.hoverEffect(HoverEffect.Highlight)
.constraintSize({
minWidth: $r('app.float.top_tab_item_min_width'),
maxWidth: $r('app.float.top_tab_item_max_width')
})
// .backgroundColor(Color.Black)
.padding({
left: $r('app.float.top_tab_item_padding_horizontal'),
right: $r('app.float.top_tab_item_padding_horizontal'),
bottom: $r('app.float.top_tab_item_padding_bottom')
})
.id(`col_tabBar${index}`)
}
aboutToAppear() {
Logger.info(TAG, `aboutToAppear this.topNavList : ${JSON.stringify(this.topNavList)}`);
}
onTopNavigationDataUpdated() {
Logger.info(TAG, `onTopNavigationDataUpdated currentTopNavIndex: ${this.currentTopNavSelectedIndex},topNavList.length:${this.topNavList.length}`);
}
}
\ No newline at end of file
... ...
import { ResponseDTO, WDHttp } from 'wdNetwork';
import { NavigationBodyDTO } from './bean/NavigationBodyDTO';
import { PageDTO } from './bean/PageDTO';
export class PageRepository {
static fetchNavigationDataApi(url: string) {
return WDHttp.get<ResponseDTO<NavigationBodyDTO>>(url)
};
static fetchPageData(url: string) {
return WDHttp.get<ResponseDTO<PageDTO>>(url)
};
}
\ No newline at end of file
... ...
import { Params } from './Params';
// 事件对象
export interface Action {
type: string;
params?: Params; // 参数集合
}
\ No newline at end of file
... ...
import { TopNavDTO } from './TopNavDTO';
/**
* 底导(包含顶导列表)数据
*/
export interface BottomNavDTO {
backgroundUrl: string;
channelChooseActionUrl: string;
channelChooseCColor: string;
channelChooseColor: string;
channelMoreColor: string;
extraData: string;
homePageColor: string;
icon: string;
iconC: string;
id: number;
immersiveIconCUrl: string;
immersiveIconUrl: string;
immersiveNameCColor: string;
immersiveNameColor: string;
logoUrl: string;
morningAndEveningUrl: string;
name: string;
nameCColor: string;
nameColor: string;
nightIconCUrl: string;
nightIconUrl: string;
nightNameCColor: string;
nightNameColor: string;
noticeColor: string;
pageId?: string;
pageType?: string;
searchBothColor: string;
searchUrl: string;
sortValue: number;
statusBarColor: number;
topNavChannelList: TopNavDTO[];
topStyle: string;
type: string;
}
\ No newline at end of file
... ...
import { ContentDTO } from './ContentDTO';
export interface CompDTO {
backgroundColor: string;
backgroundImgUrl: string;
cityCode: string;
compStyle: string;
compType: string;
// dataSourceRequest: any[];
districtCode: string;
extraData?: string;
hasAdInfo: number;
id: number;
imgSize: string;
innerUrl: string;
linkUrl: string;
// meddleDataList: any[];
name: string;
objectId: string; // 跳转页面id?
objectTitle: string; // comp标题
// objectType?: any; // 跳转类型,枚举:
operDataList: ContentDTO[]; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】
// pageId?: any;
posterSize: string;
posterUrl: string;
provinceCode: string;
sortValue: number;
subType: string;
}
\ No newline at end of file
... ...
export interface ContentDTO {
cityCode: string;
coverSize: string;
coverType: number;
coverUrl: string;
description: string;
districtCode: string;
endTime: string;
hImageUrl: string;
heatValue: string;
innerUrl: string;
landscape: number;
// lengthTime?: any;
linkUrl: string;
openLikes: number;
openUrl: string;
pageId: string;
// playUrls: any[];
programAuth: string;
programId: string;
programName: string;
programSource: number;
programType: number;
provinceCode: string;
// rankingList: any[];
showTitleEd: string;
showTitleIng: string;
showTitleNo: string;
// sortValue?: any;
startTime: string;
subType: string;
subtitle: string;
title: string;
vImageUrl: string;
screenType: string;
}
\ No newline at end of file
... ...
import { ItemDTO } from './ItemDTO';
/**
* 绑定到组件comp/view的数据Bean
*/
@Observed
// export abstract class ItemBean<DTO> implements Mapper<DTO> {
export abstract class ItemBean {
action?: Action; // 事件行为
actionId?: string; // 点击事件id
pics?: Pic
// h5pics?: Pic;
landscapeCover?: string; // 横向低分辨封面图片
portraitCover?: string; // 竖向低分辨封面图片
highLandscapeCover?: string; // 横向高分辨封面图片
highPortraitCover?: string; // 竖向高分辨封面图片
lowResolutionV34?: string; // 低清竖图(3:4比例), 取图逻辑 3:4低清竖图-->3:4高清竖图-->低分辨率竖图-->高分辨率竖图
highResolutionV34?: string; // 高清竖图(3:4比例), 取图逻辑 3:4高清竖图-->3:4低清竖图-->高分辨率竖图-->低分辨率竖图
/**
* 是否被曝光
*/
exposed: boolean;
/**
* 曝光位置
*/
position: string;
constructor(dto?: ItemDTO) {
if (dto) {
this.action = dto.action
this.actionId = dto.actionId
this.pics = dto.pics
// this.h5pics = dto.h5pics
this.landscapeCover = !dto.pics ? "" : !dto.pics.lowResolutionH ? dto.pics.highResolutionH : dto.pics.lowResolutionH;
this.portraitCover = !dto.pics ? "" : !dto.pics.lowResolutionV ? dto.pics.highResolutionV : dto.pics.lowResolutionV;
this.highLandscapeCover = !dto.pics ? "" : !dto.pics.highResolutionH ? dto.pics.lowResolutionH : dto.pics.highResolutionH;
this.highPortraitCover = !dto.pics ? "" : !dto.pics.highResolutionV ? dto.pics.lowResolutionV : dto.pics.highResolutionV;
this.lowResolutionV34 = !dto.pics ? "" : (!dto.pics.lowResolutionV34 ? dto.pics.lowResolutionV34 : (!dto.pics.highResolutionV34 ? dto.pics.highResolutionV34 : this.portraitCover));
this.highResolutionV34 = !dto.pics ? "" : (!dto.pics.highResolutionV34 ? dto.pics.highResolutionV34 : (!dto.pics.lowResolutionV34 ? dto.pics.lowResolutionV34 : this.highPortraitCover));
}
this.exposed = false
this.position = "0"
}
public setAction(action: Action): void {
this.action = action
}
public getAction(): Action {
return this.action ?? {} as Action
}
}
... ...
import { Action } from './Action';
/**
* 组件comp/view对应的服务端数据
* DTO 数据传输实体类接口,所有数据传输层数据结构体需实现该接口
*/
export interface ItemDTO {
action?: Action; // 事件对象
actionId?: string; // 点击事件id
// pics?: Pic // 图片
}
... ...
import { BottomNavDTO } from './BottomNavDTO';
/**
* 导航Body数据
*/
export interface NavigationBodyDTO {
backgroundColor: string;
bottomNavList: BottomNavDTO[];
// greyBottomNav: GreyBottomNav;
immersiveBackgroundColor: string;
nightBackgroundColor: string;
}
... ...
import { CompDTO } from './CompDTO';
/**
* Page数据DTO
*/
export interface PageDTO {
pageId: string; // 页面id
id: number; // 楼层id
name: string; // 名称
branchMark: boolean;
compList: CompDTO[]; // Components集合的布局信息
}
\ No newline at end of file
... ...
import { ExtraDTO } from './extra/ExtraDTO';
// Params定义-----------根据不同Type类型可定制指定参数
export interface Params {
// 跳转目标页面ID
pageID: string;
path?: string; // 需要跳转/刷新的内部路径,这个路径可以是pageID,也可是compID
url?: string; // 需要跳转到的URL地址/H5打开链接
extra?: ExtraDTO; // 跳转时额外需要带的参数:map<String,String> 即仅有一层的json
}
... ...
/**
* 顶导
*/
export interface TopNavDTO {
channelId: number;
channelStyle: number;
channelType: number;
defaultPermitted: number;
delPermitted: number;
fontCColor: string;
fontColor: string;
headlinesOn: number;
homeChannel: string;
iconCUrl: string;
iconCUrlSize: string;
iconUrl: string;
iconUrlSize: string;
localChannel: string;
moreChannel: string;
movePermitted: number;
myChannel: string;
name: string;
num: number;
pageId: number;
pageType: string;
underlineCColor: string;
}
... ...
import { ItemDTO } from '../ItemDTO';
import { LabelDTO } from './LabelDTO';
// 附加字段集合,不同组件,额外附加参数不同
export interface ExtraDTO extends ItemDTO {
labels?: LabelDTO[];
}
\ No newline at end of file
... ...
import { ItemBean } from '../../ItemBean';
import { LabelDTO } from './LabelDTO';
@Observed
export class LabelBean extends ItemBean {
titleIconUrl?: string;
title: string;
constructor(dto: LabelDTO) {
super(dto);
this.titleIconUrl = dto.titleIconUrl;
this.title = dto.title;
}
}
\ No newline at end of file
... ...
import { ItemDTO } from '../ItemDTO';
/**
* 标题 —— 标题(LABEL)
*/
export interface LabelDTO extends ItemDTO {
titleIconUrl?: string; // icon图片/小图标
title: string; // 标题,如:重磅推荐/热门视频彩铃/更多下饭剧/4K超高清/更多>/更多动画
}
\ No newline at end of file
... ...
import { Logger } from 'wdKit';
import { LabelDTO } from '../repository/bean/extra/LabelDTO';
const TAG: string = 'CompCornerUtil';
/**
* 与组件布局(边距/间距/圆角半径)相关的数字
*/
export class CompUtils {
/**
* The max lines.
*/
public static readonly MAX_LINES_1: number = 1;
public static readonly MAX_LINES_2: number = 2;
public static readonly MAX_LINES_3: number = 3;
/**
* 获取Label标题
*
* @param component 组件bean
* @return Label标题
*/
static getLabelTitle(extraData?: string): string {
if (!extraData) {
return ""
}
let labelDTO = JSON.parse(extraData) as LabelDTO
if (!labelDTO) {
Logger.info(TAG, 'getLabelTitle, labels is null');
return ""
}
return labelDTO.title ?? "";
}
}
... ...
import { Logger, ResourcesUtils } from 'wdKit';
import { ResponseDTO, } from 'wdNetwork';
import { PageRepository } from '../repository/PageRepository';
import http from '@ohos.net.http';
import { NavigationBodyDTO } from '../repository/bean/NavigationBodyDTO';
import { BottomNavDTO } from '../repository/bean/BottomNavDTO';
import { PageDTO } from '../repository/bean/PageDTO';
const TAG = 'PageViewModel';
/**
* 处理返回后的数据
*/
export class PageViewModel {
/**
* get Nav Data from Resource .
*
* @return BottomNavBean[] Nav Data List
*/
static async getBottomNavData(context: Context): Promise<BottomNavDTO[]> {
Logger.info(TAG, `getBottomNavData start`);
let compRes: ResponseDTO<NavigationBodyDTO> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<NavigationBodyDTO>>(context, 'bottom_nav.json');
if (!compRes || !compRes.data || !compRes.data.bottomNavList) {
Logger.info(TAG, `getBottomNavData compRes bottomNavList is empty`);
return []
}
Logger.info(TAG, `getBottomNavData getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`);
return compRes.data.bottomNavList
}
static getNavData(url: string): Promise<NavigationBodyDTO> {
return new Promise<NavigationBodyDTO>((success, error) => {
Logger.info(TAG, `getNavData start`);
PageRepository.fetchNavigationDataApi(url).then((navResDTO: ResponseDTO<NavigationBodyDTO>) => {
if (!navResDTO) {
Logger.error(TAG, 'getNavData then navResDTO is empty');
error('navResDTO is empty');
return
}
if (navResDTO.code != http.ResponseCode.OK) {
Logger.error(TAG, `getNavData then code:${navResDTO.code}, message:${navResDTO.message}`);
error('navResDTO Response Code is failure');
return
}
if (!navResDTO.data?.bottomNavList) {
error('navResDTO list is empty');
return
}
// let navResStr = JSON.stringify(navResDTO);
Logger.info(TAG, "getNavData then,navResDTO.timeStamp:" + navResDTO.timestamp);
let navigationBean = navResDTO.data
success(navigationBean);
}).catch((err: Error) => {
Logger.error(TAG, `fetchNavigationDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
/**
* Get PageDTO data.
*
* @return {GroupDTO} compRes.data
*/
static async getPageData1(context: Context): Promise<PageDTO> {
let compRes: ResponseDTO<PageDTO> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<PageDTO>>(context, 'comp_list0.json');
if (!compRes || !compRes.data) {
Logger.info(TAG, `getCompList compRes is empty`);
return {} as PageDTO
}
Logger.info(TAG, `getCompList getResourcesJson compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
/**
* Get Group data.
*
* @return {GroupDTO} compRes.data
*/
static async getPageData2(context: Context): Promise<PageDTO> {
let compRes: ResponseDTO<PageDTO> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<PageDTO>>(context, 'comp_list2.json');
if (!compRes || !compRes.data) {
Logger.info(TAG, `getCompList compRes is empty`);
return {} as PageDTO
}
Logger.info(TAG, `getCompList getResourcesJson compRes : ${JSON.stringify(compRes)}`);
return compRes.data
}
static getPageData(url: string): Promise<PageDTO> {
return new Promise<PageDTO>((success, error) => {
PageRepository.fetchPageData(url).then((resDTO: ResponseDTO<PageDTO>) => {
if (!resDTO) {
Logger.error(TAG, 'getPageData then resDTO is empty');
error("page data is empty");
return
}
if (resDTO.code != http.ResponseCode.OK || !resDTO.data) {
Logger.error(TAG, `getPageData then code:${resDTO.code}, message:${resDTO.message}`);
error(`get page data error code:${resDTO.code}, message:${resDTO.message}`);
return
}
Logger.info(TAG, "getPageData then,resDTO.timeStamp:" + resDTO.timestamp);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getPageData catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
}
let pageViewModel = new PageViewModel();
export default pageViewModel as PageViewModel;
\ No newline at end of file
... ...
{
"module": {
"name": "wdComponent",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
},
{
"name": "color_333333",
"value": "#333333"
},
{
"name": "color_666666",
"value": "#666666"
},
{
"name": "color_999999",
"value": "#999999"
},
{
"name": "color_FE4B05",
"value": "#FE4B05"
}
]
}
\ No newline at end of file
... ...
{
"float": [
{
"name": "font_size_10",
"value": "10fp"
},
{
"name": "font_size_11",
"value": "11fp"
},
{
"name": "font_size_12",
"value": "11fp"
},
{
"name": "font_size_14",
"value": "14fp"
},
{
"name": "font_size_16",
"value": "16fp"
},
{
"name": "normal_text_size",
"value": "16fp"
},
{
"name": "selected_text_size",
"value": "18fp"
},
{
"name": "font_size_24",
"value": "24fp"
},
{
"name": "main_margin",
"value": "14vp"
},
{
"name": "margin_8",
"value": "8vp"
},
{
"name": "label_margin_top",
"value": "10vp"
},
{
"name": "margin_bottom_16",
"value": "16vp"
},
{
"name": "label_margin_bottom",
"value": "8vp"
},
{
"name": "single_row_03_item_width",
"value": "158vp"
},
{
"name": "single_row_03_item_height",
"value": "160vp"
},
{
"name": "single_row_03_img_height",
"value": "88vp"
},
{
"name": "image_border_radius",
"value": "8vp"
},
{
"name": "border_radius_6",
"value": "6vp"
},
{
"name": "bottom_navigation_margin_bottom",
"value": "4vp"
},
{
"name": "bottom_navigation_barHeight",
"value": "50vp"
},
{
"name": "top_tab_bar_height",
"value": "40vp"
},
{
"name": "top_tab_item_max_width",
"value": "300vp"
},
{
"name": "top_tab_item_min_width",
"value": "20vp"
},
{
"name": "top_tab_item_padding_horizontal",
"value": "7vp"
},
{
"name": "top_tab_item_padding_bottom",
"value": "5vp"
},
{
"name": "top_tab_item_padding_top",
"value": "2vp"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "基础自定义组件库"
},
{
"name": "footer_text",
"value": "已经到底了"
}
]
}
\ No newline at end of file
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
}
]
}
\ No newline at end of file
... ...
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hspTasks
... ...
{
"name": "wdconstant",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "./src/main/ets/Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
}
}
\ No newline at end of file
... ...
export { CommonConstants } from './constants/CommonConstants';
export { ConfigConstants } from './constants/ConfigConstants';
// enum
export { BottomNavi } from './enum/BottomNavi';
export { CompStyle } from './enum/CompStyle';
export { CompType } from './enum/CompType';
export { NetDataStatusType } from './enum/NetDataStatusType';
export { ViewType } from './enum/ViewType';
export { DurationEnum } from './enum/DurationEnum';
\ No newline at end of file
... ...
/**
* The constant of Common.
*/
export class CommonConstants {
// offset
static readonly ZERO: number = 0;
static readonly NO_INDEX: number = -1;
static readonly NO_LENGTH: number = 0;
/**
* 布局相关.
*/
static readonly FULL_PARENT: string = '100%';
static readonly FULL_WIDTH: string = '100%';
static readonly FULL_HEIGHT: string = '100%';
/**
* Component opacity value: 1.
*/
static readonly FULL_OPACITY: number = 1;
}
;
... ...
/**
* Config Constants.
*/
export class ConfigConstants {
/**
* 应用id/appId
*
*/
static readonly appId: string = "";
/**
* 终端id/terminalId
*
*/
static readonly terminalId: string = "android";
/**
* 36_渠道编码(sappType)
*
*/
// static readonly appType: string = "2"; // wap
static readonly appType: string = "3"; // 手机客户端App(安卓)
static readonly clientType: string = "";
/**
* SourceID
*
*/
static readonly sourceId: string = "";
/**
* 产品渠道应用对照关系:
*/
static readonly appCode: string = "";
/**
* 基线代码和客户端应用版本号规范
*/
static readonly ptvCode: string = "";
/**
* 省份code/province(02->上海)
*/
static readonly province: string = "02";
/**
* 正在播放的节目ID
*/
static playingContentId?: string = undefined
/**
* 设备Id/deviceId
* 设备Id或者能标识请求端的唯一标识
*/
static readonly DEVICE_ID: string = "5bfed7be-0497-487f-990b-991e5b828a6e";
/**
* base url VOD
*/
static readonly BASE_URL_VOD: string = "";
/**
* base url Live
*/
static readonly BASE_URL_LIVE: string = "";
/**
* 获取用户信息的服务器
*/
static readonly BASE_URL: string = "";
/**
* 内容列表路径
*/
static readonly CONTENT_LIST_PATH: string = "/display/v4/static";
/**
* 电视台(直播)列表路径
*/
static readonly LIVE_TV_PATH: string = "/live/v2/tv-data";
/**
* 临时的详情URL
*/
static readonly DETAIL_URL = "https://pd-people-uat.pdnews.cn/h/contentTop/110?hiddenTopNavigation=true"
}
\ No newline at end of file
... ...
/**
* 常见图片宽/高比
*/
export const enum AspectRatioEnum {
// 常见纵向比例
ASPECT_RATIO_2_3 = 2 / 3,
ASPECT_RATIO_3_4 = 3 / 4,
ASPECT_RATIO_4_5 = 4 / 5,
ASPECT_RATIO_5_7 = 5 / 7,
ASPECT_RATIO_9_16 = 9 / 16,
ASPECT_RATIO_10_16 = 10 / 16,
ASPECT_RATIO_9_21 = 9 / 21,
// 正方形
ASPECT_RATIO_1_1 = 1 / 1,
// 常见横向比例
ASPECT_RATIO_7_5 = 7 / 5,
ASPECT_RATIO_5_4 = 5 / 4,
ASPECT_RATIO_4_3 = 4 / 3,
ASPECT_RATIO_3_2 = 3 / 2,
ASPECT_RATIO_16_10 = 16 / 10,
ASPECT_RATIO_16_9 = 16 / 9,
ASPECT_RATIO_21_9 = 21 / 9,
// 其他常见比例
ASPECT_RATIO_2_1 = 2 / 1, // banner图宽高比
ASPECT_RATIO_1_2 = 1 / 2,
ASPECT_RATIO_75_45 = 75 / 45, // 角标宽高比
}
... ...
/**
* 底部导航 Bottom navigation item的下标/索引
* 新闻 人民号、 视频、 服务、 我的
*/
export const enum BottomNavi {
NEWS = 0,
PEOPLE,
VIDEO,
SERVICE,
MINE,
}
... ...
/**
* 组件Style/展示样式
*/
export const enum CompStyle {
Label_03 = 'Label-03', // 标题卡:icon+文字
Carousel_Layout_01 = 'Carousel_Layout-01', // 通用轮播卡:视频、直播、活动、专题、榜单、外链
Carousel_Layout_02 = 'Carousel_Layout-02', // 直播轮播卡:直播
Single_Row_01 = 'Single_Row-01', // 三格方形小卡(排名):专题、活动
Single_Row_02 = 'Single_Row-02', // 通用横划卡:视频、直播、专题
Single_Row_03 = 'Single_Row-03', // 直播横划卡:直播
Single_Row_04 = 'Single_Row-04', // 三格方形小卡:专题、活动
Single_Row_05 = 'Single_Row-05', // 专题横划卡:视频、直播、专题、活动、榜单、外链
Single_Column_01 = 'Single_Column-01', // 大卡横屏视频:视频、直播
Single_Column_02 = 'Single_Column-02', // 活动卡:活动
Single_Column_03 = 'Single_Column-03', // 地域榜单:榜单
Single_Column_04 = 'Single_Column-04', // 大卡横屏(带背景):视频、直播
Single_Column_05 = 'Single_Column-05', // 海报图卡:/
Single_Column_06 = 'Single_Column-06', // 留言板卡:/
Grid_Layout_01 = 'Grid_Layout-01', // 横屏宫格卡:视频、直播
Grid_Layout_02 = 'Grid_Layout-02', // 竖屏宫格卡:视频、直播、榜单
Masonry_Layout_01 = 'Masonry_Layout-01', // 双列瀑布流/瀑布流卡:视频、直播、专题、活动
}
... ...
/**
* 组件Type/展示类型
*/
export const enum CompType {
LABEL = 'LABEL', // 标题组件
CAROUSEL_LAYOUT = 'CAROUSEL_LAYOUT', // 轮播组件,即Banner/焦点图
SINGLE_ROW = 'SINGLE_ROW', // 单行组件
SINGLE_COLUMN = 'SINGLE_COLUMN', // 单列组件
GRID_LAYOUT = 'GRID_LAYOUT', // 网格组件
MASONRY_LAYOUT = 'MASONRY_LAYOUT', // 瀑布流组件
}
... ...
/**
* 时间跨度/延时枚举常量值
*/
export const enum DurationEnum {
DURATION_MS_50 = 50, // 50毫秒
DURATION_MS_100 = 100, // 50毫秒
DURATION_MS_1000 = 1000, // 1秒/1000ms
DURATION_MS_1500 = 1500, // 1.5秒
DURATION_1 = 1000, // 1秒
DURATION_2 = 2000, // 2秒
DURATION_3 = 3000, // 3秒
DURATION_4 = 4000, // 4秒
}
... ...
/**
* 请求网络数据状态类型
*/
export const enum NetDataStatusType {
// 已初始化,但尚未发出请求
INITIAL = 0,
// 请求已取消/或无需网络请求/或不关心请求结果/或调用方没有设置回调callback
CANCEL,
// 已发出请求,但请求尚未返回;
LOADING,
// 请求已失败返回;
FAILED,
// 请求已成功返回;
LOADED
}
\ No newline at end of file
... ...
/**
* view展示种类
*/
export const enum ViewType {
// 已初始化,但尚未发出请求
INITIAL = 0,
// 加载中:已发出请求,但请求尚未返回;
LOADING,
// 数据加载失败(重试)/failure
ERROR,
// 结果为空/无数据/空view
EMPTY,
// 已加载结束/非失败/非空/可以是仅一页数据,即楼层数据列表PAGE_GROUP_LIST/
LOADED,
// 已加载的是tab导航数据(可嵌套page的楼层列表)
NAV_BAR
}
\ No newline at end of file
... ...
{
"module": {
"name": "wdConstant",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "description"
}
]
}
\ No newline at end of file
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
}
]
}
\ No newline at end of file
... ...
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hspTasks
... ...
{
"license": "Apache-2.0",
"devDependencies": {},
"author": "",
"name": "wdkit",
"description": "Please describe the basic information.",
"main": "./src/main/ets/Index.ets",
"version": "1.0.0",
"dependencies": {}
}
... ...
export { Logger } from "./utils/Logger"
export { ResourcesUtils } from './utils/ResourcesUtils'
export { StringUtils } from './utils/StringUtils'
export { CollectionUtils } from './utils/CollectionUtils';
export { BasicDataSource } from './utils/BasicDataSource';
export { LazyDataSource } from './utils/LazyDataSource'
... ...
/**
* IDataSource处理数据侦听器的基本实现
*/
export abstract class BasicDataSource<T> implements IDataSource {
private listeners: DataChangeListener[] = [];
constructor() {
}
// 获取数据总个数
public abstract totalCount(): number;
// 获取索引对应的Item数据
public abstract getData(index: number): T | undefined;
// 注册改变数据的控制器
public registerDataChangeListener(listener: DataChangeListener): void {
if (this.listeners.indexOf(listener) < 0) {
console.info('add DataChangeListener');
this.listeners.push(listener);
}
}
// 注销改变数据的控制器
public unregisterDataChangeListener(listener: DataChangeListener): void {
const pos = this.listeners.indexOf(listener);
if (pos >= 0) {
console.info('remove DataChangeListener');
this.listeners.splice(pos, 1);
}
}
// 通知控制器数据重新加载数据
public notifyDataReload(): void {
this.listeners.forEach(listener => {
listener.onDataReloaded();
})
}
// 通知控制器数据增加
public notifyDataAdd(index: number): void {
this.listeners.forEach(listener => {
listener.onDataAdd(index);
})
}
// 通知控制器数据位置变化
public notifyDataMove(from: number, to: number): void {
this.listeners.forEach(listener => {
listener.onDataMove(from, to);
})
}
// 通知控制器数据删除
public notifyDataDelete(index: number): void {
this.listeners.forEach(listener => {
listener.onDataDelete(index);
})
}
// 通知控制器数据变化
public notifyDataChange(index: number): void {
this.listeners.forEach(listener => {
listener.onDataChange(index);
})
}
}
\ No newline at end of file
... ...
export function add(a:number, b:number) {
return a + b;
}
\ No newline at end of file
... ...
import LinkList from '@ohos.util.List';
import HashMap from '@ohos.util.HashMap';
/**
* CollectionUtils class.
*/
export class CollectionUtils {
/**
* The Array utils tag.
*/
private static readonly TAG: string = 'CollectionUtils';
/**
* Check collection is empty or not.
* @param collection any[]
* @returns {boolean} true(empty)
*/
static isEmpty(collection?: any[]): boolean {
return !collection || collection.length === 0;
}
// static isEmptyList<T>(list1?: LinkList<T>): boolean {
// return !list1 || list1.length === 0;
// }
//
// static isEmptyHashMap(obj?: HashMap<any, any>): boolean {
// if (!obj) {
// return true;
// }
// return obj.isEmpty();
// }
//
// static isEmptyMap(obj?: Map<any, any>): boolean {
// if (!obj) {
// return true;
// }
// return Object.keys(obj).length === 0 && obj.constructor === Object;
// }
//
// static isEmptyRecord(obj?: Record<string, string>): boolean {
// if (!obj) {
// return true;
// }
// return Object.keys(obj).length === 0 && obj.constructor === Object;
// }
/**
* Check collection is empty or not.
* @param collection any[]
* @returns {boolean} true(not empty)
*/
static isNotEmpty(collection?: any[]): boolean {
if (!collection) {
return false
}
return collection.length > 0;
}
static getLength(collection?: any[]): number {
return CollectionUtils.isEmpty(collection) ? 0 : collection.length;
}
static getElement(collection?: any[], index?: number): any {
if (CollectionUtils.isEmpty(collection) || index === undefined) {
return null;
}
return index >= 0 && index < collection.length ? collection[index] : null;
}
static isArray(value: any): boolean {
if (typeof Array.isArray === 'function') {
return Array.isArray(value);
} else {
return Object.prototype.toString.call(value) === '[object Array]';
}
}
}
... ...
/**
* 日期/时间工具
*/
// let myDate = new Date();
// myDate.getTime() // 获取以毫秒为单位的时间值。
// myDate.getFullYear(); // 获取完整的年份(4位,1970-????)
// myDate.getMonth(); // 获取myDate月份(0-11,0代表1月)
// myDate.getDate(); // 获取myDate日期(1-31)
// myDate.getDay(); // 获取myDate星期X(0-6,0代表星期天)
// myDate.getTime(); // 获取myDate时间(从1970.1.1开始的毫秒数)
// myDate.getHours(); // 获取myDate小时数(0-23)
// myDate.getMinutes(); // 获取myDate分钟数(0-59)
// myDate.getSeconds(); // 获取myDate秒数(0-59)
// myDate.getMilliseconds(); // 获取myDate毫秒数(0-999)
// myDate.toLocaleDateString(); // 获取当前日期:使用当前或指定的区域设置将日期转换为字符串。
// myDate.toLocaleTimeString(); // 获取当前时间:使用当前或指定的区域设置将时间转换为字符串。
// myDate.toLocaleString(); // 获取日期与时间:使用当前或指定的区域设置将日期和时间转换为字符串
// 日期时间的年月日时分秒以及毫秒的各个字段
export class Opt {
year: string = ''; // 年 小写y
month: string = ''; // 月 大写M
day: string = ''; // 日 小写d
hour: string = ''; // 时 大写H(24小时制)
// hh: string = ''; // 时 小写H(12小时制)
minute: string = ''; // 分 小写m
second: string = ''; // 秒 小写s
millisecond: string = ''; // 毫秒 大写S
}
export class DateTimeUtils {
// 日期+时间格式
static readonly PATTERN_DATE_TIME_DEFAULT: string = 'yyyyMMddHHmmss'; // 年月日时分秒
static readonly PATTERN_DATE_TIME_HYPHEN: string = 'yyyy-MM-dd HH:mm:ss'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
static readonly PATTERN_DATE_TIME_HYPHEN_MS: string = 'yyyy-MM-dd HH:mm:ss.SSS'; // 日期中包含连字符/中划线(HYPHEN),时间是以冒号(Colon)分割
static readonly PATTERN_DATE_TIME_SLASH: string = 'yyyy/MM/dd HH:mm:ss'; // 日期中包含正斜杠(forward slash '/')
static readonly PATTERN_DATE_TIME_BACK_SLASH: string = 'yyyy\\MM\\dd HH:mm:ss'; // 日期中包含反斜杠(back slash '\')
static readonly PATTERN_DATE_TIME_DOT: string = 'yyyy.MM.dd HH:mm:ss'; // 日期中包含英文小圆点(DOT '.')
static readonly PATTERN_DATE_TIME_CN: string = 'yyyy年MM月dd日 HH:mm:ss'; // 日期中包含包含中文年月日
static readonly PATTERN_DATE_TIME_MS: string = 'yyyyMMddHHmmssSSS'; // 时间中包含毫秒
static readonly PATTERN_DATE_TIME_WITHOUT_SECOND: string = 'yyyyMMddHHmm'; // 时间中不包含秒
static readonly PATTERN_DATE_TIME_SIMPLIFY: string = 'MM/dd HH:mm'; // 精简的日期+时间(不包含年份和秒), 月/日 时:分
// 仅日期格式(不包含时间)
static readonly PATTERN_DATE_DEFAULT: string = 'yyyyMMdd'; // 年月日
static readonly PATTERN_DATE_HYPHEN: string = 'yyyy-MM-dd'; // 日期中包含连字符/中划线(HYPHEN)
static readonly PATTERN_DATE_SLASH: string = 'yyyy/MM/dd'; // 日期中包含正斜杠(forward slash '/')
static readonly PATTERN_DATE_BACK_SLASH: string = 'yyyy\\MM\\dd'; // 日期中包含反斜杠(back slash '\')
static readonly PATTERN_DATE_DOT: string = 'yyyy.MM.dd'; // 日期中包含英文小圆点(DOT '.')
static readonly PATTERN_DATE_CN: string = 'yyyy年MM月dd日'; // 日期中包含包含中文年月日
static readonly PATTERN_DATE_SLASH_WITHOUT_YEAR: string = 'MM/dd'; // 日期中不包含年份
static readonly PATTERN_DATE_CN_WITHOUT_YEAR: string = 'MM月dd日'; // 日期中不包含年份,且month与day是中文
// 仅时间格式(不包含日期)
static readonly PATTERN_TIME_DEFAULT: string = 'HHmmss'; // 时分秒
static readonly PATTERN_TIME_COLON: string = 'HH:mm:ss'; // 时间是以冒号(Colon)分割
static readonly PATTERN_TIME_MS: string = 'HHmmssSSS'; // 时间中包含毫秒
static readonly PATTERN_TIME_COLON_DOT_MS: string = 'HH:mm:ss.SSS'; // 时间是以冒号(Colon)与点号(DOT)分割,且包含毫秒
static readonly PATTERN_TIME_WITHOUT_SECOND: string = 'HHmm'; // 时间中不包含秒
static readonly PATTERN_TIME_COLON_WITHOUT_SECOND: string = 'HH:mm'; // 时间是以冒号(Colon)分割,且不包含秒
static readonly PATTERN_TIME_COLON_WITHOUT_HOUR: string = 'mm:ss'; // 时间是以冒号(Colon)分割,且不包含小时(分钟长度至少2位,可能是3位)
static readonly RADIX: number = 60; // 时分秒的进制
static readonly MILLISECOND_PER_SECOND: number = 1000; // 1000毫秒每秒,秒与毫秒之间的转换进制
// 周x
static readonly weeks1: string[] = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
// 星期X
static readonly weeks2: string[] = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
static readonly today: string = '今天';
static readonly yesterday: string = '昨天';
static readonly tomorrow: string = '明天';
/**
* 获取当前日期:年月日
* 返回格式,默认如:yyyyMMdd,20230926
*/
static getCurDate(format = DateTimeUtils.PATTERN_DATE_DEFAULT): string {
const DATETIME = new Date()
return DateTimeUtils.formatDate(DATETIME.getTime(), format)
}
/**
* 获取当前时间:时分秒
* 返回格式,默认如:HHmmss,230559
*/
static getCurTime(format = DateTimeUtils.PATTERN_TIME_DEFAULT): string {
const DATETIME = new Date()
return DateTimeUtils.formatDate(DATETIME.getTime(), format)
}
/**
* 日期不足两位前面补充0
* @param value-数据值
*/
static fill(value: number): string {
return (value > 9 ? '' : '0') + value
}
/**
* 获取两个时间点的时间差
* @param milliseconds1
* @param milliseconds2
* @returns Duration
*/
static getDuration(milliseconds1: number, milliseconds2: number): number {
let date1 = new Date(milliseconds1)
let date2 = new Date(milliseconds2)
let timeDiff = Math.abs(date2.getTime() - date1.getTime());
return timeDiff;
}
/**
* 格式化Duration时间
* @param duration 毫秒
* @returns 返回格式化后的Duration时间
*/
static getFormattedDuration(duration: number): string {
// 也可以直接先除以1000转换为秒后再计算 // duration = duration/1000
// Math.floor 用于向下取整
let hour = Math.floor(duration / (1000 * 60 * 60))
// 用总毫秒数duration减去hour所对应的毫秒数差,再除以每分钟所占用的毫秒数
let minute = Math.floor((duration - hour * (1000 * 60 * 60)) / (1000 * 60));
// let second = Math.floor((duration - hour * (1000 * 60 * 60) - minute * (60 * 1000)) / 1000)
let second = Math.floor(duration / 1000) % 60; // 先除以1000,转换为秒;再对整分钟取余
if (hour > 0) {
return `${DateTimeUtils.fill(hour)}:${DateTimeUtils.fill(minute)}:${DateTimeUtils.fill(second)}`
}
return `${DateTimeUtils.fill(minute)}:${DateTimeUtils.fill(second)}`
}
/**
* 格式化显示倒计时
* @param milliseconds 时间戳 毫秒
* @returns 返回格式化后的Duration时间
*/
static getDurationToNow(milliseconds: number): string {
let nowDateTime = new Date();
let duration = milliseconds - nowDateTime.getTime();
if (duration < 0) {
duration = 0;
}
return DateTimeUtils.getFormattedDuration(duration)
}
/**
* 根据日期/时间字符串反序列化对应的时间戳
* @param dateTimeString string 日期+时间字符串
* 列举字符串格式,如:
* 20231129,yyyyMMdd
* 20231126230559 yyyyMMddHHmmss
* 20231126230559729 yyyyMMddHHmmssSSS
* 2023-11-26 23:05:59.729, yyyy-MM-dd HH:mm:ss.SSS(先移除所有中划线和冒号及空格等非数字字符)
* @returns 转换后的时间戳:milliseconds 毫秒
*/
static parseDate(dateTimeString?: string): number {
if (!dateTimeString) {
return 0
}
// 移除连字符/中划线(Hyphen/Strike)/移除冒号(Colon)/移除空白字符(包括空格、制表符、换行符等)/移除正斜杠(forward slash '/')/移除反斜杠(back slash '\')
// let regExp = new RegExp('(\d)(?=(\d{3})+\.)/g')
let regExpHyphen: RegExp = new RegExp('-', 'g');
let regExpSlash: RegExp = new RegExp('/', 'g');
let regExpBackSlash: RegExp = new RegExp(/\\/, 'g');
let regExpColon: RegExp = new RegExp(':', 'g');
let regExpBlank: RegExp = new RegExp('\s', 'g');
dateTimeString = dateTimeString.replace(regExpHyphen, '')
.replace(regExpSlash, '')
.replace(regExpBackSlash, '')
.replace(regExpColon, '')
.replace(regExpBlank, '');
if (dateTimeString.length < 8 || dateTimeString.length > 17) {
return 0
}
console.log("dateTimeString:" + dateTimeString)
// substring(startIndex: number, endIndex?: number): string:
// 返回从startIndex开始到endIndex(不包括)之间的子字符串。
// 如果省略endIndex,则返回从startIndex到字符串末尾的子字符串。
let year: number = Number.parseInt(dateTimeString.substring(0, 4));
console.log("year:" + year)
let month: number = Number.parseInt(dateTimeString.substring(4, 6)) - 1;
console.log("month:" + month)
let day: number = Number.parseInt(dateTimeString.substring(6, 8));
console.log("day:" + day)
if (dateTimeString.length < 10) {
return new Date(year, month, day).getTime();
}
let hours: number = Number.parseInt(dateTimeString.substring(8, 10));
console.log("hours:" + hours)
if (dateTimeString.length < 12) {
return new Date(year, month, day, hours).getTime();
}
let min: number = Number.parseInt(dateTimeString.substring(10, 12));
console.log("min:" + min)
if (dateTimeString.length < 14) {
return new Date(year, month, day, hours, min).getTime();
}
let sec: number = Number.parseInt(dateTimeString.substring(12, 14));
console.log("sec:" + sec)
if (dateTimeString.length < 17) {
return new Date(year, month, day, hours, min, sec).getTime();
}
let ms: number = Number.parseInt(dateTimeString.substring(14, 17));
console.log("ms:" + ms)
return new Date(year, month, day, hours, min, sec, ms).getTime();
}
/**
* 把整数时间戳格式化为指定格式的日期+时间字符串
* @param timestamp:毫秒
* @param format 指定要格式化的pattern
* @returns 格式化后的字符串
*/
static formatDate(timestamp: number, format = DateTimeUtils.PATTERN_DATE_HYPHEN): string {
let res = "";
try {
const date = new Date(timestamp);
const opt: Opt = {
year: date.getFullYear().toString(), // 年 小写y
month: (date.getMonth() + 1).toString(), // 月 大写M
day: date.getDate().toString(), // 日 小写d
hour: date.getHours().toString(), // 时 大写H(24小时制)
minute: date.getMinutes().toString(), // 分 小写m
second: date.getSeconds().toString(), // 秒 小写s
millisecond: date.getMilliseconds().toString() // 毫秒 大写S
};
const regKeys: string[] = ['y+', 'M+', 'd+', 'H+', 'm+', 's+', 'S+'];
for (let i = 0; i < regKeys.length; i++) {
const regKey = regKeys[i];
const reg = new RegExp(regKey);
let ret = reg.exec(format); // 使用 RegExp 的 match 或 exec 方法在目标字符串中查找匹配项
if (ret) {
switch (regKey) {
case 'y+':
format = format.replace(reg, ret[0].length <= opt.year.length ? opt.year : opt.year.padStart(ret[0].length, "0"));
break;
case 'M+':
format = format.replace(reg, ret[0].length < opt.month.length ? opt.month : opt.month.padStart(ret[0].length, "0"));
break;
case 'd+':
format = format.replace(reg, ret[0].length < opt.day.length ? opt.day : opt.day.padStart(ret[0].length, "0"));
break;
case 'H+':
format = format.replace(reg, ret[0].length < opt.hour.length ? opt.hour : opt.hour.padStart(ret[0].length, "0"));
break;
case 'm+':
format = format.replace(reg, ret[0].length < opt.minute.length ? opt.minute : opt.minute.padStart(ret[0].length, "0"));
break;
case 's+':
format = format.replace(reg, ret[0].length < opt.second.length ? opt.second : opt.second.padStart(ret[0].length, "0"));
break;
case 'S+':
format = format.replace(reg, ret[0].length < opt.millisecond.length ? opt.millisecond : opt.millisecond.padStart(ret[0].length, "0"));
break;
}
}
}
res = format;
} catch (error) {
console.error(`ERROR formatDate error: ${error}.`);
}
return res;
}
/**
* 构造星期X/周X
* @param timestamp
* @returns
*/
static buildDay(timestamp: number, weeks = this.weeks1): string {
try {
const date = new Date(timestamp);
let day = date.getDay()
let week = weeks[day];
return week
} catch (error) {
console.error(`ERROR formatDate error: ${error}.`);
}
}
static startOfDay(argument: number): Date {
const _date = new Date(argument);
_date.setHours(0, 0, 0, 0);
return _date;
}
static isSameDay(dateLeft: number, dateRight: number): boolean {
const dateLeftStartOfDay = this.startOfDay(dateLeft);
const dateRightStartOfDay = this.startOfDay(dateRight);
return +dateLeftStartOfDay === +dateRightStartOfDay;
}
static addDays(argument: number, amount: number): Date {
const _date = new Date(argument);
if (amount == 0) {
return _date;
}
_date.setDate(_date.getDate() + amount);
return _date;
}
static subDays(date: number, amount: number): Date {
return this.addDays(date, -amount);
}
static isToday(date: number,): boolean {
return this.isSameDay(date, Date.now());
}
static isYesterday(date: number): boolean {
return this.isSameDay(date, this.subDays(Date.now(), 1).getTime());
}
static isTomorrow(date: number): boolean {
return this.isSameDay(date, this.addDays(Date.now(), 1).getTime());
}
}
// const dateTimeUtils = new DateTimeUtils()
\ No newline at end of file
... ...
import util from '@ohos.util';
import deviceInfo from '@ohos.deviceInfo';
import { SPHelper } from './SPHelper';
const TAG = 'DeviceUtil';
/**
* 与(硬件)设备相关(不可改变或不可升级)属性或操作
*/
export class DeviceUtil {
static async clientId() {
let uuid = await SPHelper.default.get("clientId", '');
if (uuid == '') {
uuid = util.generateRandomUUID();
await SPHelper.default.save("clientId", uuid);
}
return uuid.toString();
}
/**
* 返回设备厂家名称
* HUAWEI
* @returns
*/
static getManufacture(): string {
return deviceInfo.manufacture;
}
/**
* 返回设备品牌名称
* HUAWEI MATE 40 PRO
* @returns
*/
static getBrand(): string {
return deviceInfo.brand;
}
/**
* 返回认证型号
* LIO-AL00
* @returns
*/
static getProductModel(): string {
return deviceInfo.productModel;
}
/**
* 返回产品版本
* OpenHarmony-3.2.6.5(Beta2)
* @returns
*/
static getDisplayVersion(): string {
return deviceInfo.productModel;
}
}
\ No newline at end of file
... ...
import { BasicDataSource } from './BasicDataSource';
/**
* 实现/BasicDataSource抽象类,用于懒数据加载
*/
export class LazyDataSource<T> extends BasicDataSource<T> {
// private dataArray: Array<T> = new Array();
// private dataArray: Array<string> = new Array("0", "1", "2");
// private dataArray: string[] = ["0", "1", "2"];
private dataArray: T[] = [];
constructor() {
super();
// for (let i = 0; i < 100; i++) {
// this.dataArray.push(i)
// }
}
// 获取数据总个数
public totalCount(): number {
return this.dataArray.length;
}
// 获取索引对应的Item数据
public getData(index: number): T {
return this.dataArray[index];
}
// 获取索引对应的Item数据
public get(index: number): T {
return this.getData(index);
}
// 获取所有数据
public getDataArray(): T[] {
return this.dataArray;
}
// 增加/插入1个Item/数据,若index为undefined,则在数据尾部增加1个元素;否则,在指定索引(可为负/或大于数组长度)位置插入1个元素
public addItem(data: T, index?: number): void {
if (index == undefined) {
// 将新元素添加到数组的末尾
this.dataArray.push(data);
// this.dataArray.splice(this.dataArray.length, 0, data)
this.notifyDataAdd(this.dataArray.length - 1);
} else {
// 从数组中的index位置开始删除0个元素,并在同一位置插入((1个或多个))新元素,返回已删除的元素。
// 当index大于等于数组长度时,不删除任何数据,且data加在数组末尾
// 当index为负数时,其代表从数组后向前的索引位置
this.dataArray.splice(index, 0, data);
this.notifyDataAdd(index);
}
}
// 在数据尾部增加1到多个元素
public push(...data: T[]): void {
this.dataArray.push(...data)
for (let index = this.dataArray.length - data.length; index < this.dataArray.length; index++) {
this.notifyDataAdd(index);
}
}
// 增加一个同类型的LazyDataSource
public pushDataSource(data: LazyDataSource<T>): void {
this.push(...data.dataArray)
}
// 在数据尾部增加1个元素
public addLastItem(data: T): void {
this.addItem(data)
}
// 在数据开头插入1个元素
public addFirstItem(data: T): void {
// 在数组的开头插入(1个或多个)新元素
// this.dataArray.unshift(data)
// this.notifyDataAdd(0);
this.addItem(data, 0)
}
// 在第2个元素位置,插入1个元素
public add2ndItem(data: T): void {
this.addItem(data, 1)
}
// 在第3个元素位置,插入1个元素
public add3rdItem(data: T): void {
this.addItem(data, 2)
}
// 在第4个元素位置,插入1个元素
public add4thItem(data: T): void {
this.addItem(data, 3)
}
// 把from位置的item移动到to位置(暂不支持from/to为负数或大于等于数组长度)
public moveItem(from: number, to: number): void {
// 当from/to大于/等于数组长度时;
if (from >= this.dataArray.length) {
from = this.dataArray.length - 1;
}
if (to >= this.dataArray.length) {
to = this.dataArray.length - 1;
}
// 当from/to为负时;
let remainderFrom = from % this.dataArray.length
if (remainderFrom < 0) {
from = remainderFrom + this.dataArray.length
}
let remainderTo = to % this.dataArray.length
if (remainderTo < 0) {
to = remainderTo + this.dataArray.length
}
// 1.把from位置元素提出暂存
let tempFrom: T = this.dataArray[from];
// 2.把to位置元素覆盖from位置元素,
let tempTo: T = this.dataArray[to];
this.updateItem(tempTo, from)
// 3.把暂存的from位置元素覆盖to位置元素
this.updateItem(tempFrom, to)
this.notifyDataMove(from, to);
}
// 删除index指定索引位置的元素
public deleteItem(index?: number): void {
if (index == undefined) {
// 删除数组的最后1个元素(倒数第1个元素)
// this.dataArray.pop()
this.dataArray.splice(-1, 1)
this.notifyDataDelete(this.dataArray.length);
} else {
// 从数组中的index位置开始,删除1个元素
// 当index大于等于数组长度时,不删除任何数据
// 当index为负数时,其代表从数组后向前的索引位置
this.dataArray.splice(index, 1);
this.notifyDataDelete(index);
}
}
// 删除最后1个元素
public pop(): void {
this.deleteItem()
}
// 删除最后1个元素
public deleteLastItem(): void {
this.deleteItem()
}
// 删除第1个元素
public deleteFirstItem(): void {
this.deleteItem(0)
}
// 删除第1个元素
public delete1stItem(): void {
this.deleteItem(0)
}
// 删除第2个元素
public delete2ndItem(): void {
this.deleteItem(1)
}
// 删除第3个元素
public delete3rdItem(): void {
this.deleteItem(2)
}
// 删除第4个元素
public delete4thItem(): void {
this.deleteItem(3)
}
// 修改/更新index指定索引位置的元素
public updateItem(data: T, index?: number): void {
if (index == undefined || index >= this.dataArray.length) {
// 当不传index或index大于等于数组长度时,修改/更新数组的最后1个元素
this.dataArray.splice(this.dataArray.length - 1, 1, data);
this.notifyDataChange(this.dataArray.length);
} else {
// 从数组中的index位置开始,删除1个元素
// 当index为负数时,其代表从数组后向前的索引位置
this.dataArray.splice(index, 1, data);
this.notifyDataChange(index);
}
}
// 修改/更新最后1个元素
public updateLastItem(data: T): void {
this.updateItem(data)
}
// 修改/更新第1个元素
public updateFirstItem(data: T): void {
this.updateItem(data, 0)
}
// 修改/更新第1个元素
public update2ndItem(data: T): void {
this.updateItem(data, 0)
}
// 修改/更新第2个元素
public update1stItem(data: T): void {
this.updateItem(data, 1)
}
// 修改/更新第3个元素
public update3rdItem(data: T): void {
this.updateItem(data, 2)
}
// 修改/更新第4个元素
public update4thItem(data: T): void {
this.updateItem(data, 3)
}
// 清空数组
public clear(): void {
this.replaceAll()
}
// 把数据全部删除,再添加全部新元素
public replaceAll(...data: T[]): void {
// 从数组中的0位置开始删除dataArray.length个元素,并在同一位置插入((1个或多个))新元素,返回已删除的元素。
this.dataArray.splice(0, this.dataArray.length, ...data);
this.notifyDataReload()
}
// 获取指定元素的下标
public getIndexOf(element: T): number {
for (let index = 0; index < this.dataArray.length; index++) {
if (this.dataArray[index] == element) {
return index
}
}
return -1
}
isEmpty(): boolean {
return this.dataArray.length == 0
}
isNotEmpty(): boolean {
return this.dataArray.length > 0
}
sort(comparator: (firstValue: T, secondValue: T) => number): void {
this.dataArray.sort(comparator)
}
}
\ No newline at end of file
... ...
import hilog from '@ohos.hilog';
/**
* Log level define
*
* @syscap SystemCapability.HiviewDFX.HiLog
*/
enum LogLevel {
DEBUG = 3,
INFO = 4,
WARN = 5,
ERROR = 6,
FATAL = 7
}
/**
* Common log for all features.
*
* @param {string} prefix Identifies the log tag.
*/
export class Logger {
private static domain: number = 0xFF00;
private static prefix: string = 'PeopleDailyApp';
private static format: string = `%{public}s, %{public}s`;
/**
* constructor.
*
* @param Prefix Identifies the log tag.
* @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF.
*/
constructor(prefix: string = Logger.prefix, domain: number = Logger.domain) {
Logger.prefix = prefix;
Logger.domain = domain;
}
static debug(...args: string[]) {
hilog.debug(Logger.domain, Logger.prefix, Logger.format, args);
}
static info(...args: string[]) {
hilog.info(Logger.domain, Logger.prefix, Logger.format, args);
}
static warn(...args: string[]) {
hilog.warn(Logger.domain, Logger.prefix, Logger.format, args);
}
static error(...args: string[]) {
hilog.error(Logger.domain, Logger.prefix, Logger.format, args);
}
static fatal(...args: string[]) {
hilog.fatal(Logger.domain, Logger.prefix, Logger.format, args);
}
static isLoggable(level: LogLevel) {
hilog.isLoggable(Logger.domain, Logger.prefix, level);
}
}
export default new Logger()
\ No newline at end of file
... ...
import buffer from '@ohos.buffer';
import { Logger } from './Logger';
const TAG = "ResourcesUtils";
// 默认针对entry/src/main/resources/rawfile目录下的文件:
const JSON_FILE_NAME = "agconnect-services.json";
export class ResourcesUtils {
/**
* 获取资源字符串内容
* @param context
* @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json",test.xml,
* @returns text 字符串
*/
static getResourcesText(context: Context, filename: string): Promise<string> {
return new Promise((success, error) => {
Logger.info(TAG, "ResourcesUtils getResourcesText filename:" + filename);
context.resourceManager.getRawFileContent(filename).then((content: Uint8Array) => {
if (!content) {
Logger.warn(TAG, 'getResourcesText then content is empty');
error("file is empty");
return
}
try {
let text = buffer.from(content).toString("utf8");
if (text) {
Logger.info(TAG, "getResourcesText then text:" + text);
success(text);
} else {
Logger.warn(TAG, "getResourcesText then text is empty");
error("resources file text is empty");
}
} catch (err) {
// 转换异常
Logger.error(TAG, `getResourcesText catch err.: ${err}`);
}
}).catch((err: Error) => {
Logger.error(TAG, `getResourcesText getRawFileContent catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
/**
* 获取资源文件并转为JSON
*
* @param appContext 上下文
* @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json"
* SubscribeListData.json
* @returns JSON Object
*
* 调用方式:
* let compRes: MGHttp.ResponseDTO<BodyComponent> = await ResourcesUtils.getResourcesJson<MGHttp.ResponseDTO<BodyComponent>>(context, 'model/componentList.json');
*/
static getResourcesJson<R>(context:Context, filename: string): Promise<R> {
Logger.info(TAG, `getResourcesJson filename: ${filename}`);
return new Promise<R>((resolve, reject) => {
ResourcesUtils.getResourcesText(context, filename)
.then((text: string) => {
try {
// let config: R = JSON.parse(text)
let config:R = JSON.parse(text) as R;
if (config) {
Logger.info(TAG, "getResourcesJson parse JSON file success.");
// Logger.info(TAG, `getResourcesJson config : ${JSON.stringify(config)}`);
resolve(config);
} else {
reject("getResourcesJson parse JSON file result is empty");
}
} catch (err) {
// json解析异常
Logger.error(TAG, `getResourcesJson catch parse failed.: ${err}`);
reject(err)
}
})
.catch((error:Error) => {
reject(error)
})
})
}
}
\ No newline at end of file
... ...
import data_preferences from '@ohos.data.preferences';
/*
// SPHelper.default.get("key1", "defValue1").then((value1) => {
// this.message = value1.toString();
// })
// let value2: string = await SPHelper.default.get("key2", "defValue2");
// this.message = result;
*
* 单例模式
*/
export class SPHelper {
private static context: Context;
private static spFilename: string = '__SPHelper';
static init(context: Context) {
SPHelper.context = context;
}
static setSpFilename(spFilename: string) {
SPHelper.spFilename = spFilename;
}
// 静态属性
static default: SPHelper = new SPHelper();
// 私有构造函数
private constructor() {
}
private async getVideoPreferences(): Promise<data_preferences.Preferences> {
let preferences: data_preferences.Preferences = await data_preferences.getPreferences(SPHelper.context, SPHelper.spFilename);
return preferences;
}
async save(key: string, value: data_preferences.ValueType) {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
await preferences.put(key, value)
await preferences.flush()
}
async get(key: string, defValue: data_preferences.ValueType): Promise<data_preferences.ValueType> {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
return await preferences.get(key, defValue);
}
async has(key: string): Promise<boolean> {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
return await preferences.has(key);
}
async delete(key: string) {
const preferences: data_preferences.Preferences = await this.getVideoPreferences();
preferences.delete(key).then(async () => {
await preferences.flush();
}).catch((err: Error) => {
// Logger.error(TAG, 'Failed to delete the key. Cause: ' + err);
});
}
}
\ No newline at end of file
... ...
/**
* StringUtils class.
*/
export class StringUtils {
/**
* The String utils tag.
*/
private static readonly TAG: string = 'StringUtils';
// 评分-整数或浮点数
private static readonly SCORE_REG_EXP = RegExp(/^(\d+)(\.\d+)?$/);
/**
* Check string is empty.
*
* @param {object} any
* @return {boolean} true(empty)
*/
static isEmpty(...params: any): boolean {
if (params.length === 0) {
return true;
}
for (const param of params) {
if (!param) { // param === undefined || param === null || param === '';
return true;
}
}
return false;
}
/**
* Check obj is not empty.
*
* @param {object} obj
* @return {boolean} true(not empty)
*/
static isNotEmpty(obj: any): boolean {
// return (obj && obj !== '');
// 或
return (obj !== undefined && obj !== null && obj !== '');
}
static parseNumber(input: string): number {
// let input: string = '135' // 135
// let input: string = '135T' // NaN
// let input: string = 'ytr' // NaN
// let input: string = '' // 0
// let input: string = null // 0
// let input: string = undefined // NaN
const parsedInt = Number(input)
if (!isNaN(parsedInt)) {
return parsedInt
} else {
return 0
}
}
static isScore(text: string): boolean {
return StringUtils.SCORE_REG_EXP.test(text);
}
}
// export default new StringUtils();
... ...
{
"module": {
"name": "wdKit",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "description"
}
]
}
\ No newline at end of file
... ...
/node_modules
/oh_modules
/.preview
/build
/.cxx
/.test
\ No newline at end of file
... ...
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS"
}
]
}
\ No newline at end of file
... ...
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hspTasks
... ...
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1"
},
"packages": {
"@ohos/axios@2.1.1": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w=="
}
}
}
\ No newline at end of file
... ...
{
"name": "wdnetwork",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "./src/main/ets/Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@ohos/axios": "^2.1.1"
}
}
\ No newline at end of file
... ...
export { ResponseDTO } from "./bean/ResponseDTO"
export { HttpRequest as WDHttp } from "./http/HttpRequest"
... ...
/**
* ResponseDTO
*/
export interface ResponseDTO<T = string> {
success:boolean;
// 服务请求响应值/微服务响应状态码”
code: number;
// 服务请求响应说明
message: string;
// 响应结果
data?: T;
// 请求响应时间戳(unix格式)
timestamp?: number;
}
\ No newline at end of file
... ...
import type { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from '@ohos/axios';
import axios, { HttpStatusCode } from '@ohos/axios';
// import type ResponseDTO from '../models/ResponseDTO';
// const key = 'xxxxyyyyzzz'
// const apiBaseUrl = 'http://127.0.0.1:5566'
// const apiBaseUrl = "https://display-sc.miguvideo.com/display/v3/static";
// console.log("apiBaseUrl:" + apiBaseUrl);
// axios.defaults.baseURL = apiBaseUrl
// 使跨域请求带上cookie等用户认证凭据
// axios.defaults.withCredentials = true;
// 实例化axios
const instance: AxiosInstance = axios.create({
// axios请求基础URL(包括端口号)
// baseURL: apiBaseUrl,
// 单位毫秒
timeout: 15000,
// 跨域请求时,携带cookie等用户认证凭据
// withCredentials: true
});
// 添加请求拦截器
instance.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
// 在发送请求之前
if (!config.headers["Content-Type"]) {
config.headers["Content-Type"] = "application/json;charset=utf-8";
}
// 公共请求参数
// config.params.key = key
return config;
},
(error: AxiosError) => {
// 请求错误
console.log(`全局请求失败拦截,message:${error.message}`)
return Promise.reject(error);
}
);
// // GET /api/success
// {
// "code": 0,
// "message": "请求成功",
// "data": {
// "name": "管理员"
// }
// }
// // GET /api/fail
// {
// "code": -1,
// "message": "请求失败:XXX错误!",
// "data": null
// }
// 添加响应拦截器
instance.interceptors.response.use(
// 响应拦截器response类型就是Axios.request<T = any, R = AxiosResponse<T>, D = any>中的泛型R
// 泛型 T 就是服务器返回数据的类型
// 泛型 R 就是这个泛型 T 数据经过 axios 包装一层得到的 response 对象的类型,而 request 方法的返回值是一个 Promise,其值就是成功态的 R,也就是 response对象。
(response: AxiosResponse) => {
// response为AxiosResponse类型,含有config\data\headers\request\status\statusText属
// console.dir(response)
// 正常响应,可对响应数据做通用处理
// 2xx 范围内的状态码都会触发该函数。
if (response.status === HttpStatusCode.Ok) {
// 直接返回response,当然你也可以只返回response.data
// return response;
// 也可以先解析服务器返回的状态码,可判断code处理通用逻辑
// const { code, message, data } = response.data
// if (code === 0) {
// // 将组件用的数据返回
// return data
// } else {
// // 处理业务错误。
// console.log(`处理业务,message:${message}`)
// return Promise.reject(new Error(message))
// }
// const data: ResponseBean<any> = response.data
// 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据
return response.data;
} else {
return Promise.reject(response);
}
},
(error: AxiosError) => {
// 异常响应
// console.log('全局响应失败拦截')
// console.log(error.request)
// console.log(error.response)
// 这里用来处理http常见错误,进行全局提示
let message = buildErrorMsg(error.response?.status);
// 错误消息可以使用全局弹框展示出来
console.log(`httpStatus:${error.response?.status}-${message},请检查网络或联系管理员!`)
return Promise.reject(error);
}
);
export default instance;
function buildErrorMsg(httpStatus: number):string {
let message = "";
switch (httpStatus) {
case HttpStatusCode.BadRequest:
message = "请求错误(400)";
break;
case HttpStatusCode.Unauthorized:
message = "未授权(或token 失效),请重新登录(401)";
// 可以触发退出的 action
// 可以做清空storage并跳转到登录页的操作
break;
case HttpStatusCode.Forbidden:
message = "拒绝访问(403)";
break;
case HttpStatusCode.NotFound:
message = "请求出错(404)";
// 请求地址错误
break;
case HttpStatusCode.RequestTimeout:
message = "请求超时(408)";
break;
case HttpStatusCode.InternalServerError:
message = "服务器错误(500)";
// 服务器故障
break;
case HttpStatusCode.NotImplemented:
message = "服务未实现(501)";
break;
case HttpStatusCode.BadGateway:
message = "网络错误(502)";
break;
case HttpStatusCode.ServiceUnavailable:
message = "服务不可用(503)";
break;
case HttpStatusCode.GatewayTimeout:
message = "网络超时(504)";
break;
case HttpStatusCode.HttpVersionNotSupported:
message = "HTTP版本不受支持(505)";
break;
default:
// 网络连接故障
message = `连接出错(${httpStatus})!`;
}
return message;
}
... ...
import type { AxiosError, AxiosRequestConfig} from '@ohos/axios';
import service from './AxiosRequest';
export class HttpRequest {
// 加入泛型限定,返回数据类型为T,
static request<T = any>(config: AxiosRequestConfig): Promise<T> {
return new Promise<T>((resolve, reject) => {
service.request<any, T>(config)
.then((res:T) => {
resolve(res)
})
.catch((err:AxiosError) => {
reject(err)
})
})
// return service.request<any, T>(config)
}
static get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> {
return service.get(url, config)
}
static delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> {
return service.delete(url, config)
}
static post<T = any>(url: string, data?: object, config?: AxiosRequestConfig): Promise<T> {
return service.post(url, data, config)
}
static put<T = any>(url: string, data?: object, config?: AxiosRequestConfig): Promise<T> {
return service.put(url, data, config)
}
}
... ...
{
"module": {
"name": "wdNetwork",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"requestPermissions": [
{
"name": "ohos.permission.INTERNET"
}
]
}
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "description"
}
]
}
\ No newline at end of file
... ...