Showing
145 changed files
with
5144 additions
and
0 deletions
sight_harmony/Sight/AppScope/app.json5
0 → 100644
| 1 | +{ | ||
| 2 | + "string": [ | ||
| 3 | + { | ||
| 4 | + "name": "app_name", | ||
| 5 | + "value": "Sight" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "name": "app_desc", | ||
| 9 | + "value": "Wonder Tek layout" | ||
| 10 | + }, | ||
| 11 | + { | ||
| 12 | + "name": "app_vendor", | ||
| 13 | + "value": "Wonder Tek" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "load_net_data_loading", | ||
| 17 | + "value": "loading..." | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "load_net_data_failed", | ||
| 21 | + "value": "load net data failed" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "load_net_data_none", | ||
| 25 | + "value": "no data" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
1.99 KB
| 1 | +{ | ||
| 2 | + "string": [ | ||
| 3 | + { | ||
| 4 | + "name": "app_name", | ||
| 5 | + "value": "Sight" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "name": "app_desc", | ||
| 9 | + "value": "网达编排app" | ||
| 10 | + }, | ||
| 11 | + { | ||
| 12 | + "name": "app_vendor", | ||
| 13 | + "value": "网达" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "name": "load_net_data_loading", | ||
| 17 | + "value": "加载中..." | ||
| 18 | + }, | ||
| 19 | + { | ||
| 20 | + "name": "load_net_data_failed", | ||
| 21 | + "value": "加载网络数据失败" | ||
| 22 | + }, | ||
| 23 | + { | ||
| 24 | + "name": "load_net_data_none", | ||
| 25 | + "value": "很抱歉,未能找到相关内容" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
sight_harmony/Sight/README.md
0 → 100644
| 1 | +# 网达编排 | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +## 介绍 | ||
| 5 | + | ||
| 6 | +### 相关概念 | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +## 环境搭建 | ||
| 10 | + | ||
| 11 | +### 软件要求 | ||
| 12 | + | ||
| 13 | +### 硬件要求 | ||
| 14 | + | ||
| 15 | +### 环境搭建 | ||
| 16 | +DevEco Studio使用指南/配置开发环境: | ||
| 17 | + | ||
| 18 | +``` 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 ``` | ||
| 19 | + | ||
| 20 | +ohpm使用指导: | ||
| 21 | + | ||
| 22 | +``` https://developer.harmonyos.com/cn/docs/search?type=all&val=ohpm%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC ``` | ||
| 23 | + | ||
| 24 | +hdc使用指导: | ||
| 25 | + | ||
| 26 | +``` https://developer.harmonyos.com/cn/docs/search?val=hdc%E4%BD%BF%E7%94%A8%E6%8C%87%E5%AF%BC ``` | ||
| 27 | + | ||
| 28 | +### 下载安装 | ||
| 29 | +如何使用ohpm引入三四方库 | ||
| 30 | +方式一: | ||
| 31 | + | ||
| 32 | +打开Terminal窗口,通过如下指令进入到entry目录。 | ||
| 33 | +``` | ||
| 34 | +cd entry | ||
| 35 | +``` | ||
| 36 | + | ||
| 37 | +以引入“@ohos/axios”为例,执行以下指令进行安装。 | ||
| 38 | +``` | ||
| 39 | +ohpm install @ohos/axios | ||
| 40 | +``` | ||
| 41 | + | ||
| 42 | +在对应的eTS文件中直接引用。 | ||
| 43 | +``` | ||
| 44 | +import axios from '@ohos/axios'; | ||
| 45 | +``` | ||
| 46 | + | ||
| 47 | +方式二: | ||
| 48 | +打开工程目录下的entry目录,找到该目录下的oh-package.json5文件。 | ||
| 49 | +在oh-package.json5文件中写入想要安装的三方库,以“@ohos/axios”为例,示例如下: | ||
| 50 | +``` | ||
| 51 | +{ | ||
| 52 | + "dependencies": { | ||
| 53 | + "@ohos/axios": "^2.1.1" | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | +``` | ||
| 57 | + | ||
| 58 | +打开Terminal窗口,通过如下指令进入到entry目录。 | ||
| 59 | +``` | ||
| 60 | +cd entry | ||
| 61 | +``` | ||
| 62 | + | ||
| 63 | +执行指令进行安装。 | ||
| 64 | +``` | ||
| 65 | +ohpm install | ||
| 66 | +``` | ||
| 67 | + | ||
| 68 | +在对应的eTS文件中直接引用。 | ||
| 69 | +``` | ||
| 70 | +import axios from '@ohos/axios'; | ||
| 71 | +``` | ||
| 72 | + | ||
| 73 | +同理,在mlayout模块使用三方库@ohos/lottie(V2.0.7) | ||
| 74 | +https://ohpm.openharmony.cn/#/cn/detail/@ohos%2Flottie | ||
| 75 | + | ||
| 76 | +## 代码结构解读 | ||
| 77 | + | ||
| 78 | +## 总结 | ||
| 79 | + | ||
| 80 | +## todo: | ||
| 81 | +1.申请企业签名: | ||
| 82 | + | ||
| 83 | + --目前构建包时,用的是个人签名。 | ||
| 84 | + | ||
| 85 | +2.确保先请求组件的先展示. | ||
| 86 | + | ||
| 87 | + --对于一个页面,从上到下顺序请求组件,每个组件数据请求/返回耗时不同,故先请求的组件不一定先返回,但要业务确保先请求的组件先展示. | ||
| 88 | + | ||
| 89 | +3.后台需要增加harmony鸿蒙平台参数(包括接口参数clientId, terminalId,appType及返回字段), |
sight_harmony/Sight/build-profile.json5
0 → 100644
| 1 | +{ | ||
| 2 | + "app": { | ||
| 3 | + "signingConfigs": [ | ||
| 4 | + { | ||
| 5 | + "name": "default", | ||
| 6 | + "type": "HarmonyOS", | ||
| 7 | + "material": { | ||
| 8 | + "certpath": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.cer", | ||
| 9 | + "storePassword": "0000001A1B78DEF1A1F37D3B21A3186A35C37F3B4E24D862BD2C2E83A1B90B6778A8428D86A801422555", | ||
| 10 | + "keyAlias": "debugKey", | ||
| 11 | + "keyPassword": "0000001A130E1AC750B7D3AC097F15548CD171AC97C25A97A51242701764AB1E51097999D8CCF12C75AB", | ||
| 12 | + "profile": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p7b", | ||
| 13 | + "signAlg": "SHA256withECDSA", | ||
| 14 | + "storeFile": "./singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p12" | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | + ], | ||
| 18 | + "products": [ | ||
| 19 | + { | ||
| 20 | + "name": "default", | ||
| 21 | + "signingConfig": "default", | ||
| 22 | + "compileSdkVersion": "4.0.0(10)", | ||
| 23 | + "compatibleSdkVersion": "4.0.0(10)", | ||
| 24 | + "runtimeOS": "HarmonyOS", | ||
| 25 | + } | ||
| 26 | + ], | ||
| 27 | + "buildModeSet": [ | ||
| 28 | + { | ||
| 29 | + "name": "debug", | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "name": "release" | ||
| 33 | + } | ||
| 34 | + ] | ||
| 35 | + }, | ||
| 36 | + "modules": [ | ||
| 37 | + { | ||
| 38 | + "name": "entry", | ||
| 39 | + "srcPath": "./entry", | ||
| 40 | + "targets": [ | ||
| 41 | + { | ||
| 42 | + "name": "default", | ||
| 43 | + "applyToProducts": [ | ||
| 44 | + "default" | ||
| 45 | + ] | ||
| 46 | + } | ||
| 47 | + ] | ||
| 48 | + }, | ||
| 49 | + { | ||
| 50 | + "name": "wdKit", | ||
| 51 | + "srcPath": "./wdKit", | ||
| 52 | + "targets": [ | ||
| 53 | + { | ||
| 54 | + "name": "default", | ||
| 55 | + "applyToProducts": [ | ||
| 56 | + "default" | ||
| 57 | + ] | ||
| 58 | + } | ||
| 59 | + ] | ||
| 60 | + }, | ||
| 61 | + { | ||
| 62 | + "name": "wdBean", | ||
| 63 | + "srcPath": "./wdBean", | ||
| 64 | + "targets": [ | ||
| 65 | + { | ||
| 66 | + "name": "default", | ||
| 67 | + "applyToProducts": [ | ||
| 68 | + "default" | ||
| 69 | + ] | ||
| 70 | + } | ||
| 71 | + ] | ||
| 72 | + }, | ||
| 73 | + { | ||
| 74 | + "name": "wdComponent", | ||
| 75 | + "srcPath": "./wdComponent", | ||
| 76 | + "targets": [ | ||
| 77 | + { | ||
| 78 | + "name": "default", | ||
| 79 | + "applyToProducts": [ | ||
| 80 | + "default" | ||
| 81 | + ] | ||
| 82 | + } | ||
| 83 | + ] | ||
| 84 | + }, | ||
| 85 | + { | ||
| 86 | + "name": "wdConstant", | ||
| 87 | + "srcPath": "./wdConstant", | ||
| 88 | + "targets": [ | ||
| 89 | + { | ||
| 90 | + "name": "default", | ||
| 91 | + "applyToProducts": [ | ||
| 92 | + "default" | ||
| 93 | + ] | ||
| 94 | + } | ||
| 95 | + ] | ||
| 96 | + }, | ||
| 97 | + { | ||
| 98 | + "name": "wdNetwork", | ||
| 99 | + "srcPath": "./wdNetwork", | ||
| 100 | + "targets": [ | ||
| 101 | + { | ||
| 102 | + "name": "default", | ||
| 103 | + "applyToProducts": [ | ||
| 104 | + "default" | ||
| 105 | + ] | ||
| 106 | + } | ||
| 107 | + ] | ||
| 108 | + } | ||
| 109 | + ] | ||
| 110 | +} |
This file is too large to display.
No preview for this file type
No preview for this file type
sight_harmony/Sight/dependencies/rollup.tgz
0 → 100644
No preview for this file type
| 1 | +## 在1台电脑中配置2个git帐号(GitHub和GitLab) - windows版 | ||
| 2 | + | ||
| 3 | +参考链接: | ||
| 4 | +https://blog.csdn.net/acai_encode/article/details/130776105 | ||
| 5 | +在Windows下同台电脑Git配置多个SSH-Key | ||
| 6 | + | ||
| 7 | +https://blog.csdn.net/jifaliwo123/article/details/79126785 | ||
| 8 | +一台电脑绑定两个git帐号(GitHub和GitLab) | ||
| 9 | + | ||
| 10 | +参考: | ||
| 11 | +https://git-scm.com/docs/gitfaq | ||
| 12 | + | ||
| 13 | + |
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "name": "ohosTest", | ||
| 29 | + } | ||
| 30 | + ] | ||
| 31 | +} |
sight_harmony/Sight/entry/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
sight_harmony/Sight/entry/oh-package.json5
0 → 100644
| 1 | +{ | ||
| 2 | + "license": "", | ||
| 3 | + "devDependencies": {}, | ||
| 4 | + "author": "", | ||
| 5 | + "name": "entry", | ||
| 6 | + "description": "Please describe the basic information.", | ||
| 7 | + "main": "", | ||
| 8 | + "version": "1.0.0", | ||
| 9 | + "dependencies": { | ||
| 10 | + "wdBean": "file:../wdBean", | ||
| 11 | + "wdComponent": "file:../wdComponent", | ||
| 12 | + "wdConstant": "file:../wdConstant", | ||
| 13 | + "wdKit": "file:../wdKit", | ||
| 14 | + "wdNetwork": "file:../wdNetwork" | ||
| 15 | + } | ||
| 16 | +} |
| 1 | +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; | ||
| 2 | +import hilog from '@ohos.hilog'; | ||
| 3 | +import UIAbility from '@ohos.app.ability.UIAbility'; | ||
| 4 | +import Want from '@ohos.app.ability.Want'; | ||
| 5 | +import window from '@ohos.window'; | ||
| 6 | + | ||
| 7 | +export default class EntryAbility extends UIAbility { | ||
| 8 | + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { | ||
| 9 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + onDestroy(): void { | ||
| 13 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + onWindowStageCreate(windowStage: window.WindowStage): void { | ||
| 17 | + // Main window is created, set main page for this ability | ||
| 18 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | ||
| 19 | + | ||
| 20 | + windowStage.loadContent('pages/Index', (err, data) => { | ||
| 21 | + if (err.code) { | ||
| 22 | + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | ||
| 23 | + return; | ||
| 24 | + } | ||
| 25 | + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); | ||
| 26 | + }); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + onWindowStageDestroy(): void { | ||
| 30 | + // Main window is destroyed, release UI related resources | ||
| 31 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + onForeground(): void { | ||
| 35 | + // Ability has brought to foreground | ||
| 36 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + onBackground(): void { | ||
| 40 | + // Ability has back to background | ||
| 41 | + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); | ||
| 42 | + } | ||
| 43 | +} |
| 1 | +import { GroupDTO } from 'wdBean'; | ||
| 2 | +import { LazyDataSource, Logger } from 'wdKit'; | ||
| 3 | +import { PageViewModel } from '../viewmodel/PageViewModel'; | ||
| 4 | +import { PageComponent } from './PageComponent'; | ||
| 5 | + | ||
| 6 | +const TAG = 'Index'; | ||
| 7 | + | ||
| 8 | +@Entry | ||
| 9 | +@Component | ||
| 10 | +struct Index { | ||
| 11 | + @State groupList: LazyDataSource<GroupDTO> = new LazyDataSource(); | ||
| 12 | + // @Prop groupList: GroupDTO[] = []; | ||
| 13 | + @State message: string = 'Hello Sight'; | ||
| 14 | + | ||
| 15 | + build() { | ||
| 16 | + Column() { | ||
| 17 | + PageComponent({ groupList: this.groupList }) | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + aboutToAppear() { | ||
| 22 | + // Logger.info(TAG, `aboutToAppear, this.currentTabIndex1: ${this.currentNavIndex}`); | ||
| 23 | + // PageViewModel.getGroupDTO(); | ||
| 24 | + let groupDto = PageViewModel.getGroupDTO(getContext(this)) | ||
| 25 | + if (groupDto) { | ||
| 26 | + this.groupList.push(groupDto) | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + aboutToDisappear() { | ||
| 31 | + Logger.info(TAG, 'aboutToDisappear'); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + onPageShow() { | ||
| 35 | + Logger.info(TAG, 'onPageShow'); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + onPageHide() { | ||
| 39 | + Logger.info(TAG, 'onPageHide'); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + onBackPress() { | ||
| 43 | + Logger.info(TAG, 'onBackPress'); | ||
| 44 | + } | ||
| 45 | +} |
| 1 | +import { CompDTO, CompStyle, GroupDTO, ItemBean, ItemDTO, ViewType } from 'wdBean'; | ||
| 2 | +import { CompUtils, EmptyComponent, ErrorComponent, LabelComponent, LoadingComponent, } from 'wdComponent'; | ||
| 3 | +import { CommonConstants } from 'wdConstant'; | ||
| 4 | +import { LazyDataSource, Logger, StringUtils } from 'wdKit'; | ||
| 5 | + | ||
| 6 | + | ||
| 7 | +const TAG = 'PageComponent'; | ||
| 8 | + | ||
| 9 | +@Component | ||
| 10 | +export struct PageComponent { | ||
| 11 | + @Prop viewType: number = ViewType.LOADED; | ||
| 12 | + // Group数据及子组件数据 | ||
| 13 | + @State groupList: LazyDataSource<GroupDTO> = new LazyDataSource(); | ||
| 14 | + @State isRefreshing: boolean = false | ||
| 15 | + | ||
| 16 | + build() { | ||
| 17 | + if (this.viewType == ViewType.LOADING) { | ||
| 18 | + LoadingComponent() | ||
| 19 | + } else if (this.viewType == ViewType.ERROR) { | ||
| 20 | + ErrorComponent() | ||
| 21 | + } else if (this.viewType == ViewType.EMPTY) { | ||
| 22 | + EmptyComponent() | ||
| 23 | + } else { | ||
| 24 | + Refresh({ refreshing: this.isRefreshing }) { | ||
| 25 | + List() { | ||
| 26 | + LazyForEach(this.groupList, (groupDTO: GroupDTO, groupIndex: number) => { | ||
| 27 | + ListItem() { | ||
| 28 | + Column() { | ||
| 29 | + ForEach(groupDTO.compList, (compDTO: CompDTO, compIndex: number) => { | ||
| 30 | + this.componentBuilder(compDTO, groupIndex, compIndex) | ||
| 31 | + }) | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + }) | ||
| 35 | + } | ||
| 36 | + .cachedCount(5) | ||
| 37 | + .height(CommonConstants.FULL_PARENT) | ||
| 38 | + | ||
| 39 | + // .padding({ | ||
| 40 | + // bottom: (this.currentNavIndex === 0 || this.currentNavIndex === 1) ? $r('app.float.search_bar_height') : 0 | ||
| 41 | + // }) // 当页面顶部有搜索bar时,页面的list增加bottom的padding为搜索bar的高度 | ||
| 42 | + } | ||
| 43 | + .onRefreshing(() => { | ||
| 44 | + this.isRefreshing = true | ||
| 45 | + // this.sendRequest(true) | ||
| 46 | + // setTimeout(() => { | ||
| 47 | + // this.isRefreshing = false | ||
| 48 | + // }, 2000) | ||
| 49 | + }) | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Builder | ||
| 54 | + componentBuilder(compDTO: CompDTO, groupIndex: number, compIndex: number) { | ||
| 55 | + if (compDTO.compStyle === CompStyle.Label_03) { | ||
| 56 | + LabelComponent({ label: CompUtils.getLabelTitle(compDTO.extraData) }) | ||
| 57 | + } else { | ||
| 58 | + // todo:组件未实现 / Component Not Implemented | ||
| 59 | + Text(compDTO.compStyle) | ||
| 60 | + .width(CommonConstants.FULL_PARENT) | ||
| 61 | + .padding(10) | ||
| 62 | + // .backgroundColor(Color.Brown) // 展示本页未实现的compStyle | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + aboutToAppear() { | ||
| 67 | + Logger.info(TAG, `aboutToAppear, this.pageId: ${this.viewType}`); | ||
| 68 | + } | ||
| 69 | +} | ||
| 70 | + |
| 1 | +import { GroupDTO } from 'wdBean'; | ||
| 2 | +import { Logger, ResourcesUtils } from 'wdKit'; | ||
| 3 | +import { ResponseDTO } from 'wdNetwork'; | ||
| 4 | + | ||
| 5 | +const TAG = 'PageViewModel'; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 处理返回后的数据 | ||
| 9 | + */ | ||
| 10 | +export class PageViewModel { | ||
| 11 | + /** | ||
| 12 | + * Get Group data. | ||
| 13 | + * | ||
| 14 | + * @return {GroupDTO} compRes.data | ||
| 15 | + */ | ||
| 16 | + static getGroupDTO(context: Context): GroupDTO { | ||
| 17 | + let compRes: ResponseDTO<GroupDTO> | null = ResourcesUtils.getResourcesJsonSync<ResponseDTO<GroupDTO>>(context, 'comp_list.json'); | ||
| 18 | + Logger.info(TAG, `getCompList getResourcesJson compRes : ${JSON.stringify(compRes)}`); | ||
| 19 | + if (!compRes || !compRes.data) { | ||
| 20 | + return {} as GroupDTO | ||
| 21 | + } | ||
| 22 | + return compRes.data | ||
| 23 | + } | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +let pageViewModel = new PageViewModel(); | ||
| 27 | + | ||
| 28 | +export default pageViewModel as PageViewModel; |
| 1 | +{ | ||
| 2 | + "module": { | ||
| 3 | + "name": "entry", | ||
| 4 | + "type": "entry", | ||
| 5 | + "description": "$string:module_desc", | ||
| 6 | + "mainElement": "EntryAbility", | ||
| 7 | + "deviceTypes": [ | ||
| 8 | + "phone", | ||
| 9 | + "tablet", | ||
| 10 | + "2in1" | ||
| 11 | + ], | ||
| 12 | + "deliveryWithInstall": true, | ||
| 13 | + "installationFree": false, | ||
| 14 | + "pages": "$profile:main_pages", | ||
| 15 | + "abilities": [ | ||
| 16 | + { | ||
| 17 | + "name": "EntryAbility", | ||
| 18 | + "srcEntry": "./ets/entryability/EntryAbility.ets", | ||
| 19 | + "description": "$string:EntryAbility_desc", | ||
| 20 | + "icon": "$media:icon", | ||
| 21 | + "label": "$string:EntryAbility_label", | ||
| 22 | + "startWindowIcon": "$media:startIcon", | ||
| 23 | + "startWindowBackground": "$color:start_window_background", | ||
| 24 | + "exported": true, | ||
| 25 | + "skills": [ | ||
| 26 | + { | ||
| 27 | + "entities": [ | ||
| 28 | + "entity.system.home" | ||
| 29 | + ], | ||
| 30 | + "actions": [ | ||
| 31 | + "action.system.home" | ||
| 32 | + ] | ||
| 33 | + } | ||
| 34 | + ] | ||
| 35 | + } | ||
| 36 | + ] | ||
| 37 | + } | ||
| 38 | +} |
1.99 KB
4.25 KB
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": { | ||
| 4 | + "compAdList": [ | ||
| 5 | + | ||
| 6 | + ], | ||
| 7 | + "compList": [ | ||
| 8 | + { | ||
| 9 | + "backgroundColor": "", | ||
| 10 | + "backgroundImgUrl": "", | ||
| 11 | + "cityCode": "", | ||
| 12 | + "compStyle": "Single_Row-03", | ||
| 13 | + "compType": "SINGLE_ROW", | ||
| 14 | + "dataSourceRequest": [ | ||
| 15 | + | ||
| 16 | + ], | ||
| 17 | + "districtCode": "", | ||
| 18 | + "extraData": "", | ||
| 19 | + "hasAdInfo": 0, | ||
| 20 | + "id": 6931, | ||
| 21 | + "imgSize": "", | ||
| 22 | + "innerUrl": "", | ||
| 23 | + "linkUrl": "", | ||
| 24 | + "meddleDataList": [ | ||
| 25 | + | ||
| 26 | + ], | ||
| 27 | + "name": "直播预告", | ||
| 28 | + "objectId": "", | ||
| 29 | + "objectTitle": "", | ||
| 30 | + "objectType": null, | ||
| 31 | + "operDataList": [ | ||
| 32 | + { | ||
| 33 | + "cityCode": "", | ||
| 34 | + "coverSize": "869*489", | ||
| 35 | + "coverType": 1, | ||
| 36 | + "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", | ||
| 37 | + "description": "", | ||
| 38 | + "districtCode": "", | ||
| 39 | + "endTime": "", | ||
| 40 | + "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", | ||
| 41 | + "heatValue": "", | ||
| 42 | + "innerUrl": "", | ||
| 43 | + "landscape": 1, | ||
| 44 | + "lengthTime": null, | ||
| 45 | + "linkUrl": "", | ||
| 46 | + "openLikes": 0, | ||
| 47 | + "openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/b2877faddf2c427da7ef6d96f9594b99_lud/122987.m3u8", | ||
| 48 | + "pageId": "", | ||
| 49 | + "playUrls": [ | ||
| 50 | + | ||
| 51 | + ], | ||
| 52 | + "programAuth": "4251160", | ||
| 53 | + "programId": "20000092979", | ||
| 54 | + "programName": "", | ||
| 55 | + "programSource": 5, | ||
| 56 | + "programType": 2, | ||
| 57 | + "provinceCode": "", | ||
| 58 | + "rankingList": [ | ||
| 59 | + | ||
| 60 | + ], | ||
| 61 | + "showTitleEd": "", | ||
| 62 | + "showTitleIng": "", | ||
| 63 | + "showTitleNo": "", | ||
| 64 | + "sortValue": null, | ||
| 65 | + "startTime": "2023-11-21 23:59:59", | ||
| 66 | + "subType": "", | ||
| 67 | + "subtitle": "", | ||
| 68 | + "title": "贵州黔南州翁安县建中镇", | ||
| 69 | + "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" | ||
| 70 | + }, | ||
| 71 | + { | ||
| 72 | + "cityCode": "110100", | ||
| 73 | + "coverSize": "", | ||
| 74 | + "coverType": 1, | ||
| 75 | + "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", | ||
| 76 | + "description": "霜降,是秋季的最后一个节气,意味着冬天即将开始。《月令七十二候集解》记载:“九月中,气肃而凝,露结为霜矣。”此时节,树叶经过秋霜洗礼,有的变成深红色,有的变成金黄色,呈现出一幅幅绝美的“大地画卷”。登山赏叶,漫步乡野,徜徉海岸,尽享多彩美景不负秋日好时光", | ||
| 77 | + "districtCode": "不限", | ||
| 78 | + "endTime": "", | ||
| 79 | + "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", | ||
| 80 | + "heatValue": "", | ||
| 81 | + "innerUrl": "", | ||
| 82 | + "landscape": 1, | ||
| 83 | + "lengthTime": null, | ||
| 84 | + "linkUrl": "", | ||
| 85 | + "openLikes": 0, | ||
| 86 | + "openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/6f68f19ff71a4feca24f20478646b41e_lud/122936.m3u8", | ||
| 87 | + "pageId": "", | ||
| 88 | + "playUrls": [ | ||
| 89 | + | ||
| 90 | + ], | ||
| 91 | + "programAuth": "2004545", | ||
| 92 | + "programId": "20000092928", | ||
| 93 | + "programName": "", | ||
| 94 | + "programSource": 5, | ||
| 95 | + "programType": 2, | ||
| 96 | + "provinceCode": "110000", | ||
| 97 | + "rankingList": [ | ||
| 98 | + | ||
| 99 | + ], | ||
| 100 | + "showTitleEd": "", | ||
| 101 | + "showTitleIng": "", | ||
| 102 | + "showTitleNo": "", | ||
| 103 | + "sortValue": null, | ||
| 104 | + "startTime": "2023-11-15 17:34:17", | ||
| 105 | + "subType": "", | ||
| 106 | + "subtitle": "", | ||
| 107 | + "title": "1114回归推流直播32", | ||
| 108 | + "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" | ||
| 109 | + }, | ||
| 110 | + { | ||
| 111 | + "cityCode": "021", | ||
| 112 | + "coverSize": "366*206", | ||
| 113 | + "coverType": 1, | ||
| 114 | + "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", | ||
| 115 | + "description": "", | ||
| 116 | + "districtCode": "310115", | ||
| 117 | + "endTime": "", | ||
| 118 | + "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", | ||
| 119 | + "heatValue": "", | ||
| 120 | + "innerUrl": "", | ||
| 121 | + "landscape": 1, | ||
| 122 | + "lengthTime": null, | ||
| 123 | + "linkUrl": "", | ||
| 124 | + "openLikes": 0, | ||
| 125 | + "openUrl": "", | ||
| 126 | + "pageId": "", | ||
| 127 | + "playUrls": [ | ||
| 128 | + | ||
| 129 | + ], | ||
| 130 | + "programAuth": "4131511", | ||
| 131 | + "programId": "20000093004", | ||
| 132 | + "programName": "", | ||
| 133 | + "programSource": 5, | ||
| 134 | + "programType": 2, | ||
| 135 | + "provinceCode": "021", | ||
| 136 | + "rankingList": [ | ||
| 137 | + | ||
| 138 | + ], | ||
| 139 | + "showTitleEd": "", | ||
| 140 | + "showTitleIng": "", | ||
| 141 | + "showTitleNo": "", | ||
| 142 | + "sortValue": null, | ||
| 143 | + "startTime": "2023-11-21 10:46:47", | ||
| 144 | + "subType": "", | ||
| 145 | + "subtitle": "", | ||
| 146 | + "title": "还有一个月双十一", | ||
| 147 | + "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" | ||
| 148 | + }, | ||
| 149 | + { | ||
| 150 | + "cityCode": "", | ||
| 151 | + "coverSize": "800*450", | ||
| 152 | + "coverType": 1, | ||
| 153 | + "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", | ||
| 154 | + "description": "", | ||
| 155 | + "districtCode": "", | ||
| 156 | + "endTime": "", | ||
| 157 | + "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", | ||
| 158 | + "heatValue": "", | ||
| 159 | + "innerUrl": "", | ||
| 160 | + "landscape": 1, | ||
| 161 | + "lengthTime": null, | ||
| 162 | + "linkUrl": "", | ||
| 163 | + "openLikes": 0, | ||
| 164 | + "openUrl": "", | ||
| 165 | + "pageId": "", | ||
| 166 | + "playUrls": [ | ||
| 167 | + | ||
| 168 | + ], | ||
| 169 | + "programAuth": "4589923", | ||
| 170 | + "programId": "20000093041", | ||
| 171 | + "programName": "", | ||
| 172 | + "programSource": 5, | ||
| 173 | + "programType": 2, | ||
| 174 | + "provinceCode": "", | ||
| 175 | + "rankingList": [ | ||
| 176 | + | ||
| 177 | + ], | ||
| 178 | + "showTitleEd": "", | ||
| 179 | + "showTitleIng": "", | ||
| 180 | + "showTitleNo": "", | ||
| 181 | + "sortValue": null, | ||
| 182 | + "startTime": "2023-12-08 16:58:17", | ||
| 183 | + "subType": "", | ||
| 184 | + "subtitle": "", | ||
| 185 | + "title": "24小时熊猫慢直播", | ||
| 186 | + "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" | ||
| 187 | + } | ||
| 188 | + ], | ||
| 189 | + "pageId": null, | ||
| 190 | + "posterSize": "", | ||
| 191 | + "posterUrl": "", | ||
| 192 | + "provinceCode": "", | ||
| 193 | + "sortValue": 1, | ||
| 194 | + "subType": "" | ||
| 195 | + }, | ||
| 196 | + { | ||
| 197 | + "backgroundColor": "", | ||
| 198 | + "backgroundImgUrl": "", | ||
| 199 | + "cityCode": "", | ||
| 200 | + "compStyle": "Single_Column-01", | ||
| 201 | + "compType": "SINGLE_COLUMN", | ||
| 202 | + "dataSourceRequest": [ | ||
| 203 | + | ||
| 204 | + ], | ||
| 205 | + "districtCode": "", | ||
| 206 | + "extraData": "", | ||
| 207 | + "hasAdInfo": 0, | ||
| 208 | + "id": 6772, | ||
| 209 | + "imgSize": "", | ||
| 210 | + "innerUrl": "", | ||
| 211 | + "linkUrl": "", | ||
| 212 | + "meddleDataList": [ | ||
| 213 | + | ||
| 214 | + ], | ||
| 215 | + "name": "测试", | ||
| 216 | + "objectId": "", | ||
| 217 | + "objectTitle": "", | ||
| 218 | + "objectType": null, | ||
| 219 | + "operDataList": [ | ||
| 220 | + { | ||
| 221 | + "cityCode": "620100", | ||
| 222 | + "coverSize": "", | ||
| 223 | + "coverType": 1, | ||
| 224 | + "coverUrl": "", | ||
| 225 | + "description": "", | ||
| 226 | + "districtCode": "540102", | ||
| 227 | + "endTime": "", | ||
| 228 | + "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", | ||
| 229 | + "heatValue": "", | ||
| 230 | + "innerUrl": "", | ||
| 231 | + "landscape": 1, | ||
| 232 | + "lengthTime": 91, | ||
| 233 | + "linkUrl": "", | ||
| 234 | + "openLikes": 1, | ||
| 235 | + "openUrl": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4", | ||
| 236 | + "pageId": "", | ||
| 237 | + "playUrls": [ | ||
| 238 | + { | ||
| 239 | + "clarity": 3, | ||
| 240 | + "duration": 91, | ||
| 241 | + "landscape": 1, | ||
| 242 | + "resolutionHeight": 1080, | ||
| 243 | + "resolutionWidth": 1920, | ||
| 244 | + "type": 1, | ||
| 245 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/2577/vod/content/20231109/a5108cd087.mp4" | ||
| 246 | + } | ||
| 247 | + ], | ||
| 248 | + "programAuth": "4255335", | ||
| 249 | + "programId": "30001335003", | ||
| 250 | + "programName": "“追梦”女孩足球节兰州站顺利开幕", | ||
| 251 | + "programSource": 4, | ||
| 252 | + "programType": 1, | ||
| 253 | + "provinceCode": "620000", | ||
| 254 | + "rankingList": [ | ||
| 255 | + | ||
| 256 | + ], | ||
| 257 | + "showTitleEd": "", | ||
| 258 | + "showTitleIng": "", | ||
| 259 | + "showTitleNo": "", | ||
| 260 | + "sortValue": null, | ||
| 261 | + "startTime": "", | ||
| 262 | + "subType": "", | ||
| 263 | + "subtitle": "", | ||
| 264 | + "title": "“追梦”女孩足球节兰州站顺利开幕", | ||
| 265 | + "vImageUrl": "" | ||
| 266 | + }, | ||
| 267 | + { | ||
| 268 | + "cityCode": "110100", | ||
| 269 | + "coverSize": "1524*857", | ||
| 270 | + "coverType": 1, | ||
| 271 | + "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", | ||
| 272 | + "description": "霜降,是秋季的最后一个节气,意味着冬天即将开始。《月令七十二候集解》记载:“九月中,气肃而凝,露结为霜矣。”此时节,树叶经过秋霜洗礼,有的变成深红色,有的变成金黄色,呈现出一幅幅绝美的“大地画卷”。登山赏叶,漫步乡野,徜徉海岸,尽享多彩美景不负秋日好时光", | ||
| 273 | + "districtCode": "不限", | ||
| 274 | + "endTime": "", | ||
| 275 | + "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", | ||
| 276 | + "heatValue": "", | ||
| 277 | + "innerUrl": "", | ||
| 278 | + "landscape": 1, | ||
| 279 | + "lengthTime": null, | ||
| 280 | + "linkUrl": "", | ||
| 281 | + "openLikes": 0, | ||
| 282 | + "openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/sjbj-20231113/vod/live/51c30859550d4ebeba50e09e18186b92.mp4", | ||
| 283 | + "pageId": "", | ||
| 284 | + "playUrls": [ | ||
| 285 | + | ||
| 286 | + ], | ||
| 287 | + "programAuth": "2004545", | ||
| 288 | + "programId": "20000092968", | ||
| 289 | + "programName": "", | ||
| 290 | + "programSource": 5, | ||
| 291 | + "programType": 2, | ||
| 292 | + "provinceCode": "110000", | ||
| 293 | + "rankingList": [ | ||
| 294 | + | ||
| 295 | + ], | ||
| 296 | + "showTitleEd": "", | ||
| 297 | + "showTitleIng": "", | ||
| 298 | + "showTitleNo": "", | ||
| 299 | + "sortValue": null, | ||
| 300 | + "startTime": "2023-11-21 16:59:42", | ||
| 301 | + "subType": "", | ||
| 302 | + "subtitle": "", | ||
| 303 | + "title": "1120回归推流直播1", | ||
| 304 | + "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" | ||
| 305 | + }, | ||
| 306 | + { | ||
| 307 | + "cityCode": "", | ||
| 308 | + "coverSize": "869*489", | ||
| 309 | + "coverType": 1, | ||
| 310 | + "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", | ||
| 311 | + "description": "", | ||
| 312 | + "districtCode": "", | ||
| 313 | + "endTime": "", | ||
| 314 | + "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", | ||
| 315 | + "heatValue": "", | ||
| 316 | + "innerUrl": "", | ||
| 317 | + "landscape": 1, | ||
| 318 | + "lengthTime": null, | ||
| 319 | + "linkUrl": "", | ||
| 320 | + "openLikes": 0, | ||
| 321 | + "openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/0ea32bdda95548f0a3d25a94fbad03f5_lud/123003.m3u8", | ||
| 322 | + "pageId": "", | ||
| 323 | + "playUrls": [ | ||
| 324 | + | ||
| 325 | + ], | ||
| 326 | + "programAuth": "4251160", | ||
| 327 | + "programId": "20000092995", | ||
| 328 | + "programName": "", | ||
| 329 | + "programSource": 5, | ||
| 330 | + "programType": 2, | ||
| 331 | + "provinceCode": "", | ||
| 332 | + "rankingList": [ | ||
| 333 | + | ||
| 334 | + ], | ||
| 335 | + "showTitleEd": "", | ||
| 336 | + "showTitleIng": "", | ||
| 337 | + "showTitleNo": "", | ||
| 338 | + "sortValue": null, | ||
| 339 | + "startTime": "2023-11-21 23:59:59", | ||
| 340 | + "subType": "", | ||
| 341 | + "subtitle": "", | ||
| 342 | + "title": "贵州黔南州翁安县建中镇", | ||
| 343 | + "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" | ||
| 344 | + }, | ||
| 345 | + { | ||
| 346 | + "cityCode": "110100", | ||
| 347 | + "coverSize": "", | ||
| 348 | + "coverType": 1, | ||
| 349 | + "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", | ||
| 350 | + "description": "霜降,是秋季的最后一个节气,意味着冬天即将开始。《月令七十二候集解》记载:“九月中,气肃而凝,露结为霜矣。”此时节,树叶经过秋霜洗礼,有的变成深红色,有的变成金黄色,呈现出一幅幅绝美的“大地画卷”。登山赏叶,漫步乡野,徜徉海岸,尽享多彩美景不负秋日好时光", | ||
| 351 | + "districtCode": "不限", | ||
| 352 | + "endTime": "", | ||
| 353 | + "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", | ||
| 354 | + "heatValue": "", | ||
| 355 | + "innerUrl": "", | ||
| 356 | + "landscape": 1, | ||
| 357 | + "lengthTime": null, | ||
| 358 | + "linkUrl": "", | ||
| 359 | + "openLikes": 0, | ||
| 360 | + "openUrl": "https://uatjdcdnphoto.aikan.pdnews.cn/live/record/tr_lud/1d86a015ac5a480ea58b7f63e06a1d1f_lud/122895.m3u8", | ||
| 361 | + "pageId": "", | ||
| 362 | + "playUrls": [ | ||
| 363 | + | ||
| 364 | + ], | ||
| 365 | + "programAuth": "2004545", | ||
| 366 | + "programId": "20000092888", | ||
| 367 | + "programName": "", | ||
| 368 | + "programSource": 5, | ||
| 369 | + "programType": 2, | ||
| 370 | + "provinceCode": "110000", | ||
| 371 | + "rankingList": [ | ||
| 372 | + | ||
| 373 | + ], | ||
| 374 | + "showTitleEd": "", | ||
| 375 | + "showTitleIng": "", | ||
| 376 | + "showTitleNo": "", | ||
| 377 | + "sortValue": null, | ||
| 378 | + "startTime": "2023-11-14 17:34:17", | ||
| 379 | + "subType": "", | ||
| 380 | + "subtitle": "", | ||
| 381 | + "title": "1113回归露凝为霜 秋色深深", | ||
| 382 | + "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" | ||
| 383 | + }, | ||
| 384 | + { | ||
| 385 | + "cityCode": "", | ||
| 386 | + "coverSize": "1920*1080", | ||
| 387 | + "coverType": 1, | ||
| 388 | + "coverUrl": "", | ||
| 389 | + "description": "", | ||
| 390 | + "districtCode": "", | ||
| 391 | + "endTime": "", | ||
| 392 | + "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", | ||
| 393 | + "heatValue": "", | ||
| 394 | + "innerUrl": "", | ||
| 395 | + "landscape": 1, | ||
| 396 | + "lengthTime": 65, | ||
| 397 | + "linkUrl": "", | ||
| 398 | + "openLikes": 1, | ||
| 399 | + "openUrl": "https://uatjdcdnout.aikan.pdnews.cn/a940/vod/content/20231121/85056be2e6.mp4", | ||
| 400 | + "pageId": "", | ||
| 401 | + "playUrls": [ | ||
| 402 | + { | ||
| 403 | + "clarity": 3, | ||
| 404 | + "duration": 65, | ||
| 405 | + "landscape": 1, | ||
| 406 | + "resolutionHeight": 1080, | ||
| 407 | + "resolutionWidth": 1920, | ||
| 408 | + "type": 1, | ||
| 409 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/a940/vod/content/20231121/85056be2e6.mp4" | ||
| 410 | + } | ||
| 411 | + ], | ||
| 412 | + "programAuth": "4255737", | ||
| 413 | + "programId": "30001353022", | ||
| 414 | + "programName": "吉林省发布“十佳返乡入乡创业就业带头人”及“十大劳务品牌”", | ||
| 415 | + "programSource": 4, | ||
| 416 | + "programType": 1, | ||
| 417 | + "provinceCode": "", | ||
| 418 | + "rankingList": [ | ||
| 419 | + | ||
| 420 | + ], | ||
| 421 | + "showTitleEd": "", | ||
| 422 | + "showTitleIng": "", | ||
| 423 | + "showTitleNo": "", | ||
| 424 | + "sortValue": null, | ||
| 425 | + "startTime": "", | ||
| 426 | + "subType": "", | ||
| 427 | + "subtitle": "", | ||
| 428 | + "title": "吉林省发布“十佳返乡入乡创业就业带头人”及“十大劳务品牌”", | ||
| 429 | + "vImageUrl": "" | ||
| 430 | + } | ||
| 431 | + ], | ||
| 432 | + "pageId": null, | ||
| 433 | + "posterSize": "", | ||
| 434 | + "posterUrl": "", | ||
| 435 | + "provinceCode": "", | ||
| 436 | + "sortValue": 2, | ||
| 437 | + "subType": "" | ||
| 438 | + }, | ||
| 439 | + { | ||
| 440 | + "backgroundColor": "", | ||
| 441 | + "backgroundImgUrl": "", | ||
| 442 | + "cityCode": "", | ||
| 443 | + "compStyle": "Single_Column-01", | ||
| 444 | + "compType": "SINGLE_COLUMN", | ||
| 445 | + "dataSourceRequest": [ | ||
| 446 | + | ||
| 447 | + ], | ||
| 448 | + "districtCode": "", | ||
| 449 | + "extraData": "", | ||
| 450 | + "hasAdInfo": 0, | ||
| 451 | + "id": 7079, | ||
| 452 | + "imgSize": "", | ||
| 453 | + "innerUrl": "", | ||
| 454 | + "linkUrl": "", | ||
| 455 | + "meddleDataList": [ | ||
| 456 | + | ||
| 457 | + ], | ||
| 458 | + "name": "大卡横屏", | ||
| 459 | + "objectId": "", | ||
| 460 | + "objectTitle": "", | ||
| 461 | + "objectType": null, | ||
| 462 | + "operDataList": [ | ||
| 463 | + { | ||
| 464 | + "cityCode": "310100", | ||
| 465 | + "coverSize": "1920*1080", | ||
| 466 | + "coverType": 1, | ||
| 467 | + "coverUrl": "", | ||
| 468 | + "description": "周五快乐", | ||
| 469 | + "districtCode": "310115", | ||
| 470 | + "endTime": "", | ||
| 471 | + "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", | ||
| 472 | + "heatValue": "", | ||
| 473 | + "innerUrl": "", | ||
| 474 | + "landscape": 1, | ||
| 475 | + "lengthTime": 40, | ||
| 476 | + "linkUrl": "", | ||
| 477 | + "openLikes": 1, | ||
| 478 | + "openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231213/vod/content/output/36e100323b1947f5a1ea902dea8dcc86_opt.mp4", | ||
| 479 | + "pageId": "", | ||
| 480 | + "playUrls": [ | ||
| 481 | + { | ||
| 482 | + "clarity": 1, | ||
| 483 | + "duration": 40, | ||
| 484 | + "landscape": 1, | ||
| 485 | + "resolutionHeight": 720, | ||
| 486 | + "resolutionWidth": 1280, | ||
| 487 | + "type": 1, | ||
| 488 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231213/vod/content/output/36e100323b1947f5a1ea902dea8dcc86_opt.mp4" | ||
| 489 | + } | ||
| 490 | + ], | ||
| 491 | + "programAuth": "4112178", | ||
| 492 | + "programId": "30001353072", | ||
| 493 | + "programName": "周五快乐", | ||
| 494 | + "programSource": 4, | ||
| 495 | + "programType": 1, | ||
| 496 | + "provinceCode": "310000", | ||
| 497 | + "rankingList": [ | ||
| 498 | + | ||
| 499 | + ], | ||
| 500 | + "showTitleEd": "", | ||
| 501 | + "showTitleIng": "", | ||
| 502 | + "showTitleNo": "", | ||
| 503 | + "sortValue": null, | ||
| 504 | + "startTime": "", | ||
| 505 | + "subType": "", | ||
| 506 | + "subtitle": "", | ||
| 507 | + "title": "周五快乐", | ||
| 508 | + "vImageUrl": "" | ||
| 509 | + }, | ||
| 510 | + { | ||
| 511 | + "cityCode": "", | ||
| 512 | + "coverSize": "869*489", | ||
| 513 | + "coverType": 1, | ||
| 514 | + "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", | ||
| 515 | + "description": "", | ||
| 516 | + "districtCode": "", | ||
| 517 | + "endTime": "", | ||
| 518 | + "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", | ||
| 519 | + "heatValue": "", | ||
| 520 | + "innerUrl": "", | ||
| 521 | + "landscape": 1, | ||
| 522 | + "lengthTime": null, | ||
| 523 | + "linkUrl": "", | ||
| 524 | + "openLikes": 0, | ||
| 525 | + "openUrl": "", | ||
| 526 | + "pageId": "", | ||
| 527 | + "playUrls": [ | ||
| 528 | + | ||
| 529 | + ], | ||
| 530 | + "programAuth": "4251160", | ||
| 531 | + "programId": "20000092433", | ||
| 532 | + "programName": "", | ||
| 533 | + "programSource": 5, | ||
| 534 | + "programType": 2, | ||
| 535 | + "provinceCode": "", | ||
| 536 | + "rankingList": [ | ||
| 537 | + | ||
| 538 | + ], | ||
| 539 | + "showTitleEd": "", | ||
| 540 | + "showTitleIng": "", | ||
| 541 | + "showTitleNo": "", | ||
| 542 | + "sortValue": null, | ||
| 543 | + "startTime": "2024-10-13 09:00:00", | ||
| 544 | + "subType": "", | ||
| 545 | + "subtitle": "", | ||
| 546 | + "title": "山西运城圣天湖景区", | ||
| 547 | + "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" | ||
| 548 | + } | ||
| 549 | + ], | ||
| 550 | + "pageId": null, | ||
| 551 | + "posterSize": "", | ||
| 552 | + "posterUrl": "", | ||
| 553 | + "provinceCode": "", | ||
| 554 | + "sortValue": 3, | ||
| 555 | + "subType": "" | ||
| 556 | + }, | ||
| 557 | + { | ||
| 558 | + "backgroundColor": "", | ||
| 559 | + "backgroundImgUrl": "", | ||
| 560 | + "cityCode": "", | ||
| 561 | + "compStyle": "Grid_Layout-01", | ||
| 562 | + "compType": "GRID_LAYOUT", | ||
| 563 | + "dataSourceRequest": [ | ||
| 564 | + | ||
| 565 | + ], | ||
| 566 | + "districtCode": "", | ||
| 567 | + "extraData": "", | ||
| 568 | + "hasAdInfo": 0, | ||
| 569 | + "id": 7080, | ||
| 570 | + "imgSize": "", | ||
| 571 | + "innerUrl": "", | ||
| 572 | + "linkUrl": "", | ||
| 573 | + "meddleDataList": [ | ||
| 574 | + | ||
| 575 | + ], | ||
| 576 | + "name": "横宫格", | ||
| 577 | + "objectId": "", | ||
| 578 | + "objectTitle": "", | ||
| 579 | + "objectType": null, | ||
| 580 | + "operDataList": [ | ||
| 581 | + { | ||
| 582 | + "cityCode": "", | ||
| 583 | + "coverSize": "3840*2160", | ||
| 584 | + "coverType": 1, | ||
| 585 | + "coverUrl": "", | ||
| 586 | + "description": "", | ||
| 587 | + "districtCode": "", | ||
| 588 | + "endTime": "", | ||
| 589 | + "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", | ||
| 590 | + "heatValue": "", | ||
| 591 | + "innerUrl": "", | ||
| 592 | + "landscape": 1, | ||
| 593 | + "lengthTime": 88, | ||
| 594 | + "linkUrl": "", | ||
| 595 | + "openLikes": 1, | ||
| 596 | + "openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4", | ||
| 597 | + "pageId": "", | ||
| 598 | + "playUrls": [ | ||
| 599 | + { | ||
| 600 | + "clarity": 1, | ||
| 601 | + "duration": 88, | ||
| 602 | + "landscape": 1, | ||
| 603 | + "resolutionHeight": 720, | ||
| 604 | + "resolutionWidth": 1280, | ||
| 605 | + "type": 1, | ||
| 606 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/7fe1345d9c7244359106c2e7de3b8f7a_opt.mp4" | ||
| 607 | + }, | ||
| 608 | + { | ||
| 609 | + "clarity": 1, | ||
| 610 | + "duration": 88, | ||
| 611 | + "landscape": 1, | ||
| 612 | + "resolutionHeight": 720, | ||
| 613 | + "resolutionWidth": 1280, | ||
| 614 | + "type": 1, | ||
| 615 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/113138d566d146b483c3a3713527d376_opt.mp4" | ||
| 616 | + } | ||
| 617 | + ], | ||
| 618 | + "programAuth": "4265498", | ||
| 619 | + "programId": "30001364983", | ||
| 620 | + "programName": "【院士说】赵忠贤院士谈科技进步", | ||
| 621 | + "programSource": 4, | ||
| 622 | + "programType": 1, | ||
| 623 | + "provinceCode": "", | ||
| 624 | + "rankingList": [ | ||
| 625 | + | ||
| 626 | + ], | ||
| 627 | + "showTitleEd": "", | ||
| 628 | + "showTitleIng": "", | ||
| 629 | + "showTitleNo": "", | ||
| 630 | + "sortValue": null, | ||
| 631 | + "startTime": "", | ||
| 632 | + "subType": "", | ||
| 633 | + "subtitle": "", | ||
| 634 | + "title": "【院士说】赵忠贤院士谈科技进步", | ||
| 635 | + "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" | ||
| 636 | + }, | ||
| 637 | + { | ||
| 638 | + "cityCode": "", | ||
| 639 | + "coverSize": "1620*2160", | ||
| 640 | + "coverType": 1, | ||
| 641 | + "coverUrl": "", | ||
| 642 | + "description": "", | ||
| 643 | + "districtCode": "", | ||
| 644 | + "endTime": "", | ||
| 645 | + "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", | ||
| 646 | + "heatValue": "", | ||
| 647 | + "innerUrl": "", | ||
| 648 | + "landscape": 1, | ||
| 649 | + "lengthTime": 88, | ||
| 650 | + "linkUrl": "", | ||
| 651 | + "openLikes": 1, | ||
| 652 | + "openUrl": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/f229e5c711d14ef582b2162982ae41d6_opt.mp4", | ||
| 653 | + "pageId": "", | ||
| 654 | + "playUrls": [ | ||
| 655 | + { | ||
| 656 | + "clarity": 1, | ||
| 657 | + "duration": 88, | ||
| 658 | + "landscape": 1, | ||
| 659 | + "resolutionHeight": 720, | ||
| 660 | + "resolutionWidth": 1280, | ||
| 661 | + "type": 1, | ||
| 662 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/ca2cedfba6c14cf0b9c917e23837aeac_opt.mp4" | ||
| 663 | + }, | ||
| 664 | + { | ||
| 665 | + "clarity": 1, | ||
| 666 | + "duration": 88, | ||
| 667 | + "landscape": 1, | ||
| 668 | + "resolutionHeight": 720, | ||
| 669 | + "resolutionWidth": 1280, | ||
| 670 | + "type": 1, | ||
| 671 | + "url": "https://uatjdcdnout.aikan.pdnews.cn/sjbj-20231209/vod/content/output/f229e5c711d14ef582b2162982ae41d6_opt.mp4" | ||
| 672 | + } | ||
| 673 | + ], | ||
| 674 | + "programAuth": "4265498", | ||
| 675 | + "programId": "30001364853", | ||
| 676 | + "programName": "【院士说】赵忠贤院士谈科技进步", | ||
| 677 | + "programSource": 4, | ||
| 678 | + "programType": 1, | ||
| 679 | + "provinceCode": "", | ||
| 680 | + "rankingList": [ | ||
| 681 | + | ||
| 682 | + ], | ||
| 683 | + "showTitleEd": "", | ||
| 684 | + "showTitleIng": "", | ||
| 685 | + "showTitleNo": "", | ||
| 686 | + "sortValue": null, | ||
| 687 | + "startTime": "", | ||
| 688 | + "subType": "", | ||
| 689 | + "subtitle": "", | ||
| 690 | + "title": "【院士说】赵忠贤院士谈科技进步", | ||
| 691 | + "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" | ||
| 692 | + } | ||
| 693 | + ], | ||
| 694 | + "pageId": null, | ||
| 695 | + "posterSize": "", | ||
| 696 | + "posterUrl": "", | ||
| 697 | + "provinceCode": "", | ||
| 698 | + "sortValue": 4, | ||
| 699 | + "subType": "" | ||
| 700 | + }, | ||
| 701 | + { | ||
| 702 | + "backgroundColor": "", | ||
| 703 | + "backgroundImgUrl": "", | ||
| 704 | + "cityCode": "", | ||
| 705 | + "compStyle": "Carousel_Layout-01", | ||
| 706 | + "compType": "CAROUSEL_LAYOUT", | ||
| 707 | + "dataSourceRequest": [ | ||
| 708 | + | ||
| 709 | + ], | ||
| 710 | + "districtCode": "", | ||
| 711 | + "extraData": "", | ||
| 712 | + "hasAdInfo": 0, | ||
| 713 | + "id": 31, | ||
| 714 | + "imgSize": "", | ||
| 715 | + "innerUrl": "", | ||
| 716 | + "linkUrl": "", | ||
| 717 | + "meddleDataList": [ | ||
| 718 | + | ||
| 719 | + ], | ||
| 720 | + "name": "为你推荐feed", | ||
| 721 | + "objectId": "", | ||
| 722 | + "objectTitle": "", | ||
| 723 | + "objectType": null, | ||
| 724 | + "operDataList": [ | ||
| 725 | + { | ||
| 726 | + "cityCode": "", | ||
| 727 | + "coverSize": "1920*1080", | ||
| 728 | + "coverType": 1, | ||
| 729 | + "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", | ||
| 730 | + "description": "甘肃积石山6.2级地震新闻发布会", | ||
| 731 | + "districtCode": "", | ||
| 732 | + "endTime": "", | ||
| 733 | + "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", | ||
| 734 | + "heatValue": "", | ||
| 735 | + "innerUrl": "", | ||
| 736 | + "landscape": 1, | ||
| 737 | + "lengthTime": null, | ||
| 738 | + "linkUrl": "", | ||
| 739 | + "openLikes": 0, | ||
| 740 | + "openUrl": "http://livewatch-prod.aikan.pdnews.cn/tr_lud/5404912f99bf4703ab070752b507cc64_origin.m3u8?auth_key=1705628416-0-0-c7f5854d6cbe801578009bfa44757f0d", | ||
| 741 | + "pageId": "", | ||
| 742 | + "playUrls": [ | ||
| 743 | + | ||
| 744 | + ], | ||
| 745 | + "programAuth": "2004557", | ||
| 746 | + "programId": "20000003744", | ||
| 747 | + "programName": "", | ||
| 748 | + "programSource": 5, | ||
| 749 | + "programType": 2, | ||
| 750 | + "provinceCode": "", | ||
| 751 | + "rankingList": [ | ||
| 752 | + | ||
| 753 | + ], | ||
| 754 | + "showTitleEd": "", | ||
| 755 | + "showTitleIng": "", | ||
| 756 | + "showTitleNo": "", | ||
| 757 | + "sortValue": null, | ||
| 758 | + "startTime": "2023-12-19 09:00:00", | ||
| 759 | + "subType": "", | ||
| 760 | + "subtitle": "", | ||
| 761 | + "title": "甘肃积石山县6.2级地震救援进行时", | ||
| 762 | + "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" | ||
| 763 | + }, | ||
| 764 | + { | ||
| 765 | + "cityCode": "", | ||
| 766 | + "coverSize": "1920*1080", | ||
| 767 | + "coverType": 1, | ||
| 768 | + "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", | ||
| 769 | + "description": "“大雪”至,冬意日浓。从冰封千里的纳木错到白雪皑皑的雪乡,从吉林绝美雾凇到毕棚沟雪山冰川,从崇礼惊险的滑雪盛宴到银装素裹的老君山,从延吉的民族风情到滕王阁的落霞孤鹜,看广州、惠州依然花开日暖,一起云游幅员辽阔的壮美神州!", | ||
| 770 | + "districtCode": "", | ||
| 771 | + "endTime": "", | ||
| 772 | + "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", | ||
| 773 | + "heatValue": "", | ||
| 774 | + "innerUrl": "", | ||
| 775 | + "landscape": 1, | ||
| 776 | + "lengthTime": null, | ||
| 777 | + "linkUrl": "", | ||
| 778 | + "openLikes": 0, | ||
| 779 | + "openUrl": "", | ||
| 780 | + "pageId": "", | ||
| 781 | + "playUrls": [ | ||
| 782 | + | ||
| 783 | + ], | ||
| 784 | + "programAuth": "2004557", | ||
| 785 | + "programId": "20000003614", | ||
| 786 | + "programName": "", | ||
| 787 | + "programSource": 5, | ||
| 788 | + "programType": 2, | ||
| 789 | + "provinceCode": "", | ||
| 790 | + "rankingList": [ | ||
| 791 | + | ||
| 792 | + ], | ||
| 793 | + "showTitleEd": "", | ||
| 794 | + "showTitleIng": "", | ||
| 795 | + "showTitleNo": "", | ||
| 796 | + "sortValue": null, | ||
| 797 | + "startTime": "2023-12-07 09:00:00", | ||
| 798 | + "subType": "", | ||
| 799 | + "subtitle": "", | ||
| 800 | + "title": "雪花飞舞,漫天银色", | ||
| 801 | + "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" | ||
| 802 | + }, | ||
| 803 | + { | ||
| 804 | + "cityCode": "", | ||
| 805 | + "coverSize": "", | ||
| 806 | + "coverType": 1, | ||
| 807 | + "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", | ||
| 808 | + "description": "秋意尚未尽消,冬日已翩然而至。秋冬之交的校园在你想象中是什么颜色的?人民日报新媒体文旅系列直播继续出发,联合国内9所高校发出漫步邀约,带你沉浸式云游青春高校,一起看秋末冬初的校园风光和大学生活。", | ||
| 809 | + "districtCode": "", | ||
| 810 | + "endTime": "", | ||
| 811 | + "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", | ||
| 812 | + "heatValue": "", | ||
| 813 | + "innerUrl": "", | ||
| 814 | + "landscape": 1, | ||
| 815 | + "lengthTime": null, | ||
| 816 | + "linkUrl": "", | ||
| 817 | + "openLikes": 0, | ||
| 818 | + "openUrl": "", | ||
| 819 | + "pageId": "", | ||
| 820 | + "playUrls": [ | ||
| 821 | + | ||
| 822 | + ], | ||
| 823 | + "programAuth": "2004557", | ||
| 824 | + "programId": "20000003394", | ||
| 825 | + "programName": "", | ||
| 826 | + "programSource": 5, | ||
| 827 | + "programType": 2, | ||
| 828 | + "provinceCode": "", | ||
| 829 | + "rankingList": [ | ||
| 830 | + | ||
| 831 | + ], | ||
| 832 | + "showTitleEd": "", | ||
| 833 | + "showTitleIng": "", | ||
| 834 | + "showTitleNo": "", | ||
| 835 | + "sortValue": null, | ||
| 836 | + "startTime": "2023-11-12 13:50:48", | ||
| 837 | + "subType": "", | ||
| 838 | + "subtitle": "", | ||
| 839 | + "title": "跟着高校去旅行", | ||
| 840 | + "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" | ||
| 841 | + } | ||
| 842 | + ], | ||
| 843 | + "pageId": null, | ||
| 844 | + "posterSize": "", | ||
| 845 | + "posterUrl": "", | ||
| 846 | + "provinceCode": "", | ||
| 847 | + "sortValue": 2, | ||
| 848 | + "subType": "" | ||
| 849 | + }, | ||
| 850 | + { | ||
| 851 | + "backgroundColor": "", | ||
| 852 | + "backgroundImgUrl": "", | ||
| 853 | + "cityCode": "", | ||
| 854 | + "compStyle": "Label-03", | ||
| 855 | + "compType": "LABEL", | ||
| 856 | + "dataSourceRequest": [ | ||
| 857 | + | ||
| 858 | + ], | ||
| 859 | + "districtCode": "", | ||
| 860 | + "extraData": "{\"titleIconUrl\":\"\",\"title\":\"精彩回放\"}", | ||
| 861 | + "hasAdInfo": 0, | ||
| 862 | + "id": 11, | ||
| 863 | + "imgSize": "", | ||
| 864 | + "innerUrl": "", | ||
| 865 | + "linkUrl": "", | ||
| 866 | + "meddleDataList": [ | ||
| 867 | + | ||
| 868 | + ], | ||
| 869 | + "name": "精彩回放标题", | ||
| 870 | + "objectId": "", | ||
| 871 | + "objectTitle": "", | ||
| 872 | + "objectType": null, | ||
| 873 | + "operDataList": [ | ||
| 874 | + | ||
| 875 | + ], | ||
| 876 | + "pageId": null, | ||
| 877 | + "posterSize": "", | ||
| 878 | + "posterUrl": "", | ||
| 879 | + "provinceCode": "", | ||
| 880 | + "sortValue": 5, | ||
| 881 | + "subType": "" | ||
| 882 | + }, | ||
| 883 | + { | ||
| 884 | + "backgroundColor": "", | ||
| 885 | + "backgroundImgUrl": "", | ||
| 886 | + "cityCode": "", | ||
| 887 | + "compStyle": "Single_Column-01", | ||
| 888 | + "compType": "SINGLE_COLUMN", | ||
| 889 | + "dataSourceRequest": [ | ||
| 890 | + | ||
| 891 | + ], | ||
| 892 | + "districtCode": "", | ||
| 893 | + "extraData": "", | ||
| 894 | + "hasAdInfo": 0, | ||
| 895 | + "id": 12, | ||
| 896 | + "imgSize": "", | ||
| 897 | + "innerUrl": "", | ||
| 898 | + "linkUrl": "", | ||
| 899 | + "meddleDataList": [ | ||
| 900 | + | ||
| 901 | + ], | ||
| 902 | + "name": "为你推荐feed", | ||
| 903 | + "objectId": "", | ||
| 904 | + "objectTitle": "", | ||
| 905 | + "objectType": null, | ||
| 906 | + "operDataList": [ | ||
| 907 | + { | ||
| 908 | + "cityCode": "", | ||
| 909 | + "coverSize": "1920*1080", | ||
| 910 | + "coverType": 1, | ||
| 911 | + "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", | ||
| 912 | + "description": "随着生活水平的提高和女性乳腺疾病宣传的深入,很多女性朋友不再是“发现疾病后才去就医”,而是越来越重视乳腺的定期检查,而钼靶检查也因为其简便快速等优点被多数人选择。本次直播,复旦大学附属华山医院放射科技师王益芳将针对患者常问的相关问题进行解答。", | ||
| 913 | + "districtCode": "", | ||
| 914 | + "endTime": "", | ||
| 915 | + "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", | ||
| 916 | + "heatValue": "", | ||
| 917 | + "innerUrl": "", | ||
| 918 | + "landscape": 1, | ||
| 919 | + "lengthTime": null, | ||
| 920 | + "linkUrl": "", | ||
| 921 | + "openLikes": 0, | ||
| 922 | + "openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/e77d054073f543ffbc8f296d4975189f_lud/5362.m3u8", | ||
| 923 | + "pageId": "", | ||
| 924 | + "playUrls": [ | ||
| 925 | + | ||
| 926 | + ], | ||
| 927 | + "programAuth": "2004557", | ||
| 928 | + "programId": "20000003739", | ||
| 929 | + "programName": "", | ||
| 930 | + "programSource": 5, | ||
| 931 | + "programType": 2, | ||
| 932 | + "provinceCode": "", | ||
| 933 | + "rankingList": [ | ||
| 934 | + | ||
| 935 | + ], | ||
| 936 | + "showTitleEd": "", | ||
| 937 | + "showTitleIng": "", | ||
| 938 | + "showTitleNo": "", | ||
| 939 | + "sortValue": null, | ||
| 940 | + "startTime": "2023-12-19 12:00:00", | ||
| 941 | + "subType": "", | ||
| 942 | + "subtitle": "", | ||
| 943 | + "title": "医点就通 | 关爱女性健康,聊聊乳腺钼靶检查", | ||
| 944 | + "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" | ||
| 945 | + }, | ||
| 946 | + { | ||
| 947 | + "cityCode": "", | ||
| 948 | + "coverSize": "2271*1278", | ||
| 949 | + "coverType": 1, | ||
| 950 | + "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", | ||
| 951 | + "description": "“弦韵乌审,暖才于心”,通过马头琴管弦乐、原生态组合曲、传统民歌合唱、马头琴独奏等多种艺术表现形式,充分展现马头琴音乐的悠扬之美、力量之美,为高校师生带来一场别开生面的音乐盛宴。", | ||
| 952 | + "districtCode": "", | ||
| 953 | + "endTime": "", | ||
| 954 | + "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", | ||
| 955 | + "heatValue": "", | ||
| 956 | + "innerUrl": "", | ||
| 957 | + "landscape": 1, | ||
| 958 | + "lengthTime": null, | ||
| 959 | + "linkUrl": "", | ||
| 960 | + "openLikes": 0, | ||
| 961 | + "openUrl": "", | ||
| 962 | + "pageId": "", | ||
| 963 | + "playUrls": [ | ||
| 964 | + | ||
| 965 | + ], | ||
| 966 | + "programAuth": "2004557", | ||
| 967 | + "programId": "20000003702", | ||
| 968 | + "programName": "", | ||
| 969 | + "programSource": 5, | ||
| 970 | + "programType": 2, | ||
| 971 | + "provinceCode": "", | ||
| 972 | + "rankingList": [ | ||
| 973 | + | ||
| 974 | + ], | ||
| 975 | + "showTitleEd": "", | ||
| 976 | + "showTitleIng": "", | ||
| 977 | + "showTitleNo": "", | ||
| 978 | + "sortValue": null, | ||
| 979 | + "startTime": "", | ||
| 980 | + "subType": "", | ||
| 981 | + "subtitle": "", | ||
| 982 | + "title": "“弦韵乌审,暖才于心”中国•乌审马头琴交响乐团走进高校", | ||
| 983 | + "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" | ||
| 984 | + }, | ||
| 985 | + { | ||
| 986 | + "cityCode": "", | ||
| 987 | + "coverSize": "600*338", | ||
| 988 | + "coverType": 1, | ||
| 989 | + "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", | ||
| 990 | + "description": "国务院新闻办公室于2023年12月18日(星期一)下午3时举行国务院政策例行吹风会,请商务部副部长盛秋平和海关总署、市场监管总局、金融监管总局有关负责人介绍加快内外贸一体化发展有关情况,并答记者问。", | ||
| 991 | + "districtCode": "", | ||
| 992 | + "endTime": "", | ||
| 993 | + "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", | ||
| 994 | + "heatValue": "", | ||
| 995 | + "innerUrl": "", | ||
| 996 | + "landscape": 1, | ||
| 997 | + "lengthTime": null, | ||
| 998 | + "linkUrl": "", | ||
| 999 | + "openLikes": 0, | ||
| 1000 | + "openUrl": "", | ||
| 1001 | + "pageId": "", | ||
| 1002 | + "playUrls": [ | ||
| 1003 | + | ||
| 1004 | + ], | ||
| 1005 | + "programAuth": "2004557", | ||
| 1006 | + "programId": "20000003737", | ||
| 1007 | + "programName": "", | ||
| 1008 | + "programSource": 5, | ||
| 1009 | + "programType": 2, | ||
| 1010 | + "provinceCode": "", | ||
| 1011 | + "rankingList": [ | ||
| 1012 | + | ||
| 1013 | + ], | ||
| 1014 | + "showTitleEd": "", | ||
| 1015 | + "showTitleIng": "", | ||
| 1016 | + "showTitleNo": "", | ||
| 1017 | + "sortValue": null, | ||
| 1018 | + "startTime": "2023-12-18 15:09:00", | ||
| 1019 | + "subType": "", | ||
| 1020 | + "subtitle": "", | ||
| 1021 | + "title": "国新办发布会|介绍加快内外贸一体化发展有关情况", | ||
| 1022 | + "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" | ||
| 1023 | + }, | ||
| 1024 | + { | ||
| 1025 | + "cityCode": "", | ||
| 1026 | + "coverSize": "1600*900", | ||
| 1027 | + "coverType": 1, | ||
| 1028 | + "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", | ||
| 1029 | + "description": "云上看呆萌“滚滚”的日常,一起来看国宝大熊猫的精彩生活、搞笑瞬间和治愈时刻。", | ||
| 1030 | + "districtCode": "", | ||
| 1031 | + "endTime": "", | ||
| 1032 | + "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", | ||
| 1033 | + "heatValue": "", | ||
| 1034 | + "innerUrl": "", | ||
| 1035 | + "landscape": 1, | ||
| 1036 | + "lengthTime": null, | ||
| 1037 | + "linkUrl": "", | ||
| 1038 | + "openLikes": 0, | ||
| 1039 | + "openUrl": "", | ||
| 1040 | + "pageId": "", | ||
| 1041 | + "playUrls": [ | ||
| 1042 | + | ||
| 1043 | + ], | ||
| 1044 | + "programAuth": "2004557", | ||
| 1045 | + "programId": "20000003715", | ||
| 1046 | + "programName": "", | ||
| 1047 | + "programSource": 5, | ||
| 1048 | + "programType": 2, | ||
| 1049 | + "provinceCode": "", | ||
| 1050 | + "rankingList": [ | ||
| 1051 | + | ||
| 1052 | + ], | ||
| 1053 | + "showTitleEd": "", | ||
| 1054 | + "showTitleIng": "", | ||
| 1055 | + "showTitleNo": "", | ||
| 1056 | + "sortValue": null, | ||
| 1057 | + "startTime": "2023-12-18 10:38:00", | ||
| 1058 | + "subType": "", | ||
| 1059 | + "subtitle": "", | ||
| 1060 | + "title": "云逛奇妙动物园:国宝大熊猫的欢乐日常", | ||
| 1061 | + "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" | ||
| 1062 | + }, | ||
| 1063 | + { | ||
| 1064 | + "cityCode": "", | ||
| 1065 | + "coverSize": "942*530", | ||
| 1066 | + "coverType": 1, | ||
| 1067 | + "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", | ||
| 1068 | + "description": "“老伴你帮我看看血压器是不是坏掉了,怎么两只手测量不一样呀?”高血压是一种常见的心血管疾病,如果血压没有得到有效控制,会增加心脑血管疾病的风险。正确测量血压对于掌握健康状况至关重要。本次直播,复旦大学附属华山医院护理部护师须倩雯将详细介绍正确的测量血压的步骤、测量前的准备工作,以及常见的测量误区。", | ||
| 1069 | + "districtCode": "", | ||
| 1070 | + "endTime": "", | ||
| 1071 | + "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", | ||
| 1072 | + "heatValue": "", | ||
| 1073 | + "innerUrl": "", | ||
| 1074 | + "landscape": 1, | ||
| 1075 | + "lengthTime": null, | ||
| 1076 | + "linkUrl": "", | ||
| 1077 | + "openLikes": 0, | ||
| 1078 | + "openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/634c575b859d49f7bcf65bb318c84e86_lud/5346.m3u8", | ||
| 1079 | + "pageId": "", | ||
| 1080 | + "playUrls": [ | ||
| 1081 | + | ||
| 1082 | + ], | ||
| 1083 | + "programAuth": "2004557", | ||
| 1084 | + "programId": "20000003723", | ||
| 1085 | + "programName": "", | ||
| 1086 | + "programSource": 5, | ||
| 1087 | + "programType": 2, | ||
| 1088 | + "provinceCode": "", | ||
| 1089 | + "rankingList": [ | ||
| 1090 | + | ||
| 1091 | + ], | ||
| 1092 | + "showTitleEd": "", | ||
| 1093 | + "showTitleIng": "", | ||
| 1094 | + "showTitleNo": "", | ||
| 1095 | + "sortValue": null, | ||
| 1096 | + "startTime": "2023-12-18 12:00:38", | ||
| 1097 | + "subType": "", | ||
| 1098 | + "subtitle": "", | ||
| 1099 | + "title": "医点就通 | 如何正确测量血压,你做对了吗?", | ||
| 1100 | + "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" | ||
| 1101 | + }, | ||
| 1102 | + { | ||
| 1103 | + "cityCode": "", | ||
| 1104 | + "coverSize": "1920*1080", | ||
| 1105 | + "coverType": 1, | ||
| 1106 | + "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", | ||
| 1107 | + "description": "乡村篮球菁英友谊赛将于12月17-18日在海南琼海举办。届时,村BA总决赛MVP李衍均、得分王吴中庆、栏板王、助攻王马鹏,沙溪跑车刘炜祺、山东飞人申守法,宁夏三营杨家三兄弟等村BA顶流将悉数登场;村BA功勋教练赵仁斌、姬晓现场指导;更有中国篮球名宿、96黄金一代球员巩晓彬,北京篮球名宿“玉面少侠”焦健,现身赛场,为乡村篮球代言。三分大战、技巧大战、扣篮大战也将精彩上演。", | ||
| 1108 | + "districtCode": "", | ||
| 1109 | + "endTime": "", | ||
| 1110 | + "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", | ||
| 1111 | + "heatValue": "", | ||
| 1112 | + "innerUrl": "", | ||
| 1113 | + "landscape": 1, | ||
| 1114 | + "lengthTime": null, | ||
| 1115 | + "linkUrl": "", | ||
| 1116 | + "openLikes": 0, | ||
| 1117 | + "openUrl": "", | ||
| 1118 | + "pageId": "", | ||
| 1119 | + "playUrls": [ | ||
| 1120 | + | ||
| 1121 | + ], | ||
| 1122 | + "programAuth": "2004557", | ||
| 1123 | + "programId": "20000003734", | ||
| 1124 | + "programName": "", | ||
| 1125 | + "programSource": 5, | ||
| 1126 | + "programType": 2, | ||
| 1127 | + "provinceCode": "", | ||
| 1128 | + "rankingList": [ | ||
| 1129 | + | ||
| 1130 | + ], | ||
| 1131 | + "showTitleEd": "", | ||
| 1132 | + "showTitleIng": "", | ||
| 1133 | + "showTitleNo": "", | ||
| 1134 | + "sortValue": null, | ||
| 1135 | + "startTime": "2023-12-17 19:07:00", | ||
| 1136 | + "subType": "", | ||
| 1137 | + "subtitle": "", | ||
| 1138 | + "title": "上视界 看村赛|星耀村BA 激情菁英赛", | ||
| 1139 | + "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" | ||
| 1140 | + }, | ||
| 1141 | + { | ||
| 1142 | + "cityCode": "", | ||
| 1143 | + "coverSize": "1280*720", | ||
| 1144 | + "coverType": 1, | ||
| 1145 | + "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", | ||
| 1146 | + "description": "为深入贯彻党的二十大精神,落实《全面加强和改进新时代学生心理健康工作专项行动计划(2023-2025)和江苏省教育厅“润心”行动工作要求,健全社会心理服务体系体制机制的建设,提升社会公众心理健康意识和素养,充分发挥以乐润心,以心育德的重要功能。南京审计大学心理健康教育教学部与浦口区社会心理健康服务指导中心联合举办“以乐润心 因爱同行”音乐会。", | ||
| 1147 | + "districtCode": "", | ||
| 1148 | + "endTime": "", | ||
| 1149 | + "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", | ||
| 1150 | + "heatValue": "", | ||
| 1151 | + "innerUrl": "", | ||
| 1152 | + "landscape": 1, | ||
| 1153 | + "lengthTime": null, | ||
| 1154 | + "linkUrl": "", | ||
| 1155 | + "openLikes": 0, | ||
| 1156 | + "openUrl": "", | ||
| 1157 | + "pageId": "", | ||
| 1158 | + "playUrls": [ | ||
| 1159 | + | ||
| 1160 | + ], | ||
| 1161 | + "programAuth": "2004557", | ||
| 1162 | + "programId": "20000003662", | ||
| 1163 | + "programName": "", | ||
| 1164 | + "programSource": 5, | ||
| 1165 | + "programType": 2, | ||
| 1166 | + "provinceCode": "", | ||
| 1167 | + "rankingList": [ | ||
| 1168 | + | ||
| 1169 | + ], | ||
| 1170 | + "showTitleEd": "", | ||
| 1171 | + "showTitleIng": "", | ||
| 1172 | + "showTitleNo": "", | ||
| 1173 | + "sortValue": null, | ||
| 1174 | + "startTime": "2023-12-17 19:03:18", | ||
| 1175 | + "subType": "", | ||
| 1176 | + "subtitle": "", | ||
| 1177 | + "title": "《以乐润心 音爱同行 ——新年音乐会》", | ||
| 1178 | + "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" | ||
| 1179 | + }, | ||
| 1180 | + { | ||
| 1181 | + "cityCode": "", | ||
| 1182 | + "coverSize": "942*530", | ||
| 1183 | + "coverType": 1, | ||
| 1184 | + "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", | ||
| 1185 | + "description": "“音为梦响 乐动华章”哈工大第二十五届校园十大歌手大赛决赛,27首歌曲唱响冬日的哈工大,邀你共同见证本届十大歌手的荣耀时刻。", | ||
| 1186 | + "districtCode": "", | ||
| 1187 | + "endTime": "", | ||
| 1188 | + "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", | ||
| 1189 | + "heatValue": "", | ||
| 1190 | + "innerUrl": "", | ||
| 1191 | + "landscape": 1, | ||
| 1192 | + "lengthTime": null, | ||
| 1193 | + "linkUrl": "", | ||
| 1194 | + "openLikes": 0, | ||
| 1195 | + "openUrl": "", | ||
| 1196 | + "pageId": "", | ||
| 1197 | + "playUrls": [ | ||
| 1198 | + | ||
| 1199 | + ], | ||
| 1200 | + "programAuth": "2004557", | ||
| 1201 | + "programId": "20000003730", | ||
| 1202 | + "programName": "", | ||
| 1203 | + "programSource": 5, | ||
| 1204 | + "programType": 2, | ||
| 1205 | + "provinceCode": "", | ||
| 1206 | + "rankingList": [ | ||
| 1207 | + | ||
| 1208 | + ], | ||
| 1209 | + "showTitleEd": "", | ||
| 1210 | + "showTitleIng": "", | ||
| 1211 | + "showTitleNo": "", | ||
| 1212 | + "sortValue": null, | ||
| 1213 | + "startTime": "2023-12-17 18:56:00", | ||
| 1214 | + "subType": "", | ||
| 1215 | + "subtitle": "", | ||
| 1216 | + "title": "“音为梦响 乐动华章”哈工大第二十五届校园十大歌手大赛决赛", | ||
| 1217 | + "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" | ||
| 1218 | + }, | ||
| 1219 | + { | ||
| 1220 | + "cityCode": "", | ||
| 1221 | + "coverSize": "1920*1080", | ||
| 1222 | + "coverType": 1, | ||
| 1223 | + "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", | ||
| 1224 | + "description": "纺织在我国有着几千年的历史,作为传统产业具有重要地位。经过多年积累,我国逐步从纺织业大国成长为全球纺织业强国。从一根纤维到最后的成衣,国内已经形成了全球最完备的纺织产业链。纺织行业是国民经济与社会发展的支柱产业,是解决民生与美化生活的基础产业,是国际合作与融合发展的优势产业,正朝着“科技、时尚、绿色”方向不断发展。", | ||
| 1225 | + "districtCode": "", | ||
| 1226 | + "endTime": "", | ||
| 1227 | + "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", | ||
| 1228 | + "heatValue": "", | ||
| 1229 | + "innerUrl": "", | ||
| 1230 | + "landscape": 1, | ||
| 1231 | + "lengthTime": null, | ||
| 1232 | + "linkUrl": "", | ||
| 1233 | + "openLikes": 0, | ||
| 1234 | + "openUrl": "https://cdnjdphoto.aikan.pdnews.cn/live/record/tr_lud/f9ec8eda59174f4b8dc4d074ca8fd43d_lud/5327.m3u8", | ||
| 1235 | + "pageId": "", | ||
| 1236 | + "playUrls": [ | ||
| 1237 | + | ||
| 1238 | + ], | ||
| 1239 | + "programAuth": "2004557", | ||
| 1240 | + "programId": "20000003710", | ||
| 1241 | + "programName": "", | ||
| 1242 | + "programSource": 5, | ||
| 1243 | + "programType": 2, | ||
| 1244 | + "provinceCode": "", | ||
| 1245 | + "rankingList": [ | ||
| 1246 | + | ||
| 1247 | + ], | ||
| 1248 | + "showTitleEd": "", | ||
| 1249 | + "showTitleIng": "", | ||
| 1250 | + "showTitleNo": "", | ||
| 1251 | + "sortValue": null, | ||
| 1252 | + "startTime": "2023-12-17 19:00:00", | ||
| 1253 | + "subType": "", | ||
| 1254 | + "subtitle": "", | ||
| 1255 | + "title": "我的青春主场|教育部公益直播课:纺织行业发展趋势和职业机会", | ||
| 1256 | + "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" | ||
| 1257 | + }, | ||
| 1258 | + { | ||
| 1259 | + "cityCode": "", | ||
| 1260 | + "coverSize": "942*530", | ||
| 1261 | + "coverType": 1, | ||
| 1262 | + "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", | ||
| 1263 | + "description": "近期一股强寒潮将从新疆开始自西向东、自北向南影响我国。深圳气温将出现断崖式下降,周末“小冰人”登场,急冻模式开启,17日最低气温降至10℃左右。深圳广电集团第一现场将与新疆、西藏、广西派驻记者连线,展示南北气温差异;同时,记者将登上深圳梧桐山测量山顶最低气温;气象局、医院、供电部门也作出相关提醒及防寒准备措施。", | ||
| 1264 | + "districtCode": "", | ||
| 1265 | + "endTime": "", | ||
| 1266 | + "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", | ||
| 1267 | + "heatValue": "", | ||
| 1268 | + "innerUrl": "", | ||
| 1269 | + "landscape": 1, | ||
| 1270 | + "lengthTime": null, | ||
| 1271 | + "linkUrl": "", | ||
| 1272 | + "openLikes": 0, | ||
| 1273 | + "openUrl": "", | ||
| 1274 | + "pageId": "", | ||
| 1275 | + "playUrls": [ | ||
| 1276 | + | ||
| 1277 | + ], | ||
| 1278 | + "programAuth": "2004557", | ||
| 1279 | + "programId": "20000003726", | ||
| 1280 | + "programName": "", | ||
| 1281 | + "programSource": 5, | ||
| 1282 | + "programType": 2, | ||
| 1283 | + "provinceCode": "", | ||
| 1284 | + "rankingList": [ | ||
| 1285 | + | ||
| 1286 | + ], | ||
| 1287 | + "showTitleEd": "", | ||
| 1288 | + "showTitleIng": "", | ||
| 1289 | + "showTitleNo": "", | ||
| 1290 | + "sortValue": null, | ||
| 1291 | + "startTime": "2023-12-17 08:06:38", | ||
| 1292 | + "subType": "", | ||
| 1293 | + "subtitle": "", | ||
| 1294 | + "title": "今年最强寒潮来袭 深圳或开启急冻模式", | ||
| 1295 | + "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" | ||
| 1296 | + } | ||
| 1297 | + ], | ||
| 1298 | + "pageId": null, | ||
| 1299 | + "posterSize": "", | ||
| 1300 | + "posterUrl": "", | ||
| 1301 | + "provinceCode": "", | ||
| 1302 | + "sortValue": 6, | ||
| 1303 | + "subType": "" | ||
| 1304 | + }, | ||
| 1305 | + { | ||
| 1306 | + "backgroundColor": "", | ||
| 1307 | + "backgroundImgUrl": "", | ||
| 1308 | + "cityCode": "", | ||
| 1309 | + "compStyle": "Label-03", | ||
| 1310 | + "compType": "LABEL", | ||
| 1311 | + "dataSourceRequest": [ | ||
| 1312 | + | ||
| 1313 | + ], | ||
| 1314 | + "districtCode": "", | ||
| 1315 | + "extraData": "{\"titleIconUrl\":\"\",\"title\":\"正在直播\"}", | ||
| 1316 | + "hasAdInfo": 0, | ||
| 1317 | + "id": 2549, | ||
| 1318 | + "imgSize": "", | ||
| 1319 | + "innerUrl": "", | ||
| 1320 | + "linkUrl": "", | ||
| 1321 | + "meddleDataList": [ | ||
| 1322 | + | ||
| 1323 | + ], | ||
| 1324 | + "name": "正在直播标题", | ||
| 1325 | + "objectId": "", | ||
| 1326 | + "objectTitle": "", | ||
| 1327 | + "objectType": null, | ||
| 1328 | + "operDataList": [ | ||
| 1329 | + | ||
| 1330 | + ], | ||
| 1331 | + "pageId": null, | ||
| 1332 | + "posterSize": "", | ||
| 1333 | + "posterUrl": "", | ||
| 1334 | + "provinceCode": "", | ||
| 1335 | + "sortValue": 1, | ||
| 1336 | + "subType": "" | ||
| 1337 | + }, | ||
| 1338 | + { | ||
| 1339 | + "backgroundColor": "", | ||
| 1340 | + "backgroundImgUrl": "", | ||
| 1341 | + "cityCode": "", | ||
| 1342 | + "compStyle": "Single_Column-01", | ||
| 1343 | + "compType": "SINGLE_COLUMN", | ||
| 1344 | + "dataSourceRequest": [ | ||
| 1345 | + | ||
| 1346 | + ], | ||
| 1347 | + "districtCode": "", | ||
| 1348 | + "extraData": "", | ||
| 1349 | + "hasAdInfo": 0, | ||
| 1350 | + "id": 2550, | ||
| 1351 | + "imgSize": "", | ||
| 1352 | + "innerUrl": "", | ||
| 1353 | + "linkUrl": "", | ||
| 1354 | + "meddleDataList": [ | ||
| 1355 | + | ||
| 1356 | + ], | ||
| 1357 | + "name": "为你推荐feed", | ||
| 1358 | + "objectId": "", | ||
| 1359 | + "objectTitle": "", | ||
| 1360 | + "objectType": null, | ||
| 1361 | + "operDataList": [ | ||
| 1362 | + { | ||
| 1363 | + "cityCode": "", | ||
| 1364 | + "coverSize": "1292*727", | ||
| 1365 | + "coverType": 1, | ||
| 1366 | + "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", | ||
| 1367 | + "description": "虽雨雪天气早已离去,但因持续低温,泰山山顶雪景依旧,雪晴美景,冰玉盈枝,被冰雪覆盖的泰山在日光照射下,更显神圣,仿若天上宫殿,再现了“苍山负雪,明烛天南”的场景!一起感受雪后泰山的绝美景色~", | ||
| 1368 | + "districtCode": "", | ||
| 1369 | + "endTime": "", | ||
| 1370 | + "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", | ||
| 1371 | + "heatValue": "", | ||
| 1372 | + "innerUrl": "", | ||
| 1373 | + "landscape": 1, | ||
| 1374 | + "lengthTime": null, | ||
| 1375 | + "linkUrl": "", | ||
| 1376 | + "openLikes": 0, | ||
| 1377 | + "openUrl": "http://livewatch-prod.aikan.pdnews.cn/tr_lud/bd20a351ac84428dbfdd24dc8822c421_origin.m3u8?auth_key=1705628416-0-0-8545eb30a8dccf969c4bc487af4dc088", | ||
| 1378 | + "pageId": "", | ||
| 1379 | + "playUrls": [ | ||
| 1380 | + | ||
| 1381 | + ], | ||
| 1382 | + "programAuth": "2004557", | ||
| 1383 | + "programId": "20000003741", | ||
| 1384 | + "programName": "", | ||
| 1385 | + "programSource": 5, | ||
| 1386 | + "programType": 2, | ||
| 1387 | + "provinceCode": "", | ||
| 1388 | + "rankingList": [ | ||
| 1389 | + | ||
| 1390 | + ], | ||
| 1391 | + "showTitleEd": "", | ||
| 1392 | + "showTitleIng": "", | ||
| 1393 | + "showTitleNo": "", | ||
| 1394 | + "sortValue": null, | ||
| 1395 | + "startTime": "2023-12-19 10:30:00", | ||
| 1396 | + "subType": "", | ||
| 1397 | + "subtitle": "", | ||
| 1398 | + "title": "泰山雪景慢直播", | ||
| 1399 | + "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" | ||
| 1400 | + } | ||
| 1401 | + ], | ||
| 1402 | + "pageId": null, | ||
| 1403 | + "posterSize": "", | ||
| 1404 | + "posterUrl": "", | ||
| 1405 | + "provinceCode": "", | ||
| 1406 | + "sortValue": 2, | ||
| 1407 | + "subType": "" | ||
| 1408 | + }, | ||
| 1409 | + { | ||
| 1410 | + "backgroundColor": "", | ||
| 1411 | + "backgroundImgUrl": "", | ||
| 1412 | + "cityCode": "", | ||
| 1413 | + "compStyle": "Label-03", | ||
| 1414 | + "compType": "LABEL", | ||
| 1415 | + "dataSourceRequest": [ | ||
| 1416 | + | ||
| 1417 | + ], | ||
| 1418 | + "districtCode": "", | ||
| 1419 | + "extraData": "{\"titleIconUrl\":\"\",\"title\":\"直播预告\"}", | ||
| 1420 | + "hasAdInfo": 0, | ||
| 1421 | + "id": 9, | ||
| 1422 | + "imgSize": "", | ||
| 1423 | + "innerUrl": "", | ||
| 1424 | + "linkUrl": "", | ||
| 1425 | + "meddleDataList": [ | ||
| 1426 | + | ||
| 1427 | + ], | ||
| 1428 | + "name": "直播预告标题", | ||
| 1429 | + "objectId": "", | ||
| 1430 | + "objectTitle": "", | ||
| 1431 | + "objectType": null, | ||
| 1432 | + "operDataList": [ | ||
| 1433 | + | ||
| 1434 | + ], | ||
| 1435 | + "pageId": null, | ||
| 1436 | + "posterSize": "", | ||
| 1437 | + "posterUrl": "", | ||
| 1438 | + "provinceCode": "", | ||
| 1439 | + "sortValue": 1, | ||
| 1440 | + "subType": "" | ||
| 1441 | + }, | ||
| 1442 | + { | ||
| 1443 | + "backgroundColor": "", | ||
| 1444 | + "backgroundImgUrl": "", | ||
| 1445 | + "cityCode": "", | ||
| 1446 | + "compStyle": "Single_Row-03", | ||
| 1447 | + "compType": "SINGLE_ROW", | ||
| 1448 | + "dataSourceRequest": [ | ||
| 1449 | + | ||
| 1450 | + ], | ||
| 1451 | + "districtCode": "", | ||
| 1452 | + "extraData": "", | ||
| 1453 | + "hasAdInfo": 0, | ||
| 1454 | + "id": 4637, | ||
| 1455 | + "imgSize": "", | ||
| 1456 | + "innerUrl": "", | ||
| 1457 | + "linkUrl": "", | ||
| 1458 | + "meddleDataList": [ | ||
| 1459 | + | ||
| 1460 | + ], | ||
| 1461 | + "name": "为你推荐feed", | ||
| 1462 | + "objectId": "", | ||
| 1463 | + "objectTitle": "", | ||
| 1464 | + "objectType": null, | ||
| 1465 | + "operDataList": [ | ||
| 1466 | + { | ||
| 1467 | + "cityCode": "", | ||
| 1468 | + "coverSize": "1189*669", | ||
| 1469 | + "coverType": 1, | ||
| 1470 | + "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", | ||
| 1471 | + "description": "一眼千年,壁上乾坤。全国首座建于壁画墓葬原址上的博物馆开馆。人说山西好风光联合山西卫视开馆日进行首场沉浸式直播。", | ||
| 1472 | + "districtCode": "", | ||
| 1473 | + "endTime": "", | ||
| 1474 | + "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", | ||
| 1475 | + "heatValue": "", | ||
| 1476 | + "innerUrl": "", | ||
| 1477 | + "landscape": 1, | ||
| 1478 | + "lengthTime": null, | ||
| 1479 | + "linkUrl": "", | ||
| 1480 | + "openLikes": 0, | ||
| 1481 | + "openUrl": "", | ||
| 1482 | + "pageId": "", | ||
| 1483 | + "playUrls": [ | ||
| 1484 | + | ||
| 1485 | + ], | ||
| 1486 | + "programAuth": "2004557", | ||
| 1487 | + "programId": "20000003752", | ||
| 1488 | + "programName": "", | ||
| 1489 | + "programSource": 5, | ||
| 1490 | + "programType": 2, | ||
| 1491 | + "provinceCode": "", | ||
| 1492 | + "rankingList": [ | ||
| 1493 | + | ||
| 1494 | + ], | ||
| 1495 | + "showTitleEd": "", | ||
| 1496 | + "showTitleIng": "", | ||
| 1497 | + "showTitleNo": "", | ||
| 1498 | + "sortValue": null, | ||
| 1499 | + "startTime": "2023-12-20 11:00:00", | ||
| 1500 | + "subType": "", | ||
| 1501 | + "subtitle": "", | ||
| 1502 | + "title": "穿越千年比个“耶” 北齐壁画博物馆开馆日首场直播", | ||
| 1503 | + "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" | ||
| 1504 | + }, | ||
| 1505 | + { | ||
| 1506 | + "cityCode": "", | ||
| 1507 | + "coverSize": "1920*1080", | ||
| 1508 | + "coverType": 1, | ||
| 1509 | + "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", | ||
| 1510 | + "description": "“他睁着眼睛,但是看不见我,听不到我,他还在我的生活中,但是无法和我产生交流。”意识障碍,常见于颅脑外伤、缺血缺氧性脑病、脑血管意外等,老百姓也称之为“植物人”。本次直播,复旦大学康复医学科主治医师谢鸿宇为大家讲解植物人的康复促醒治疗。", | ||
| 1511 | + "districtCode": "", | ||
| 1512 | + "endTime": "", | ||
| 1513 | + "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", | ||
| 1514 | + "heatValue": "", | ||
| 1515 | + "innerUrl": "", | ||
| 1516 | + "landscape": 1, | ||
| 1517 | + "lengthTime": null, | ||
| 1518 | + "linkUrl": "", | ||
| 1519 | + "openLikes": 0, | ||
| 1520 | + "openUrl": "", | ||
| 1521 | + "pageId": "", | ||
| 1522 | + "playUrls": [ | ||
| 1523 | + | ||
| 1524 | + ], | ||
| 1525 | + "programAuth": "2004557", | ||
| 1526 | + "programId": "20000003747", | ||
| 1527 | + "programName": "", | ||
| 1528 | + "programSource": 5, | ||
| 1529 | + "programType": 2, | ||
| 1530 | + "provinceCode": "", | ||
| 1531 | + "rankingList": [ | ||
| 1532 | + | ||
| 1533 | + ], | ||
| 1534 | + "showTitleEd": "", | ||
| 1535 | + "showTitleIng": "", | ||
| 1536 | + "showTitleNo": "", | ||
| 1537 | + "sortValue": null, | ||
| 1538 | + "startTime": "2023-12-20 12:00:00", | ||
| 1539 | + "subType": "", | ||
| 1540 | + "subtitle": "", | ||
| 1541 | + "title": "医点就通 | “植物人”唤醒——促醒康复治疗", | ||
| 1542 | + "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" | ||
| 1543 | + }, | ||
| 1544 | + { | ||
| 1545 | + "cityCode": "", | ||
| 1546 | + "coverSize": "1920*1080", | ||
| 1547 | + "coverType": 1, | ||
| 1548 | + "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", | ||
| 1549 | + "description": "随着现代医学的不断进步,很多昔日治不好的癌症在今天都已经变成慢病,以及不那么可怕,但是对于女性而言子宫内膜癌仍然是一个潜在的威胁。子宫内膜癌常常以阴道异常流血为特征,而围绝经期女性月经紊乱的情况非常常见,所以早期特别容易被女性朋友们忽视。子宫内膜癌是一个什么样的疾病?患子宫内膜癌有哪些高危因素?如何早期发现和治疗?如何预防?患病的年轻育龄女性是否可以正常生孩子?", | ||
| 1550 | + "districtCode": "", | ||
| 1551 | + "endTime": "", | ||
| 1552 | + "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", | ||
| 1553 | + "heatValue": "", | ||
| 1554 | + "innerUrl": "", | ||
| 1555 | + "landscape": 1, | ||
| 1556 | + "lengthTime": null, | ||
| 1557 | + "linkUrl": "", | ||
| 1558 | + "openLikes": 0, | ||
| 1559 | + "openUrl": "", | ||
| 1560 | + "pageId": "", | ||
| 1561 | + "playUrls": [ | ||
| 1562 | + | ||
| 1563 | + ], | ||
| 1564 | + "programAuth": "2004557", | ||
| 1565 | + "programId": "20000003751", | ||
| 1566 | + "programName": "", | ||
| 1567 | + "programSource": 5, | ||
| 1568 | + "programType": 2, | ||
| 1569 | + "provinceCode": "", | ||
| 1570 | + "rankingList": [ | ||
| 1571 | + | ||
| 1572 | + ], | ||
| 1573 | + "showTitleEd": "", | ||
| 1574 | + "showTitleIng": "", | ||
| 1575 | + "showTitleNo": "", | ||
| 1576 | + "sortValue": null, | ||
| 1577 | + "startTime": "2023-12-20 12:00:00", | ||
| 1578 | + "subType": "", | ||
| 1579 | + "subtitle": "", | ||
| 1580 | + "title": "医点就通 | “不期而至现端倪”——子宫内膜癌专题科普", | ||
| 1581 | + "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" | ||
| 1582 | + }, | ||
| 1583 | + { | ||
| 1584 | + "cityCode": "", | ||
| 1585 | + "coverSize": "1920*1080", | ||
| 1586 | + "coverType": 1, | ||
| 1587 | + "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", | ||
| 1588 | + "description": "喜马拉雅2023有声之夜暨峰爆榜颁奖典礼,喜马拉雅和他的朋友们,邀你共同探索声音的无限可能!倾听科技、文化和商业的观点碰撞,峰爆榜揭示音频潮流,直达音频行业浪潮前沿。", | ||
| 1589 | + "districtCode": "", | ||
| 1590 | + "endTime": "", | ||
| 1591 | + "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", | ||
| 1592 | + "heatValue": "", | ||
| 1593 | + "innerUrl": "", | ||
| 1594 | + "landscape": 1, | ||
| 1595 | + "lengthTime": null, | ||
| 1596 | + "linkUrl": "", | ||
| 1597 | + "openLikes": 0, | ||
| 1598 | + "openUrl": "", | ||
| 1599 | + "pageId": "", | ||
| 1600 | + "playUrls": [ | ||
| 1601 | + | ||
| 1602 | + ], | ||
| 1603 | + "programAuth": "2004557", | ||
| 1604 | + "programId": "20000003746", | ||
| 1605 | + "programName": "", | ||
| 1606 | + "programSource": 5, | ||
| 1607 | + "programType": 2, | ||
| 1608 | + "provinceCode": "", | ||
| 1609 | + "rankingList": [ | ||
| 1610 | + | ||
| 1611 | + ], | ||
| 1612 | + "showTitleEd": "", | ||
| 1613 | + "showTitleIng": "", | ||
| 1614 | + "showTitleNo": "", | ||
| 1615 | + "sortValue": null, | ||
| 1616 | + "startTime": "2023-12-20 13:30:00", | ||
| 1617 | + "subType": "", | ||
| 1618 | + "subtitle": "", | ||
| 1619 | + "title": "喜马拉雅2023有声之夜暨峰爆榜颁奖典礼", | ||
| 1620 | + "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" | ||
| 1621 | + }, | ||
| 1622 | + { | ||
| 1623 | + "cityCode": "", | ||
| 1624 | + "coverSize": "1920*1080", | ||
| 1625 | + "coverType": 1, | ||
| 1626 | + "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", | ||
| 1627 | + "description": "秋冬季节,气温常骤升骤降,是高血压、冠心病、卒中,等心脑血管疾病的高发期,其心血管疾病的发生率是夏季的两倍多,为什么心血管疾病在秋冬季高发?我们又应该如何平安过冬?带着这些疑问,积水潭医院血管外科的副主任贾伟医生,带我们一起了解一下如何保护好血管,平安过冬。", | ||
| 1628 | + "districtCode": "", | ||
| 1629 | + "endTime": "", | ||
| 1630 | + "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", | ||
| 1631 | + "heatValue": "", | ||
| 1632 | + "innerUrl": "", | ||
| 1633 | + "landscape": 1, | ||
| 1634 | + "lengthTime": null, | ||
| 1635 | + "linkUrl": "", | ||
| 1636 | + "openLikes": 0, | ||
| 1637 | + "openUrl": "", | ||
| 1638 | + "pageId": "", | ||
| 1639 | + "playUrls": [ | ||
| 1640 | + | ||
| 1641 | + ], | ||
| 1642 | + "programAuth": "2004557", | ||
| 1643 | + "programId": "20000003749", | ||
| 1644 | + "programName": "", | ||
| 1645 | + "programSource": 5, | ||
| 1646 | + "programType": 2, | ||
| 1647 | + "provinceCode": "", | ||
| 1648 | + "rankingList": [ | ||
| 1649 | + | ||
| 1650 | + ], | ||
| 1651 | + "showTitleEd": "", | ||
| 1652 | + "showTitleIng": "", | ||
| 1653 | + "showTitleNo": "", | ||
| 1654 | + "sortValue": null, | ||
| 1655 | + "startTime": "2023-12-21 14:30:00", | ||
| 1656 | + "subType": "", | ||
| 1657 | + "subtitle": "", | ||
| 1658 | + "title": "医点就通 | 保护血管,安全过冬", | ||
| 1659 | + "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" | ||
| 1660 | + }, | ||
| 1661 | + { | ||
| 1662 | + "cityCode": "", | ||
| 1663 | + "coverSize": "2003*1127", | ||
| 1664 | + "coverType": 1, | ||
| 1665 | + "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", | ||
| 1666 | + "description": "业勤知行,书海思源,奋发有为,各领风骚!\n是扬帆学海的领航者,是躬耕科研的冲浪者,是诠释担当的志愿者,是力学笃行的实践者,是光影舞台上的明星,是运动赛场上的健儿,是红果园中最多彩的青春模样,他们就是北京交通大学学生先进集体和先进个人。", | ||
| 1667 | + "districtCode": "", | ||
| 1668 | + "endTime": "", | ||
| 1669 | + "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", | ||
| 1670 | + "heatValue": "", | ||
| 1671 | + "innerUrl": "", | ||
| 1672 | + "landscape": 1, | ||
| 1673 | + "lengthTime": null, | ||
| 1674 | + "linkUrl": "", | ||
| 1675 | + "openLikes": 0, | ||
| 1676 | + "openUrl": "", | ||
| 1677 | + "pageId": "", | ||
| 1678 | + "playUrls": [ | ||
| 1679 | + | ||
| 1680 | + ], | ||
| 1681 | + "programAuth": "2004557", | ||
| 1682 | + "programId": "20000003742", | ||
| 1683 | + "programName": "", | ||
| 1684 | + "programSource": 5, | ||
| 1685 | + "programType": 2, | ||
| 1686 | + "provinceCode": "", | ||
| 1687 | + "rankingList": [ | ||
| 1688 | + | ||
| 1689 | + ], | ||
| 1690 | + "showTitleEd": "", | ||
| 1691 | + "showTitleIng": "", | ||
| 1692 | + "showTitleNo": "", | ||
| 1693 | + "sortValue": null, | ||
| 1694 | + "startTime": "2023-12-21 15:00:00", | ||
| 1695 | + "subType": "", | ||
| 1696 | + "subtitle": "", | ||
| 1697 | + "title": "荣誉 责任 梦想—北京交通大学2022-2023学年表彰大会", | ||
| 1698 | + "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" | ||
| 1699 | + }, | ||
| 1700 | + { | ||
| 1701 | + "cityCode": "", | ||
| 1702 | + "coverSize": "764*430", | ||
| 1703 | + "coverType": 1, | ||
| 1704 | + "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", | ||
| 1705 | + "description": "冬至是我国四时八节之一,在二十四节气中是较重要的一个节气。《清嘉录》载:“冬至大如年”,古人将冬至视为“节日”,这种大如年的冬至节在古代有哪些讲究和趣事,12月22日跟随博物馆专业的小姐姐走进上海观复博物馆,通过探寻一件件古物,了解中国传统节气里大如年的“冬至节”。", | ||
| 1706 | + "districtCode": "", | ||
| 1707 | + "endTime": "", | ||
| 1708 | + "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", | ||
| 1709 | + "heatValue": "", | ||
| 1710 | + "innerUrl": "", | ||
| 1711 | + "landscape": 1, | ||
| 1712 | + "lengthTime": null, | ||
| 1713 | + "linkUrl": "", | ||
| 1714 | + "openLikes": 0, | ||
| 1715 | + "openUrl": "", | ||
| 1716 | + "pageId": "", | ||
| 1717 | + "playUrls": [ | ||
| 1718 | + | ||
| 1719 | + ], | ||
| 1720 | + "programAuth": "2004557", | ||
| 1721 | + "programId": "20000003714", | ||
| 1722 | + "programName": "", | ||
| 1723 | + "programSource": 5, | ||
| 1724 | + "programType": 2, | ||
| 1725 | + "provinceCode": "", | ||
| 1726 | + "rankingList": [ | ||
| 1727 | + | ||
| 1728 | + ], | ||
| 1729 | + "showTitleEd": "", | ||
| 1730 | + "showTitleIng": "", | ||
| 1731 | + "showTitleNo": "", | ||
| 1732 | + "sortValue": null, | ||
| 1733 | + "startTime": "2023-12-22 14:30:00", | ||
| 1734 | + "subType": "", | ||
| 1735 | + "subtitle": "", | ||
| 1736 | + "title": "冬至大如年——博物馆里的冬至故事", | ||
| 1737 | + "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" | ||
| 1738 | + }, | ||
| 1739 | + { | ||
| 1740 | + "cityCode": "", | ||
| 1741 | + "coverSize": "1920*1080", | ||
| 1742 | + "coverType": 1, | ||
| 1743 | + "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", | ||
| 1744 | + "description": "原发性头痛和继发性头痛、紧张型头痛、偏头痛、前庭型偏头痛……人人都可能有过头痛的经历,头痛多种多样,你有被头痛困扰过吗?今天浙大四院《医千零一问》科普直播的主题是关于头痛的那事儿,与大家一起认识和面对头痛。", | ||
| 1745 | + "districtCode": "", | ||
| 1746 | + "endTime": "", | ||
| 1747 | + "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", | ||
| 1748 | + "heatValue": "", | ||
| 1749 | + "innerUrl": "", | ||
| 1750 | + "landscape": 1, | ||
| 1751 | + "lengthTime": null, | ||
| 1752 | + "linkUrl": "", | ||
| 1753 | + "openLikes": 0, | ||
| 1754 | + "openUrl": "", | ||
| 1755 | + "pageId": "", | ||
| 1756 | + "playUrls": [ | ||
| 1757 | + | ||
| 1758 | + ], | ||
| 1759 | + "programAuth": "2004557", | ||
| 1760 | + "programId": "20000003748", | ||
| 1761 | + "programName": "", | ||
| 1762 | + "programSource": 5, | ||
| 1763 | + "programType": 2, | ||
| 1764 | + "provinceCode": "", | ||
| 1765 | + "rankingList": [ | ||
| 1766 | + | ||
| 1767 | + ], | ||
| 1768 | + "showTitleEd": "", | ||
| 1769 | + "showTitleIng": "", | ||
| 1770 | + "showTitleNo": "", | ||
| 1771 | + "sortValue": null, | ||
| 1772 | + "startTime": "2023-12-22 16:00:00", | ||
| 1773 | + "subType": "", | ||
| 1774 | + "subtitle": "", | ||
| 1775 | + "title": "医点就通 | 一起聊聊让人“头痛”的那些事", | ||
| 1776 | + "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" | ||
| 1777 | + }, | ||
| 1778 | + { | ||
| 1779 | + "cityCode": "", | ||
| 1780 | + "coverSize": "1249*702", | ||
| 1781 | + "coverType": 1, | ||
| 1782 | + "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", | ||
| 1783 | + "description": "2023深圳宝安马拉松是由深圳市宝安区人民政府主办,深圳市宝安区文化广电旅游体育局承办的马拉松赛事。比赛于2023年12月31日上午7时30分在海滨广场鸣枪开跑,赛事设有马拉松和半程马拉松两个项目,规模将达到2万人,其中马拉松8000人,半程马拉松12000人。深圳宝安马拉松自2016年首创以来,已成功举办5届赛事,并斩获中国田协“金牌赛事”和世界田联“精英标牌赛事”两大殊荣。", | ||
| 1784 | + "districtCode": "", | ||
| 1785 | + "endTime": "", | ||
| 1786 | + "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", | ||
| 1787 | + "heatValue": "", | ||
| 1788 | + "innerUrl": "", | ||
| 1789 | + "landscape": 1, | ||
| 1790 | + "lengthTime": null, | ||
| 1791 | + "linkUrl": "", | ||
| 1792 | + "openLikes": 0, | ||
| 1793 | + "openUrl": "", | ||
| 1794 | + "pageId": "", | ||
| 1795 | + "playUrls": [ | ||
| 1796 | + | ||
| 1797 | + ], | ||
| 1798 | + "programAuth": "2004557", | ||
| 1799 | + "programId": "20000003750", | ||
| 1800 | + "programName": "", | ||
| 1801 | + "programSource": 5, | ||
| 1802 | + "programType": 2, | ||
| 1803 | + "provinceCode": "", | ||
| 1804 | + "rankingList": [ | ||
| 1805 | + | ||
| 1806 | + ], | ||
| 1807 | + "showTitleEd": "", | ||
| 1808 | + "showTitleIng": "", | ||
| 1809 | + "showTitleNo": "", | ||
| 1810 | + "sortValue": null, | ||
| 1811 | + "startTime": "2023-12-31 07:00:00", | ||
| 1812 | + "subType": "", | ||
| 1813 | + "subtitle": "", | ||
| 1814 | + "title": "我在视界看比赛|2023深圳宝安马拉松", | ||
| 1815 | + "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" | ||
| 1816 | + } | ||
| 1817 | + ], | ||
| 1818 | + "pageId": null, | ||
| 1819 | + "posterSize": "", | ||
| 1820 | + "posterUrl": "", | ||
| 1821 | + "provinceCode": "", | ||
| 1822 | + "sortValue": 2, | ||
| 1823 | + "subType": "" | ||
| 1824 | + } | ||
| 1825 | + ], | ||
| 1826 | + "id": 5, | ||
| 1827 | + "name": "今日热点", | ||
| 1828 | + "pageId": "2" | ||
| 1829 | + }, | ||
| 1830 | + "message": "Success", | ||
| 1831 | + "meta": { | ||
| 1832 | + "md5": "yZstaJZxCm+YdypyQpuQyA==" | ||
| 1833 | + }, | ||
| 1834 | + "requestId": "", | ||
| 1835 | + "success": true, | ||
| 1836 | + "timestamp": 1702881464711 | ||
| 1837 | +} |
| 1 | +import hilog from '@ohos.hilog'; | ||
| 2 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 3 | + | ||
| 4 | +export default function abilityTest() { | ||
| 5 | + describe('ActsAbilityTest', () => { | ||
| 6 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 7 | + beforeAll(() => { | ||
| 8 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 9 | + // This API supports only one parameter: preset action function. | ||
| 10 | + }) | ||
| 11 | + beforeEach(() => { | ||
| 12 | + // Presets an action, which is performed before each unit test case starts. | ||
| 13 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 14 | + // This API supports only one parameter: preset action function. | ||
| 15 | + }) | ||
| 16 | + afterEach(() => { | ||
| 17 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 18 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 19 | + // This API supports only one parameter: clear action function. | ||
| 20 | + }) | ||
| 21 | + afterAll(() => { | ||
| 22 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 23 | + // This API supports only one parameter: clear action function. | ||
| 24 | + }) | ||
| 25 | + it('assertContain', 0, () => { | ||
| 26 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 27 | + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); | ||
| 28 | + let a = 'abc'; | ||
| 29 | + let b = 'b'; | ||
| 30 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 31 | + expect(a).assertContain(b); | ||
| 32 | + expect(a).assertEqual(a); | ||
| 33 | + }) | ||
| 34 | + }) | ||
| 35 | +} |
| 1 | +import UIAbility from '@ohos.app.ability.UIAbility'; | ||
| 2 | +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; | ||
| 3 | +import hilog from '@ohos.hilog'; | ||
| 4 | +import { Hypium } from '@ohos/hypium'; | ||
| 5 | +import testsuite from '../test/List.test'; | ||
| 6 | +import window from '@ohos.window'; | ||
| 7 | +import Want from '@ohos.app.ability.Want'; | ||
| 8 | +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; | ||
| 9 | + | ||
| 10 | +export default class TestAbility extends UIAbility { | ||
| 11 | + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) { | ||
| 12 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); | ||
| 13 | + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); | ||
| 14 | + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); | ||
| 15 | + let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator; | ||
| 16 | + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); | ||
| 17 | + let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs; | ||
| 18 | + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments(); | ||
| 19 | + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); | ||
| 20 | + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite); | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + onDestroy() { | ||
| 24 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + onWindowStageCreate(windowStage: window.WindowStage) { | ||
| 28 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); | ||
| 29 | + windowStage.loadContent('testability/pages/Index', (err, data) => { | ||
| 30 | + if (err.code) { | ||
| 31 | + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); | ||
| 32 | + return; | ||
| 33 | + } | ||
| 34 | + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', | ||
| 35 | + JSON.stringify(data) ?? ''); | ||
| 36 | + }); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + onWindowStageDestroy() { | ||
| 40 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + onForeground() { | ||
| 44 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + onBackground() { | ||
| 48 | + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); | ||
| 49 | + } | ||
| 50 | +} |
| 1 | +import hilog from '@ohos.hilog'; | ||
| 2 | +import TestRunner from '@ohos.application.testRunner'; | ||
| 3 | +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; | ||
| 4 | +import Want from '@ohos.app.ability.Want'; | ||
| 5 | + | ||
| 6 | +let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator | undefined = undefined | ||
| 7 | +let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs | undefined = undefined | ||
| 8 | + | ||
| 9 | +async function onAbilityCreateCallback() { | ||
| 10 | + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +async function addAbilityMonitorCallback(err : Error) { | ||
| 14 | + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +export default class OpenHarmonyTestRunner implements TestRunner { | ||
| 18 | + constructor() { | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + onPrepare() { | ||
| 22 | + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + async onRun() { | ||
| 26 | + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); | ||
| 27 | + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() | ||
| 28 | + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() | ||
| 29 | + const bundleName = abilityDelegatorArguments.bundleName; | ||
| 30 | + const testAbilityName = 'TestAbility'; | ||
| 31 | + let lMonitor: AbilityDelegatorRegistry.AbilityMonitor = { | ||
| 32 | + abilityName: testAbilityName, | ||
| 33 | + onAbilityCreate: onAbilityCreateCallback, | ||
| 34 | + }; | ||
| 35 | + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) | ||
| 36 | + const want: Want = { | ||
| 37 | + bundleName: bundleName, | ||
| 38 | + abilityName: testAbilityName | ||
| 39 | + }; | ||
| 40 | + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator(); | ||
| 41 | + abilityDelegator.startAbility(want, (err, data) => { | ||
| 42 | + hilog.info(0x0000, 'testTag', 'startAbility : err : %{public}s', JSON.stringify(err) ?? ''); | ||
| 43 | + hilog.info(0x0000, 'testTag', 'startAbility : data : %{public}s',JSON.stringify(data) ?? ''); | ||
| 44 | + }) | ||
| 45 | + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); | ||
| 46 | + } | ||
| 47 | +} |
| 1 | +{ | ||
| 2 | + "module": { | ||
| 3 | + "name": "entry_test", | ||
| 4 | + "type": "feature", | ||
| 5 | + "description": "$string:module_test_desc", | ||
| 6 | + "mainElement": "TestAbility", | ||
| 7 | + "deviceTypes": [ | ||
| 8 | + "phone", | ||
| 9 | + "tablet", | ||
| 10 | + "2in1" | ||
| 11 | + ], | ||
| 12 | + "deliveryWithInstall": true, | ||
| 13 | + "installationFree": false, | ||
| 14 | + "pages": "$profile:test_pages", | ||
| 15 | + "abilities": [ | ||
| 16 | + { | ||
| 17 | + "name": "TestAbility", | ||
| 18 | + "srcEntry": "./ets/testability/TestAbility.ets", | ||
| 19 | + "description": "$string:TestAbility_desc", | ||
| 20 | + "icon": "$media:icon", | ||
| 21 | + "label": "$string:TestAbility_label", | ||
| 22 | + "exported": true, | ||
| 23 | + "startWindowIcon": "$media:icon", | ||
| 24 | + "startWindowBackground": "$color:start_window_background", | ||
| 25 | + "skills": [ | ||
| 26 | + { | ||
| 27 | + "actions": [ | ||
| 28 | + "action.system.home" | ||
| 29 | + ], | ||
| 30 | + "entities": [ | ||
| 31 | + "entity.system.home" | ||
| 32 | + ] | ||
| 33 | + } | ||
| 34 | + ] | ||
| 35 | + } | ||
| 36 | + ] | ||
| 37 | + } | ||
| 38 | +} |
6.63 KB
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
| 1 | +{ | ||
| 2 | + "hvigorVersion": "file:../dependencies/hvigor-3.0.10-s.tgz", | ||
| 3 | + "dependencies": { | ||
| 4 | + "@ohos/hvigor-ohos-plugin": "file:../dependencies/hvigor-ohos-plugin-3.0.10-s.tgz", | ||
| 5 | + "rollup": "file:../dependencies/rollup.tgz", | ||
| 6 | + }, | ||
| 7 | + "execution": { | ||
| 8 | + // "daemon": true, /* Enable daemon compilation. Default: true */ | ||
| 9 | + // "incremental": true, /* Enable incremental compilation. Default: true */ | ||
| 10 | + // "parallel": true, /* Enable parallel compilation. Default: true */ | ||
| 11 | + // "typeCheck": false, /* Enable typeCheck. Default: false */ | ||
| 12 | + }, | ||
| 13 | + "logging": { | ||
| 14 | + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ | ||
| 15 | + }, | ||
| 16 | + "debugging": { | ||
| 17 | + // "stacktrace": false /* Disable stacktrace compilation. Default: false */ | ||
| 18 | + } | ||
| 19 | +} |
sight_harmony/Sight/hvigor/hvigor-wrapper.js
0 → 100644
| 1 | +"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))}(); |
sight_harmony/Sight/hvigorfile.ts
0 → 100644
sight_harmony/Sight/hvigorw
0 → 100644
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +# ---------------------------------------------------------------------------- | ||
| 4 | +# Hvigor startup script, version 1.0.0 | ||
| 5 | +# | ||
| 6 | +# Required ENV vars: | ||
| 7 | +# ------------------ | ||
| 8 | +# NODE_HOME - location of a Node home dir | ||
| 9 | +# or | ||
| 10 | +# Add /usr/local/nodejs/bin to the PATH environment variable | ||
| 11 | +# ---------------------------------------------------------------------------- | ||
| 12 | + | ||
| 13 | +HVIGOR_APP_HOME="`pwd -P`" | ||
| 14 | +HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js | ||
| 15 | + | ||
| 16 | +fail() { | ||
| 17 | + echo "$*" | ||
| 18 | + exit 1 | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +set_executable_node() { | ||
| 22 | + EXECUTABLE_NODE="${NODE_HOME}/bin/node" | ||
| 23 | + if [ -x "$EXECUTABLE_NODE" ]; then | ||
| 24 | + return | ||
| 25 | + fi | ||
| 26 | + | ||
| 27 | + EXECUTABLE_NODE="${NODE_HOME}/node" | ||
| 28 | + if [ -x "$EXECUTABLE_NODE" ]; then | ||
| 29 | + return | ||
| 30 | + fi | ||
| 31 | + 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" | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +# Determine node to start hvigor wrapper script | ||
| 35 | +if [ -n "${NODE_HOME}" ]; then | ||
| 36 | + set_executable_node | ||
| 37 | +else | ||
| 38 | + EXECUTABLE_NODE="node" | ||
| 39 | + command -v ${EXECUTABLE_NODE} &> /dev/null || fail "ERROR: NODE_HOME not set and 'node' command not found" | ||
| 40 | +fi | ||
| 41 | + | ||
| 42 | +# Check hvigor wrapper script | ||
| 43 | +if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ]; then | ||
| 44 | + fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}" | ||
| 45 | +fi | ||
| 46 | + | ||
| 47 | +# start hvigor-wrapper script | ||
| 48 | +exec "${EXECUTABLE_NODE}" \ | ||
| 49 | + "${HVIGOR_WRAPPER_SCRIPT}" "$@" |
sight_harmony/Sight/hvigorw.bat
0 → 100644
| 1 | +@if "%DEBUG%" == "" @echo off | ||
| 2 | +@rem ########################################################################## | ||
| 3 | +@rem | ||
| 4 | +@rem Hvigor startup script for Windows | ||
| 5 | +@rem | ||
| 6 | +@rem ########################################################################## | ||
| 7 | + | ||
| 8 | +@rem Set local scope for the variables with windows NT shell | ||
| 9 | +if "%OS%"=="Windows_NT" setlocal | ||
| 10 | + | ||
| 11 | +set DIRNAME=%~dp0 | ||
| 12 | +if "%DIRNAME%" == "" set DIRNAME=. | ||
| 13 | +set APP_BASE_NAME=%~n0 | ||
| 14 | +set APP_HOME=%DIRNAME% | ||
| 15 | + | ||
| 16 | +@rem Resolve any "." and ".." in APP_HOME to make it shorter. | ||
| 17 | +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi | ||
| 18 | + | ||
| 19 | +set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js | ||
| 20 | +set NODE_EXE=node.exe | ||
| 21 | + | ||
| 22 | +goto start | ||
| 23 | + | ||
| 24 | +:start | ||
| 25 | +@rem Find node.exe | ||
| 26 | +if defined NODE_HOME goto findNodeFromNodeHome | ||
| 27 | + | ||
| 28 | +%NODE_EXE% --version >NUL 2>&1 | ||
| 29 | +if "%ERRORLEVEL%" == "0" goto execute | ||
| 30 | + | ||
| 31 | +echo. | ||
| 32 | +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. | ||
| 33 | +echo. | ||
| 34 | +echo Please set the NODE_HOME variable in your environment to match the | ||
| 35 | +echo location of your NodeJs installation. | ||
| 36 | + | ||
| 37 | +goto fail | ||
| 38 | + | ||
| 39 | +:findNodeFromNodeHome | ||
| 40 | +set NODE_HOME=%NODE_HOME:"=% | ||
| 41 | +set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% | ||
| 42 | + | ||
| 43 | +if exist "%NODE_EXE_PATH%" goto execute | ||
| 44 | +echo. | ||
| 45 | +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. | ||
| 46 | +echo. | ||
| 47 | +echo Please set the NODE_HOME variable in your environment to match the | ||
| 48 | +echo location of your NodeJs installation. | ||
| 49 | + | ||
| 50 | +goto fail | ||
| 51 | + | ||
| 52 | +:execute | ||
| 53 | +@rem Execute hvigor | ||
| 54 | +"%NODE_EXE%" "%WRAPPER_MODULE_PATH%" %* | ||
| 55 | + | ||
| 56 | +if "%ERRORLEVEL%" == "0" goto hvigorwEnd | ||
| 57 | + | ||
| 58 | +:fail | ||
| 59 | +exit /b 1 | ||
| 60 | + | ||
| 61 | +:hvigorwEnd | ||
| 62 | +if "%OS%" == "Windows_NT" endlocal | ||
| 63 | + | ||
| 64 | +:end |
sight_harmony/Sight/local.properties
0 → 100644
| 1 | +# This file is automatically generated by DevEco Studio. | ||
| 2 | +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
| 3 | +# | ||
| 4 | +# This file should *NOT* be checked into Version Control Systems, | ||
| 5 | +# as it contains information specific to your local configuration. | ||
| 6 | +# | ||
| 7 | +# For customization when using a Version Control System, please read the header note. | ||
| 8 | +hwsdk.dir=D:/Harmony/HarmonyOS_SDK- 4.0.3.700-SP1 | ||
| 9 | +nodejs.dir=D:/nodejs-16.20.1 |
sight_harmony/Sight/oh-package-lock.json5
0 → 100644
| 1 | +{ | ||
| 2 | + "lockfileVersion": 1, | ||
| 3 | + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 4 | + "specifiers": { | ||
| 5 | + "@ohos/hypium@1.0.11": "@ohos/hypium@1.0.11" | ||
| 6 | + }, | ||
| 7 | + "packages": { | ||
| 8 | + "@ohos/hypium@1.0.11": { | ||
| 9 | + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.11.tgz", | ||
| 10 | + "integrity": "sha512-KawcLnv43C3QIYv1UbDnKCFX3MohtDxGuFvzlUxT/qf2DBilR56Ws6zrj90LdH6PjloJQwOPESuBQIHBACAK7w==" | ||
| 11 | + } | ||
| 12 | + } | ||
| 13 | +} |
sight_harmony/Sight/oh-package.json5
0 → 100644
sight_harmony/Sight/singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.cer
0 → 100644
| 1 | +-----BEGIN CERTIFICATE----- | ||
| 2 | +MIICGjCCAaGgAwIBAgIIShhpn519jNAwCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 3 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 4 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDMxNjAzMDQzOVoXDTQ5MDMx | ||
| 5 | +NjAzMDQzOVowUzELMAkGA1UEBhMCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 6 | +CwwKSHVhd2VpIENCRzEeMBwGA1UEAwwVSHVhd2VpIENCRyBSb290IENBIEcyMHYw | ||
| 7 | +EAYHKoZIzj0CAQYFK4EEACIDYgAEWidkGnDSOw3/HE2y2GHl+fpWBIa5S+IlnNrs | ||
| 8 | +GUvwC1I2QWvtqCHWmwFlFK95zKXiM8s9yV3VVXh7ivN8ZJO3SC5N1TCrvB2lpHMB | ||
| 9 | +wcz4DA0kgHCMm/wDec6kOHx1xvCRo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T | ||
| 10 | +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUo45a9Vq8cYwqaiVyfkiS4pLcIAAwCgYIKoZI | ||
| 11 | +zj0EAwMDZwAwZAIwMypeB7P0IbY7c6gpWcClhRznOJFj8uavrNu2PIoz9KIqr3jn | ||
| 12 | +BlBHJs0myI7ntYpEAjBbm8eDMZY5zq5iMZUC6H7UzYSix4Uy1YlsLVV738PtKP9h | ||
| 13 | +FTjgDHctXJlC5L7+ZDY= | ||
| 14 | +-----END CERTIFICATE----- | ||
| 15 | +-----BEGIN CERTIFICATE----- | ||
| 16 | +MIIDATCCAoigAwIBAgIIXmuDXbWpOB8wCgYIKoZIzj0EAwMwUzELMAkGA1UEBhMC | ||
| 17 | +Q04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEeMBwGA1UE | ||
| 18 | +AwwVSHVhd2VpIENCRyBSb290IENBIEcyMB4XDTIwMDcwOTAyMDQyNFoXDTMwMDcw | ||
| 19 | +NzAyMDQyNFowYjELMAkGA1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UE | ||
| 20 | +CwwKSHVhd2VpIENCRzEtMCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVs | ||
| 21 | +YXRpb25zIENBIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE65LdoIZh1hlpZ2gP | ||
| 22 | +bJ6gPhHsvYSRe22KETgdqeVeYnrbRHI9wsPT6RGYS+pU4mPl6wxzgDMqN6SY/BoZ | ||
| 23 | +luhkE1PzaHoPoNIWIq0O33hpyKyyYwAacIUEjYurkw1E9r9no4IBGDCCARQwHwYD | ||
| 24 | +VR0jBBgwFoAUo45a9Vq8cYwqaiVyfkiS4pLcIAAwHQYDVR0OBBYEFNtek7Ij6NDk | ||
| 25 | +/nF6Zumkc0dbf/NeMEYGA1UdIAQ/MD0wOwYEVR0gADAzMDEGCCsGAQUFBwIBFiVo | ||
| 26 | +dHRwOi8vY3BraS1jYXdlYi5odWF3ZWkuY29tL2Nwa2kvY3BzMBIGA1UdEwEB/wQI | ||
| 27 | +MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMGYGA1UdHwRfMF0wW6BZoFeGVWh0dHA6 | ||
| 28 | +Ly9jcGtpLWNhd2ViLmh1YXdlaS5jb20vY3BraS9zZXJ2bGV0L2NybEZpbGVEb3du | ||
| 29 | +LmNybD9jZXJ0eXBlPTEwJi9yb290X2cyX2NybC5jcmwwCgYIKoZIzj0EAwMDZwAw | ||
| 30 | +ZAIwWO1X5q2MdfpR1Q237GpUHGbL1C13rGyFg2p3AYo44FpZ2/A9ss0wOHKM4KDl | ||
| 31 | +ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o | ||
| 32 | +Q+FzM3c= | ||
| 33 | +-----END CERTIFICATE----- | ||
| 34 | +-----BEGIN CERTIFICATE----- | ||
| 35 | +MIICxjCCAkugAwIBAgIOY79lYTcHyI5az+ZALFYwCgYIKoZIzj0EAwMwYjELMAkG | ||
| 36 | +A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt | ||
| 37 | +MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X | ||
| 38 | +DTIzMTIyNTA1MzEzNFoXDTI0MTIyNTA1MzEzNFowdTELMAkGA1UEBhMCQ04xEjAQ | ||
| 39 | +BgNVBAoMCeaoiuaYjuWPizEcMBoGA1UECwwTMTE5NzkzMDQ4MTAzMTU5ODA4MTE0 | ||
| 40 | +MDIGA1UEAwwr5qiK5piO5Y+LKDExOTc5MzA0ODEwMzE1OTgwODEpXCxEZXZlbG9w | ||
| 41 | +bWVudDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMRyJ7HQ+fMiifMVCImAjzDl | ||
| 42 | +WQJqLyoFWQM8dvHolphRzIy8wj4sJ5iTKbNlUoRsrmtULPqdWgWYW5lKQyQYeP2j | ||
| 43 | +gdEwgc4wDAYDVR0TAQH/BAIwADBZBgNVHR8EUjBQME6gTKBKhkhodHRwOi8vaDVo | ||
| 44 | +b3N0aW5nLWRyY24uZGJhbmtjZG4uY24vY2NoNS9jcmwvaGRyY2FnMi9IdWF3ZWlD | ||
| 45 | +QkdIRFJHMmNybC5jcmwwHwYDVR0jBBgwFoAU216TsiPo0OT+cXpm6aRzR1t/814w | ||
| 46 | +HQYDVR0OBBYEFP/wgrm5Ql8yDbpEszJHfCxvQxb8MA4GA1UdDwEB/wQEAwIHgDAT | ||
| 47 | +BgNVHSUEDDAKBggrBgEFBQcDAzAKBggqhkjOPQQDAwNpADBmAjEAnojm/vMYow4S | ||
| 48 | +8uVuYGAVGW16L/XlLe7PoFrQnj0OHCjho6If8C4HnsHQZ5YEFDcSAjEAw2JGA99J | ||
| 49 | +FnSyOmgDVvqlXGGjzecrBmz+XxLO8jW71RWGRGqYcmrC5odUs6mOO1Jt | ||
| 50 | +-----END CERTIFICATE----- |
sight_harmony/Sight/singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.csr
0 → 100644
| 1 | +-----BEGIN NEW CERTIFICATE REQUEST----- | ||
| 2 | +MIIBNDCB3AIBADBKMQkwBwYDVQQGEwAxCTAHBgNVBAgTADEJMAcGA1UEBxMAMQkw | ||
| 3 | +BwYDVQQKEwAxCTAHBgNVBAsTADERMA8GA1UEAxMIRGVidWdLZXkwWTATBgcqhkjO | ||
| 4 | +PQIBBggqhkjOPQMBBwNCAATEciex0PnzIonzFQiJgI8w5VkCai8qBVkDPHbx6JaY | ||
| 5 | +UcyMvMI+LCeYkymzZVKEbK5rVCz6nVoFmFuZSkMkGHj9oDAwLgYJKoZIhvcNAQkO | ||
| 6 | +MSEwHzAdBgNVHQ4EFgQU//CCublCXzINukSzMkd8LG9DFvwwCgYIKoZIzj0EAwID | ||
| 7 | +RwAwRAIgHAT6BlkWveRUDVWrxHD2T+MkuGM4KL3S52VH6idhCGMCIBecypUwT6kn | ||
| 8 | +Al2Hfwz9hiftXBe+oNF0fD8ATmkGpI8V | ||
| 9 | +-----END NEW CERTIFICATE REQUEST----- |
sight_harmony/Sight/singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p12
0 → 100644
No preview for this file type
sight_harmony/Sight/singing_config/auto_debug_Sight_com.wondertek.sight_70086000309521319.p7b
0 → 100644
No preview for this file type
No preview for this file type
| 1 | +1MzQ3 |
| 1 | +ýs›3«”¡¥j$E\l |
| 1 | +㔢y<sRB1L|7 |
sight_harmony/Sight/wdBean/Index.ets
0 → 100644
| 1 | +// enum | ||
| 2 | +export { CompStyle } from './src/main/ets/enum/CompStyle'; | ||
| 3 | + | ||
| 4 | +export { CompType } from './src/main/ets/enum/CompType'; | ||
| 5 | + | ||
| 6 | +export { NetDataStatusType } from './src/main/ets/enum/NetDataStatusType'; | ||
| 7 | + | ||
| 8 | +export { ViewType } from './src/main/ets/enum/ViewType'; | ||
| 9 | + | ||
| 10 | +// entity | ||
| 11 | +export { ItemDTO } from './src/main/ets/bean/ItemDTO'; | ||
| 12 | + | ||
| 13 | +export { ItemBean } from './src/main/ets/bean/ItemBean'; | ||
| 14 | + | ||
| 15 | +// component | ||
| 16 | +export { LabelBean } from './src/main/ets/bean/component/extra/LabelBean'; | ||
| 17 | + | ||
| 18 | +export { LabelDTO } from './src/main/ets/bean/component/extra/LabelDTO'; | ||
| 19 | + | ||
| 20 | +export { GroupDTO } from './src/main/ets/bean/component/GroupDTO'; | ||
| 21 | + | ||
| 22 | +export { CompDTO } from './src/main/ets/bean/component/CompDTO'; | ||
| 23 | + | ||
| 24 | +export { ContentDTO } from './src/main/ets/bean/component/ContentDTO'; | ||
| 25 | + | ||
| 26 | + |
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
sight_harmony/Sight/wdBean/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
sight_harmony/Sight/wdBean/oh-package.json5
0 → 100644
| 1 | +import { ItemDTO } from './ItemDTO'; | ||
| 2 | +import { Action } from './programme/Action'; | ||
| 3 | +import { Pic } from './programme/Pic'; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 绑定到组件comp/view的数据Bean | ||
| 7 | + */ | ||
| 8 | +@Observed | ||
| 9 | +// export abstract class ItemBean<DTO> implements Mapper<DTO> { | ||
| 10 | +export abstract class ItemBean extends ItemDTO { | ||
| 11 | + landscapeCover?: string; // 横向低分辨封面图片 | ||
| 12 | + portraitCover?: string; // 竖向低分辨封面图片 | ||
| 13 | + highLandscapeCover?: string; // 横向高分辨封面图片 | ||
| 14 | + highPortraitCover?: string; // 竖向高分辨封面图片 | ||
| 15 | + lowResolutionV34?: string; // 低清竖图(3:4比例), 取图逻辑 3:4低清竖图-->3:4高清竖图-->低分辨率竖图-->高分辨率竖图 | ||
| 16 | + highResolutionV34?: string; // 高清竖图(3:4比例), 取图逻辑 3:4高清竖图-->3:4低清竖图-->高分辨率竖图-->低分辨率竖图 | ||
| 17 | + /** | ||
| 18 | + * 是否被曝光 | ||
| 19 | + */ | ||
| 20 | + exposed: boolean; | ||
| 21 | + /** | ||
| 22 | + * 曝光位置 | ||
| 23 | + */ | ||
| 24 | + position: string; | ||
| 25 | + | ||
| 26 | + constructor(dto: ItemDTO) { | ||
| 27 | + super(dto.action, dto.actionId, dto.pics, dto.h5pics) | ||
| 28 | + | ||
| 29 | + this.landscapeCover = !dto.pics ? "" : !dto.pics.lowResolutionH ? dto.pics.highResolutionH : dto.pics.lowResolutionH; | ||
| 30 | + this.portraitCover = !dto.pics ? "" : !dto.pics.lowResolutionV ? dto.pics.highResolutionV : dto.pics.lowResolutionV; | ||
| 31 | + this.highLandscapeCover = !dto.pics ? "" : !dto.pics.highResolutionH ? dto.pics.lowResolutionH : dto.pics.highResolutionH; | ||
| 32 | + this.highPortraitCover = !dto.pics ? "" : !dto.pics.highResolutionV ? dto.pics.lowResolutionV : dto.pics.highResolutionV; | ||
| 33 | + | ||
| 34 | + this.lowResolutionV34 = !dto.pics ? "" : (!dto.pics.lowResolutionV34 ? dto.pics.lowResolutionV34 : (!dto.pics.highResolutionV34 ? dto.pics.highResolutionV34 : this.portraitCover)); | ||
| 35 | + this.highResolutionV34 = !dto.pics ? "" : (!dto.pics.highResolutionV34 ? dto.pics.highResolutionV34 : (!dto.pics.lowResolutionV34 ? dto.pics.lowResolutionV34 : this.highPortraitCover)); | ||
| 36 | + | ||
| 37 | + this.exposed = false | ||
| 38 | + this.position = "0" | ||
| 39 | + } | ||
| 40 | +} |
| 1 | +import { Action } from './programme/Action'; | ||
| 2 | +import { Pic } from './programme/Pic'; | ||
| 3 | + | ||
| 4 | +/** | ||
| 5 | + * 组件comp/view对应的服务端数据 | ||
| 6 | + * DTO 数据传输实体类接口,所有数据传输层数据结构体需实现该接口 | ||
| 7 | + */ | ||
| 8 | +export abstract class ItemDTO { | ||
| 9 | + action?: Action; // 事件对象 | ||
| 10 | + actionId?: string; // 点击事件id | ||
| 11 | + pics?: Pic // 图片 | ||
| 12 | + h5pics?: Pic; // h5图片 | ||
| 13 | + | ||
| 14 | + constructor(action?: Action, actionId?: string, pics?: Pic, h5pics?: Pic) { | ||
| 15 | + this.action = action; | ||
| 16 | + this.actionId = actionId; | ||
| 17 | + this.pics = pics; | ||
| 18 | + this.h5pics = h5pics; | ||
| 19 | + } | ||
| 20 | +} |
| 1 | +import { ContentDTO } from './ContentDTO'; | ||
| 2 | + | ||
| 3 | +export interface CompDTO { | ||
| 4 | + backgroundColor: string; | ||
| 5 | + backgroundImgUrl: string; | ||
| 6 | + cityCode: string; | ||
| 7 | + compStyle: string; | ||
| 8 | + compType: string; | ||
| 9 | + // dataSourceRequest: any[]; | ||
| 10 | + districtCode: string; | ||
| 11 | + extraData?: string; | ||
| 12 | + hasAdInfo: number; | ||
| 13 | + id: number; | ||
| 14 | + imgSize: string; | ||
| 15 | + innerUrl: string; | ||
| 16 | + linkUrl: string; | ||
| 17 | + // meddleDataList: any[]; | ||
| 18 | + name: string; | ||
| 19 | + objectId: string; | ||
| 20 | + objectTitle: string; | ||
| 21 | + // objectType?: any; | ||
| 22 | + operDataList: ContentDTO[]; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】 | ||
| 23 | + // pageId?: any; | ||
| 24 | + posterSize: string; | ||
| 25 | + posterUrl: string; | ||
| 26 | + provinceCode: string; | ||
| 27 | + sortValue: number; | ||
| 28 | + subType: string; | ||
| 29 | +} |
| 1 | +export interface ContentDTO { | ||
| 2 | + cityCode: string; | ||
| 3 | + coverSize: string; | ||
| 4 | + coverType: number; | ||
| 5 | + coverUrl: string; | ||
| 6 | + description: string; | ||
| 7 | + districtCode: string; | ||
| 8 | + endTime: string; | ||
| 9 | + hImageUrl: string; | ||
| 10 | + heatValue: string; | ||
| 11 | + innerUrl: string; | ||
| 12 | + landscape: number; | ||
| 13 | + // lengthTime?: any; | ||
| 14 | + linkUrl: string; | ||
| 15 | + openLikes: number; | ||
| 16 | + openUrl: string; | ||
| 17 | + pageId: string; | ||
| 18 | + // playUrls: any[]; | ||
| 19 | + programAuth: string; | ||
| 20 | + programId: string; | ||
| 21 | + programName: string; | ||
| 22 | + programSource: number; | ||
| 23 | + programType: number; | ||
| 24 | + provinceCode: string; | ||
| 25 | + // rankingList: any[]; | ||
| 26 | + showTitleEd: string; | ||
| 27 | + showTitleIng: string; | ||
| 28 | + showTitleNo: string; | ||
| 29 | + // sortValue?: any; | ||
| 30 | + startTime: string; | ||
| 31 | + subType: string; | ||
| 32 | + subtitle: string; | ||
| 33 | + title: string; | ||
| 34 | + vImageUrl: string; | ||
| 35 | +} |
| 1 | +import { ItemBean } from '../../ItemBean'; | ||
| 2 | +import { LabelDTO } from './LabelDTO'; | ||
| 3 | + | ||
| 4 | +@Observed | ||
| 5 | +export class LabelBean extends ItemBean { | ||
| 6 | + titleIconUrl?: string; | ||
| 7 | + title: string; | ||
| 8 | + | ||
| 9 | + constructor(dto: LabelDTO) { | ||
| 10 | + super(dto); | ||
| 11 | + this.titleIconUrl = dto.titleIconUrl; | ||
| 12 | + this.title = dto.title; | ||
| 13 | + } | ||
| 14 | +} |
| 1 | +/** | ||
| 2 | + * 图片 | ||
| 3 | + * Pic 同 H5pic | ||
| 4 | + */ | ||
| 5 | +export interface Pic { | ||
| 6 | + lowResolutionH?: string; //低清横图 | ||
| 7 | + lowResolutionV?: string; // 低清竖图 | ||
| 8 | + lowResolutionV34?: string; // 低清竖图(3:4比例) | ||
| 9 | + highResolutionH?: string; // 高清横图 | ||
| 10 | + highResolutionV?: string; // 高清竖图 | ||
| 11 | + highResolutionV34?: string; // 高清竖图(3:4比例) | ||
| 12 | + gkResolution1?: string; // g客视频1配图 | ||
| 13 | + gkResolution2?: string; // g客视频2配图 | ||
| 14 | +} |
| 1 | +/** | ||
| 2 | + * 组件Style/展示样式 | ||
| 3 | + */ | ||
| 4 | +export const enum CompStyle { | ||
| 5 | + Label_03 = 'Label-03', // 标题 | ||
| 6 | + Carousel_Layout_01 = 'Carousel_Layout-01', | ||
| 7 | + Carousel_Layout_02 = 'Carousel_Layout-02', | ||
| 8 | + Single_Row_01 = 'Single_Row-01', | ||
| 9 | + Single_Row_02 = 'Single_Row-02', | ||
| 10 | + Single_Row_03 = 'Single_Row-03', | ||
| 11 | + Single_Row_04 = 'Single_Row-04', | ||
| 12 | + Single_Row_05 = 'Single_Row-05', | ||
| 13 | + Single_Column_01 = 'Single_Column-01', | ||
| 14 | + Single_Column_02 = 'Single_Column-02', | ||
| 15 | + Single_Column_03 = 'Single_Column-03', | ||
| 16 | + Single_Column_04 = 'Single_Column-04', | ||
| 17 | + Single_Column_05 = 'Single_Column-05', | ||
| 18 | + Single_Column_06 = 'Single_Column-06', | ||
| 19 | + Grid_Layout_01 = 'Grid_Layout-01', | ||
| 20 | + Grid_Layout_02 = 'Grid_Layout-02', | ||
| 21 | + Masonry_Layout_01 = 'Masonry_Layout-01', | ||
| 22 | +} |
| 1 | +/** | ||
| 2 | + * 组件Type/展示类型 | ||
| 3 | + */ | ||
| 4 | +export const enum CompType { | ||
| 5 | + LABEL = 'LABEL', // 标题 | ||
| 6 | + CAROUSEL_LAYOUT = 'CAROUSEL_LAYOUT', // 轮播大图,即Banner/焦点图 | ||
| 7 | + SINGLE_ROW = 'SINGLE_ROW', // | ||
| 8 | + SINGLE_COLUMN = 'SINGLE_COLUMN', // | ||
| 9 | + GRID_LAYOUT = 'GRID_LAYOUT', // | ||
| 10 | + MASONRY_LAYOUT = 'MASONRY_LAYOUT', // | ||
| 11 | +} |
| 1 | +/** | ||
| 2 | + * view展示种类 | ||
| 3 | + */ | ||
| 4 | +export const enum ViewType { | ||
| 5 | + // 已初始化,但尚未发出请求 | ||
| 6 | + INITIAL = 0, | ||
| 7 | + // 加载中:已发出请求,但请求尚未返回; | ||
| 8 | + LOADING, | ||
| 9 | + // 数据加载失败(重试)/failure | ||
| 10 | + ERROR, | ||
| 11 | + // 结果为空/无数据/空view | ||
| 12 | + EMPTY, | ||
| 13 | + // 已加载结束/非失败/非空/可以是仅一页数据,即楼层数据列表PAGE_GROUP_LIST/ | ||
| 14 | + LOADED, | ||
| 15 | + // 已加载的是tab导航数据(可嵌套page的楼层列表) | ||
| 16 | + NAV_BAR | ||
| 17 | +} |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
sight_harmony/Sight/wdComponent/Index.ets
0 → 100644
| 1 | +export { CompUtils } from "./src/main/ets/utils/CompUtils" | ||
| 2 | + | ||
| 3 | +export { EmptyComponent } from "./src/main/ets/components/EmptyComponent" | ||
| 4 | + | ||
| 5 | +export { ErrorComponent } from "./src/main/ets/components/ErrorComponent" | ||
| 6 | + | ||
| 7 | +export { LoadingComponent } from "./src/main/ets/components/LoadingComponent" | ||
| 8 | + | ||
| 9 | +export { LabelComponent } from "./src/main/ets/components/LabelComponent" |
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
| 1 | +{ | ||
| 2 | + "name": "wdcomponent", | ||
| 3 | + "version": "1.0.0", | ||
| 4 | + "description": "Please describe the basic information.", | ||
| 5 | + "main": "Index.ets", | ||
| 6 | + "author": "", | ||
| 7 | + "license": "Apache-2.0", | ||
| 8 | + "dependencies": { | ||
| 9 | + "wdBean": "file:../wdBean", | ||
| 10 | + "wdConstant": "file:../wdConstant", | ||
| 11 | + "wdKit": "file:../wdKit" | ||
| 12 | + } | ||
| 13 | +} |
| 1 | +import { CommonConstants } from 'wdConstant'; | ||
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG = 'EmptyComponent'; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 空数据/无数据 | ||
| 8 | + */ | ||
| 9 | +@Component | ||
| 10 | +export struct EmptyComponent { | ||
| 11 | + // private emptySize: SizeOptions = {}; | ||
| 12 | + @State emptyWidth: string | number = CommonConstants.FULL_PARENT; | ||
| 13 | + @State emptyHeight: string | number = CommonConstants.FULL_PARENT; | ||
| 14 | + /** | ||
| 15 | + * The empty image width percentage setting. | ||
| 16 | + */ | ||
| 17 | + readonly EMPTY_IMAGE_WIDTH: string = '50%'; | ||
| 18 | + /** | ||
| 19 | + * The empty image height percentage setting. | ||
| 20 | + */ | ||
| 21 | + readonly EMPTY_IMAGE_HEIGHT: string = '30%'; | ||
| 22 | + /** | ||
| 23 | + * The empty data text component margin top. | ||
| 24 | + */ | ||
| 25 | + readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%'; | ||
| 26 | + /** | ||
| 27 | + * The empty data text opacity. | ||
| 28 | + */ | ||
| 29 | + readonly TEXT_OPACITY: number = 0.4; | ||
| 30 | + | ||
| 31 | + build() { | ||
| 32 | + this.noProgrammeData(); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 无数据,空白view组件 | ||
| 37 | + */ | ||
| 38 | + @Builder | ||
| 39 | + noProgrammeData() { | ||
| 40 | + Column() { | ||
| 41 | + // Image($r('app.media.icon_no_content')) | ||
| 42 | + // .width(this.EMPTY_IMAGE_WIDTH) | ||
| 43 | + // .height(this.EMPTY_IMAGE_HEIGHT) | ||
| 44 | + // .objectFit(ImageFit.Contain) | ||
| 45 | + // // .border({ width: 1, color: Color.Red, radius: 6 }) | ||
| 46 | + | ||
| 47 | + Text(this.buildNoDataTip()) | ||
| 48 | + .fontSize($r('app.float.normal_text_size')) | ||
| 49 | + .fontColor('#B2B2B2') | ||
| 50 | + .fontWeight(FontWeight.Normal) | ||
| 51 | + .opacity(this.TEXT_OPACITY) | ||
| 52 | + .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) | ||
| 53 | + .onClick((event: ClickEvent) => { | ||
| 54 | + Logger.info(TAG, `noProgrammeData onClick event?.source: ${event.source}`); | ||
| 55 | + }) | ||
| 56 | + } | ||
| 57 | + .justifyContent(FlexAlign.Center) | ||
| 58 | + .width(this.emptyWidth) | ||
| 59 | + .height(this.emptyHeight) | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + buildNoDataTip(): Resource | string { | ||
| 63 | + Logger.info(TAG, "buildNoDataTip"); | ||
| 64 | + return $r('app.string.load_net_data_none') | ||
| 65 | + } | ||
| 66 | +} |
| 1 | +import { CommonConstants } from 'wdConstant'; | ||
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG = 'ErrorComponent'; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * failed失败/出错页面 | ||
| 8 | + */ | ||
| 9 | +@Component | ||
| 10 | +export struct ErrorComponent { | ||
| 11 | + // private emptySize: SizeOptions = {}; | ||
| 12 | + @State emptyWidth: string | number = CommonConstants.FULL_PARENT; | ||
| 13 | + @State emptyHeight: string | number = CommonConstants.FULL_PARENT; | ||
| 14 | + /** | ||
| 15 | + * The empty image width percentage setting. | ||
| 16 | + */ | ||
| 17 | + readonly EMPTY_IMAGE_WIDTH: string = '50%'; | ||
| 18 | + /** | ||
| 19 | + * The empty image height percentage setting. | ||
| 20 | + */ | ||
| 21 | + readonly EMPTY_IMAGE_HEIGHT: string = '30%'; | ||
| 22 | + /** | ||
| 23 | + * The empty data text component margin top. | ||
| 24 | + */ | ||
| 25 | + readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%'; | ||
| 26 | + /** | ||
| 27 | + * The empty data text opacity. | ||
| 28 | + */ | ||
| 29 | + readonly TEXT_OPACITY: number = 0.4; | ||
| 30 | + | ||
| 31 | + build() { | ||
| 32 | + this.errorView(); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 失败view | ||
| 37 | + */ | ||
| 38 | + @Builder | ||
| 39 | + errorView() { | ||
| 40 | + Column() { | ||
| 41 | + // Image($r('app.media.ic_no_data')) | ||
| 42 | + // .width(this.EMPTY_IMAGE_WIDTH) | ||
| 43 | + // .height(this.EMPTY_IMAGE_HEIGHT) | ||
| 44 | + // .objectFit(ImageFit.Contain) | ||
| 45 | + // // .border({ width: 1, color: Color.Red, radius: 6 }) | ||
| 46 | + | ||
| 47 | + Text(this.buildFailedTip()) | ||
| 48 | + .fontSize($r('app.float.normal_text_size')) | ||
| 49 | + .fontColor(Color.Black) | ||
| 50 | + .fontWeight(FontWeight.Normal) | ||
| 51 | + .opacity(this.TEXT_OPACITY) | ||
| 52 | + .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) | ||
| 53 | + .onClick((event: ClickEvent) => { | ||
| 54 | + Logger.info(TAG, `errorView onClick event.source: ${event.source}`); | ||
| 55 | + }) | ||
| 56 | + } | ||
| 57 | + .justifyContent(FlexAlign.Center) | ||
| 58 | + .width(this.emptyWidth) | ||
| 59 | + .height(this.emptyHeight) | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + buildFailedTip(): Resource | string { | ||
| 63 | + Logger.info(TAG, "buildFailedTip"); | ||
| 64 | + return $r('app.string.load_net_data_failed') | ||
| 65 | + } | ||
| 66 | +} |
| 1 | +import LinkList from '@ohos.util.List'; | ||
| 2 | +import { LabelBean } from 'wdBean'; | ||
| 3 | +import { CommonConstants } from 'wdConstant'; | ||
| 4 | +import { Logger } from 'wdKit'; | ||
| 5 | + | ||
| 6 | +import { EmptyComponent } from './EmptyComponent'; | ||
| 7 | + | ||
| 8 | +const TAG = 'LabelComponent'; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 标题/标签组件(暂时仅展示主标题,不展示子标题) | ||
| 12 | + * LABEL-01 | ||
| 13 | + * 重磅推荐/精选/电视剧/电影/综艺/短剧/更多>/ | ||
| 14 | + * 1.只有一个LABEL主标题(如重磅推荐) | ||
| 15 | + * 2.左右共两个LABEL(左边【电影】是主标题/右边【上海电影节】是子标题) | ||
| 16 | + */ | ||
| 17 | +@Component | ||
| 18 | +export struct LabelComponent { | ||
| 19 | + @State label: string = ''; | ||
| 20 | + | ||
| 21 | + build() { | ||
| 22 | + Row() { | ||
| 23 | + Text(this.label) | ||
| 24 | + .width(CommonConstants.FULL_PARENT) | ||
| 25 | + .padding({ | ||
| 26 | + left: $r('app.float.main_margin'), | ||
| 27 | + right: $r('app.float.main_margin'), | ||
| 28 | + top: $r('app.float.label_margin_top'), | ||
| 29 | + bottom: $r('app.float.label_margin_bottom') | ||
| 30 | + }) | ||
| 31 | + .fontSize($r('app.float.normal_text_size')) | ||
| 32 | + .fontWeight(FontWeight.Bold) | ||
| 33 | + .maxLines(1) | ||
| 34 | + // .backgroundColor(Color.Yellow) | ||
| 35 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | ||
| 36 | + } | ||
| 37 | + .width(CommonConstants.FULL_PARENT) | ||
| 38 | + .justifyContent(FlexAlign.Start) | ||
| 39 | + } | ||
| 40 | +} |
| 1 | +import { CommonConstants } from 'wdConstant'; | ||
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG = 'LoadingComponent'; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * Loading/网络数据加载中 | ||
| 8 | + */ | ||
| 9 | +@Component | ||
| 10 | +export struct LoadingComponent { | ||
| 11 | + @State emptyWidth: string | number = CommonConstants.FULL_PARENT; | ||
| 12 | + @State emptyHeight: string | number = CommonConstants.FULL_PARENT; | ||
| 13 | + /** | ||
| 14 | + * The empty image width percentage setting. | ||
| 15 | + */ | ||
| 16 | + readonly EMPTY_IMAGE_WIDTH: string = '50%'; | ||
| 17 | + /** | ||
| 18 | + * The empty image height percentage setting. | ||
| 19 | + */ | ||
| 20 | + readonly EMPTY_IMAGE_HEIGHT: string = '30%'; | ||
| 21 | + /** | ||
| 22 | + * The empty data text component margin top. | ||
| 23 | + */ | ||
| 24 | + readonly EMPTY_TIP_TEXT_MARGIN_TOP: string = '2%'; | ||
| 25 | + /** | ||
| 26 | + * The empty data text opacity. | ||
| 27 | + */ | ||
| 28 | + readonly TEXT_OPACITY: number = 0.4; | ||
| 29 | + | ||
| 30 | + build() { | ||
| 31 | + this.loadingView(); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * loading | ||
| 36 | + */ | ||
| 37 | + @Builder | ||
| 38 | + loadingView() { | ||
| 39 | + Column() { | ||
| 40 | + // Image($r('app.media.ic_no_data')) | ||
| 41 | + // .width(this.EMPTY_IMAGE_WIDTH) | ||
| 42 | + // .height(this.EMPTY_IMAGE_HEIGHT) | ||
| 43 | + // .objectFit(ImageFit.Contain) | ||
| 44 | + // .border({ width: 1, color: Color.Red, radius: 6 }) | ||
| 45 | + | ||
| 46 | + Text(this.buildLoadingTip()) | ||
| 47 | + .fontSize($r('app.float.normal_text_size')) | ||
| 48 | + .fontColor(Color.Black) | ||
| 49 | + .fontWeight(FontWeight.Normal) | ||
| 50 | + .opacity(this.TEXT_OPACITY) | ||
| 51 | + .margin({ top: this.EMPTY_TIP_TEXT_MARGIN_TOP }) | ||
| 52 | + .onClick((event: ClickEvent) => { | ||
| 53 | + Logger.info(TAG, `loadingView onClick event.source: ${event.source}`); | ||
| 54 | + }) | ||
| 55 | + } | ||
| 56 | + .justifyContent(FlexAlign.Center) | ||
| 57 | + .width(this.emptyWidth) | ||
| 58 | + .height(this.emptyHeight) | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + buildLoadingTip(): Resource | string { | ||
| 62 | + Logger.info(TAG, "buildLoadingTip"); | ||
| 63 | + return $r('app.string.load_net_data_loading') | ||
| 64 | + } | ||
| 65 | +} |
| 1 | +import { LabelDTO } from 'wdBean'; | ||
| 2 | +import { Logger } from 'wdKit'; | ||
| 3 | + | ||
| 4 | +const TAG: string = 'CompCornerUtil'; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 与组件布局(边距/间距/圆角半径)相关的数字 | ||
| 8 | + */ | ||
| 9 | +export class CompUtils { | ||
| 10 | + // 高/宽比 | ||
| 11 | + public static readonly ASPECT_RATIO_1_1: number = 1; | ||
| 12 | + public static readonly ASPECT_RATIO_2_1: number = 2; | ||
| 13 | + public static readonly ASPECT_RATIO_3_4: number = 3 / 4; | ||
| 14 | + public static readonly ASPECT_RATIO_16_9: number = 16 / 9; | ||
| 15 | + public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比 | ||
| 16 | + /** | ||
| 17 | + * The max lines. | ||
| 18 | + */ | ||
| 19 | + public static readonly MAX_LINES_ONE: number = 1; | ||
| 20 | + public static readonly MAX_LINES_TWO: number = 2; | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 获取Label标题 | ||
| 24 | + * | ||
| 25 | + * @param component 组件bean | ||
| 26 | + * @return Label标题 | ||
| 27 | + */ | ||
| 28 | + static getLabelTitle(extraData?: string): string { | ||
| 29 | + if (!extraData) { | ||
| 30 | + return "" | ||
| 31 | + } | ||
| 32 | + let labelDTO = JSON.parse(extraData) as LabelDTO | ||
| 33 | + if (!labelDTO) { | ||
| 34 | + Logger.info(TAG, 'getLabelTitle, labels is null'); | ||
| 35 | + return "" | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + return labelDTO.title ?? ""; | ||
| 40 | + } | ||
| 41 | +} |
6.63 KB
11.1 KB
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
sight_harmony/Sight/wdConstant/Index.ets
0 → 100644
| 1 | +export { CommonConstants } from './src/main/ets/constants/CommonConstants'; |
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
sight_harmony/Sight/wdConstant/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
| 1 | +/** | ||
| 2 | + * The constant of Common. | ||
| 3 | + */ | ||
| 4 | +export class CommonConstants { | ||
| 5 | + // offset | ||
| 6 | + static readonly ZERO: number = 0; | ||
| 7 | + static readonly NO_INDEX: number = -1; | ||
| 8 | + static readonly NO_LENGTH: number = 0; | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * 布局相关. | ||
| 12 | + */ | ||
| 13 | + static readonly FULL_PARENT: string = '100%'; | ||
| 14 | + static readonly FULL_WIDTH: string = '100%'; | ||
| 15 | + static readonly FULL_HEIGHT: string = '100%'; | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * Component opacity value: 1. | ||
| 19 | + */ | ||
| 20 | + static readonly FULL_OPACITY: number = 1; | ||
| 21 | +} | ||
| 22 | +; | ||
| 23 | + |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
sight_harmony/Sight/wdKit/Index.ets
0 → 100644
| 1 | +export { Logger } from './src/main/ets/utils/Logger' | ||
| 2 | + | ||
| 3 | +export { ResourcesUtils } from './src/main/ets/utils/ResourcesUtils' | ||
| 4 | + | ||
| 5 | +export { StringUtils } from './src/main/ets/utils/StringUtils' | ||
| 6 | + | ||
| 7 | +export { BasicDataSource } from './src/main/ets/utils/BasicDataSource'; | ||
| 8 | + | ||
| 9 | +export { LazyDataSource } from './src/main/ets/utils/LazyDataSource' |
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
sight_harmony/Sight/wdKit/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
sight_harmony/Sight/wdKit/oh-package.json5
0 → 100644
| 1 | +/** | ||
| 2 | + * IDataSource处理数据侦听器的基本实现 | ||
| 3 | + */ | ||
| 4 | +export abstract class BasicDataSource<T> implements IDataSource { | ||
| 5 | + private listeners: DataChangeListener[] = []; | ||
| 6 | + | ||
| 7 | + constructor() { | ||
| 8 | + } | ||
| 9 | + | ||
| 10 | + // 获取数据总个数 | ||
| 11 | + public abstract totalCount(): number; | ||
| 12 | + | ||
| 13 | + // 获取索引对应的Item数据 | ||
| 14 | + public abstract getData(index: number): T | undefined; | ||
| 15 | + | ||
| 16 | + // 注册改变数据的控制器 | ||
| 17 | + public registerDataChangeListener(listener: DataChangeListener): void { | ||
| 18 | + if (this.listeners.indexOf(listener) < 0) { | ||
| 19 | + console.info('add DataChangeListener'); | ||
| 20 | + this.listeners.push(listener); | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + // 注销改变数据的控制器 | ||
| 25 | + public unregisterDataChangeListener(listener: DataChangeListener): void { | ||
| 26 | + const pos = this.listeners.indexOf(listener); | ||
| 27 | + if (pos >= 0) { | ||
| 28 | + console.info('remove DataChangeListener'); | ||
| 29 | + this.listeners.splice(pos, 1); | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + // 通知控制器数据重新加载数据 | ||
| 34 | + public notifyDataReload(): void { | ||
| 35 | + this.listeners.forEach(listener => { | ||
| 36 | + listener.onDataReloaded(); | ||
| 37 | + }) | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + // 通知控制器数据增加 | ||
| 41 | + public notifyDataAdd(index: number): void { | ||
| 42 | + this.listeners.forEach(listener => { | ||
| 43 | + listener.onDataAdd(index); | ||
| 44 | + }) | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + // 通知控制器数据位置变化 | ||
| 48 | + public notifyDataMove(from: number, to: number): void { | ||
| 49 | + this.listeners.forEach(listener => { | ||
| 50 | + listener.onDataMove(from, to); | ||
| 51 | + }) | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + // 通知控制器数据删除 | ||
| 55 | + public notifyDataDelete(index: number): void { | ||
| 56 | + this.listeners.forEach(listener => { | ||
| 57 | + listener.onDataDelete(index); | ||
| 58 | + }) | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + // 通知控制器数据变化 | ||
| 62 | + public notifyDataChange(index: number): void { | ||
| 63 | + this.listeners.forEach(listener => { | ||
| 64 | + listener.onDataChange(index); | ||
| 65 | + }) | ||
| 66 | + } | ||
| 67 | +} |
| 1 | +import { BasicDataSource } from './BasicDataSource'; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 实现/BasicDataSource抽象类,用于懒数据加载 | ||
| 5 | + */ | ||
| 6 | +export class LazyDataSource<T> extends BasicDataSource<T> { | ||
| 7 | + // private dataArray: Array<T> = new Array(); | ||
| 8 | + // private dataArray: Array<string> = new Array("0", "1", "2"); | ||
| 9 | + // private dataArray: string[] = ["0", "1", "2"]; | ||
| 10 | + private dataArray: T[] = []; | ||
| 11 | + | ||
| 12 | + constructor() { | ||
| 13 | + super(); | ||
| 14 | + // for (let i = 0; i < 100; i++) { | ||
| 15 | + // this.dataArray.push(i) | ||
| 16 | + // } | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + // 获取数据总个数 | ||
| 20 | + public totalCount(): number { | ||
| 21 | + return this.dataArray.length; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + // 获取索引对应的Item数据 | ||
| 25 | + public getData(index: number): T { | ||
| 26 | + return this.dataArray[index]; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + // 增加/插入1个Item/数据,若index为undefined,则在数据尾部增加1个元素;否则,在指定索引(可为负/或大于数组长度)位置插入1个元素 | ||
| 30 | + public addItem(data: T, index?: number): void { | ||
| 31 | + if (index == undefined) { | ||
| 32 | + // 将新元素添加到数组的末尾 | ||
| 33 | + this.dataArray.push(data); | ||
| 34 | + // this.dataArray.splice(this.dataArray.length, 0, data) | ||
| 35 | + this.notifyDataAdd(this.dataArray.length - 1); | ||
| 36 | + } else { | ||
| 37 | + // 从数组中的index位置开始删除0个元素,并在同一位置插入((1个或多个))新元素,返回已删除的元素。 | ||
| 38 | + // 当index大于等于数组长度时,不删除任何数据,且data加在数组末尾 | ||
| 39 | + // 当index为负数时,其代表从数组后向前的索引位置 | ||
| 40 | + this.dataArray.splice(index, 0, data); | ||
| 41 | + this.notifyDataAdd(index); | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + // 在数据尾部增加1到多个元素 | ||
| 46 | + public push(...data: T[]): void { | ||
| 47 | + this.dataArray.push(...data) | ||
| 48 | + for (let index = this.dataArray.length - data.length; index < this.dataArray.length; index++) { | ||
| 49 | + this.notifyDataAdd(index); | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + // 在数据尾部增加1个元素 | ||
| 54 | + public addLastItem(data: T): void { | ||
| 55 | + this.addItem(data) | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + // 在数据开头插入1个元素 | ||
| 59 | + public addFirstItem(data: T): void { | ||
| 60 | + // 在数组的开头插入(1个或多个)新元素 | ||
| 61 | + // this.dataArray.unshift(data) | ||
| 62 | + // this.notifyDataAdd(0); | ||
| 63 | + this.addItem(data, 0) | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + // 在第2个元素位置,插入1个元素 | ||
| 67 | + public add2ndItem(data: T): void { | ||
| 68 | + this.addItem(data, 1) | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + // 在第3个元素位置,插入1个元素 | ||
| 72 | + public add3rdItem(data: T): void { | ||
| 73 | + this.addItem(data, 2) | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + // 在第4个元素位置,插入1个元素 | ||
| 77 | + public add4thItem(data: T): void { | ||
| 78 | + this.addItem(data, 3) | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + // 把from位置的item移动到to位置(暂不支持from/to为负数或大于等于数组长度) | ||
| 82 | + public moveItem(from: number, to: number): void { | ||
| 83 | + // 当from/to大于/等于数组长度时; | ||
| 84 | + if (from >= this.dataArray.length) { | ||
| 85 | + from = this.dataArray.length - 1; | ||
| 86 | + } | ||
| 87 | + if (to >= this.dataArray.length) { | ||
| 88 | + to = this.dataArray.length - 1; | ||
| 89 | + } | ||
| 90 | + // 当from/to为负时; | ||
| 91 | + let remainderFrom = from % this.dataArray.length | ||
| 92 | + if (remainderFrom < 0) { | ||
| 93 | + from = remainderFrom + this.dataArray.length | ||
| 94 | + } | ||
| 95 | + let remainderTo = to % this.dataArray.length | ||
| 96 | + if (remainderTo < 0) { | ||
| 97 | + to = remainderTo + this.dataArray.length | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + // 1.把from位置元素提出暂存 | ||
| 101 | + let tempFrom: T = this.dataArray[from]; | ||
| 102 | + // 2.把to位置元素覆盖from位置元素, | ||
| 103 | + let tempTo: T = this.dataArray[to]; | ||
| 104 | + this.updateItem(tempTo, from) | ||
| 105 | + // 3.把暂存的from位置元素覆盖to位置元素 | ||
| 106 | + this.updateItem(tempFrom, to) | ||
| 107 | + this.notifyDataMove(from, to); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + // 删除index指定索引位置的元素 | ||
| 111 | + public deleteItem(index?: number): void { | ||
| 112 | + if (index == undefined) { | ||
| 113 | + // 删除数组的最后1个元素(倒数第1个元素) | ||
| 114 | + // this.dataArray.pop() | ||
| 115 | + this.dataArray.splice(-1, 1) | ||
| 116 | + this.notifyDataDelete(this.dataArray.length); | ||
| 117 | + } else { | ||
| 118 | + // 从数组中的index位置开始,删除1个元素 | ||
| 119 | + // 当index大于等于数组长度时,不删除任何数据 | ||
| 120 | + // 当index为负数时,其代表从数组后向前的索引位置 | ||
| 121 | + this.dataArray.splice(index, 1); | ||
| 122 | + this.notifyDataDelete(index); | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + // 删除最后1个元素 | ||
| 127 | + public pop(): void { | ||
| 128 | + this.deleteItem() | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + // 删除最后1个元素 | ||
| 132 | + public deleteLastItem(): void { | ||
| 133 | + this.deleteItem() | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + // 删除第1个元素 | ||
| 137 | + public deleteFirstItem(): void { | ||
| 138 | + this.deleteItem(0) | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + // 删除第1个元素 | ||
| 142 | + public delete1stItem(): void { | ||
| 143 | + this.deleteItem(0) | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + // 删除第2个元素 | ||
| 147 | + public delete2ndItem(): void { | ||
| 148 | + this.deleteItem(1) | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + // 删除第3个元素 | ||
| 152 | + public delete3rdItem(): void { | ||
| 153 | + this.deleteItem(2) | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + // 删除第4个元素 | ||
| 157 | + public delete4thItem(): void { | ||
| 158 | + this.deleteItem(3) | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + // 修改/更新index指定索引位置的元素 | ||
| 162 | + public updateItem(data: T, index?: number): void { | ||
| 163 | + if (index == undefined || index >= this.dataArray.length) { | ||
| 164 | + // 当不传index或index大于等于数组长度时,修改/更新数组的最后1个元素 | ||
| 165 | + this.dataArray.splice(this.dataArray.length - 1, 1, data); | ||
| 166 | + this.notifyDataChange(this.dataArray.length); | ||
| 167 | + } else { | ||
| 168 | + // 从数组中的index位置开始,删除1个元素 | ||
| 169 | + // 当index为负数时,其代表从数组后向前的索引位置 | ||
| 170 | + this.dataArray.splice(index, 1, data); | ||
| 171 | + this.notifyDataChange(index); | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + // 修改/更新最后1个元素 | ||
| 176 | + public updateLastItem(data: T): void { | ||
| 177 | + this.updateItem(data) | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + // 修改/更新第1个元素 | ||
| 181 | + public updateFirstItem(data: T): void { | ||
| 182 | + this.updateItem(data, 0) | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + // 修改/更新第1个元素 | ||
| 186 | + public update2ndItem(data: T): void { | ||
| 187 | + this.updateItem(data, 0) | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + // 修改/更新第2个元素 | ||
| 191 | + public update1stItem(data: T): void { | ||
| 192 | + this.updateItem(data, 1) | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + // 修改/更新第3个元素 | ||
| 196 | + public update3rdItem(data: T): void { | ||
| 197 | + this.updateItem(data, 2) | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + // 修改/更新第4个元素 | ||
| 201 | + public update4thItem(data: T): void { | ||
| 202 | + this.updateItem(data, 3) | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + // 把数据全部删除,再添加全部新元素 | ||
| 206 | + public replaceAll(...data: T[]): void { | ||
| 207 | + // 从数组中的0位置开始删除dataArray.length个元素,并在同一位置插入((1个或多个))新元素,返回已删除的元素。 | ||
| 208 | + this.dataArray.splice(0, this.dataArray.length, ...data); | ||
| 209 | + this.notifyDataReload() | ||
| 210 | + } | ||
| 211 | +} |
| 1 | +import hilog from '@ohos.hilog'; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * Log level define | ||
| 5 | + * | ||
| 6 | + * @syscap SystemCapability.HiviewDFX.HiLog | ||
| 7 | + */ | ||
| 8 | +enum LogLevel { | ||
| 9 | + DEBUG = 3, | ||
| 10 | + INFO = 4, | ||
| 11 | + WARN = 5, | ||
| 12 | + ERROR = 6, | ||
| 13 | + FATAL = 7 | ||
| 14 | +} | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * Common log for all features. | ||
| 18 | + * | ||
| 19 | + * @param {string} prefix Identifies the log tag. | ||
| 20 | + */ | ||
| 21 | +export class Logger { | ||
| 22 | + private static domain: number = 0xFF00; | ||
| 23 | + private static prefix: string = 'SightApp'; | ||
| 24 | + private static format: string = `%{public}s, %{public}s`; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * constructor. | ||
| 28 | + * | ||
| 29 | + * @param Prefix Identifies the log tag. | ||
| 30 | + * @param domain Domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFFF. | ||
| 31 | + */ | ||
| 32 | + constructor(prefix: string = 'SightApp', domain: number = 0xFF00) { | ||
| 33 | + Logger.prefix = prefix; | ||
| 34 | + Logger.domain = domain; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + static debug(...args: string[]) { | ||
| 38 | + hilog.debug(Logger.domain, Logger.prefix, Logger.format, args); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + static info(...args: string[]) { | ||
| 42 | + hilog.info(Logger.domain, Logger.prefix, Logger.format, args); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + static warn(...args: string[]) { | ||
| 46 | + hilog.warn(Logger.domain, Logger.prefix, Logger.format, args); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + static error(...args: string[]) { | ||
| 50 | + hilog.error(Logger.domain, Logger.prefix, Logger.format, args); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + static fatal(...args: string[]) { | ||
| 54 | + hilog.fatal(Logger.domain, Logger.prefix, Logger.format, args); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + static isLoggable(level: LogLevel) { | ||
| 58 | + hilog.isLoggable(Logger.domain, Logger.prefix, level); | ||
| 59 | + } | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +export default new Logger('SightApp', 0xFF00) |
| 1 | +import buffer from '@ohos.buffer'; | ||
| 2 | +import { BusinessError } from '@ohos.base'; | ||
| 3 | +import { Logger } from './Logger'; | ||
| 4 | + | ||
| 5 | +const TAG = "ResourcesUtils"; | ||
| 6 | + | ||
| 7 | +// 默认针对entry/src/main/resources/rawfile目录下的文件: | ||
| 8 | +const JSON_FILE_NAME = "agconnect-services.json"; | ||
| 9 | + | ||
| 10 | +export class ResourcesUtils { | ||
| 11 | + /** | ||
| 12 | + * 获取资源字符串内容 | ||
| 13 | + * @param context | ||
| 14 | + * @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json",test.xml, | ||
| 15 | + * @returns text 字符串 | ||
| 16 | + */ | ||
| 17 | + static getResourcesText(context: Context, filename: string): Promise<string> { | ||
| 18 | + return new Promise((success, error) => { | ||
| 19 | + Logger.info(TAG, "ResourcesUtils getResourcesText filename:" + filename); | ||
| 20 | + context.resourceManager.getRawFileContent(filename).then((content: Uint8Array) => { | ||
| 21 | + if (!content) { | ||
| 22 | + Logger.warn(TAG, 'getResourcesText then content is empty'); | ||
| 23 | + error("file is empty"); | ||
| 24 | + return | ||
| 25 | + } | ||
| 26 | + try { | ||
| 27 | + let text = buffer.from(content).toString("utf8"); | ||
| 28 | + if (text) { | ||
| 29 | + Logger.info(TAG, "getResourcesText then text:" + text); | ||
| 30 | + success(text); | ||
| 31 | + } else { | ||
| 32 | + Logger.warn(TAG, "getResourcesText then text is empty"); | ||
| 33 | + error("resources file text is empty"); | ||
| 34 | + } | ||
| 35 | + } catch (err) { | ||
| 36 | + // 转换异常 | ||
| 37 | + Logger.error(TAG, `getResourcesText catch err.: ${err}`); | ||
| 38 | + } | ||
| 39 | + }).catch((err: Error) => { | ||
| 40 | + Logger.error(TAG, `getResourcesText getRawFileContent catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 41 | + error(err); | ||
| 42 | + }) | ||
| 43 | + }) | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 获取资源字符串内容 | ||
| 48 | + * @param context | ||
| 49 | + * @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json",test.xml, | ||
| 50 | + * @returns text 字符串 | ||
| 51 | + */ | ||
| 52 | + static getResourcesTextSync(context: Context, filename: string): string | null { | ||
| 53 | + Logger.info(TAG, `getResourcesTextSync filename: ${filename}`); | ||
| 54 | + try { | ||
| 55 | + let content: Uint8Array = context.resourceManager.getRawFileContentSync(filename) | ||
| 56 | + if (!content) { | ||
| 57 | + Logger.warn(TAG, 'getResourcesTextSync content is empty'); | ||
| 58 | + return null | ||
| 59 | + } | ||
| 60 | + let text = buffer.from(content).toString("utf8"); | ||
| 61 | + if (text) { | ||
| 62 | + // Logger.info(TAG, "getRawFileContentSync text:" + text); | ||
| 63 | + } else { | ||
| 64 | + Logger.warn(TAG, "getRawFileContentSync text is empty"); | ||
| 65 | + } | ||
| 66 | + return text; | ||
| 67 | + } catch (err) { | ||
| 68 | + // 转换异常 | ||
| 69 | + Logger.error(TAG, `getResourcesText catch err.: ${err}`); | ||
| 70 | + return null; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 获取资源文件并转为JSON | ||
| 76 | + * | ||
| 77 | + * @param appContext 上下文 | ||
| 78 | + * @param filename 仅文件名(不包含路径,文件在src\main\resources\rawfile下),如:"agconnect-services.json" | ||
| 79 | + * SubscribeListData.json | ||
| 80 | + * @returns JSON Object | ||
| 81 | + * | ||
| 82 | + * 调用方式:todo: | ||
| 83 | + */ | ||
| 84 | + static getResourcesJson<R>(context:Context, filename: string): Promise<R> { | ||
| 85 | + Logger.info(TAG, `getResourcesJson filename: ${filename}`); | ||
| 86 | + return new Promise<R>((resolve, reject) => { | ||
| 87 | + ResourcesUtils.getResourcesText(context, filename) | ||
| 88 | + .then((text: string) => { | ||
| 89 | + try { | ||
| 90 | + // let config: R = JSON.parse(text) | ||
| 91 | + let config:R = JSON.parse(text) as R; | ||
| 92 | + if (config) { | ||
| 93 | + Logger.info(TAG, "getResourcesJson parse JSON file success."); | ||
| 94 | + // Logger.info(TAG, `getResourcesJson config : ${JSON.stringify(config)}`); | ||
| 95 | + resolve(config); | ||
| 96 | + } else { | ||
| 97 | + reject("getResourcesJson parse JSON file result is empty"); | ||
| 98 | + } | ||
| 99 | + } catch (err) { | ||
| 100 | + // json解析异常 | ||
| 101 | + Logger.error(TAG, `getResourcesJson catch parse failed.: ${err}`); | ||
| 102 | + reject(err) | ||
| 103 | + } | ||
| 104 | + }) | ||
| 105 | + .catch((error: BusinessError) => { | ||
| 106 | + reject(error) | ||
| 107 | + }) | ||
| 108 | + }) | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + static getResourcesJsonSync<R>(context: Context, filename: string): R | null { | ||
| 112 | + Logger.info(TAG, `getResourcesJsonSync filename: ${filename}`); | ||
| 113 | + let text = ResourcesUtils.getResourcesTextSync(context, filename) | ||
| 114 | + if (!text) { | ||
| 115 | + Logger.warn(TAG, `getResourcesJsonSync file result is empty`); | ||
| 116 | + return null | ||
| 117 | + } | ||
| 118 | + try { | ||
| 119 | + // let config: R = JSON.parse(text) | ||
| 120 | + let config:R = JSON.parse(text) as R; | ||
| 121 | + return config | ||
| 122 | + } catch (err) { | ||
| 123 | + // json解析异常 | ||
| 124 | + Logger.error(TAG, `getResourcesJsonSync catch parse failed.: ${err}`); | ||
| 125 | + return null | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | +} |
| 1 | +const SLEEP_TIME: number = 10; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * StringUtils class. | ||
| 5 | + */ | ||
| 6 | +export class StringUtils { | ||
| 7 | + /** | ||
| 8 | + * The String utils tag. | ||
| 9 | + */ | ||
| 10 | + private static readonly TAG: string = 'StringUtils'; | ||
| 11 | + // 评分-整数或浮点数 | ||
| 12 | + private static readonly SCORE_REG_EXP = RegExp(/^(\d+)(\.\d+)?$/); | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * Check string is empty. | ||
| 16 | + * | ||
| 17 | + * @param {object} any | ||
| 18 | + * @return {boolean} true(empty) | ||
| 19 | + */ | ||
| 20 | + static isEmpty(...params: any): boolean { | ||
| 21 | + if (params.length === 0) { | ||
| 22 | + return true; | ||
| 23 | + } | ||
| 24 | + for (const param of params) { | ||
| 25 | + if (!param) { // param === undefined || param === null || param === ''; | ||
| 26 | + return true; | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | + return false; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * Check obj is not empty. | ||
| 34 | + * | ||
| 35 | + * @param {object} obj | ||
| 36 | + * @return {boolean} true(not empty) | ||
| 37 | + */ | ||
| 38 | + static isNotEmpty(obj: any): boolean { | ||
| 39 | + // return (obj && obj !== ''); | ||
| 40 | + // 或 | ||
| 41 | + return (obj !== undefined && obj !== null && obj !== ''); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + static isObject(value: any): boolean { | ||
| 45 | + return Object.prototype.toString.call(value) === '[object Object]'; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + static isNotNullObject(value: unknown): boolean { | ||
| 49 | + return value !== null ? typeof value === 'object' : false; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + static isNullOrUndefined(value: any): boolean { | ||
| 53 | + return value === undefined || value === null; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + static isFunction(object: any): boolean { | ||
| 57 | + return typeof object === 'function'; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + static isValidObject(objectList: any): boolean { | ||
| 61 | + if (!objectList || typeof objectList !== 'object' | ||
| 62 | + || objectList.constructor.name === 'Object') { | ||
| 63 | + return false; | ||
| 64 | + } | ||
| 65 | + return true; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + static isClass(object: any): boolean { | ||
| 69 | + if (StringUtils.isFunction(object)) { | ||
| 70 | + const prototype = object.prototype; | ||
| 71 | + if (!StringUtils.isNotNullObject(prototype)) { | ||
| 72 | + return false; | ||
| 73 | + } | ||
| 74 | + const constructor = prototype.constructor; | ||
| 75 | + if (StringUtils.isFunction(constructor)) { | ||
| 76 | + return true; | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + return false; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + static getClassName(clz: any): string { | ||
| 83 | + if (StringUtils.isNullOrUndefined(clz)) { | ||
| 84 | + return clz; | ||
| 85 | + } | ||
| 86 | + let input = clz; | ||
| 87 | + if (!StringUtils.isClass(input)) { | ||
| 88 | + input = clz.constructor; | ||
| 89 | + } | ||
| 90 | + return input.className ? input.className : input.name; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + static hash(value: string | number): string { | ||
| 94 | + const str = '' + value; | ||
| 95 | + let hash = 5381; | ||
| 96 | + let index = str.length; | ||
| 97 | + while (index) { | ||
| 98 | + hash = (hash * 33) ^ str.charCodeAt(--index); | ||
| 99 | + } | ||
| 100 | + return '' + (hash >>> 0); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + static parseNumber(input: string): number { | ||
| 104 | + // let input: string = '135' // 135 | ||
| 105 | + // let input: string = '135T' // NaN | ||
| 106 | + // let input: string = 'ytr' // NaN | ||
| 107 | + // let input: string = '' // 0 | ||
| 108 | + // let input: string = null // 0 | ||
| 109 | + // let input: string = undefined // NaN | ||
| 110 | + const parsedInt = Number(input) | ||
| 111 | + if (!isNaN(parsedInt)) { | ||
| 112 | + return parsedInt | ||
| 113 | + } else { | ||
| 114 | + return 0 | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + static async sleep(times: number): Promise<void> { | ||
| 119 | + if (!times) { | ||
| 120 | + times = SLEEP_TIME; | ||
| 121 | + } | ||
| 122 | + await new Promise((res) => setTimeout(res, times)) // .then().catch().finally(); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + static isScore(text: string): boolean { | ||
| 126 | + return StringUtils.SCORE_REG_EXP.test(text); | ||
| 127 | + } | ||
| 128 | +} | ||
| 129 | + | ||
| 130 | +// export default new StringUtils(); |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
sight_harmony/Sight/wdNetwork/Index.ets
0 → 100644
| 1 | +{ | ||
| 2 | + "apiType": "stageMode", | ||
| 3 | + "buildOption": { | ||
| 4 | + "arkOptions": { | ||
| 5 | + // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | ||
| 6 | + } | ||
| 7 | + }, | ||
| 8 | + "buildOptionSet": [ | ||
| 9 | + { | ||
| 10 | + "name": "release", | ||
| 11 | + "arkOptions": { | ||
| 12 | + "obfuscation": { | ||
| 13 | + "ruleOptions": { | ||
| 14 | + "enable": true, | ||
| 15 | + "files": [ | ||
| 16 | + "./obfuscation-rules.txt" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + ], | ||
| 23 | + "targets": [ | ||
| 24 | + { | ||
| 25 | + "name": "default" | ||
| 26 | + } | ||
| 27 | + ] | ||
| 28 | +} |
sight_harmony/Sight/wdNetwork/hvigorfile.ts
0 → 100644
| 1 | +# Define project specific obfuscation rules here. | ||
| 2 | +# You can include the obfuscation configuration files in the current module's build-profile.json5. | ||
| 3 | +# | ||
| 4 | +# For more details, see | ||
| 5 | +# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md | ||
| 6 | + | ||
| 7 | +# Obfuscation options: | ||
| 8 | +# -disable-obfuscation: disable all obfuscations | ||
| 9 | +# -enable-property-obfuscation: obfuscate the property names | ||
| 10 | +# -enable-toplevel-obfuscation: obfuscate the names in the global scope | ||
| 11 | +# -compact: remove unnecessary blank spaces and all line feeds | ||
| 12 | +# -remove-log: remove all console.* statements | ||
| 13 | +# -print-namecache: print the name cache that contains the mapping from the old names to new names | ||
| 14 | +# -apply-namecache: reuse the given cache file | ||
| 15 | + | ||
| 16 | +# Keep options: | ||
| 17 | +# -keep-property-name: specifies property names that you want to keep | ||
| 18 | +# -keep-global-name: specifies names that you want to keep in the global scope |
| 1 | +{ | ||
| 2 | + "lockfileVersion": 1, | ||
| 3 | + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 4 | + "specifiers": { | ||
| 5 | + "@ohos/axios@^2.1.1": "@ohos/axios@2.1.1" | ||
| 6 | + }, | ||
| 7 | + "packages": { | ||
| 8 | + "@ohos/axios@2.1.1": { | ||
| 9 | + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har", | ||
| 10 | + "integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w==" | ||
| 11 | + } | ||
| 12 | + } | ||
| 13 | +} |
| 1 | +/** | ||
| 2 | + * ResponseVO | ||
| 3 | + */ | ||
| 4 | +export interface ResponseVO<T = string> { | ||
| 5 | + // 返回代码,参考附录ResultCode 即(ACCEPTED/SUCCESS/FAILED/REJECTED等) | ||
| 6 | + resultCode: string; | ||
| 7 | + | ||
| 8 | + // 返回描述 | ||
| 9 | + resultDesc: string; | ||
| 10 | + | ||
| 11 | + // 错误码,参考附录和接口中ErrorCode(当resultCode=FAILED才有),如:"ERR_USER_NOTFOUND" | ||
| 12 | + errorCode?: string; | ||
| 13 | + | ||
| 14 | + // 业务数据 | ||
| 15 | + data?: T; | ||
| 16 | +} |
| 1 | +/** | ||
| 2 | + * The Response ResultCode enum. | ||
| 3 | + */ | ||
| 4 | +export const enum ResultCode { | ||
| 5 | + // 请求执行(查询)成功 | ||
| 6 | + SUCCESS = 'SUCCESS', | ||
| 7 | + // 请求执行(查询)失败 | ||
| 8 | + FAILED = 'FAILED', | ||
| 9 | + // 该请求被拒绝处理,例如参数错误或非法等 | ||
| 10 | + REJECTED = 'REJECTED', | ||
| 11 | + // 该请求已经被接收,但是本次同步返回无法知道执行结果 | ||
| 12 | + ACCEPTED = 'ACCEPTED', | ||
| 13 | + // 参数错误 | ||
| 14 | + // ERR_NOT_VALID_PARAMETERS = 'ERR_NOT_VALID_PARAMETERS' | ||
| 15 | +} |
| 1 | +import type { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from '@ohos/axios'; | ||
| 2 | +import axios, { HttpStatusCode } from '@ohos/axios'; | ||
| 3 | + | ||
| 4 | +// import type ResponseDTO from '../models/ResponseDTO'; | ||
| 5 | + | ||
| 6 | +// const key = 'xxxxyyyyzzz' | ||
| 7 | + | ||
| 8 | +// const apiBaseUrl = 'http://127.0.0.1:5566' | ||
| 9 | +// const apiBaseUrl = "https://display-sc.miguvideo.com/display/v3/static"; | ||
| 10 | +// console.log("apiBaseUrl:" + apiBaseUrl); | ||
| 11 | +// axios.defaults.baseURL = apiBaseUrl | ||
| 12 | + | ||
| 13 | +// 使跨域请求带上cookie等用户认证凭据 | ||
| 14 | +// axios.defaults.withCredentials = true; | ||
| 15 | + | ||
| 16 | +// 实例化axios | ||
| 17 | +const instance: AxiosInstance = axios.create({ | ||
| 18 | + // axios请求基础URL(包括端口号) | ||
| 19 | + // baseURL: apiBaseUrl, | ||
| 20 | + // 单位毫秒 | ||
| 21 | + timeout: 15000, | ||
| 22 | + // 跨域请求时,携带cookie等用户认证凭据 | ||
| 23 | + // withCredentials: true | ||
| 24 | +}); | ||
| 25 | + | ||
| 26 | +// 添加请求拦截器 | ||
| 27 | +instance.interceptors.request.use( | ||
| 28 | + (config: InternalAxiosRequestConfig) => { | ||
| 29 | + // 在发送请求之前 | ||
| 30 | + if (!config.headers["Content-Type"]) { | ||
| 31 | + config.headers["Content-Type"] = "application/json;charset=utf-8"; | ||
| 32 | + } | ||
| 33 | + // 公共请求参数 | ||
| 34 | + // config.params.key = key | ||
| 35 | + return config; | ||
| 36 | + }, | ||
| 37 | + (error: AxiosError) => { | ||
| 38 | + // 请求错误 | ||
| 39 | + console.log(`全局请求失败拦截,message:${error.message}`) | ||
| 40 | + return Promise.reject(error); | ||
| 41 | + } | ||
| 42 | +); | ||
| 43 | + | ||
| 44 | +// // GET /api/success | ||
| 45 | +// { | ||
| 46 | +// "code": 0, | ||
| 47 | +// "message": "请求成功", | ||
| 48 | +// "data": { | ||
| 49 | +// "name": "管理员" | ||
| 50 | +// } | ||
| 51 | +// } | ||
| 52 | +// // GET /api/fail | ||
| 53 | +// { | ||
| 54 | +// "code": -1, | ||
| 55 | +// "message": "请求失败:XXX错误!", | ||
| 56 | +// "data": null | ||
| 57 | +// } | ||
| 58 | + | ||
| 59 | +// 添加响应拦截器 | ||
| 60 | +instance.interceptors.response.use( | ||
| 61 | + // 响应拦截器response类型就是Axios.request<T = any, R = AxiosResponse<T>, D = any>中的泛型R | ||
| 62 | + // 泛型 T 就是服务器返回数据的类型 | ||
| 63 | + // 泛型 R 就是这个泛型 T 数据经过 axios 包装一层得到的 response 对象的类型,而 request 方法的返回值是一个 Promise,其值就是成功态的 R,也就是 response对象。 | ||
| 64 | + (response: AxiosResponse) => { | ||
| 65 | + // response为AxiosResponse类型,含有config\data\headers\request\status\statusText属 | ||
| 66 | + // console.dir(response) | ||
| 67 | + // 正常响应,可对响应数据做通用处理 | ||
| 68 | + // 2xx 范围内的状态码都会触发该函数。 | ||
| 69 | + if (response.status === HttpStatusCode.Ok) { | ||
| 70 | + // 直接返回response,当然你也可以只返回response.data | ||
| 71 | + // return response; | ||
| 72 | + // 也可以先解析服务器返回的状态码,可判断code处理通用逻辑 | ||
| 73 | + // const { code, message, data } = response.data | ||
| 74 | + // if (code === 0) { | ||
| 75 | + // // 将组件用的数据返回 | ||
| 76 | + // return data | ||
| 77 | + // } else { | ||
| 78 | + // // 处理业务错误。 | ||
| 79 | + // console.log(`处理业务,message:${message}`) | ||
| 80 | + // return Promise.reject(new Error(message)) | ||
| 81 | + // } | ||
| 82 | + // const data: ResponseBean<any> = response.data | ||
| 83 | + // 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据 | ||
| 84 | + return response.data; | ||
| 85 | + } else { | ||
| 86 | + return Promise.reject(response); | ||
| 87 | + } | ||
| 88 | + }, | ||
| 89 | + (error: AxiosError) => { | ||
| 90 | + // 异常响应 | ||
| 91 | + // console.log('全局响应失败拦截') | ||
| 92 | + // console.log(error.request) | ||
| 93 | + // console.log(error.response) | ||
| 94 | + // 这里用来处理http常见错误,进行全局提示 | ||
| 95 | + let message = buildErrorMsg(error.response?.status); | ||
| 96 | + // 错误消息可以使用全局弹框展示出来 | ||
| 97 | + console.log(`httpStatus:${error.response?.status}-${message},请检查网络或联系管理员!`) | ||
| 98 | + return Promise.reject(error); | ||
| 99 | + } | ||
| 100 | +); | ||
| 101 | + | ||
| 102 | +export default instance; | ||
| 103 | + | ||
| 104 | +function buildErrorMsg(httpStatus: number):string { | ||
| 105 | + let message = ""; | ||
| 106 | + switch (httpStatus) { | ||
| 107 | + case HttpStatusCode.BadRequest: | ||
| 108 | + message = "请求错误(400)"; | ||
| 109 | + break; | ||
| 110 | + case HttpStatusCode.Unauthorized: | ||
| 111 | + message = "未授权(或token 失效),请重新登录(401)"; | ||
| 112 | + // 可以触发退出的 action | ||
| 113 | + // 可以做清空storage并跳转到登录页的操作 | ||
| 114 | + break; | ||
| 115 | + case HttpStatusCode.Forbidden: | ||
| 116 | + message = "拒绝访问(403)"; | ||
| 117 | + break; | ||
| 118 | + case HttpStatusCode.NotFound: | ||
| 119 | + message = "请求出错(404)"; | ||
| 120 | + // 请求地址错误 | ||
| 121 | + break; | ||
| 122 | + case HttpStatusCode.RequestTimeout: | ||
| 123 | + message = "请求超时(408)"; | ||
| 124 | + break; | ||
| 125 | + case HttpStatusCode.InternalServerError: | ||
| 126 | + message = "服务器错误(500)"; | ||
| 127 | + // 服务器故障 | ||
| 128 | + break; | ||
| 129 | + case HttpStatusCode.NotImplemented: | ||
| 130 | + message = "服务未实现(501)"; | ||
| 131 | + break; | ||
| 132 | + case HttpStatusCode.BadGateway: | ||
| 133 | + message = "网络错误(502)"; | ||
| 134 | + break; | ||
| 135 | + case HttpStatusCode.ServiceUnavailable: | ||
| 136 | + message = "服务不可用(503)"; | ||
| 137 | + break; | ||
| 138 | + case HttpStatusCode.GatewayTimeout: | ||
| 139 | + message = "网络超时(504)"; | ||
| 140 | + break; | ||
| 141 | + case HttpStatusCode.HttpVersionNotSupported: | ||
| 142 | + message = "HTTP版本不受支持(505)"; | ||
| 143 | + break; | ||
| 144 | + default: | ||
| 145 | + // 网络连接故障 | ||
| 146 | + message = `连接出错(${httpStatus})!`; | ||
| 147 | + } | ||
| 148 | + return message; | ||
| 149 | +} |
| 1 | +import type { AxiosError, AxiosRequestConfig} from '@ohos/axios'; | ||
| 2 | +import service from './AxiosRequest'; | ||
| 3 | + | ||
| 4 | +export default class HttpRequest { | ||
| 5 | + // 加入泛型限定,返回数据类型为T, | ||
| 6 | + static request<T = any>(config: AxiosRequestConfig): Promise<T> { | ||
| 7 | + return new Promise<T>((resolve, reject) => { | ||
| 8 | + service.request<any, T>(config) | ||
| 9 | + .then((res:T) => { | ||
| 10 | + resolve(res) | ||
| 11 | + }) | ||
| 12 | + .catch((err:AxiosError) => { | ||
| 13 | + reject(err) | ||
| 14 | + }) | ||
| 15 | + }) | ||
| 16 | + // return service.request<any, T>(config) | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + static get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> { | ||
| 20 | + return service.get(url, config) | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + static delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T> { | ||
| 24 | + return service.delete(url, config) | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + static post<T = any>(url: string, data?: object, config?: AxiosRequestConfig): Promise<T> { | ||
| 28 | + return service.post(url, data, config) | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + static put<T = any>(url: string, data?: object, config?: AxiosRequestConfig): Promise<T> { | ||
| 32 | + return service.put(url, data, config) | ||
| 33 | + } | ||
| 34 | +} |
| 1 | +const TAG: string = '[HttpUtils]' | ||
| 2 | + | ||
| 3 | +export class HttpUtils { | ||
| 4 | + static buildHeaders(): Record<string, string> { | ||
| 5 | + let timestamp: number = new Date().getTime(); // 单位毫秒 | ||
| 6 | + | ||
| 7 | + let headers: Record<string, string> = {}; | ||
| 8 | + // 通用请求头 | ||
| 9 | + | ||
| 10 | + // 设备信息请求头 | ||
| 11 | + // headers["User-Agent"] = ''; // 终端UA,自动获取 | ||
| 12 | + headers["Content-Type"] = 'application/json;charset=UTF-8'; // 返回/响应的HTTP内容类型 | ||
| 13 | + headers["os"] = 'harmony'; // 操作系统类型:鸿蒙、安卓或iOS | ||
| 14 | + | ||
| 15 | + // 用户信息/登录信息请求头:登录完成之后二级接口返回,带入头信息;未登录情况下,头信息不传这些字段 | ||
| 16 | + | ||
| 17 | + // 签名相关请求头 | ||
| 18 | + headers["timeStamp"] = timestamp + ''; // 服务端时间戳(毫秒):1701667763664 | ||
| 19 | + headers["signType"] = 'RSA'; // 签名类型,固定RSA | ||
| 20 | + | ||
| 21 | + // 业务请求头 | ||
| 22 | + | ||
| 23 | + // 添加其他header | ||
| 24 | + | ||
| 25 | + // Logger.info(TAG, "buildHeader headers:" + JSON.stringify(headers)); | ||
| 26 | + return headers; | ||
| 27 | + } | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +// export default new HttpUtils() |
| 1 | +{ | ||
| 2 | + "module": { | ||
| 3 | + "name": "wdNetwork", | ||
| 4 | + "type": "shared", | ||
| 5 | + "description": "$string:shared_desc", | ||
| 6 | + "deviceTypes": [ | ||
| 7 | + "phone", | ||
| 8 | + "tablet", | ||
| 9 | + "2in1" | ||
| 10 | + ], | ||
| 11 | + "deliveryWithInstall": true, | ||
| 12 | + "requestPermissions": [ | ||
| 13 | + { | ||
| 14 | + "name": "ohos.permission.INTERNET" | ||
| 15 | + } | ||
| 16 | + ] | ||
| 17 | + } | ||
| 18 | +} |
| 1 | +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; | ||
| 2 | + | ||
| 3 | +export default function localUnitTest() { | ||
| 4 | + describe('localUnitTest',() => { | ||
| 5 | + // Defines a test suite. Two parameters are supported: test suite name and test suite function. | ||
| 6 | + beforeAll(() => { | ||
| 7 | + // Presets an action, which is performed only once before all test cases of the test suite start. | ||
| 8 | + // This API supports only one parameter: preset action function. | ||
| 9 | + }); | ||
| 10 | + beforeEach(() => { | ||
| 11 | + // Presets an action, which is performed before each unit test case starts. | ||
| 12 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 13 | + // This API supports only one parameter: preset action function. | ||
| 14 | + }); | ||
| 15 | + afterEach(() => { | ||
| 16 | + // Presets a clear action, which is performed after each unit test case ends. | ||
| 17 | + // The number of execution times is the same as the number of test cases defined by **it**. | ||
| 18 | + // This API supports only one parameter: clear action function. | ||
| 19 | + }); | ||
| 20 | + afterAll(() => { | ||
| 21 | + // Presets a clear action, which is performed after all test cases of the test suite end. | ||
| 22 | + // This API supports only one parameter: clear action function. | ||
| 23 | + }); | ||
| 24 | + it('assertContain', 0, () => { | ||
| 25 | + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. | ||
| 26 | + let a = 'abc'; | ||
| 27 | + let b = 'b'; | ||
| 28 | + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. | ||
| 29 | + expect(a).assertContain(b); | ||
| 30 | + expect(a).assertEqual(a); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 33 | +} |
-
Please register or login to post a comment