liujian1_wd

编排项目

Showing 145 changed files with 5144 additions and 0 deletions
{
"app": {
"bundleName": "com.wondertek.sight",
"vendor": "$string:app_vendor",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
}
... ...
{
"string": [
{
"name": "app_name",
"value": "Sight"
},
{
"name": "app_desc",
"value": "Wonder Tek layout"
},
{
"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": "Sight"
},
{
"name": "app_desc",
"value": "网达编排app"
},
{
"name": "app_vendor",
"value": "网达"
},
{
"name": "load_net_data_loading",
"value": "加载中..."
},
{
"name": "load_net_data_failed",
"value": "加载网络数据失败"
},
{
"name": "load_net_data_none",
"value": "很抱歉,未能找到相关内容"
}
]
}
... ...
# 网达编排
## 介绍
### 相关概念
## 环境搭建
### 软件要求
### 硬件要求
### 环境搭建
DevEco Studio使用指南/配置开发环境:
``` https://developer.harmonyos.com/cn/docs/search?val=%E9%85%8D%E7%BD%AE%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83 ```
ohpm使用指导:
``` https://developer.harmonyos.com/cn/docs/search?type=all&val=ohpm%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC ```
hdc使用指导:
``` https://developer.harmonyos.com/cn/docs/search?val=hdc%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC ```
### 下载安装
如何使用ohpm引入三四方库
方式一:
打开Terminal窗口,通过如下指令进入到entry目录。
```
cd entry
```
以引入“@ohos/axios”为例,执行以下指令进行安装。
```
ohpm install @ohos/axios
```
在对应的eTS文件中直接引用。
```
import axios from '@ohos/axios';
```
方式二:
打开工程目录下的entry目录,找到该目录下的oh-package.json5文件。
在oh-package.json5文件中写入想要安装的三方库,以“@ohos/axios”为例,示例如下:
```
{
"dependencies": {
"@ohos/axios": "^2.1.1"
}
}
```
打开Terminal窗口,通过如下指令进入到entry目录。
```
cd entry
```
执行指令进行安装。
```
ohpm install
```
在对应的eTS文件中直接引用。
```
import axios from '@ohos/axios';
```
同理,在mlayout模块使用三方库@ohos/lottie(V2.0.7)
https://ohpm.openharmony.cn/#/cn/detail/@ohos%2Flottie
## 代码结构解读
## 总结
## todo:
1.申请企业签名:
--目前构建包时,用的是个人签名。
2.确保先请求组件的先展示.
--对于一个页面,从上到下顺序请求组件,每个组件数据请求/返回耗时不同,故先请求的组件不一定先返回,但要业务确保先请求的组件先展示.
3.后台需要增加harmony鸿蒙平台参数(包括接口参数clientId, terminalId,appType及返回字段),
... ...
{
"app": {
"signingConfigs": [
{
"name": "default",
"type": "HarmonyOS",
"material": {
"certpath": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.cer",
"storePassword": "0000001A1B78DEF1A1F37D3B21A3186A35C37F3B4E24D862BD2C2E83A1B90B6778A8428D86A801422555",
"keyAlias": "debugKey",
"keyPassword": "0000001A130E1AC750B7D3AC097F15548CD171AC97C25A97A51242701764AB1E51097999D8CCF12C75AB",
"profile": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p12"
}
}
],
"products": [
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": "4.0.0(10)",
"compatibleSdkVersion": "4.0.0(10)",
"runtimeOS": "HarmonyOS",
}
],
"buildModeSet": [
{
"name": "debug",
},
{
"name": "release"
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdKit",
"srcPath": "./wdKit",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdBean",
"srcPath": "./wdBean",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdComponent",
"srcPath": "./wdComponent",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdConstant",
"srcPath": "./wdConstant",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "wdNetwork",
"srcPath": "./wdNetwork",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
\ No newline at end of file
... ...
This file is too large to display.
No preview for this file type
## 在1台电脑中配置2个git帐号(GitHub和GitLab) - windows版
参考链接:
https://blog.csdn.net/acai_encode/article/details/130776105
在Windows下同台电脑Git配置多个SSH-Key
https://blog.csdn.net/jifaliwo123/article/details/79126785
一台电脑绑定两个git帐号(GitHub和GitLab)
参考:
https://git-scm.com/docs/gitfaq
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
},
{
"name": "ohosTest",
}
]
}
\ No newline at end of file
... ...
import { hapTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"license": "",
"devDependencies": {},
"author": "",
"name": "entry",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {
"wdBean": "file:../wdBean",
"wdComponent": "file:../wdComponent",
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdNetwork": "file:../wdNetwork"
}
}
\ No newline at end of file
... ...
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
import hilog from '@ohos.hilog';
import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
}
onDestroy(): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
}
onWindowStageCreate(windowStage: window.WindowStage): void {
// Main window is created, set main page for this ability
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
windowStage.loadContent('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(): void {
// Main window is destroyed, release UI related resources
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
}
onForeground(): void {
// Ability has brought to foreground
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
}
onBackground(): void {
// Ability has back to background
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
}
}
... ...
import { GroupDTO } from 'wdBean';
import { LazyDataSource, Logger } from 'wdKit';
import { PageViewModel } from '../viewmodel/PageViewModel';
import { PageComponent } from './PageComponent';
const TAG = 'Index';
@Entry
@Component
struct Index {
@State groupList: LazyDataSource<GroupDTO> = new LazyDataSource();
// @Prop groupList: GroupDTO[] = [];
@State message: string = 'Hello Sight';
build() {
Column() {
PageComponent({ groupList: this.groupList })
}
}
aboutToAppear() {
// Logger.info(TAG, `aboutToAppear, this.currentTabIndex1: ${this.currentNavIndex}`);
// PageViewModel.getGroupDTO();
let groupDto = PageViewModel.getGroupDTO(getContext(this))
if (groupDto) {
this.groupList.push(groupDto)
}
}
aboutToDisappear() {
Logger.info(TAG, 'aboutToDisappear');
}
onPageShow() {
Logger.info(TAG, 'onPageShow');
}
onPageHide() {
Logger.info(TAG, 'onPageHide');
}
onBackPress() {
Logger.info(TAG, 'onBackPress');
}
}
\ No newline at end of file
... ...
import { CompDTO, CompStyle, GroupDTO, ItemBean, ItemDTO, ViewType } from 'wdBean';
import { CompUtils, EmptyComponent, ErrorComponent, LabelComponent, LoadingComponent, } from 'wdComponent';
import { CommonConstants } from 'wdConstant';
import { LazyDataSource, Logger, StringUtils } from 'wdKit';
const TAG = 'PageComponent';
@Component
export struct PageComponent {
@Prop viewType: number = ViewType.LOADED;
// Group数据及子组件数据
@State groupList: LazyDataSource<GroupDTO> = new LazyDataSource();
@State isRefreshing: boolean = false
build() {
if (this.viewType == ViewType.LOADING) {
LoadingComponent()
} else if (this.viewType == ViewType.ERROR) {
ErrorComponent()
} else if (this.viewType == ViewType.EMPTY) {
EmptyComponent()
} else {
Refresh({ refreshing: this.isRefreshing }) {
List() {
LazyForEach(this.groupList, (groupDTO: GroupDTO, groupIndex: number) => {
ListItem() {
Column() {
ForEach(groupDTO.compList, (compDTO: CompDTO, compIndex: number) => {
this.componentBuilder(compDTO, groupIndex, compIndex)
})
}
}
})
}
.cachedCount(5)
.height(CommonConstants.FULL_PARENT)
// .padding({
// bottom: (this.currentNavIndex === 0 || this.currentNavIndex === 1) ? $r('app.float.search_bar_height') : 0
// }) // 当页面顶部有搜索bar时,页面的list增加bottom的padding为搜索bar的高度
}
.onRefreshing(() => {
this.isRefreshing = true
// this.sendRequest(true)
// setTimeout(() => {
// this.isRefreshing = false
// }, 2000)
})
}
}
@Builder
componentBuilder(compDTO: CompDTO, groupIndex: number, compIndex: number) {
if (compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ label: CompUtils.getLabelTitle(compDTO.extraData) })
} else {
// todo:组件未实现 / Component Not Implemented
Text(compDTO.compStyle)
.width(CommonConstants.FULL_PARENT)
.padding(10)
// .backgroundColor(Color.Brown) // 展示本页未实现的compStyle
}
}
aboutToAppear() {
Logger.info(TAG, `aboutToAppear, this.pageId: ${this.viewType}`);
}
}
... ...
import { GroupDTO } from 'wdBean';
import { Logger, ResourcesUtils } from 'wdKit';
import { ResponseDTO } from 'wdNetwork';
const TAG = 'PageViewModel';
/**
* 处理返回后的数据
*/
export class PageViewModel {
/**
* Get Group data.
*
* @return {GroupDTO} compRes.data
*/
static getGroupDTO(context: Context): GroupDTO {
let compRes: ResponseDTO<GroupDTO> | null = ResourcesUtils.getResourcesJsonSync<ResponseDTO<GroupDTO>>(context, 'comp_list.json');
Logger.info(TAG, `getCompList getResourcesJson compRes : ${JSON.stringify(compRes)}`);
if (!compRes || !compRes.data) {
return {} as GroupDTO
}
return compRes.data
}
}
let pageViewModel = new PageViewModel();
export default pageViewModel as PageViewModel;
\ No newline at end of file
... ...
{
"module": {
"name": "entry",
"type": "entry",
"description": "$string:module_desc",
"mainElement": "EntryAbility",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"abilities": [
{
"name": "EntryAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:icon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:startIcon",
"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": "main entry"
},
{
"name": "EntryAbility_desc",
"value": "$string:app_desc"
},
{
"name": "EntryAbility_label",
"value": "$string:app_name"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "module_desc",
"value": "main entry"
},
{
"name": "EntryAbility_desc",
"value": "$string:app_desc"
},
{
"name": "EntryAbility_label",
"value": "$string:app_name"
}
]
}
\ No newline at end of file
... ...
{
"code": "0",
"data": {
"compAdList": [
],
"compList": [
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Single_Row-03",
"compType": "SINGLE_ROW",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 6931,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "直播预告",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"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/b2877faddf2c427da7ef6d96f9594b99_lud/122987.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "4251160",
"programId": "20000092979",
"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/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/live/record/tr_lud/6f68f19ff71a4feca24f20478646b41e_lud/122936.m3u8",
"pageId": "",
"playUrls": [
],
"programAuth": "2004545",
"programId": "20000092928",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "110000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-15 17:34:17",
"subType": "",
"subtitle": "",
"title": "1114回归推流直播32",
"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": "021",
"coverSize": "366*206",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231014/image/live/7a2a14d763504a339596c35c10903169.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "",
"districtCode": "310115",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231014/image/live/7a2a14d763504a339596c35c10903169.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": "4131511",
"programId": "20000093004",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "021",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-11-21 10:46:47",
"subType": "",
"subtitle": "",
"title": "还有一个月双十一",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231014/image/live/3217ab9e1f564cbfadad7e27738f2274.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "800*450",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231128/image/live/fed7c4f866d445d6bdfc7087a75e2035.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-20231128/image/live/fed7c4f866d445d6bdfc7087a75e2035.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": "4589923",
"programId": "20000093041",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-08 16:58:17",
"subType": "",
"subtitle": "",
"title": "24小时熊猫慢直播",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231128/image/live/c8fdf7a4d8074357819188dda7b46548.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 1,
"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/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-01",
"compType": "SINGLE_COLUMN",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 7079,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "大卡横屏",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "310100",
"coverSize": "1920*1080",
"coverType": 1,
"coverUrl": "",
"description": "周五快乐",
"districtCode": "310115",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/content/2f42c881503b4feda1709a6fb6524b90.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 40,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231213/vod/content/output/36e100323b1947f5a1ea902dea8dcc86_opt.mp4",
"pageId": "",
"playUrls": [
{
"clarity": 1,
"duration": 40,
"landscape": 1,
"resolutionHeight": 720,
"resolutionWidth": 1280,
"type": 1,
"url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231213/vod/content/output/36e100323b1947f5a1ea902dea8dcc86_opt.mp4"
}
],
"programAuth": "4112178",
"programId": "30001353072",
"programName": "周五快乐",
"programSource": 4,
"programType": 1,
"provinceCode": "310000",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "周五快乐",
"vImageUrl": ""
},
{
"cityCode": "",
"coverSize": "869*489",
"coverType": 1,
"coverUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/live/e768f875610b490fa5550759307817b1.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/e768f875610b490fa5550759307817b1.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": "4251160",
"programId": "20000092433",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2024-10-13 09:00:00",
"subType": "",
"subtitle": "",
"title": "山西运城圣天湖景区",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231013/image/live/f33a113ae0034589ab688cc6d44a2d55.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 3,
"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-20231014/image/content/b69828ba41cd47b9b9f9150dc9c77a26.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/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-20231014/image/content/867435005b444b6d99199ee8041a3468.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1620*2160",
"coverType": 1,
"coverUrl": "",
"description": "",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231014/image/content/b69828ba41cd47b9b9f9150dc9c77a26.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"heatValue": "",
"innerUrl": "",
"landscape": 1,
"lengthTime": 88,
"linkUrl": "",
"openLikes": 1,
"openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/f229e5c711d14ef582b2162982ae41d6_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/ca2cedfba6c14cf0b9c917e23837aeac_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/f229e5c711d14ef582b2162982ae41d6_opt.mp4"
}
],
"programAuth": "4265498",
"programId": "30001364853",
"programName": "【院士说】赵忠贤院士谈科技进步",
"programSource": 4,
"programType": 1,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "",
"subType": "",
"subtitle": "",
"title": "【院士说】赵忠贤院士谈科技进步",
"vImageUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231014/image/content/867435005b444b6d99199ee8041a3468.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 4,
"subType": ""
},
{
"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://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/297b5282d80b40e980cc4b0142d38475.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "甘肃积石山6.2级地震新闻发布会",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/297b5282d80b40e980cc4b0142d38475.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": "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": "甘肃积石山县6.2级地震救援进行时",
"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://cdnjdphoto.aikan.pdnews.cn/sjbj-20231206/image/live/f65ec0e2d5014cd2a282d039a0f804f7.jpg?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-20231206/image/live/f65ec0e2d5014cd2a282d039a0f804f7.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": "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://cdnjdphoto.aikan.pdnews.cn/sjbj-20231109/image/live/04906f6f09aa44a9be2a889eec88dc56.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "秋意尚未尽消,冬日已翩然而至。秋冬之交的校园在你想象中是什么颜色的?人民日报新媒体文旅系列直播继续出发,联合国内9所高校发出漫步邀约,带你沉浸式云游青春高校,一起看秋末冬初的校园风光和大学生活。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231109/image/live/04906f6f09aa44a9be2a889eec88dc56.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": "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": "Single_Column-01",
"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://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"
},
{
"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": "Label-03",
"compType": "LABEL",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "{\"titleIconUrl\":\"\",\"title\":\"正在直播\"}",
"hasAdInfo": 0,
"id": 2549,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "正在直播标题",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 1,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Single_Column-01",
"compType": "SINGLE_COLUMN",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 2550,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "为你推荐feed",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "1292*727",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/6a8b752e1b85418d87385c5b63e4c577.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/6a8b752e1b85418d87385c5b63e4c577.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": "http://livewatch-prod.aikan.pdnews.cn/tr_lud/bd20a351ac84428dbfdd24dc8822c421_origin.m3u8?auth_key=1705628416-0-0-8545eb30a8dccf969c4bc487af4dc088",
"pageId": "",
"playUrls": [
],
"programAuth": "2004557",
"programId": "20000003741",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-19 10:30:00",
"subType": "",
"subtitle": "",
"title": "泰山雪景慢直播",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/6d76b1b3340e452ba36e4e3d65c37010.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": 9,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "直播预告标题",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 1,
"subType": ""
},
{
"backgroundColor": "",
"backgroundImgUrl": "",
"cityCode": "",
"compStyle": "Single_Row-03",
"compType": "SINGLE_ROW",
"dataSourceRequest": [
],
"districtCode": "",
"extraData": "",
"hasAdInfo": 0,
"id": 4637,
"imgSize": "",
"innerUrl": "",
"linkUrl": "",
"meddleDataList": [
],
"name": "为你推荐feed",
"objectId": "",
"objectTitle": "",
"objectType": null,
"operDataList": [
{
"cityCode": "",
"coverSize": "1189*669",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/9087b4ae155b47e3948e61a260ef88a0.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-20231219/image/live/9087b4ae155b47e3948e61a260ef88a0.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": "20000003752",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-20 11:00:00",
"subType": "",
"subtitle": "",
"title": "穿越千年比个“耶” 北齐壁画博物馆开馆日首场直播",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/6dd60f776fa74de789552cf78f759388.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-20231219/image/live/401a01bef0754d9fbae2e665dae999af.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-20231219/image/live/401a01bef0754d9fbae2e665dae999af.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": "20000003747",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-20 12:00:00",
"subType": "",
"subtitle": "",
"title": "医点就通 | “植物人”唤醒——促醒康复治疗",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/1fb3f7f40e8641d1b82d9f18ebdb9689.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-20231219/image/live/0c17646af7384dcb802abe82d6b9bacc.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-20231219/image/live/0c17646af7384dcb802abe82d6b9bacc.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": "20000003751",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-20 12:00:00",
"subType": "",
"subtitle": "",
"title": "医点就通 | “不期而至现端倪”——子宫内膜癌专题科普",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/e938460e1f4c43bfa53a72cd3fe5242b.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-20231219/image/live/6b94551c748948d196303a9125b704e6.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "喜马拉雅2023有声之夜暨峰爆榜颁奖典礼,喜马拉雅和他的朋友们,邀你共同探索声音的无限可能!倾听科技、文化和商业的观点碰撞,峰爆榜揭示音频潮流,直达音频行业浪潮前沿。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/6b94551c748948d196303a9125b704e6.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": "20000003746",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-20 13:30:00",
"subType": "",
"subtitle": "",
"title": "喜马拉雅2023有声之夜暨峰爆榜颁奖典礼",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/7369e988944b44babcb2bf5511169c54.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-20231219/image/live/33c5b7e48f874ede89eb96c88d5bc041.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-20231219/image/live/33c5b7e48f874ede89eb96c88d5bc041.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": "20000003749",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-21 14:30:00",
"subType": "",
"subtitle": "",
"title": "医点就通 | 保护血管,安全过冬",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/66420d45814342dcafee263d706c73cb.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "2003*1127",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/6c8a3db58c644f8bb51eef1cc808ddd0.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "业勤知行,书海思源,奋发有为,各领风骚!\n是扬帆学海的领航者,是躬耕科研的冲浪者,是诠释担当的志愿者,是力学笃行的实践者,是光影舞台上的明星,是运动赛场上的健儿,是红果园中最多彩的青春模样,他们就是北京交通大学学生先进集体和先进个人。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/6c8a3db58c644f8bb51eef1cc808ddd0.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": "20000003742",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-21 15:00:00",
"subType": "",
"subtitle": "",
"title": "荣誉 责任 梦想—北京交通大学2022-2023学年表彰大会",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231218/image/live/b79d3bc95e914d849c78114594501be7.jpeg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "764*430",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/7019c1dd5e854add9f3081a6ca5b9955.jpg?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "冬至是我国四时八节之一,在二十四节气中是较重要的一个节气。《清嘉录》载:“冬至大如年”,古人将冬至视为“节日”,这种大如年的冬至节在古代有哪些讲究和趣事,12月22日跟随博物馆专业的小姐姐走进上海观复博物馆,通过探寻一件件古物,了解中国传统节气里大如年的“冬至节”。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/7019c1dd5e854add9f3081a6ca5b9955.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": "20000003714",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-22 14:30:00",
"subType": "",
"subtitle": "",
"title": "冬至大如年——博物馆里的冬至故事",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231215/image/live/3b28ca44a05b4e04ab4f00492e9fd6f3.jpg?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-20231219/image/live/0ff93cee7d034d33a5e7b093ef0488e5.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-20231219/image/live/0ff93cee7d034d33a5e7b093ef0488e5.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": "20000003748",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-22 16:00:00",
"subType": "",
"subtitle": "",
"title": "医点就通 | 一起聊聊让人“头痛”的那些事",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/ed2b47f5b73e4c52b3c6f2491fcdea4d.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
},
{
"cityCode": "",
"coverSize": "1249*702",
"coverType": 1,
"coverUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/682858c43cb64262ad084534cdd16c96.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg",
"description": "2023深圳宝安马拉松是由深圳市宝安区人民政府主办,深圳市宝安区文化广电旅游体育局承办的马拉松赛事。比赛于2023年12月31日上午7时30分在海滨广场鸣枪开跑,赛事设有马拉松和半程马拉松两个项目,规模将达到2万人,其中马拉松8000人,半程马拉松12000人。深圳宝安马拉松自2016年首创以来,已成功举办5届赛事,并斩获中国田协“金牌赛事”和世界田联“精英标牌赛事”两大殊荣。",
"districtCode": "",
"endTime": "",
"hImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/682858c43cb64262ad084534cdd16c96.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": "20000003750",
"programName": "",
"programSource": 5,
"programType": 2,
"provinceCode": "",
"rankingList": [
],
"showTitleEd": "",
"showTitleIng": "",
"showTitleNo": "",
"sortValue": null,
"startTime": "2023-12-31 07:00:00",
"subType": "",
"subtitle": "",
"title": "我在视界看比赛|2023深圳宝安马拉松",
"vImageUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20231219/image/live/ed016dc3d97242cea137ede4aa92f1f7.png?x-oss-process=image/resize,l_850/auto-orient,1/quality,q_95/format,jpg"
}
],
"pageId": null,
"posterSize": "",
"posterUrl": "",
"provinceCode": "",
"sortValue": 2,
"subType": ""
}
],
"id": 5,
"name": "今日热点",
"pageId": "2"
},
"message": "Success",
"meta": {
"md5": "yZstaJZxCm+YdypyQpuQyA=="
},
"requestId": "",
"success": true,
"timestamp": 1702881464711
}
\ No newline at end of file
... ...
{
"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', () => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// 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';
import Want from '@ohos.app.ability.Want';
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
export default class TestAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.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) ?? '');
let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator;
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs;
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
... ...
@Entry
@Component
struct Index {
@State message: string = 'Hello World';
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.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';
import Want from '@ohos.app.ability.Want';
let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator | undefined = undefined
let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs | undefined = undefined
async function onAbilityCreateCallback() {
hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
}
async function addAbilityMonitorCallback(err : Error) {
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()
const bundleName = abilityDelegatorArguments.bundleName;
const testAbilityName = 'TestAbility';
let lMonitor: AbilityDelegatorRegistry.AbilityMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
const want: Want = {
bundleName: bundleName,
abilityName: testAbilityName
};
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
abilityDelegator.startAbility(want, (err, data) => {
hilog.info(0x0000, 'testTag', 'startAbility : err : %{public}s', JSON.stringify(err) ?? '');
hilog.info(0x0000, 'testTag', 'startAbility : data : %{public}s',JSON.stringify(data) ?? '');
})
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",
"2in1"
],
"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
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...
{
"hvigorVersion": "file:../dependencies/hvigor-3.0.10-s.tgz",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-3.0.10-s.tgz",
"rollup": "file:../dependencies/rollup.tgz",
},
"execution": {
// "daemon": true, /* Enable daemon compilation. Default: true */
// "incremental": true, /* Enable incremental compilation. Default: true */
// "parallel": true, /* Enable parallel compilation. Default: true */
// "typeCheck": false, /* Enable typeCheck. Default: false */
},
"logging": {
// "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
},
"debugging": {
// "stacktrace": false /* Disable stacktrace compilation. Default: false */
}
}
... ...
"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"‌":case"‍":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
... ...
import { appTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
#!/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="`pwd -P`"
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
fail() {
echo "$*"
exit 1
}
set_executable_node() {
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ -x "$EXECUTABLE_NODE" ]; then
return
fi
EXECUTABLE_NODE="${NODE_HOME}/node"
if [ -x "$EXECUTABLE_NODE" ]; then
return
fi
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"
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ]; then
set_executable_node
else
EXECUTABLE_NODE="node"
command -v ${EXECUTABLE_NODE} &> /dev/null || fail "ERROR: NODE_HOME not set and 'node' command not found"
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
... ...
# This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# For customization when using a Version Control System, please read the header note.
hwsdk.dir=D:/Harmony/HarmonyOS_SDK- 4.0.3.700-SP1
nodejs.dir=D:/nodejs-16.20.1
... ...
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.11": "@ohos/hypium@1.0.11"
},
"packages": {
"@ohos/hypium@1.0.11": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.11.tgz",
"integrity": "sha512-KawcLnv43C3QIYv1UbDnKCFX3MohtDxGuFvzlUxT/qf2DBilR56Ws6zrj90LdH6PjloJQwOPESuBQIHBACAK7w=="
}
}
}
\ No newline at end of file
... ...
{
"license": "",
"devDependencies": {
"@ohos/hypium": "1.0.11"
},
"author": "",
"name": "sight",
"description": "Please describe the basic information.",
"main": "",
"version": "1.0.0",
"dependencies": {}
}
... ...
-----BEGIN CERTIFICATE-----
MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC
Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE
AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx
NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE
CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw
EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs
GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB
wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI
zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn
BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h
FTjgDHctXJlC5L7+ZDY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC
Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE
AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw
NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE
CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs
YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP
bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ
luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD
VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk
/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo
dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI
MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6
Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du
LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw
ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl
ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o
Q+FzM3c=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIICxjCCAkugAwIBAgIOY79lYTcHyI5az+ZALFYwCgYIKoZIzj0EAwMwYjELMAkG
A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt
MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X
DTIzMTIyNTA1MzEzNFoXDTI0MTIyNTA1MzEzNFowdTELMAkGA1UEBhMCQ04xEjAQ
BgNVBAoMCeaoiuaYjuWPizEcMBoGA1UECwwTMTE5NzkzMDQ4MTAzMTU5ODA4MTE0
MDIGA1UEAwwr5qiK5piO5Y+LKDExOTc5MzA0ODEwMzE1OTgwODEpXCxEZXZlbG9w
bWVudDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMRyJ7HQ+fMiifMVCImAjzDl
WQJqLyoFWQM8dvHolphRzIy8wj4sJ5iTKbNlUoRsrmtULPqdWgWYW5lKQyQYeP2j
gdEwgc4wDAYDVR0TAQH/BAIwADBZBgNVHR8EUjBQME6gTKBKhkhodHRwOi8vaDVo
b3N0aW5nLWRyY24uZGJhbmtjZG4uY24vY2NoNS9jcmwvaGRyY2FnMi9IdWF3ZWlD
QkdIRFJHMmNybC5jcmwwHwYDVR0jBBgwFoAU216TsiPo0OT+cXpm6aRzR1t/814w
HQYDVR0OBBYEFP/wgrm5Ql8yDbpEszJHfCxvQxb8MA4GA1UdDwEB/wQEAwIHgDAT
BgNVHSUEDDAKBggrBgEFBQcDAzAKBggqhkjOPQQDAwNpADBmAjEAnojm/vMYow4S
8uVuYGAVGW16L/XlLe7PoFrQnj0OHCjho6If8C4HnsHQZ5YEFDcSAjEAw2JGA99J
FnSyOmgDVvqlXGGjzecrBmz+XxLO8jW71RWGRGqYcmrC5odUs6mOO1Jt
-----END CERTIFICATE-----
... ...
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBNDCB3AIBADBKMQkwBwYDVQQGEwAxCTAHBgNVBAgTADEJMAcGA1UEBxMAMQkw
BwYDVQQKEwAxCTAHBgNVBAsTADERMA8GA1UEAxMIRGVidWdLZXkwWTATBgcqhkjO
PQIBBggqhkjOPQMBBwNCAATEciex0PnzIonzFQiJgI8w5VkCai8qBVkDPHbx6JaY
UcyMvMI+LCeYkymzZVKEbK5rVCz6nVoFmFuZSkMkGHj9oDAwLgYJKoZIhvcNAQkO
MSEwHzAdBgNVHQ4EFgQU//CCublCXzINukSzMkd8LG9DFvwwCgYIKoZIzj0EAwID
RwAwRAIgHAT6BlkWveRUDVWrxHD2T+MkuGM4KL3S52VH6idhCGMCIBecypUwT6kn
Al2Hfwz9hiftXBe+oNF0fD8ATmkGpI8V
-----END NEW CERTIFICATE REQUEST-----
... ...
/¬T)–»¶
å[Ÿ¥ª
\ No newline at end of file
... ...
ýs›3«”¡¥j$E\l
\ No newline at end of file
... ...
// enum
export { CompStyle } from './src/main/ets/enum/CompStyle';
export { CompType } from './src/main/ets/enum/CompType';
export { NetDataStatusType } from './src/main/ets/enum/NetDataStatusType';
export { ViewType } from './src/main/ets/enum/ViewType';
// entity
export { ItemDTO } from './src/main/ets/bean/ItemDTO';
export { ItemBean } from './src/main/ets/bean/ItemBean';
// component
export { LabelBean } from './src/main/ets/bean/component/extra/LabelBean';
export { LabelDTO } from './src/main/ets/bean/component/extra/LabelDTO';
export { GroupDTO } from './src/main/ets/bean/component/GroupDTO';
export { CompDTO } from './src/main/ets/bean/component/CompDTO';
export { ContentDTO } from './src/main/ets/bean/component/ContentDTO';
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"name": "wdbean",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
}
}
\ No newline at end of file
... ...
import { ItemDTO } from './ItemDTO';
import { Action } from './programme/Action';
import { Pic } from './programme/Pic';
/**
* 绑定到组件comp/view的数据Bean
*/
@Observed
// export abstract class ItemBean<DTO> implements Mapper<DTO> {
export abstract class ItemBean extends ItemDTO {
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) {
super(dto.action, dto.actionId, dto.pics, 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"
}
}
... ...
import { Action } from './programme/Action';
import { Pic } from './programme/Pic';
/**
* 组件comp/view对应的服务端数据
* DTO 数据传输实体类接口,所有数据传输层数据结构体需实现该接口
*/
export abstract class ItemDTO {
action?: Action; // 事件对象
actionId?: string; // 点击事件id
pics?: Pic // 图片
h5pics?: Pic; // h5图片
constructor(action?: Action, actionId?: string, pics?: Pic, h5pics?: Pic) {
this.action = action;
this.actionId = actionId;
this.pics = pics;
this.h5pics = h5pics;
}
}
... ...
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;
objectTitle: string;
// 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;
}
\ No newline at end of file
... ...
import { CompDTO } from './CompDTO';
/**
* 组件列表的body
*/
export interface GroupDTO {
pageId: string; // 页面id
id: number; // 楼层id
name: string; // 名称
branchMark: boolean;
compList: CompDTO[]; // Components集合的布局信息
// compAdList?: any[];
}
\ No newline at end of file
... ...
import { GroupDTO } from './GroupDTO';
/**
* Page数据DTO
*/
export interface PageDTO {
id: number; // 页面id
name: string; // 页面名称
description: string; // 描述
groups: GroupDTO[]; // page下的group列表
}
\ No newline at end of file
... ...
import { LabelDTO } from './LabelDTO';
import { ItemDTO } from '../../ItemDTO';
// 附加字段集合,不同组件,额外附加参数不同
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
... ...
// 事件对象
export interface Action {
type: string;
name?: string; // 行为的名称,目前值与type相同,暂不启用
// params?: Params; // 参数集合
}
\ No newline at end of file
... ...
/**
* 图片
* Pic 同 H5pic
*/
export interface Pic {
lowResolutionH?: string; //低清横图
lowResolutionV?: string; // 低清竖图
lowResolutionV34?: string; // 低清竖图(3:4比例)
highResolutionH?: string; // 高清横图
highResolutionV?: string; // 高清竖图
highResolutionV34?: string; // 高清竖图(3:4比例)
gkResolution1?: string; // g客视频1配图
gkResolution2?: string; // g客视频2配图
}
\ No newline at end of file
... ...
/**
* 底部导航 Bottom navigation item的下标/索引
* 首页 xx、 xx、 xx、 我的
*/
export const enum BottomNavi {
HOME = 0,
MINE,
}
... ...
/**
* 组件Style/展示样式
*/
export const enum CompStyle {
Label_03 = 'Label-03', // 标题
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 DelayTimeEnum {
DURATION_50 = 50, // 50毫秒
DURATION_100 = 100, // 50毫秒
DURATION_1000 = 1000, // 1秒/1000ms
DURATION_2000 = 2000, // 2秒/2000ms
LAUNCHER_DELAY_TIME = 1500 // 1.5秒
}
... ...
/**
* 请求网络数据状态类型
*/
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": "wdBean",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "全局bean"
}
]
}
\ No newline at end of file
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...
export { CompUtils } from "./src/main/ets/utils/CompUtils"
export { EmptyComponent } from "./src/main/ets/components/EmptyComponent"
export { ErrorComponent } from "./src/main/ets/components/ErrorComponent"
export { LoadingComponent } from "./src/main/ets/components/LoadingComponent"
export { LabelComponent } from "./src/main/ets/components/LabelComponent"
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"name": "wdcomponent",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"wdBean": "file:../wdBean",
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit"
}
}
\ 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 LinkList from '@ohos.util.List';
import { LabelBean } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { Logger } from 'wdKit';
import { EmptyComponent } from './EmptyComponent';
const TAG = 'LabelComponent';
/**
* 标题/标签组件(暂时仅展示主标题,不展示子标题)
* LABEL-01
* 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/
* 1.只有一个LABEL主标题(如重磅推荐)
* 2.左右共两个LABEL(左边【电影】是主标题/右边【上海电影节】是子标题)
*/
@Component
export struct LabelComponent {
@State label: string = '';
build() {
Row() {
Text(this.label)
.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 { LabelDTO } from 'wdBean';
import { Logger } from 'wdKit';
const TAG: string = 'CompCornerUtil';
/**
* 与组件布局(边距/间距/圆角半径)相关的数字
*/
export class CompUtils {
// 高/宽比
public static readonly ASPECT_RATIO_1_1: number = 1;
public static readonly ASPECT_RATIO_2_1: number = 2;
public static readonly ASPECT_RATIO_3_4: number = 3 / 4;
public static readonly ASPECT_RATIO_16_9: number = 16 / 9;
public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比
/**
* The max lines.
*/
public static readonly MAX_LINES_ONE: number = 1;
public static readonly MAX_LINES_TWO: number = 2;
/**
* 获取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 ?? "";
}
}
... ...
{
"module": {
"name": "wdComponent",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"float": [
{
"name": "normal_text_size",
"value": "16fp"
},
{
"name": "main_margin",
"value": "14vp"
},
{
"name": "label_margin_top",
"value": "10vp"
},
{
"name": "label_margin_bottom",
"value": "8vp"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "基础自定义组件库"
}
]
}
\ No newline at end of file
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...
export { CommonConstants } from './src/main/ets/constants/CommonConstants';
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"name": "wdconstant",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
}
}
\ 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;
}
;
... ...
{
"module": {
"name": "wdConstant",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "全局常量"
}
]
}
\ No newline at end of file
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...
export { Logger } from './src/main/ets/utils/Logger'
export { ResourcesUtils } from './src/main/ets/utils/ResourcesUtils'
export { StringUtils } from './src/main/ets/utils/StringUtils'
export { BasicDataSource } from './src/main/ets/utils/BasicDataSource';
export { LazyDataSource } from './src/main/ets/utils/LazyDataSource'
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"name": "wdkit",
"version": "1.0.0",
"description": "Please describe the basic information.",
"main": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
}
}
\ No newline at end of file
... ...
/**
* 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
... ...
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];
}
// 增加/插入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);
}
}
// 在数据尾部增加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 replaceAll(...data: T[]): void {
// 从数组中的0位置开始删除dataArray.length个元素,并在同一位置插入((1个或多个))新元素,返回已删除的元素。
this.dataArray.splice(0, this.dataArray.length, ...data);
this.notifyDataReload()
}
}
\ 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 = 'SightApp';
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 = 'SightApp', domain: number = 0xFF00) {
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('SightApp', 0xFF00)
\ No newline at end of file
... ...
import buffer from '@ohos.buffer';
import { BusinessError } from '@ohos.base';
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);
})
})
}
/**
* 获取资源字符串内容
* @param context
* @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json",test.xml,
* @returns text 字符串
*/
static getResourcesTextSync(context: Context, filename: string): string | null {
Logger.info(TAG, `getResourcesTextSync filename: ${filename}`);
try {
let content: Uint8Array = context.resourceManager.getRawFileContentSync(filename)
if (!content) {
Logger.warn(TAG, 'getResourcesTextSync content is empty');
return null
}
let text = buffer.from(content).toString("utf8");
if (text) {
// Logger.info(TAG, "getRawFileContentSync text:" + text);
} else {
Logger.warn(TAG, "getRawFileContentSync text is empty");
}
return text;
} catch (err) {
// 转换异常
Logger.error(TAG, `getResourcesText catch err.: ${err}`);
return null;
}
}
/**
* 获取资源文件并转为JSON
*
* @param appContext 上下文
* @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json"
* SubscribeListData.json
* @returns JSON Object
*
* 调用方式:todo:
*/
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: BusinessError) => {
reject(error)
})
})
}
static getResourcesJsonSync<R>(context: Context, filename: string): R | null {
Logger.info(TAG, `getResourcesJsonSync filename: ${filename}`);
let text = ResourcesUtils.getResourcesTextSync(context, filename)
if (!text) {
Logger.warn(TAG, `getResourcesJsonSync file result is empty`);
return null
}
try {
// let config: R = JSON.parse(text)
let config:R = JSON.parse(text) as R;
return config
} catch (err) {
// json解析异常
Logger.error(TAG, `getResourcesJsonSync catch parse failed.: ${err}`);
return null
}
}
}
\ No newline at end of file
... ...
const SLEEP_TIME: number = 10;
/**
* 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 isObject(value: any): boolean {
return Object.prototype.toString.call(value) === '[object Object]';
}
static isNotNullObject(value: unknown): boolean {
return value !== null ? typeof value === 'object' : false;
}
static isNullOrUndefined(value: any): boolean {
return value === undefined || value === null;
}
static isFunction(object: any): boolean {
return typeof object === 'function';
}
static isValidObject(objectList: any): boolean {
if (!objectList || typeof objectList !== 'object'
|| objectList.constructor.name === 'Object') {
return false;
}
return true;
}
static isClass(object: any): boolean {
if (StringUtils.isFunction(object)) {
const prototype = object.prototype;
if (!StringUtils.isNotNullObject(prototype)) {
return false;
}
const constructor = prototype.constructor;
if (StringUtils.isFunction(constructor)) {
return true;
}
}
return false;
}
static getClassName(clz: any): string {
if (StringUtils.isNullOrUndefined(clz)) {
return clz;
}
let input = clz;
if (!StringUtils.isClass(input)) {
input = clz.constructor;
}
return input.className ? input.className : input.name;
}
static hash(value: string | number): string {
const str = '' + value;
let hash = 5381;
let index = str.length;
while (index) {
hash = (hash * 33) ^ str.charCodeAt(--index);
}
return '' + (hash >>> 0);
}
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 async sleep(times: number): Promise<void> {
if (!times) {
times = SLEEP_TIME;
}
await new Promise((res) => setTimeout(res, times)) // .then().catch().finally();
}
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",
"2in1"
],
"deliveryWithInstall": true
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "全局工具包"
}
]
}
\ No newline at end of file
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...
export { ResponseDTO } from './src/main/ets/bean/ResponseDTO'
export { ResponseVO } from './src/main/ets/bean/ResponseVO'
export { ResultCode } from './src/main/ets/bean/ResultCode'
\ No newline at end of file
... ...
{
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
}
},
"buildOptionSet": [
{
"name": "release",
"arkOptions": {
"obfuscation": {
"ruleOptions": {
"enable": true,
"files": [
"./obfuscation-rules.txt"
]
}
}
}
},
],
"targets": [
{
"name": "default"
}
]
}
\ No newline at end of file
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
... ...
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
# For more details, see
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
# Obfuscation options:
# -disable-obfuscation: disable all obfuscations
# -enable-property-obfuscation: obfuscate the property names
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
# -compact: remove unnecessary blank spaces and all line feeds
# -remove-log: remove all console.* statements
# -print-namecache: print the name cache that contains the mapping from the old names to new names
# -apply-namecache: reuse the given cache file
# Keep options:
# -keep-property-name: specifies property names that you want to keep
# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
... ...
{
"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": "Index.ets",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@ohos/axios": "^2.1.1"
}
}
\ No newline at end of file
... ...
/**
* ResponseDTO
*/
export interface ResponseDTO<T = string> {
success:boolean;
// 服务请求响应值/微服务响应状态码”
code: number;
// 服务请求响应说明
message: string;
// 响应结果
data?: T;
// 请求响应时间戳(unix格式)
timestamp?: number;
}
\ No newline at end of file
... ...
/**
* ResponseVO
*/
export interface ResponseVO<T = string> {
// 返回代码,参考附录ResultCode 即(ACCEPTED/SUCCESS/FAILED/REJECTED等)
resultCode: string;
// 返回描述
resultDesc: string;
// 错误码,参考附录和接口中ErrorCode(当resultCode=FAILED才有),如:"ERR_USER_NOTFOUND"
errorCode?: string;
// 业务数据
data?: T;
}
\ No newline at end of file
... ...
/**
* The Response ResultCode enum.
*/
export const enum ResultCode {
// 请求执行(查询)成功
SUCCESS = 'SUCCESS',
// 请求执行(查询)失败
FAILED = 'FAILED',
// 该请求被拒绝处理,例如参数错误或非法等
REJECTED = 'REJECTED',
// 该请求已经被接收,但是本次同步返回无法知道执行结果
ACCEPTED = 'ACCEPTED',
// 参数错误
// ERR_NOT_VALID_PARAMETERS = 'ERR_NOT_VALID_PARAMETERS'
}
... ...
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 default 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)
}
}
... ...
const TAG: string = '[HttpUtils]'
export class HttpUtils {
static buildHeaders(): Record<string, string> {
let timestamp: number = new Date().getTime(); // 单位毫秒
let headers: Record<string, string> = {};
// 通用请求头
// 设备信息请求头
// headers["User-Agent"] = ''; // 终端UA,自动获取
headers["Content-Type"] = 'application/json;charset=UTF-8'; // 返回/响应的HTTP内容类型
headers["os"] = 'harmony'; // 操作系统类型:鸿蒙、安卓或iOS
// 用户信息/登录信息请求头:登录完成之后二级接口返回,带入头信息;未登录情况下,头信息不传这些字段
// 签名相关请求头
headers["timeStamp"] = timestamp + ''; // 服务端时间戳(毫秒):1701667763664
headers["signType"] = 'RSA'; // 签名类型,固定RSA
// 业务请求头
// 添加其他header
// Logger.info(TAG, "buildHeader headers:" + JSON.stringify(headers));
return headers;
}
}
// export default new HttpUtils()
... ...
{
"module": {
"name": "wdNetwork",
"type": "shared",
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
],
"deliveryWithInstall": true,
"requestPermissions": [
{
"name": "ohos.permission.INTERNET"
}
]
}
}
\ No newline at end of file
... ...
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}
\ No newline at end of file
... ...
{
"string": [
{
"name": "shared_desc",
"value": "网络库"
}
]
}
\ No newline at end of file
... ...
import localUnitTest from './LocalUnit.test';
export default function testsuite() {
localUnitTest();
}
\ No newline at end of file
... ...
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
export default function localUnitTest() {
describe('localUnitTest',() => {
// Defines a test suite. Two parameters are supported: test suite name and test suite function.
beforeAll(() => {
// 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(() => {
// 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(() => {
// 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(() => {
// 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, () => {
// Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
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
... ...