Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: (33 commits) 早晚报进行播报后点击关闭图标播报内容仍热继续播放 早晚报语音播报调试 fix: 18122 收藏>大专题卡不应展开展示稿件,标题超过1行应省略展示。 忽略文件 fix(直播liveStreamType为空处理): 根据视频内容确定大小屏 fix: 18195 三图卡稿件,标题折行效果不正确 feat:早晚报意图调用防抖 忽略BuildProfile 点播视频wifi状态优化 删除lock文件的管理,本地生成文件,不提交 git代码管理,忽略规则修改 feat: 1)lottie版本倒退 feat: 1)lottie升级到2.0.11-rc.4 fix: 18539 精选评论卡-同一个用户头像展示与安卓不一致 fix: 1) 人民号-关注页进行刷新会出现空白页 ref |> 解决视频宽高被缩小问题 删除todo 删除无用日志打印 编译新增build_version字段。 fix: 1)电子报展示图片和展位图位置调换 ...
Showing
91 changed files
with
1078 additions
and
2278 deletions
| @@ -50,6 +50,13 @@ | @@ -50,6 +50,13 @@ | ||
| 50 | "compileSdkVersion": "5.0.0(12)", | 50 | "compileSdkVersion": "5.0.0(12)", |
| 51 | "compatibleSdkVersion": "5.0.0(12)", | 51 | "compatibleSdkVersion": "5.0.0(12)", |
| 52 | "runtimeOS": "HarmonyOS", | 52 | "runtimeOS": "HarmonyOS", |
| 53 | + "buildOption": { | ||
| 54 | + "arkOptions": { | ||
| 55 | + "buildProfileFields": { | ||
| 56 | + "BUILD_VERSION": "" | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + }, | ||
| 53 | }, | 60 | }, |
| 54 | { | 61 | { |
| 55 | "name": "productRELEASE", | 62 | "name": "productRELEASE", |
| @@ -57,6 +64,13 @@ | @@ -57,6 +64,13 @@ | ||
| 57 | "compileSdkVersion": "5.0.0(12)", | 64 | "compileSdkVersion": "5.0.0(12)", |
| 58 | "compatibleSdkVersion": "5.0.0(12)", | 65 | "compatibleSdkVersion": "5.0.0(12)", |
| 59 | "runtimeOS": "HarmonyOS", | 66 | "runtimeOS": "HarmonyOS", |
| 67 | + "buildOption": { | ||
| 68 | + "arkOptions": { | ||
| 69 | + "buildProfileFields": { | ||
| 70 | + "BUILD_VERSION": "" | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + } | ||
| 60 | } | 74 | } |
| 61 | ], | 75 | ], |
| 62 | "buildModeSet": [ | 76 | "buildModeSet": [ |
| @@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
| 2 | "apiType": "stageMode", | 2 | "apiType": "stageMode", |
| 3 | "buildOption": { | 3 | "buildOption": { |
| 4 | "arkOptions": { | 4 | "arkOptions": { |
| 5 | - // "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */ | 5 | + "buildProfileFields": { |
| 6 | + "BUILD_TIME": "" | ||
| 7 | + } | ||
| 6 | } | 8 | } |
| 7 | }, | 9 | }, |
| 8 | "buildOptionSet": [ | 10 | "buildOptionSet": [ |
| @@ -16,6 +18,9 @@ | @@ -16,6 +18,9 @@ | ||
| 16 | "./obfuscation-rules.txt" | 18 | "./obfuscation-rules.txt" |
| 17 | ] | 19 | ] |
| 18 | } | 20 | } |
| 21 | + }, | ||
| 22 | + "buildProfileFields": { | ||
| 23 | + "BUILD_TIME": "" | ||
| 19 | } | 24 | } |
| 20 | } | 25 | } |
| 21 | }, | 26 | }, |
| 1 | import { hspTasks } from '@ohos/hvigor-ohos-plugin'; | 1 | import { hspTasks } from '@ohos/hvigor-ohos-plugin'; |
| 2 | +import { appTasks, OhosAppContext, OhosPluginId } from '@ohos/hvigor-ohos-plugin'; | ||
| 3 | +import { hvigor, getNode } from '@ohos/hvigor' | ||
| 4 | + | ||
| 5 | +// 获取根节点 | ||
| 6 | +const rootNode = getNode(__filename); | ||
| 7 | +// 为根节点添加一个afterNodeEvaluate hook 在hook中修改根目录下的build-profile.json5的内容并使能 | ||
| 8 | +rootNode.afterNodeEvaluate(node => { | ||
| 9 | + // 获取app插件的上下文对象 | ||
| 10 | + const appContext = node.getContext(OhosPluginId.OHOS_HSP_PLUGIN) as OhosHspContext; | ||
| 11 | + // 通过上下文对象获取从根目录build-profile.json5文件中读出来的obj对象 | ||
| 12 | + const buildProfileOpt = appContext.getBuildProfileOpt(); | ||
| 13 | + buildProfileOpt['buildOption']['arkOptions']['buildProfileFields'] = { | ||
| 14 | + "BUILD_VERSION": getBuildVersion(), | ||
| 15 | + }; | ||
| 16 | + // 将obj对象设置回上下文对象以使能到构建的过程与结果中 | ||
| 17 | + appContext.setBuildProfileOpt(buildProfileOpt); | ||
| 18 | +}) | ||
| 2 | 19 | ||
| 3 | export default { | 20 | export default { |
| 4 | - system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ | ||
| 5 | - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ | 21 | + system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ |
| 22 | + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ | ||
| 6 | } | 23 | } |
| 24 | + | ||
| 25 | +function getBuildVersion() { | ||
| 26 | + // build时间作为版本 | ||
| 27 | + let now = new Date() | ||
| 28 | + let year = now.getFullYear() | ||
| 29 | + let month = ('0' + (now.getMonth() + 1)).slice(-2) | ||
| 30 | + let day = ('0' + (now.getDate())).slice(-2) | ||
| 31 | + let hours = ('0' + (now.getHours())).slice(-2) | ||
| 32 | + let minutes = ('0' + (now.getMinutes())).slice(-2) | ||
| 33 | + let str = year + month + day + hours + minutes | ||
| 34 | + return str; | ||
| 35 | +} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 9 | - "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 10 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon" | ||
| 11 | - }, | ||
| 12 | - "packages": { | ||
| 13 | - "@umeng/analytics@1.0.19": { | ||
| 14 | - "name": "@umeng/analytics", | ||
| 15 | - "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 16 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 17 | - "registryType": "ohpm" | ||
| 18 | - }, | ||
| 19 | - "@umeng/common@1.0.21": { | ||
| 20 | - "name": "@umeng/common", | ||
| 21 | - "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 22 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 23 | - "registryType": "ohpm", | ||
| 24 | - "dependencies": { | ||
| 25 | - "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 26 | - } | ||
| 27 | - }, | ||
| 28 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 29 | - "name": "libcommon.so", | ||
| 30 | - "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 31 | - "registryType": "local" | ||
| 32 | - } | ||
| 33 | - } | ||
| 34 | -} |
| 1 | import bundleManager from '@ohos.bundle.bundleManager'; | 1 | import bundleManager from '@ohos.bundle.bundleManager'; |
| 2 | import common from '@ohos.app.ability.common'; | 2 | import common from '@ohos.app.ability.common'; |
| 3 | import { Logger } from './Logger'; | 3 | import { Logger } from './Logger'; |
| 4 | +import BuildProfile from 'BuildProfile'; | ||
| 4 | 5 | ||
| 5 | const TAG: string = 'AppUtils'; | 6 | const TAG: string = 'AppUtils'; |
| 6 | 7 | ||
| @@ -8,9 +9,14 @@ const TAG: string = 'AppUtils'; | @@ -8,9 +9,14 @@ const TAG: string = 'AppUtils'; | ||
| 8 | * 与应用相关属性或操作 | 9 | * 与应用相关属性或操作 |
| 9 | */ | 10 | */ |
| 10 | export class AppUtils { | 11 | export class AppUtils { |
| 12 | + private static buildVersion: string = '' | ||
| 13 | + static { | ||
| 14 | + AppUtils.buildVersion = BuildProfile.BUILD_VERSION; | ||
| 15 | + } | ||
| 16 | + | ||
| 11 | /** | 17 | /** |
| 12 | * 获取应用名称 | 18 | * 获取应用名称 |
| 13 | - * 即:咪咕视频 | 19 | + * 即:人民日报 |
| 14 | */ | 20 | */ |
| 15 | static getAppName(context: common.Context): string { | 21 | static getAppName(context: common.Context): string { |
| 16 | // todo:获取到的是 $string:app_name | 22 | // todo:获取到的是 $string:app_name |
| @@ -20,7 +26,6 @@ export class AppUtils { | @@ -20,7 +26,6 @@ export class AppUtils { | ||
| 20 | 26 | ||
| 21 | /** | 27 | /** |
| 22 | * 获取应用的包名 | 28 | * 获取应用的包名 |
| 23 | - * 即:com.cmcc.myapplication | ||
| 24 | */ | 29 | */ |
| 25 | static getPackageName(context: common.Context): string { | 30 | static getPackageName(context: common.Context): string { |
| 26 | return context.applicationInfo?.name; | 31 | return context.applicationInfo?.name; |
| @@ -60,7 +65,6 @@ export class AppUtils { | @@ -60,7 +65,6 @@ export class AppUtils { | ||
| 60 | } | 65 | } |
| 61 | 66 | ||
| 62 | static getOSName() { | 67 | static getOSName() { |
| 63 | - // TODO: 待确认,暂时写死Android | ||
| 64 | return "Harmony" | 68 | return "Harmony" |
| 65 | } | 69 | } |
| 66 | 70 | ||
| @@ -74,5 +78,12 @@ export class AppUtils { | @@ -74,5 +78,12 @@ export class AppUtils { | ||
| 74 | } | 78 | } |
| 75 | return ''; | 79 | return ''; |
| 76 | } | 80 | } |
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 应用build版本,时间,如:'202405291450' | ||
| 84 | + */ | ||
| 85 | + static getBuildVersion(): string { | ||
| 86 | + return AppUtils.buildVersion; | ||
| 87 | + } | ||
| 77 | } | 88 | } |
| 78 | 89 |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | - "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 12 | - "wdConstant@../wdConstant": "wdConstant@../wdConstant", | ||
| 13 | - "wdKit@../wdKit": "wdKit@../wdKit" | ||
| 14 | - }, | ||
| 15 | - "packages": { | ||
| 16 | - "@ohos/axios@2.2.0": { | ||
| 17 | - "name": "@ohos/axios", | ||
| 18 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 19 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 20 | - "registryType": "ohpm" | ||
| 21 | - }, | ||
| 22 | - "@umeng/analytics@1.0.19": { | ||
| 23 | - "name": "@umeng/analytics", | ||
| 24 | - "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 25 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 26 | - "registryType": "ohpm" | ||
| 27 | - }, | ||
| 28 | - "@umeng/common@1.0.21": { | ||
| 29 | - "name": "@umeng/common", | ||
| 30 | - "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 31 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 32 | - "registryType": "ohpm", | ||
| 33 | - "dependencies": { | ||
| 34 | - "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 35 | - } | ||
| 36 | - }, | ||
| 37 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 38 | - "name": "libcommon.so", | ||
| 39 | - "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 40 | - "registryType": "local" | ||
| 41 | - }, | ||
| 42 | - "wdConstant@../wdConstant": { | ||
| 43 | - "name": "wdconstant", | ||
| 44 | - "resolved": "../wdConstant", | ||
| 45 | - "registryType": "local" | ||
| 46 | - }, | ||
| 47 | - "wdKit@../wdKit": { | ||
| 48 | - "name": "wdkit", | ||
| 49 | - "resolved": "../wdKit", | ||
| 50 | - "registryType": "local", | ||
| 51 | - "dependencies": { | ||
| 52 | - "@umeng/common": "^1.0.21", | ||
| 53 | - "@umeng/analytics": "^1.0.19" | ||
| 54 | - } | ||
| 55 | - } | ||
| 56 | - } | ||
| 57 | -} |
| @@ -40,9 +40,6 @@ instance.interceptors.request.use( | @@ -40,9 +40,6 @@ instance.interceptors.request.use( | ||
| 40 | // 公共请求参数 | 40 | // 公共请求参数 |
| 41 | // config.params.key = key | 41 | // config.params.key = key |
| 42 | Logger.debug('HttpRequest', 'request: ' + config.url) | 42 | Logger.debug('HttpRequest', 'request: ' + config.url) |
| 43 | - // TODO 临时打印token,测试token失效。待删除 | ||
| 44 | - Logger.debug('HttpRequest', 'request token: ' + config?.headers?.get('RMRB-X-TOKEN')) | ||
| 45 | - Logger.debug('HttpRequest', 'request cookie: ' + config?.headers?.get('cookie')) | ||
| 46 | return config; | 43 | return config; |
| 47 | }, | 44 | }, |
| 48 | (error: AxiosError) => { | 45 | (error: AxiosError) => { |
| @@ -16,7 +16,7 @@ export class HttpParams { | @@ -16,7 +16,7 @@ export class HttpParams { | ||
| 16 | headers['plat'] = DeviceUtil.getPlat() | 16 | headers['plat'] = DeviceUtil.getPlat() |
| 17 | headers['Content-Type'] = 'application/json; charset=utf-8' | 17 | headers['Content-Type'] = 'application/json; charset=utf-8' |
| 18 | headers['device_id'] = DeviceUtil.clientId() | 18 | headers['device_id'] = DeviceUtil.clientId() |
| 19 | - headers['build_version'] = HttpParams.getVersion() | 19 | + headers['build_version'] = AppUtils.getBuildVersion() |
| 20 | headers['adcode'] = HttpUtils.getProvinceCode() | 20 | headers['adcode'] = HttpUtils.getProvinceCode() |
| 21 | headers['os_version'] = DeviceUtil.getOsVersion() | 21 | headers['os_version'] = DeviceUtil.getOsVersion() |
| 22 | headers['system'] = AppUtils.getOSName() | 22 | headers['system'] = AppUtils.getOSName() |
| @@ -80,9 +80,4 @@ export class HttpParams { | @@ -80,9 +80,4 @@ export class HttpParams { | ||
| 80 | headers['city_dode'] = encodeURI(cityCode) | 80 | headers['city_dode'] = encodeURI(cityCode) |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | - | ||
| 84 | - private static getVersion() { | ||
| 85 | - // TODO build时间,待对接build生成属性 | ||
| 86 | - return '202401242103'; | ||
| 87 | - } | ||
| 88 | } | 83 | } |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "wdBean@../../features/wdBean": "wdBean@../../features/wdBean", | ||
| 9 | - "wdKit@../wdKit": "wdKit@../wdKit" | ||
| 10 | - }, | ||
| 11 | - "packages": { | ||
| 12 | - "wdBean@../../features/wdBean": { | ||
| 13 | - "name": "wdbean", | ||
| 14 | - "resolved": "../../features/wdBean", | ||
| 15 | - "registryType": "local" | ||
| 16 | - }, | ||
| 17 | - "wdKit@../wdKit": { | ||
| 18 | - "name": "wdkit", | ||
| 19 | - "resolved": "../wdKit", | ||
| 20 | - "registryType": "local" | ||
| 21 | - } | ||
| 22 | - } | ||
| 23 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "wdBean@../../features/wdBean": "wdBean@../../features/wdBean", | ||
| 9 | - "wdConstant@../wdConstant": "wdConstant@../wdConstant", | ||
| 10 | - "wdJsBridge@../wdJsBridge": "wdJsBridge@../wdJsBridge", | ||
| 11 | - "wdKit@../wdKit": "wdKit@../wdKit", | ||
| 12 | - "wdRouter@../wdRouter": "wdRouter@../wdRouter" | ||
| 13 | - }, | ||
| 14 | - "packages": { | ||
| 15 | - "wdBean@../../features/wdBean": { | ||
| 16 | - "name": "wdbean", | ||
| 17 | - "resolved": "../../features/wdBean", | ||
| 18 | - "registryType": "local" | ||
| 19 | - }, | ||
| 20 | - "wdConstant@../wdConstant": { | ||
| 21 | - "name": "wdconstant", | ||
| 22 | - "resolved": "../wdConstant", | ||
| 23 | - "registryType": "local" | ||
| 24 | - }, | ||
| 25 | - "wdJsBridge@../wdJsBridge": { | ||
| 26 | - "name": "wdjsbridge", | ||
| 27 | - "resolved": "../wdJsBridge", | ||
| 28 | - "registryType": "local" | ||
| 29 | - }, | ||
| 30 | - "wdKit@../wdKit": { | ||
| 31 | - "name": "wdkit", | ||
| 32 | - "resolved": "../wdKit", | ||
| 33 | - "registryType": "local" | ||
| 34 | - }, | ||
| 35 | - "wdRouter@../wdRouter": { | ||
| 36 | - "name": "wdrouter", | ||
| 37 | - "resolved": "../wdRouter", | ||
| 38 | - "registryType": "local", | ||
| 39 | - "dependencies": { | ||
| 40 | - "wdKit": "file:../wdKit", | ||
| 41 | - "wdBean": "file:../../features/wdBean" | ||
| 42 | - } | ||
| 43 | - } | ||
| 44 | - } | ||
| 45 | -} |
| @@ -8,6 +8,7 @@ import { RmhInfoDTO } from '../detail/RmhInfoDTO'; | @@ -8,6 +8,7 @@ import { RmhInfoDTO } from '../detail/RmhInfoDTO'; | ||
| 8 | import { commentInfo } from './commentInfo'; | 8 | import { commentInfo } from './commentInfo'; |
| 9 | import { BaseDTO } from '../component/BaseDTO'; | 9 | import { BaseDTO } from '../component/BaseDTO'; |
| 10 | import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; | 10 | import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; |
| 11 | +import { ReserveItemBean } from '../live/ReserveItemBean'; | ||
| 11 | 12 | ||
| 12 | export class ContentShareInfoDTO { | 13 | export class ContentShareInfoDTO { |
| 13 | shareTitle: string = '' | 14 | shareTitle: string = '' |
| @@ -67,8 +68,8 @@ export class ContentDTO implements BaseDTO { | @@ -67,8 +68,8 @@ export class ContentDTO implements BaseDTO { | ||
| 67 | vImageUrl: string = ''; | 68 | vImageUrl: string = ''; |
| 68 | screenType: string = ''; | 69 | screenType: string = ''; |
| 69 | source: string = ''; | 70 | source: string = ''; |
| 70 | - objectId: string = ''; | ||
| 71 | objectType: string = ''; | 71 | objectType: string = ''; |
| 72 | + objectId: string = ''; | ||
| 72 | objectLevel: string = ''; | 73 | objectLevel: string = ''; |
| 73 | channelId: string = ''; | 74 | channelId: string = ''; |
| 74 | relId: string = ''; | 75 | relId: string = ''; |
| @@ -115,7 +116,11 @@ export class ContentDTO implements BaseDTO { | @@ -115,7 +116,11 @@ export class ContentDTO implements BaseDTO { | ||
| 115 | //本地字段:时间轴专题页节点组件时间;【如果开启模糊则显示时间->左右;0:否,1:是】 | 116 | //本地字段:时间轴专题页节点组件时间;【如果开启模糊则显示时间->左右;0:否,1:是】 |
| 116 | timeBlurred:number = 0 | 117 | timeBlurred:number = 0 |
| 117 | top:number = 0 | 118 | top:number = 0 |
| 119 | + // 直播预约状态 | ||
| 120 | + reserveItemBean : ReserveItemBean = new ReserveItemBean(-1,this.relId,false) | ||
| 118 | 121 | ||
| 122 | + // keyGenerator相关字符串,用于刷新list布局 | ||
| 123 | + timestamp: String = '1' | ||
| 119 | // 自定义参数,用于跳转对应页面时 传递targetLayout参数用 | 124 | // 自定义参数,用于跳转对应页面时 传递targetLayout参数用 |
| 120 | customParamTargetLayout?: string | 125 | customParamTargetLayout?: string |
| 121 | 126 |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0", | ||
| 10 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 11 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 12 | - "wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi", | ||
| 13 | - "wdDetailPlayShortVideo@../wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../wdDetailPlayShortVideo", | ||
| 14 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 15 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 16 | - "wdLogin@../wdLogin": "wdLogin@../wdLogin", | ||
| 17 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 18 | - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer", | ||
| 19 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 20 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | ||
| 21 | - }, | ||
| 22 | - "packages": { | ||
| 23 | - "@ohos/axios@2.2.0": { | ||
| 24 | - "name": "@ohos/axios", | ||
| 25 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 26 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 27 | - "registryType": "ohpm" | ||
| 28 | - }, | ||
| 29 | - "@ohos/lottie@2.0.0": { | ||
| 30 | - "name": "@ohos/lottie", | ||
| 31 | - "integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==", | ||
| 32 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har", | ||
| 33 | - "registryType": "ohpm" | ||
| 34 | - }, | ||
| 35 | - "wdBean@../wdBean": { | ||
| 36 | - "name": "wdbean", | ||
| 37 | - "resolved": "../wdBean", | ||
| 38 | - "registryType": "local" | ||
| 39 | - }, | ||
| 40 | - "wdConstant@../../commons/wdConstant": { | ||
| 41 | - "name": "wdconstant", | ||
| 42 | - "resolved": "../../commons/wdConstant", | ||
| 43 | - "registryType": "local" | ||
| 44 | - }, | ||
| 45 | - "wdDetailPlayApi@../wdDetailPlayApi": { | ||
| 46 | - "name": "wddetailplayapi", | ||
| 47 | - "resolved": "../wdDetailPlayApi", | ||
| 48 | - "registryType": "local", | ||
| 49 | - "dependencies": { | ||
| 50 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 51 | - "wdKit": "file:../../commons/wdKit", | ||
| 52 | - "wdBean": "file:../../features/wdBean", | ||
| 53 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 54 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 55 | - } | ||
| 56 | - }, | ||
| 57 | - "wdDetailPlayShortVideo@../wdDetailPlayShortVideo": { | ||
| 58 | - "name": "wddetailplayshortvideo", | ||
| 59 | - "resolved": "../wdDetailPlayShortVideo", | ||
| 60 | - "registryType": "local", | ||
| 61 | - "dependencies": { | ||
| 62 | - "@ohos/lottie": "2.0.0", | ||
| 63 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 64 | - "wdKit": "file:../../commons/wdKit", | ||
| 65 | - "wdBean": "file:../../features/wdBean", | ||
| 66 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 67 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 68 | - "wdDetailPlayApi": "file:../../features/wdDetailPlayApi" | ||
| 69 | - } | ||
| 70 | - }, | ||
| 71 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 72 | - "name": "wdjsbridge", | ||
| 73 | - "resolved": "../../commons/wdJsBridge", | ||
| 74 | - "registryType": "local" | ||
| 75 | - }, | ||
| 76 | - "wdKit@../../commons/wdKit": { | ||
| 77 | - "name": "wdkit", | ||
| 78 | - "resolved": "../../commons/wdKit", | ||
| 79 | - "registryType": "local" | ||
| 80 | - }, | ||
| 81 | - "wdLogin@../wdLogin": { | ||
| 82 | - "name": "wdlogin", | ||
| 83 | - "resolved": "../wdLogin", | ||
| 84 | - "registryType": "local", | ||
| 85 | - "dependencies": { | ||
| 86 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 87 | - "wdKit": "file:../../commons/wdKit", | ||
| 88 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 89 | - "wdBean": "file:../../features/wdBean", | ||
| 90 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 91 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 92 | - } | ||
| 93 | - }, | ||
| 94 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 95 | - "name": "wdnetwork", | ||
| 96 | - "resolved": "../../commons/wdNetwork", | ||
| 97 | - "registryType": "local", | ||
| 98 | - "dependencies": { | ||
| 99 | - "wdConstant": "file:../wdConstant", | ||
| 100 | - "wdKit": "file:../wdKit", | ||
| 101 | - "@ohos/axios": "^2.1.1" | ||
| 102 | - } | ||
| 103 | - }, | ||
| 104 | - "wdPlayer@../wdPlayer": { | ||
| 105 | - "name": "wdplayer", | ||
| 106 | - "resolved": "../wdPlayer", | ||
| 107 | - "registryType": "local", | ||
| 108 | - "dependencies": { | ||
| 109 | - "wdKit": "file:../../commons/wdKit" | ||
| 110 | - } | ||
| 111 | - }, | ||
| 112 | - "wdRouter@../../commons/wdRouter": { | ||
| 113 | - "name": "wdrouter", | ||
| 114 | - "resolved": "../../commons/wdRouter", | ||
| 115 | - "registryType": "local", | ||
| 116 | - "dependencies": { | ||
| 117 | - "wdKit": "file:../wdKit", | ||
| 118 | - "wdBean": "file:../../features/wdBean" | ||
| 119 | - } | ||
| 120 | - }, | ||
| 121 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 122 | - "name": "wdwebcomponent", | ||
| 123 | - "resolved": "../../commons/wdWebComponent", | ||
| 124 | - "registryType": "local", | ||
| 125 | - "dependencies": { | ||
| 126 | - "wdConstant": "file:../wdConstant", | ||
| 127 | - "wdKit": "file:../wdKit", | ||
| 128 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 129 | - "wdBean": "file:../../features/wdBean", | ||
| 130 | - "wdRouter": "file:../wdRouter" | ||
| 131 | - } | ||
| 132 | - } | ||
| 133 | - } | ||
| 134 | -} |
| @@ -19,6 +19,7 @@ import { SearchContentComponent } from './cardview/SearchContentComponent'; | @@ -19,6 +19,7 @@ import { SearchContentComponent } from './cardview/SearchContentComponent'; | ||
| 19 | import { DateTimeUtils } from 'wdKit/Index'; | 19 | import { DateTimeUtils } from 'wdKit/Index'; |
| 20 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | 20 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 21 | import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; | 21 | import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; |
| 22 | +import { LiveBigImage01Component } from './cardview/LiveBigImage01Component'; | ||
| 22 | 23 | ||
| 23 | /** | 24 | /** |
| 24 | * card适配器,卡片样式汇总,依据ContentDTO#appStyle | 25 | * card适配器,卡片样式汇总,依据ContentDTO#appStyle |
| @@ -26,13 +27,13 @@ import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; | @@ -26,13 +27,13 @@ import { LiveBigImage02Component } from './cardview/LiveBigImage02Component'; | ||
| 26 | */ | 27 | */ |
| 27 | @Component | 28 | @Component |
| 28 | export struct CardParser { | 29 | export struct CardParser { |
| 29 | - | ||
| 30 | @State pageId: string = ''; | 30 | @State pageId: string = ''; |
| 31 | @State pageName: string = ''; | 31 | @State pageName: string = ''; |
| 32 | @State contentDTO: ContentDTO = new ContentDTO(); | 32 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 33 | + @State compIndex: number = 0; | ||
| 33 | @ObjectLink compDTO: CompDTO | 34 | @ObjectLink compDTO: CompDTO |
| 34 | - pageShowTime:number = 0; | ||
| 35 | - pageHideTime:number = 0; | 35 | + pageShowTime: number = 0; |
| 36 | + pageHideTime: number = 0; | ||
| 36 | 37 | ||
| 37 | aboutToAppear(): void { | 38 | aboutToAppear(): void { |
| 38 | console.log('CardParser-', JSON.stringify(this.contentDTO)) | 39 | console.log('CardParser-', JSON.stringify(this.contentDTO)) |
| @@ -46,8 +47,9 @@ export struct CardParser { | @@ -46,8 +47,9 @@ export struct CardParser { | ||
| 46 | onPageHide(): void { | 47 | onPageHide(): void { |
| 47 | this.pageHideTime = DateTimeUtils.getTimeStamp() | 48 | this.pageHideTime = DateTimeUtils.getTimeStamp() |
| 48 | let duration = 0 | 49 | let duration = 0 |
| 49 | - duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000) | ||
| 50 | - TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration) | 50 | + duration = Math.floor((this.pageHideTime - this.pageShowTime) / 1000) |
| 51 | + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal, | ||
| 52 | + TrackConstants.PageName.Customer_Personal, duration) | ||
| 51 | } | 53 | } |
| 52 | 54 | ||
| 53 | build() { | 55 | build() { |
| @@ -58,41 +60,136 @@ export struct CardParser { | @@ -58,41 +60,136 @@ export struct CardParser { | ||
| 58 | contentBuilder(contentDTO: ContentDTO) { | 60 | contentBuilder(contentDTO: ContentDTO) { |
| 59 | // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) | 61 | // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) |
| 60 | if (!!contentDTO.contentText) { | 62 | if (!!contentDTO.contentText) { |
| 61 | - SearchContentComponent({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 63 | + SearchContentComponent({ |
| 64 | + contentDTO, | ||
| 65 | + compDTO: this.compDTO, | ||
| 66 | + pageId: this.pageId, | ||
| 67 | + pageName: this.pageName | ||
| 68 | + }) | ||
| 62 | } else { | 69 | } else { |
| 63 | if (contentDTO.appStyle === CompStyle.Card_02) { | 70 | if (contentDTO.appStyle === CompStyle.Card_02) { |
| 64 | - Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 71 | + Card2Component({ |
| 72 | + compDTO: this.compDTO, | ||
| 73 | + contentDTO, | ||
| 74 | + pageId: this.pageId, | ||
| 75 | + pageName: this.pageName | ||
| 76 | + }) | ||
| 65 | } else if (contentDTO.appStyle === CompStyle.Card_03) { | 77 | } else if (contentDTO.appStyle === CompStyle.Card_03) { |
| 66 | - Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | ||
| 67 | - }else if (contentDTO.appStyle === CompStyle.Card_04) { | ||
| 68 | - Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | ||
| 69 | - } else if (contentDTO.appStyle === CompStyle.Card_05) { | ||
| 70 | - Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName}) | ||
| 71 | - } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13 ) { | ||
| 72 | - Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName }) | 78 | + Card3Component({ |
| 79 | + compDTO: this.compDTO, | ||
| 80 | + contentDTO, | ||
| 81 | + pageId: this.pageId, | ||
| 82 | + pageName: this.pageName | ||
| 83 | + }) | ||
| 84 | + } else if (contentDTO.appStyle === CompStyle.Card_04) { | ||
| 85 | + Card4Component({ | ||
| 86 | + compDTO: this.compDTO, | ||
| 87 | + contentDTO, | ||
| 88 | + pageId: this.pageId, | ||
| 89 | + pageName: this.pageName | ||
| 90 | + }) | ||
| 91 | + } else if (contentDTO.appStyle === CompStyle.Card_05) { | ||
| 92 | + Card5Component({ | ||
| 93 | + compDTO: this.compDTO, | ||
| 94 | + contentDTO, | ||
| 95 | + titleShowPolicy: this.compDTO.titleShowPolicy, | ||
| 96 | + pageId: this.pageId, | ||
| 97 | + pageName: this.pageName | ||
| 98 | + }) | ||
| 99 | + } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) { | ||
| 100 | + Card6Component({ | ||
| 101 | + compDTO: this.compDTO, | ||
| 102 | + contentDTO: this.contentDTO, | ||
| 103 | + pageId: this.pageId, | ||
| 104 | + pageName: this.pageName | ||
| 105 | + }) | ||
| 73 | } else if (contentDTO.appStyle === CompStyle.Card_10) { | 106 | } else if (contentDTO.appStyle === CompStyle.Card_10) { |
| 74 | - Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 107 | + Card10Component({ |
| 108 | + compDTO: this.compDTO, | ||
| 109 | + contentDTO, | ||
| 110 | + pageId: this.pageId, | ||
| 111 | + pageName: this.pageName | ||
| 112 | + }) | ||
| 75 | } else if (contentDTO.appStyle === CompStyle.Card_11) { | 113 | } else if (contentDTO.appStyle === CompStyle.Card_11) { |
| 76 | - Card11Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 114 | + Card11Component({ |
| 115 | + compDTO: this.compDTO, | ||
| 116 | + contentDTO, | ||
| 117 | + pageId: this.pageId, | ||
| 118 | + pageName: this.pageName | ||
| 119 | + }) | ||
| 77 | } else if (contentDTO.appStyle === CompStyle.Card_12) { | 120 | } else if (contentDTO.appStyle === CompStyle.Card_12) { |
| 78 | - Card12Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 121 | + Card12Component({ |
| 122 | + compDTO: this.compDTO, | ||
| 123 | + contentDTO, | ||
| 124 | + pageId: this.pageId, | ||
| 125 | + pageName: this.pageName | ||
| 126 | + }) | ||
| 79 | } else if (contentDTO.appStyle === CompStyle.Card_14) { | 127 | } else if (contentDTO.appStyle === CompStyle.Card_14) { |
| 80 | - Card14Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 128 | + Card14Component({ |
| 129 | + contentDTO, | ||
| 130 | + compDTO: this.compDTO, | ||
| 131 | + pageId: this.pageId, | ||
| 132 | + pageName: this.pageName | ||
| 133 | + }) | ||
| 81 | } else if (contentDTO.appStyle === CompStyle.Card_15) { | 134 | } else if (contentDTO.appStyle === CompStyle.Card_15) { |
| 82 | - Card15Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 135 | + Card15Component({ |
| 136 | + contentDTO, | ||
| 137 | + compDTO: this.compDTO, | ||
| 138 | + pageId: this.pageId, | ||
| 139 | + pageName: this.pageName | ||
| 140 | + }) | ||
| 83 | } else if (contentDTO.appStyle === CompStyle.Card_16) { | 141 | } else if (contentDTO.appStyle === CompStyle.Card_16) { |
| 84 | - Card16Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 142 | + Card16Component({ |
| 143 | + contentDTO, | ||
| 144 | + compDTO: this.compDTO, | ||
| 145 | + pageId: this.pageId, | ||
| 146 | + pageName: this.pageName | ||
| 147 | + }) | ||
| 85 | } else if (contentDTO.appStyle === CompStyle.Card_17) { | 148 | } else if (contentDTO.appStyle === CompStyle.Card_17) { |
| 86 | - Card17Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName }) | 149 | + Card17Component({ |
| 150 | + compDTO: this.compDTO, | ||
| 151 | + contentDTO, | ||
| 152 | + pageId: this.pageId, | ||
| 153 | + pageName: this.pageName | ||
| 154 | + }) | ||
| 87 | } else if (contentDTO.appStyle === CompStyle.Card_19) { | 155 | } else if (contentDTO.appStyle === CompStyle.Card_19) { |
| 88 | - Card19Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 156 | + Card19Component({ |
| 157 | + contentDTO, | ||
| 158 | + compDTO: this.compDTO, | ||
| 159 | + pageId: this.pageId, | ||
| 160 | + pageName: this.pageName | ||
| 161 | + }) | ||
| 89 | } else if (contentDTO.appStyle === CompStyle.Card_20) { | 162 | } else if (contentDTO.appStyle === CompStyle.Card_20) { |
| 90 | - Card20Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 163 | + Card20Component({ |
| 164 | + contentDTO, | ||
| 165 | + compDTO: this.compDTO, | ||
| 166 | + pageId: this.pageId, | ||
| 167 | + pageName: this.pageName | ||
| 168 | + }) | ||
| 91 | } else if (contentDTO.appStyle === CompStyle.Card_21) { | 169 | } else if (contentDTO.appStyle === CompStyle.Card_21) { |
| 92 | - Card21Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 170 | + Card21Component({ |
| 171 | + contentDTO, | ||
| 172 | + compDTO: this.compDTO, | ||
| 173 | + pageId: this.pageId, | ||
| 174 | + pageName: this.pageName | ||
| 175 | + }) | ||
| 176 | + } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) { | ||
| 177 | + LiveBigImage01Component({ | ||
| 178 | + contentDTO: contentDTO, | ||
| 179 | + compDTO: this.compDTO, | ||
| 180 | + pageId: this.pageId, | ||
| 181 | + pageName: this.pageName, | ||
| 182 | + index: this.compIndex | ||
| 183 | + }) | ||
| 93 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) { | 184 | } else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) { |
| 94 | - LiveBigImage02Component({ contentDTO:contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | ||
| 95 | - }else { | 185 | + LiveBigImage02Component({ |
| 186 | + contentDTO: contentDTO, | ||
| 187 | + compDTO: this.compDTO, | ||
| 188 | + pageId: this.pageId, | ||
| 189 | + pageName: this.pageName | ||
| 190 | + | ||
| 191 | + }) | ||
| 192 | + } else { | ||
| 96 | // todo:组件未实现 / Component Not Implemented | 193 | // todo:组件未实现 / Component Not Implemented |
| 97 | // Text(contentDTO.appStyle) | 194 | // Text(contentDTO.appStyle) |
| 98 | // .width(CommonConstants.FULL_PARENT) | 195 | // .width(CommonConstants.FULL_PARENT) |
| @@ -58,7 +58,7 @@ export struct CompParser { | @@ -58,7 +58,7 @@ export struct CompParser { | ||
| 58 | this.compDTO.operDataList = this.noneAudioItems; | 58 | this.compDTO.operDataList = this.noneAudioItems; |
| 59 | } | 59 | } |
| 60 | // 金刚卡屏蔽音频类型稿件 | 60 | // 金刚卡屏蔽音频类型稿件 |
| 61 | - if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 61 | + if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 62 | this.audioItems = this.compDTO.operDataList.filter(item => { | 62 | this.audioItems = this.compDTO.operDataList.filter(item => { |
| 63 | return item.objectType === '13' || item.linkUrl.includes('audiotopic') | 63 | return item.objectType === '13' || item.linkUrl.includes('audiotopic') |
| 64 | }) | 64 | }) |
| @@ -96,9 +96,17 @@ export struct CompParser { | @@ -96,9 +96,17 @@ export struct CompParser { | ||
| 96 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 96 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 97 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { | 97 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { |
| 98 | if (this.compDTO.operDataList.length > 1) { | 98 | if (this.compDTO.operDataList.length > 1) { |
| 99 | - HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 99 | + HorizontalStrokeCardThreeTwoRadioForMoreComponent({ |
| 100 | + compDTO: this.compDTO, | ||
| 101 | + pageId: this.pageId, | ||
| 102 | + pageName: this.pageName | ||
| 103 | + }) | ||
| 100 | } else { | 104 | } else { |
| 101 | - HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 105 | + HorizontalStrokeCardThreeTwoRadioForOneComponent({ |
| 106 | + compDTO: this.compDTO, | ||
| 107 | + pageId: this.pageId, | ||
| 108 | + pageName: this.pageName | ||
| 109 | + }) | ||
| 102 | } | 110 | } |
| 103 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 111 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 104 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 112 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| @@ -113,7 +121,12 @@ export struct CompParser { | @@ -113,7 +121,12 @@ export struct CompParser { | ||
| 113 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 121 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 114 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 | 122 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 |
| 115 | 123 | ||
| 116 | - ZhGridLayout02NewsContent({ compDTO: this.compDTO, operDataList: this.compDTO.operDataList, pageId: this.pageId, pageName: this.pageName }) | 124 | + ZhGridLayout02NewsContent({ |
| 125 | + compDTO: this.compDTO, | ||
| 126 | + operDataList: this.compDTO.operDataList, | ||
| 127 | + pageId: this.pageId, | ||
| 128 | + pageName: this.pageName | ||
| 129 | + }) | ||
| 117 | 130 | ||
| 118 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 131 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 119 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 132 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| @@ -139,24 +152,39 @@ export struct CompParser { | @@ -139,24 +152,39 @@ export struct CompParser { | ||
| 139 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 152 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 140 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 153 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 141 | // 大图卡 | 154 | // 大图卡 |
| 142 | - Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 155 | + Card2Component({ |
| 156 | + compDTO: this.compDTO, | ||
| 157 | + contentDTO: this.compDTO.operDataList[0], | ||
| 158 | + pageId: this.pageId, | ||
| 159 | + pageName: this.pageName | ||
| 160 | + }) | ||
| 143 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 161 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 144 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { | 162 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { |
| 145 | //时间链卡 | 163 | //时间链卡 |
| 146 | Card9Component({ | 164 | Card9Component({ |
| 147 | compDTO: this.compDTO, | 165 | compDTO: this.compDTO, |
| 148 | - contentDTO:this.compDTO.operDataList[0], | 166 | + contentDTO: this.compDTO.operDataList[0], |
| 149 | pageId: this.pageId, | 167 | pageId: this.pageId, |
| 150 | pageName: this.pageName | 168 | pageName: this.pageName |
| 151 | }) | 169 | }) |
| 152 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 170 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 153 | - } else if(this.compDTO.compStyle === CompStyle.Card_13){ | ||
| 154 | - Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 171 | + } else if (this.compDTO.compStyle === CompStyle.Card_13) { |
| 172 | + Card6Component({ | ||
| 173 | + compDTO: this.compDTO, | ||
| 174 | + contentDTO: this.compDTO.operDataList[0], | ||
| 175 | + pageId: this.pageId, | ||
| 176 | + pageName: this.pageName | ||
| 177 | + }) | ||
| 155 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 178 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 156 | - } else if(this.compDTO.compStyle === CompStyle.Card_03){ | ||
| 157 | - Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 179 | + } else if (this.compDTO.compStyle === CompStyle.Card_03) { |
| 180 | + Card3Component({ | ||
| 181 | + compDTO: this.compDTO, | ||
| 182 | + contentDTO: this.compDTO.operDataList[0], | ||
| 183 | + pageId: this.pageId, | ||
| 184 | + pageName: this.pageName | ||
| 185 | + }) | ||
| 158 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 186 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 159 | - }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 187 | + } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { |
| 160 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 188 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 161 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 189 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 162 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 190 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| @@ -170,7 +198,13 @@ export struct CompParser { | @@ -170,7 +198,13 @@ export struct CompParser { | ||
| 170 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) | 198 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) |
| 171 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 199 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 172 | } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { | 200 | } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { |
| 173 | - CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }); | 201 | + CardParser({ |
| 202 | + contentDTO: this.compDTO.operDataList[0], | ||
| 203 | + compDTO: this.compDTO, | ||
| 204 | + pageId: this.pageId, | ||
| 205 | + pageName: this.pageName, | ||
| 206 | + compIndex: this.compIndex | ||
| 207 | + }); | ||
| 174 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 208 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 175 | } else { | 209 | } else { |
| 176 | // Text(this.compDTO.compStyle) | 210 | // Text(this.compDTO.compStyle) |
| @@ -784,13 +784,13 @@ export struct DynamicDetailComponent { | @@ -784,13 +784,13 @@ export struct DynamicDetailComponent { | ||
| 784 | return | 784 | return |
| 785 | } | 785 | } |
| 786 | const params: postExecuteLikeParams = { | 786 | const params: postExecuteLikeParams = { |
| 787 | - status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1, | 787 | + status: this.newsStatusOfUser?.likeStatus == '1' ? 0 : 1, |
| 788 | contentId: this.contentDetailData?.newsId + '', | 788 | contentId: this.contentDetailData?.newsId + '', |
| 789 | contentType: this.contentDetailData?.newsType + '', | 789 | contentType: this.contentDetailData?.newsType + '', |
| 790 | } | 790 | } |
| 791 | ContentDetailRequest.postExecuteLike(params).then(res => { | 791 | ContentDetailRequest.postExecuteLike(params).then(res => { |
| 792 | - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1' | ||
| 793 | - if (this.newsStatusOfUser.likeStatus === '1') { | 792 | + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1' |
| 793 | + if (this.newsStatusOfUser.likeStatus == '1') { | ||
| 794 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1 | 794 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1 |
| 795 | } else { | 795 | } else { |
| 796 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1 | 796 | this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1 |
| @@ -798,7 +798,7 @@ export struct DynamicDetailComponent { | @@ -798,7 +798,7 @@ export struct DynamicDetailComponent { | ||
| 798 | console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum) | 798 | console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum) |
| 799 | 799 | ||
| 800 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 | 800 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 |
| 801 | - TrackingContent.like(this.newsStatusOfUser?.likeStatus === '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail, | 801 | + TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail, |
| 802 | { | 802 | { |
| 803 | 'contentType': `${this.contentDetailData.newsType}`, | 803 | 'contentType': `${this.contentDetailData.newsType}`, |
| 804 | 'contentId': `${this.contentDetailData.newsId}`, | 804 | 'contentId': `${this.contentDetailData.newsId}`, |
| 1 | import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; | 1 | import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean'; |
| 2 | import { StringUtils } from 'wdKit'; | 2 | import { StringUtils } from 'wdKit'; |
| 3 | import { ProcessUtils } from 'wdRouter'; | 3 | import { ProcessUtils } from 'wdRouter'; |
| 4 | -import { TrackingContent,TrackConstants } from 'wdTracking/Index'; | 4 | +import { TrackingContent, TrackConstants } from 'wdTracking/Index'; |
| 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; | 5 | import { newsSkeleton } from './skeleton/newsSkeleton'; |
| 6 | 6 | ||
| 7 | @Component | 7 | @Component |
| @@ -21,21 +21,22 @@ export struct ENewspaperItemComponent { | @@ -21,21 +21,22 @@ export struct ENewspaperItemComponent { | ||
| 21 | aboutToAppear(): void { | 21 | aboutToAppear(): void { |
| 22 | for (let index = 0; index < this.newspaperListItemBean.items.length; index++) { | 22 | for (let index = 0; index < this.newspaperListItemBean.items.length; index++) { |
| 23 | const element = this.newspaperListItemBean.items[index]; | 23 | const element = this.newspaperListItemBean.items[index]; |
| 24 | - TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | ||
| 25 | - ,{ | ||
| 26 | - 'contentName':element.title, | ||
| 27 | - 'contentType':element.newsType, | ||
| 28 | - 'contentId':element.newsId, | ||
| 29 | - 'panelNumber':this.newspaperListItemBean.pageNum, | ||
| 30 | - 'panelName':this.newspaperListItemBean.pageName, | ||
| 31 | - 'readMode':'1', | 24 | + TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.NewsPaperPage, |
| 25 | + TrackConstants.PageName.NewsPaperPage | ||
| 26 | + , { | ||
| 27 | + 'contentName': element.title, | ||
| 28 | + 'contentType': element.newsType, | ||
| 29 | + 'contentId': element.newsId, | ||
| 30 | + 'panelNumber': this.newspaperListItemBean.pageNum, | ||
| 31 | + 'panelName': this.newspaperListItemBean.pageName, | ||
| 32 | + 'readMode': '1', | ||
| 32 | }) | 33 | }) |
| 33 | } | 34 | } |
| 34 | } | 35 | } |
| 36 | + | ||
| 35 | build() { | 37 | build() { |
| 36 | Stack() { | 38 | Stack() { |
| 37 | - newsSkeleton() | ||
| 38 | - .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | 39 | + |
| 39 | Image(this.newspaperListItemBean.pagePic) | 40 | Image(this.newspaperListItemBean.pagePic) |
| 40 | .width(px2vp(this.itemPicWidth)) | 41 | .width(px2vp(this.itemPicWidth)) |
| 41 | .height(px2vp(this.itemPicHeight)) | 42 | .height(px2vp(this.itemPicHeight)) |
| @@ -48,6 +49,8 @@ export struct ENewspaperItemComponent { | @@ -48,6 +49,8 @@ export struct ENewspaperItemComponent { | ||
| 48 | }) | 49 | }) |
| 49 | .objectFit(ImageFit.Fill) | 50 | .objectFit(ImageFit.Fill) |
| 50 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) | 51 | .visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible) |
| 52 | + newsSkeleton() | ||
| 53 | + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | ||
| 51 | if (this.contentWidth !== 0) { | 54 | if (this.contentWidth !== 0) { |
| 52 | Canvas(this.context) | 55 | Canvas(this.context) |
| 53 | .width(px2vp(this.contentWidth)) | 56 | .width(px2vp(this.contentWidth)) |
| @@ -58,7 +61,12 @@ export struct ENewspaperItemComponent { | @@ -58,7 +61,12 @@ export struct ENewspaperItemComponent { | ||
| 58 | }) | 61 | }) |
| 59 | } | 62 | } |
| 60 | } | 63 | } |
| 61 | - .padding({ top:14, right: 10, bottom: 14, left: 10 }) | 64 | + .padding({ |
| 65 | + top: 14, | ||
| 66 | + right: 10, | ||
| 67 | + bottom: 14, | ||
| 68 | + left: 10 | ||
| 69 | + }) | ||
| 62 | .backgroundColor(Color.White) | 70 | .backgroundColor(Color.White) |
| 63 | .width('100%') | 71 | .width('100%') |
| 64 | .onTouch((event: TouchEvent) => { | 72 | .onTouch((event: TouchEvent) => { |
| @@ -88,21 +96,22 @@ export struct ENewspaperItemComponent { | @@ -88,21 +96,22 @@ export struct ENewspaperItemComponent { | ||
| 88 | if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) { | 96 | if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) { |
| 89 | //公共跳转 | 97 | //公共跳转 |
| 90 | let content: ContentDTO = { | 98 | let content: ContentDTO = { |
| 91 | - objectId:this.itemBeanClicked.newsId+'', | ||
| 92 | - objectType:this.itemBeanClicked.newsType+'', | ||
| 93 | - relId:this.itemBeanClicked.relId+'', | ||
| 94 | - relType:this.itemBeanClicked.relType ?? '0' | 99 | + objectId: this.itemBeanClicked.newsId + '', |
| 100 | + objectType: this.itemBeanClicked.newsType + '', | ||
| 101 | + relId: this.itemBeanClicked.relId + '', | ||
| 102 | + relType: this.itemBeanClicked.relType ?? '0' | ||
| 95 | } as ContentDTO | 103 | } as ContentDTO |
| 96 | ProcessUtils.processPage(content) | 104 | ProcessUtils.processPage(content) |
| 97 | //内容点击 | 105 | //内容点击 |
| 98 | - TrackingContent.clickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage | ||
| 99 | - ,{ | ||
| 100 | - 'contentName':this.itemBeanClicked.title, | ||
| 101 | - 'contentType':this.itemBeanClicked.newsType, | ||
| 102 | - 'contentId':this.itemBeanClicked.newsId, | ||
| 103 | - 'panelNumber':this.newspaperListItemBean.pageNum, | ||
| 104 | - 'panelName':this.newspaperListItemBean.pageName, | ||
| 105 | - 'readMode':'1', | 106 | + TrackingContent.clickWithEvent('current_Number_Panel_content_click', TrackConstants.PageName.NewsPaperPage, |
| 107 | + TrackConstants.PageName.NewsPaperPage | ||
| 108 | + , { | ||
| 109 | + 'contentName': this.itemBeanClicked.title, | ||
| 110 | + 'contentType': this.itemBeanClicked.newsType, | ||
| 111 | + 'contentId': this.itemBeanClicked.newsId, | ||
| 112 | + 'panelNumber': this.newspaperListItemBean.pageNum, | ||
| 113 | + 'panelName': this.newspaperListItemBean.pageName, | ||
| 114 | + 'readMode': '1', | ||
| 106 | }) | 115 | }) |
| 107 | this.itemBeanClicked = {} as NewspaperPositionItemBean | 116 | this.itemBeanClicked = {} as NewspaperPositionItemBean |
| 108 | } | 117 | } |
| @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent { | @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent { | ||
| 373 | status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1', | 373 | status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1', |
| 374 | contentId: this.contentDetailData?.newsId + '', | 374 | contentId: this.contentDetailData?.newsId + '', |
| 375 | contentType: this.contentDetailData?.newsType + '', | 375 | contentType: this.contentDetailData?.newsType + '', |
| 376 | + contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '', | ||
| 376 | } | 377 | } |
| 378 | + console.log(TAG, '点赞、取消点赞params', JSON.stringify(params)) | ||
| 377 | PageRepository.postExecuteLike(params).then(res => { | 379 | PageRepository.postExecuteLike(params).then(res => { |
| 380 | + console.log(TAG, '点赞、res', JSON.stringify(res)) | ||
| 378 | console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',) | 381 | console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',) |
| 379 | if (this.newsStatusOfUser) { | 382 | if (this.newsStatusOfUser) { |
| 380 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 | 383 | //内容点赞、取消点赞Tracking 1点赞 0取消点赞 |
| @@ -91,14 +91,14 @@ export struct MorningEveningPaperComponent { | @@ -91,14 +91,14 @@ export struct MorningEveningPaperComponent { | ||
| 91 | private AudioSuspension = new AudioSuspensionModel() | 91 | private AudioSuspension = new AudioSuspensionModel() |
| 92 | 92 | ||
| 93 | onCancel() { | 93 | onCancel() { |
| 94 | - Logger.info(TAG, "cj2024 onCancel = ") | 94 | + console.log(TAG, "cj2024 onCancel = ") |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | /** | 97 | /** |
| 98 | * 回调无用 | 98 | * 回调无用 |
| 99 | **/ | 99 | **/ |
| 100 | onConfirm() { | 100 | onConfirm() { |
| 101 | - Logger.info(TAG, "cj2024 onConfirm = ") | 101 | + console.log(TAG, "cj2024 onConfirm = ") |
| 102 | // if (this.playerController != undefined) { | 102 | // if (this.playerController != undefined) { |
| 103 | // | 103 | // |
| 104 | // } | 104 | // } |
| @@ -108,10 +108,10 @@ export struct MorningEveningPaperComponent { | @@ -108,10 +108,10 @@ export struct MorningEveningPaperComponent { | ||
| 108 | 108 | ||
| 109 | // 续播判断 | 109 | // 续播判断 |
| 110 | changeContinue() { | 110 | changeContinue() { |
| 111 | - Logger.info(TAG, "cj2024 changeContinue = 1") | 111 | + console.log(TAG, "cj2024 changeContinue = 1") |
| 112 | // if (this.nextContId) { | 112 | // if (this.nextContId) { |
| 113 | this.playerController.continue = () => { | 113 | this.playerController.continue = () => { |
| 114 | - Logger.info(TAG, "cj2024 changeContinue = 2") | 114 | + console.log(TAG, "cj2024 changeContinue = 2") |
| 115 | this.playerController?.stop(); | 115 | this.playerController?.stop(); |
| 116 | // this.playVM.playWithContentId(this.nextContId ?? ''); | 116 | // this.playVM.playWithContentId(this.nextContId ?? ''); |
| 117 | } | 117 | } |
| @@ -130,8 +130,8 @@ export struct MorningEveningPaperComponent { | @@ -130,8 +130,8 @@ export struct MorningEveningPaperComponent { | ||
| 130 | const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String | 130 | const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String |
| 131 | console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) | 131 | console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) |
| 132 | const currentTime = new Date().getTime() | 132 | const currentTime = new Date().getTime() |
| 133 | - Logger.info(TAG, "currentTime = " + currentTime) | ||
| 134 | - Logger.info(TAG, `currentTime = ${currentTime}`) | 133 | + console.log(TAG, "currentTime = " + currentTime) |
| 134 | + console.log(TAG, `currentTime = ${currentTime}`) | ||
| 135 | try { | 135 | try { |
| 136 | 136 | ||
| 137 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) | 137 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) |
| @@ -145,13 +145,13 @@ export struct MorningEveningPaperComponent { | @@ -145,13 +145,13 @@ export struct MorningEveningPaperComponent { | ||
| 145 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) | 145 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) |
| 146 | const dateShow = new Date(dateTime) | 146 | const dateShow = new Date(dateTime) |
| 147 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` | 147 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` |
| 148 | - Logger.info(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate) | ||
| 149 | - Logger.info(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title) | 148 | + console.log(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate) |
| 149 | + console.log(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title) | ||
| 150 | 150 | ||
| 151 | - Logger.info(TAG, "pageInfoBean dateTime = " + dateTime) | ||
| 152 | - Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle) | 151 | + console.log(TAG, "pageInfoBean dateTime = " + dateTime) |
| 152 | + console.log(TAG, "pageInfoBean subTitle = " + this.subTitle) | ||
| 153 | 153 | ||
| 154 | - Logger.info(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean)) | 154 | + console.log(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean)) |
| 155 | 155 | ||
| 156 | this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false | 156 | this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false |
| 157 | let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :'' | 157 | let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :'' |
| @@ -159,21 +159,22 @@ export struct MorningEveningPaperComponent { | @@ -159,21 +159,22 @@ export struct MorningEveningPaperComponent { | ||
| 159 | 159 | ||
| 160 | let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) | 160 | let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId) |
| 161 | // this.compInfoBean = compInfoBean | 161 | // this.compInfoBean = compInfoBean |
| 162 | - Logger.info(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) | 162 | + console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean)) |
| 163 | if (compInfoBean?.compList[0]) { | 163 | if (compInfoBean?.compList[0]) { |
| 164 | this.compListItem = compInfoBean?.compList[0] | 164 | this.compListItem = compInfoBean?.compList[0] |
| 165 | - Logger.debug(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`) | 165 | + console.log(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`) |
| 166 | if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) { | 166 | if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) { |
| 167 | this.getAllContentInteractData(this.compListItem.operDataList) | 167 | this.getAllContentInteractData(this.compListItem.operDataList) |
| 168 | } | 168 | } |
| 169 | - Logger.debug(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList)) | 169 | + console.log(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList)) |
| 170 | if (compInfoBean?.compList[0].audioDataList) { | 170 | if (compInfoBean?.compList[0].audioDataList) { |
| 171 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl | 171 | this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl |
| 172 | this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title | 172 | this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title |
| 173 | + console.log(TAG, 'this.audioPlayUrl', this.audioPlayUrl) | ||
| 173 | } | 174 | } |
| 174 | } | 175 | } |
| 175 | 176 | ||
| 176 | - Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) | 177 | + console.log(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle) |
| 177 | this.playerController.onTimeUpdate = (position, duration) => { | 178 | this.playerController.onTimeUpdate = (position, duration) => { |
| 178 | this.currentTime = DateFormatUtil.secondToTime(position); | 179 | this.currentTime = DateFormatUtil.secondToTime(position); |
| 179 | this.totalTime = DateFormatUtil.secondToTime(duration); | 180 | this.totalTime = DateFormatUtil.secondToTime(duration); |
| @@ -203,10 +204,10 @@ export struct MorningEveningPaperComponent { | @@ -203,10 +204,10 @@ export struct MorningEveningPaperComponent { | ||
| 203 | contentType: Number(item.objectType ?? '1') | 204 | contentType: Number(item.objectType ?? '1') |
| 204 | }) | 205 | }) |
| 205 | }) | 206 | }) |
| 206 | - Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(params)}`) | 207 | + console.log(TAG, '获取评论数据' + `${JSON.stringify(params)}`) |
| 207 | 208 | ||
| 208 | this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params) | 209 | this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params) |
| 209 | - Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`) | 210 | + console.log(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`) |
| 210 | 211 | ||
| 211 | } catch (exception) { | 212 | } catch (exception) { |
| 212 | 213 | ||
| @@ -216,7 +217,7 @@ export struct MorningEveningPaperComponent { | @@ -216,7 +217,7 @@ export struct MorningEveningPaperComponent { | ||
| 216 | async setComponentBgColor(imageUrl: string) { | 217 | async setComponentBgColor(imageUrl: string) { |
| 217 | // 图片转换为PixelMap对象 | 218 | // 图片转换为PixelMap对象 |
| 218 | // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); | 219 | // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); |
| 219 | - Logger.debug(TAG, "compInfoBean compStyle = " + imageUrl) | 220 | + console.log(TAG, "compInfoBean compStyle = " + imageUrl) |
| 220 | 221 | ||
| 221 | if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) { | 222 | if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) { |
| 222 | const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) | 223 | const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) |
| @@ -237,11 +238,11 @@ export struct MorningEveningPaperComponent { | @@ -237,11 +238,11 @@ export struct MorningEveningPaperComponent { | ||
| 237 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); | 238 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); |
| 238 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { | 239 | effectKit.createColorPicker(pixelMap, (err, colorPicker) => { |
| 239 | let color = colorPicker.getLargestProportionColor(); | 240 | let color = colorPicker.getLargestProportionColor(); |
| 240 | - Logger.debug(TAG, "compInfoBean compStyle = " + color) | 241 | + console.log(TAG, "compInfoBean compStyle = " + color) |
| 241 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) | 242 | // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) |
| 242 | // 将取色器选取的color示例转换为十六进制颜色代码 | 243 | // 将取色器选取的color示例转换为十六进制颜色代码 |
| 243 | this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); | 244 | this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); |
| 244 | - Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor) | 245 | + console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) |
| 245 | }); | 246 | }); |
| 246 | 247 | ||
| 247 | } | 248 | } |
| @@ -267,10 +268,11 @@ export struct MorningEveningPaperComponent { | @@ -267,10 +268,11 @@ export struct MorningEveningPaperComponent { | ||
| 267 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) | 268 | topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject }) |
| 268 | } | 269 | } |
| 269 | 270 | ||
| 270 | - if (this.audioPlayUrl !== ""){ | ||
| 271 | - ListItem() { | ||
| 272 | - this.AudioBarView() | ||
| 273 | - } | 271 | + } |
| 272 | + | ||
| 273 | + if (this.audioPlayUrl !== ""){ | ||
| 274 | + ListItem() { | ||
| 275 | + this.AudioBarView() | ||
| 274 | } | 276 | } |
| 275 | } | 277 | } |
| 276 | 278 | ||
| @@ -310,8 +312,11 @@ export struct MorningEveningPaperComponent { | @@ -310,8 +312,11 @@ export struct MorningEveningPaperComponent { | ||
| 310 | @Builder | 312 | @Builder |
| 311 | topPaperTitle(){ | 313 | topPaperTitle(){ |
| 312 | Column(){ | 314 | Column(){ |
| 313 | - PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}).margin({top:this.topSafeHeight}) | ||
| 314 | - }.height(44+this.topSafeHeight).backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor) | 315 | + PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}) |
| 316 | + .margin({top:this.topSafeHeight}) | ||
| 317 | + } | ||
| 318 | + .height(44+this.topSafeHeight) | ||
| 319 | + .backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor) | ||
| 315 | } | 320 | } |
| 316 | 321 | ||
| 317 | @Builder | 322 | @Builder |
| @@ -350,12 +355,12 @@ export struct MorningEveningPaperComponent { | @@ -350,12 +355,12 @@ export struct MorningEveningPaperComponent { | ||
| 350 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) | 355 | .margin({ left: 10 })// .alignSelf(ItemAlign.Center) |
| 351 | .objectFit(ImageFit.Contain) | 356 | .objectFit(ImageFit.Contain) |
| 352 | .onClick(() => { | 357 | .onClick(() => { |
| 353 | - Logger.info("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying) | 358 | + console.log("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying) |
| 354 | // dialog.open() | 359 | // dialog.open() |
| 355 | // this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle) | 360 | // this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle) |
| 356 | this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle) | 361 | this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle) |
| 357 | - Logger.info(TAG, "this.audioPlayUrl = " + this.audioPlayUrl) | ||
| 358 | - Logger.info("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying) | 362 | + console.log(TAG, "this.audioPlayUrl = " + this.audioPlayUrl) |
| 363 | + console.log("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying) | ||
| 359 | }) | 364 | }) |
| 360 | } | 365 | } |
| 361 | // .aspectRatio(7 / 4) | 366 | // .aspectRatio(7 / 4) |
| @@ -66,7 +66,7 @@ export struct Card10Component { | @@ -66,7 +66,7 @@ export struct Card10Component { | ||
| 66 | .width(CommonConstants.FULL_WIDTH) | 66 | .width(CommonConstants.FULL_WIDTH) |
| 67 | .fontSize($r('app.float.font_size_18')) | 67 | .fontSize($r('app.float.font_size_18')) |
| 68 | .fontWeight(600) | 68 | .fontWeight(600) |
| 69 | - .maxLines(2) | 69 | + .maxLines(1) |
| 70 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 70 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 71 | .margin({ bottom: 19 }) | 71 | .margin({ bottom: 19 }) |
| 72 | .onClick((event: ClickEvent) => { | 72 | .onClick((event: ClickEvent) => { |
| @@ -75,7 +75,8 @@ export struct Card4Component { | @@ -75,7 +75,8 @@ export struct Card4Component { | ||
| 75 | Span(this.contentDTO.newsTitle) | 75 | Span(this.contentDTO.newsTitle) |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| 78 | - .fontSize($r('app.float.font_size_18')) | 78 | + .fontSize(17.5) |
| 79 | + .lineHeight(27) | ||
| 79 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) | 80 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) |
| 80 | .maxLines(3) | 81 | .maxLines(3) |
| 81 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 82 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
sight_harmony/features/wdComponent/src/main/ets/components/cardview/LiveBigImage01Component.ets
0 → 100644
| 1 | +import { CompDTO, ContentDTO } from 'wdBean'; | ||
| 2 | +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; | ||
| 3 | +import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 4 | +import { hasClicked } from '../../utils/persistentStorage'; | ||
| 5 | +import { ToastUtils } from 'wdKit/Index'; | ||
| 6 | +import { router } from '@kit.ArkUI'; | ||
| 7 | +import { TrackConstants, Tracking, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; | ||
| 8 | +import { HttpUtils } from 'wdNetwork/Index'; | ||
| 9 | +import { LiveModel } from '../../viewmodel/LiveModel'; | ||
| 10 | + | ||
| 11 | +const TAG: string = 'LiveBigImage01Component'; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 本地样式卡:直播预约卡 | ||
| 15 | + */ | ||
| 16 | +@Component | ||
| 17 | +export struct LiveBigImage01Component { | ||
| 18 | + @ObjectLink compDTO: CompDTO | ||
| 19 | + @State pageId: string = ''; | ||
| 20 | + @State pageName: string = ''; | ||
| 21 | + @State contentDTO: ContentDTO = new ContentDTO(); | ||
| 22 | + @State loadImg: boolean = false; | ||
| 23 | + @State clicked: boolean = false; | ||
| 24 | + index: number = 0 | ||
| 25 | + @State isLoadingAttention: boolean = false | ||
| 26 | + | ||
| 27 | + async aboutToAppear() { | ||
| 28 | + const curRouter = router.getState().name; | ||
| 29 | + this.clicked = hasClicked(this.contentDTO.objectId, curRouter) | ||
| 30 | + this.loadImg = await onlyWifiLoadImg(); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + build() { | ||
| 34 | + Column() { | ||
| 35 | + Stack() { | ||
| 36 | + Image(this.loadImg ? this.contentDTO.fullColumnImgUrls[0]?.url : '') | ||
| 37 | + .width('100%') | ||
| 38 | + .aspectRatio(16 / 9) | ||
| 39 | + .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : $r('app.color.color_33A3A3A3')) | ||
| 40 | + .objectFit(ImageFit.Contain) | ||
| 41 | + .borderWidth(0.5) | ||
| 42 | + .borderColor($r('app.color.color_0D000000')) | ||
| 43 | + .borderRadius({ | ||
| 44 | + topLeft: '4vp', | ||
| 45 | + topRight: '4vp' | ||
| 46 | + }) | ||
| 47 | + this.LiveImage() | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + .alignContent(Alignment.BottomEnd) | ||
| 53 | + | ||
| 54 | + Text(this.contentDTO.newsTitle) | ||
| 55 | + .fontSize(17) | ||
| 56 | + .maxLines(2) | ||
| 57 | + .lineHeight(25) | ||
| 58 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 59 | + .margin({ top: 4, left: 12, right: 12 }) | ||
| 60 | + .alignSelf(ItemAlign.Start) | ||
| 61 | + Row() { | ||
| 62 | + if (this.contentDTO.liveInfo && this.contentDTO.liveInfo.liveStartTime) { | ||
| 63 | + Row() { | ||
| 64 | + Image($r('app.media.reserve_play_icon')) | ||
| 65 | + .width(20) | ||
| 66 | + .height(20) | ||
| 67 | + .margin({ | ||
| 68 | + left: 10, | ||
| 69 | + top: 2, | ||
| 70 | + bottom: 2, | ||
| 71 | + right: 6 | ||
| 72 | + }) | ||
| 73 | + | ||
| 74 | + Text(this.getReserveDate(this.contentDTO.liveInfo.liveStartTime, 1)) | ||
| 75 | + .fontSize(12) | ||
| 76 | + .fontWeight(500) | ||
| 77 | + .fontColor('#ED2800') | ||
| 78 | + .fontFamily('PingFang SC-Medium') | ||
| 79 | + .maxLines(1) | ||
| 80 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 81 | + .margin({ top: 8, bottom: 8 }) | ||
| 82 | + .align(Alignment.Start) | ||
| 83 | + | ||
| 84 | + Image($r('app.media.point_icon')) | ||
| 85 | + .objectFit(ImageFit.Auto) | ||
| 86 | + .interpolation(ImageInterpolation.High) | ||
| 87 | + .width(6) | ||
| 88 | + .height(16) | ||
| 89 | + .margin(2) | ||
| 90 | + | ||
| 91 | + Text(this.getReserveDate(this.contentDTO.liveInfo.liveStartTime, 2)) | ||
| 92 | + .fontSize(12) | ||
| 93 | + .fontWeight(500) | ||
| 94 | + .fontColor('#ED2800') | ||
| 95 | + .fontFamily('PingFang SC-Medium') | ||
| 96 | + .maxLines(1) | ||
| 97 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 98 | + .margin({ top: 8, bottom: 8, right: 10 }) | ||
| 99 | + .align(Alignment.Start) | ||
| 100 | + } | ||
| 101 | + .backgroundColor('#F5F5F5') | ||
| 102 | + .margin(12) | ||
| 103 | + } | ||
| 104 | + // 预约 | ||
| 105 | + Row() { | ||
| 106 | + LoadingProgress() | ||
| 107 | + .width(20) | ||
| 108 | + .height(20) | ||
| 109 | + .color(!this.isReserved() ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) | ||
| 110 | + .visibility((this.isLoadingAttention) ? Visibility.Visible : | ||
| 111 | + Visibility.None) | ||
| 112 | + | ||
| 113 | + Text(!this.isReserved() ? '预约' : '已预约') | ||
| 114 | + .fontSize($r('app.float.vp_12')) | ||
| 115 | + .fontWeight(500) | ||
| 116 | + .fontColor(!this.isReserved() ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) | ||
| 117 | + .width('100%') | ||
| 118 | + .height('100%') | ||
| 119 | + .textAlign(TextAlign.Center) | ||
| 120 | + .visibility((this.isLoadingAttention) ? Visibility.None : | ||
| 121 | + Visibility.Visible) | ||
| 122 | + .margin({ | ||
| 123 | + right: '10vp' | ||
| 124 | + }) | ||
| 125 | + .textShadow({ | ||
| 126 | + radius: 2, | ||
| 127 | + color: 'rgba(0,0,0,0.3)', | ||
| 128 | + offsetY: 2 | ||
| 129 | + }) | ||
| 130 | + .backgroundColor(!this.isReserved() ? $r('app.color.color_ED2800') : $r('app.color.color_F5F5F5')) | ||
| 131 | + .borderRadius(3) | ||
| 132 | + | ||
| 133 | + } | ||
| 134 | + .onClick(() => { | ||
| 135 | + this.bookAndCancel(this.contentDTO) | ||
| 136 | + }) | ||
| 137 | + .justifyContent(FlexAlign.Center) | ||
| 138 | + .alignItems(VerticalAlign.Center) | ||
| 139 | + .borderRadius(3) | ||
| 140 | + .width('52vp') | ||
| 141 | + .height('24vp') | ||
| 142 | + .margin({ right: 12 }) | ||
| 143 | + | ||
| 144 | + } | ||
| 145 | + .width('100%') | ||
| 146 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 147 | + | ||
| 148 | + } | ||
| 149 | + .borderRadius(4) | ||
| 150 | + .backgroundColor(Color.White) | ||
| 151 | + .width('calc(100% - 24vp)') | ||
| 152 | + .margin({ | ||
| 153 | + left: '12vp', | ||
| 154 | + right: '12vp', | ||
| 155 | + top: this.index == 0 ? '12vp' : '8vp' | ||
| 156 | + }) | ||
| 157 | + .onClick(() => { | ||
| 158 | + | ||
| 159 | + // 内容点击埋点 | ||
| 160 | + TrackingContent.common(TrackConstants.EventType.Click, | ||
| 161 | + this.pageId, | ||
| 162 | + this.pageId, | ||
| 163 | + TrackParamConvert.program(this.contentDTO)) | ||
| 164 | + | ||
| 165 | + ProcessUtils.processPage(this.contentDTO) | ||
| 166 | + }) | ||
| 167 | + .onVisibleAreaChange([0, 1], (isVisiable: boolean, ratio: number) => { | ||
| 168 | + if (isVisiable) { | ||
| 169 | + // 内容曝光埋点 | ||
| 170 | + TrackingContent.common(TrackConstants.EventType.Show, | ||
| 171 | + this.pageId, | ||
| 172 | + this.pageId, | ||
| 173 | + TrackParamConvert.program(this.contentDTO)) | ||
| 174 | + } | ||
| 175 | + }) | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + @Builder | ||
| 179 | + LiveImage() { | ||
| 180 | + Row() { | ||
| 181 | + Image($r('app.media.reserve_new_icon')) | ||
| 182 | + .width(14) | ||
| 183 | + .height(14) | ||
| 184 | + .margin({ | ||
| 185 | + right: 3 | ||
| 186 | + }) | ||
| 187 | + Text('预约') | ||
| 188 | + .fontSize('12vp') | ||
| 189 | + .fontWeight(400) | ||
| 190 | + .fontColor(Color.White) | ||
| 191 | + .textShadow({ | ||
| 192 | + radius: 2, | ||
| 193 | + color: 'rgba(0,0,0,0.3)', | ||
| 194 | + offsetY: 2 | ||
| 195 | + }) | ||
| 196 | + } | ||
| 197 | + .backgroundColor(Color.Transparent) | ||
| 198 | + .margin({ right: 8, bottom: 8 }) | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + getReserveDate(eventDateTimeString: string, type: number): string { | ||
| 202 | + // 解析事件的日期和时间 | ||
| 203 | + const eventDateTime = new Date(eventDateTimeString); | ||
| 204 | + const currentDateTime = new Date(); | ||
| 205 | + | ||
| 206 | + // 截取事件时间的小时和分钟(假设事件时间是按照24小时制) | ||
| 207 | + const eventHour = eventDateTime.getHours(); | ||
| 208 | + const eventMinutes = eventDateTime.getMinutes(); | ||
| 209 | + const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 | ||
| 210 | + if (type === 1) { | ||
| 211 | + // 判断是否是今天 | ||
| 212 | + const eventDate = eventDateTime.setHours(0, 0, 0, 0); | ||
| 213 | + const currentDate = currentDateTime.setHours(0, 0, 0, 0); | ||
| 214 | + if (eventDate === currentDate) { | ||
| 215 | + return `今天`; | ||
| 216 | + } else { | ||
| 217 | + const month = eventDateTime.getMonth() + 1; | ||
| 218 | + const date = eventDateTime.getDate(); | ||
| 219 | + return `${month}月${date}日`; | ||
| 220 | + } | ||
| 221 | + } else { | ||
| 222 | + return `${eventTimeStr}`; | ||
| 223 | + } | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + // 预约/取消预约 | ||
| 227 | + async bookAndCancel(item: ContentDTO) { | ||
| 228 | + | ||
| 229 | + // 未登录,跳转登录 | ||
| 230 | + if (!HttpUtils.getUserId()) { | ||
| 231 | + WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 232 | + return | ||
| 233 | + } | ||
| 234 | + if (!this.isLoadingAttention) { | ||
| 235 | + this.isLoadingAttention = true | ||
| 236 | + const reserveItem = item.reserveItemBean | ||
| 237 | + if (reserveItem) { | ||
| 238 | + this.isLoadingAttention = true | ||
| 239 | + try { | ||
| 240 | + | ||
| 241 | + // 埋点 | ||
| 242 | + Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click", | ||
| 243 | + TrackParamConvert.program(item)) | ||
| 244 | + | ||
| 245 | + const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), | ||
| 246 | + !reserveItem.subscribe); | ||
| 247 | + if (res.code == 0) { | ||
| 248 | + ToastUtils.shortToast(!reserveItem.subscribe ? '预约成功' : '取消预约成功') | ||
| 249 | + reserveItem.subscribe = !reserveItem.subscribe ? true : false | ||
| 250 | + } | ||
| 251 | + this.isLoadingAttention = false | ||
| 252 | + } catch (e) { | ||
| 253 | + this.isLoadingAttention = false | ||
| 254 | + } | ||
| 255 | + } else { | ||
| 256 | + this.isLoadingAttention = false | ||
| 257 | + } | ||
| 258 | + } | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + // 判断是否预约 | ||
| 262 | + isReserved() { | ||
| 263 | + | ||
| 264 | + if (this.compDTO.operDataList[0].reserveItemBean == undefined) { | ||
| 265 | + return false | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + return this.compDTO.operDataList[0].reserveItemBean.subscribe | ||
| 269 | + } | ||
| 270 | +} |
| @@ -2,12 +2,11 @@ import { CompDTO, ContentDTO } from 'wdBean'; | @@ -2,12 +2,11 @@ import { CompDTO, ContentDTO } from 'wdBean'; | ||
| 2 | import { ProcessUtils } from 'wdRouter'; | 2 | import { ProcessUtils } from 'wdRouter'; |
| 3 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | 3 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; |
| 4 | import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; | 4 | import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; |
| 5 | -import { SearchShowRed, textItem, titleInitRes } from '../../utils/searchShowRed'; | ||
| 6 | import { DateTimeUtils } from 'wdKit/Index'; | 5 | import { DateTimeUtils } from 'wdKit/Index'; |
| 7 | import { LottieView } from '../lottie/LottieView'; | 6 | import { LottieView } from '../lottie/LottieView'; |
| 8 | import { router } from '@kit.ArkUI'; | 7 | import { router } from '@kit.ArkUI'; |
| 9 | 8 | ||
| 10 | -const TAG: string = 'Card6Component-Card13Component'; | 9 | +const TAG: string = 'LiveBigImage02Component'; |
| 11 | 10 | ||
| 12 | /** | 11 | /** |
| 13 | * 本地样式卡:直播大图卡 | 12 | * 本地样式卡:直播大图卡 |
| @@ -30,14 +30,15 @@ export struct MoreComponent { | @@ -30,14 +30,15 @@ export struct MoreComponent { | ||
| 30 | Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" }) | 30 | Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" }) |
| 31 | } | 31 | } |
| 32 | }) | 32 | }) |
| 33 | + | ||
| 34 | + Divider() | ||
| 35 | + .width('100%') | ||
| 36 | + .color($r('app.color.color_F5F5F5')) | ||
| 37 | + .strokeWidth(4) | ||
| 38 | + | ||
| 33 | } else { | 39 | } else { |
| 34 | Column() { | 40 | Column() { |
| 35 | 41 | ||
| 36 | - Divider() | ||
| 37 | - .width('100%') | ||
| 38 | - .color($r('app.color.color_F5F5F5')) | ||
| 39 | - .strokeWidth(5) | ||
| 40 | - | ||
| 41 | Row() { | 42 | Row() { |
| 42 | Text('点击展开更多相似') | 43 | Text('点击展开更多相似') |
| 43 | .fontSize(16) | 44 | .fontSize(16) |
| @@ -34,7 +34,7 @@ export struct SearchContentComponent { | @@ -34,7 +34,7 @@ export struct SearchContentComponent { | ||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | titleInit() { | 36 | titleInit() { |
| 37 | - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title); | 37 | + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.contentText || ''); |
| 38 | // this.titleMarked = titleInitRes.titleMarked; | 38 | // this.titleMarked = titleInitRes.titleMarked; |
| 39 | this.textArr = titleInitRes.textArr; | 39 | this.textArr = titleInitRes.textArr; |
| 40 | } | 40 | } |
| @@ -48,7 +48,8 @@ export struct ZhGridLayout02NewsContent { | @@ -48,7 +48,8 @@ export struct ZhGridLayout02NewsContent { | ||
| 48 | Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '') | 48 | Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '') |
| 49 | .backgroundColor(0xf5f5f5) | 49 | .backgroundColor(0xf5f5f5) |
| 50 | .width('100%') | 50 | .width('100%') |
| 51 | - .height(95) | 51 | + // .height(95) |
| 52 | + .aspectRatio(167 / 95) | ||
| 52 | .borderWidth(0.5) | 53 | .borderWidth(0.5) |
| 53 | .borderColor($r('app.color.color_0D000000')) | 54 | .borderColor($r('app.color.color_0D000000')) |
| 54 | .borderRadius(4) | 55 | .borderRadius(4) |
| @@ -90,7 +90,9 @@ export struct ZhSingleRow03 { | @@ -90,7 +90,9 @@ export struct ZhSingleRow03 { | ||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | async aboutToAppear(): Promise<void> { | 92 | async aboutToAppear(): Promise<void> { |
| 93 | - this.getReserveState(); | 93 | + if (HttpUtils.getUserId()) { |
| 94 | + this.getReserveState(); | ||
| 95 | + } | ||
| 94 | this.loadImg = await onlyWifiLoadImg(); | 96 | this.loadImg = await onlyWifiLoadImg(); |
| 95 | } | 97 | } |
| 96 | 98 |
| @@ -174,7 +174,7 @@ export struct ZhSingleRow06 { | @@ -174,7 +174,7 @@ export struct ZhSingleRow06 { | ||
| 174 | this.loadImg | 174 | this.loadImg |
| 175 | ? item.operDataList[0]?.commentInfo?.userHeaderUrl | 175 | ? item.operDataList[0]?.commentInfo?.userHeaderUrl |
| 176 | ? item.operDataList[0].commentInfo.userHeaderUrl | 176 | ? item.operDataList[0].commentInfo.userHeaderUrl |
| 177 | - : $r('app.media.default_head') | 177 | + : $r('app.media.icon_default_head_mater') |
| 178 | : $r('app.media.icon_default_head_mater')) | 178 | : $r('app.media.icon_default_head_mater')) |
| 179 | .width(32) | 179 | .width(32) |
| 180 | .height(32) | 180 | .height(32) |
| @@ -23,7 +23,7 @@ struct LiveMorePage { | @@ -23,7 +23,7 @@ struct LiveMorePage { | ||
| 23 | //常见标题 | 23 | //常见标题 |
| 24 | CommonPageTitle({ title: this.title }) | 24 | CommonPageTitle({ title: this.title }) |
| 25 | // 通用模板组件 | 25 | // 通用模板组件 |
| 26 | - TemplatePageComponent({ pageDataSourceType: TemplatePageConstant.LIVE_HORIZONTAL_CARD }) | 26 | + TemplatePageComponent({ pageDataSourceType: TemplatePageConstant.LIVE_HORIZONTAL_PAGE }) |
| 27 | 27 | ||
| 28 | } | 28 | } |
| 29 | .height('100%') | 29 | .height('100%') |
| @@ -256,6 +256,7 @@ export struct TopNavigationComponentNew { | @@ -256,6 +256,7 @@ export struct TopNavigationComponentNew { | ||
| 256 | 'right': { 'anchor': '__container__', 'align': HorizontalAlign.End } | 256 | 'right': { 'anchor': '__container__', 'align': HorizontalAlign.End } |
| 257 | }) | 257 | }) |
| 258 | .onClick(() => { | 258 | .onClick(() => { |
| 259 | + Logger.info(TAG, `搜索按钮点击: 人民号`); | ||
| 259 | TrackingButton.searchClick(TrackConstants.PageName.Search, "PEOPLE") | 260 | TrackingButton.searchClick(TrackConstants.PageName.Search, "PEOPLE") |
| 260 | let params = { 'tabName': "PEOPLE" } as Record<string, string> | 261 | let params = { 'tabName': "PEOPLE" } as Record<string, string> |
| 261 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params) | 262 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params) |
| @@ -479,6 +480,8 @@ export struct TopNavigationComponentNew { | @@ -479,6 +480,8 @@ export struct TopNavigationComponentNew { | ||
| 479 | //处理新闻tab顶导频道数据 | 480 | //处理新闻tab顶导频道数据 |
| 480 | this.topNavListHandle() | 481 | this.topNavListHandle() |
| 481 | this.changePage(this.currentTopNavSelectedIndex) | 482 | this.changePage(this.currentTopNavSelectedIndex) |
| 483 | + | ||
| 484 | + console.log('XY', '----TopNavigation-------aboutToAppear'+this.navItem.name) | ||
| 482 | } | 485 | } |
| 483 | 486 | ||
| 484 | onTopNavigationDataUpdated() { | 487 | onTopNavigationDataUpdated() { |
| @@ -487,9 +490,10 @@ export struct TopNavigationComponentNew { | @@ -487,9 +490,10 @@ export struct TopNavigationComponentNew { | ||
| 487 | } | 490 | } |
| 488 | 491 | ||
| 489 | updateCurrentTopNavSelectedIndex() { | 492 | updateCurrentTopNavSelectedIndex() { |
| 493 | + Logger.info(TAG, `this.navItem 埋点参数topStyle: ${this.navItem.topStyle}`); | ||
| 490 | 494 | ||
| 491 | // 顶部tab埋点 | 495 | // 顶部tab埋点 |
| 492 | - if (CompUtils.isVideo(this.navItem)) { | 496 | + if (CompUtils.isNews(this.navItem)) { |
| 493 | const tab = this.myChannelList[this.currentTopNavSelectedIndex] | 497 | const tab = this.myChannelList[this.currentTopNavSelectedIndex] |
| 494 | Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`); | 498 | Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`); |
| 495 | 499 | ||
| @@ -498,7 +502,7 @@ export struct TopNavigationComponentNew { | @@ -498,7 +502,7 @@ export struct TopNavigationComponentNew { | ||
| 498 | "tabName": tab.name, | 502 | "tabName": tab.name, |
| 499 | "pageId": tab.pageId, | 503 | "pageId": tab.pageId, |
| 500 | } | 504 | } |
| 501 | - Tracking.event("home_page_tab_click ", params) | 505 | + Tracking.event("home_page_tab_click", params) |
| 502 | } else if (CompUtils.isRMH(this.navItem)) { | 506 | } else if (CompUtils.isRMH(this.navItem)) { |
| 503 | const tab = this.topNavList[this.currentTopNavSelectedIndex] | 507 | const tab = this.topNavList[this.currentTopNavSelectedIndex] |
| 504 | Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`); | 508 | Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`); |
| 1 | -import { ArrayList } from '@kit.ArkTS' | ||
| 2 | -import { CompDTO, ContentDTO, LiveRoomDataBean } from 'wdBean/Index' | 1 | +import { CompDTO, ContentDTO, LiveRoomDataBean, ReserveBean, ReserveItemBean } from 'wdBean/Index' |
| 3 | import { DateTimeUtils, Logger } from 'wdKit/Index' | 2 | import { DateTimeUtils, Logger } from 'wdKit/Index' |
| 3 | +import { HttpUtils } from 'wdNetwork/Index' | ||
| 4 | +import { LiveModel } from '../../../viewmodel/LiveModel' | ||
| 4 | import PageViewModel from '../../../viewmodel/PageViewModel' | 5 | import PageViewModel from '../../../viewmodel/PageViewModel' |
| 6 | + | ||
| 5 | const TAG: string = 'BaseTemplateHelp' | 7 | const TAG: string = 'BaseTemplateHelp' |
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | export class BasePageHelp { | 10 | export class BasePageHelp { |
| 9 | - | ||
| 10 | /** | 11 | /** |
| 11 | - * 请求获取直播房间的动态数据 | ||
| 12 | - * @param list | 12 | + * 批查直播预约数据 |
| 13 | + * @param compList | ||
| 13 | */ | 14 | */ |
| 15 | + async getAppointmentInfo(compList: CompDTO[]) { | ||
| 16 | + if (HttpUtils.getUserId()) { | ||
| 17 | + | ||
| 18 | + let time = DateTimeUtils.getTimeStamp().toString() | ||
| 19 | + Logger.debug(TAG, 'getAppointmentInfo-->'+time) | ||
| 20 | + const reserveBean = this.transformToLiveDetailsBeans(compList) | ||
| 21 | + LiveModel.getAppointmentStatus(reserveBean).then((result) => { | ||
| 22 | + Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(result)}`) | ||
| 23 | + if (result && result.length > 0) { | ||
| 24 | + for (let item of result) { | ||
| 25 | + for (let compItem of compList) { | ||
| 26 | + if (item.liveId.toString() == compItem.operDataList[0].objectId) { | ||
| 27 | + compItem.operDataList[0].reserveItemBean = item | ||
| 28 | + compItem.timestamp = time | ||
| 29 | + break | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + }).catch(() => { | ||
| 35 | + }) | ||
| 36 | + } else { | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + // 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组 | ||
| 42 | + transformToLiveDetailsBeans(compList: CompDTO[]): ReserveBean[] { | ||
| 43 | + | ||
| 44 | + let list: ContentDTO[] = [] | ||
| 45 | + | ||
| 46 | + compList.forEach(compBean => { | ||
| 47 | + if (compBean.operDataList && compBean.operDataList.length > 0) { | ||
| 48 | + list.push(compBean.operDataList[0]) | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + }) | ||
| 52 | + | ||
| 53 | + const liveDetailsBeans: ReserveBean[] = []; | ||
| 54 | + list.forEach(item => { | ||
| 55 | + liveDetailsBeans.push({ | ||
| 56 | + relationId: item.relId, | ||
| 57 | + liveId: item.objectId, | ||
| 58 | + }); | ||
| 59 | + }); | ||
| 60 | + return liveDetailsBeans | ||
| 61 | + } | ||
| 62 | + | ||
| 14 | /** | 63 | /** |
| 15 | - * 直播回看的批查数据 | ||
| 16 | - * @param list | 64 | + * 请求获取直播房间的动态数据 |
| 17 | * @param compList | 65 | * @param compList |
| 18 | */ | 66 | */ |
| 19 | - getLiveRoomDataInfo(compList: CompDTO[]) { | 67 | + |
| 68 | + getLiveRoomDataInfo(compList: CompDTO[]) { | ||
| 20 | 69 | ||
| 21 | let list: ContentDTO[] = [] | 70 | let list: ContentDTO[] = [] |
| 22 | compList.forEach((comp: CompDTO) => { | 71 | compList.forEach((comp: CompDTO) => { |
| 23 | - list.push(...comp.operDataList) | 72 | + list.push(...comp.operDataList) |
| 24 | }) | 73 | }) |
| 25 | let time = DateTimeUtils.getTimeStamp().toString() | 74 | let time = DateTimeUtils.getTimeStamp().toString() |
| 26 | 75 | ||
| @@ -48,6 +97,7 @@ export class BasePageHelp { | @@ -48,6 +97,7 @@ export class BasePageHelp { | ||
| 48 | }).catch(() => { | 97 | }).catch(() => { |
| 49 | }) | 98 | }) |
| 50 | } | 99 | } |
| 100 | + | ||
| 51 | /** | 101 | /** |
| 52 | * 获取业务内容 objectId 集合穿 如1,2,3 | 102 | * 获取业务内容 objectId 集合穿 如1,2,3 |
| 53 | * @param pageContentList | 103 | * @param pageContentList |
| 1 | -import { CompDTO, ContentDTO } from 'wdBean/Index' | ||
| 2 | -import { LazyDataSource, Logger } from 'wdKit/Index' | 1 | +import { CompDTO, ContentDTO, ReserveItemBean } from 'wdBean/Index' |
| 2 | +import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource, Logger } from 'wdKit/Index' | ||
| 3 | import { CompParser } from '../../CompParser' | 3 | import { CompParser } from '../../CompParser' |
| 4 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' | 4 | import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh' |
| 5 | import { PeopleShipNoMoreData } from '../../reusable/PeopleShipNoMoreData' | 5 | import { PeopleShipNoMoreData } from '../../reusable/PeopleShipNoMoreData' |
| @@ -23,7 +23,6 @@ const TAG: string = 'TemplatePageComponent'; | @@ -23,7 +23,6 @@ const TAG: string = 'TemplatePageComponent'; | ||
| 23 | */ | 23 | */ |
| 24 | @Component | 24 | @Component |
| 25 | export default struct TemplatePageComponent { | 25 | export default struct TemplatePageComponent { |
| 26 | - | ||
| 27 | // 模板页面的数据驱动对象 | 26 | // 模板页面的数据驱动对象 |
| 28 | @State private templatePage: TemplatePageModel = new TemplatePageModel | 27 | @State private templatePage: TemplatePageModel = new TemplatePageModel |
| 29 | // 此内容主要因CustomPullToRefresh需要,目前没任何业务意义要求 | 28 | // 此内容主要因CustomPullToRefresh需要,目前没任何业务意义要求 |
| @@ -32,7 +31,7 @@ export default struct TemplatePageComponent { | @@ -32,7 +31,7 @@ export default struct TemplatePageComponent { | ||
| 32 | private templateScroller: Scroller = new Scroller() | 31 | private templateScroller: Scroller = new Scroller() |
| 33 | //识别不同页面的业务类型 | 32 | //识别不同页面的业务类型 |
| 34 | pageDataSourceType: string = '' | 33 | pageDataSourceType: string = '' |
| 35 | - | 34 | + @State listColor: Resource = $r('app.color.color_fff') |
| 36 | // 埋点字段 | 35 | // 埋点字段 |
| 37 | pageId: string = '' | 36 | pageId: string = '' |
| 38 | pageName: string = '' | 37 | pageName: string = '' |
| @@ -40,6 +39,38 @@ export default struct TemplatePageComponent { | @@ -40,6 +39,38 @@ export default struct TemplatePageComponent { | ||
| 40 | async aboutToAppear() { | 39 | async aboutToAppear() { |
| 41 | Logger.debug(TAG, 'aboutToAppear') | 40 | Logger.debug(TAG, 'aboutToAppear') |
| 42 | this.requestPageData() | 41 | this.requestPageData() |
| 42 | + | ||
| 43 | + // 登录成功 | ||
| 44 | + EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => { | ||
| 45 | + Logger.debug(TAG, 'receiveEvent-----LOGIN_SUCCESS----------') | ||
| 46 | + this.templatePage.isEmitter = true | ||
| 47 | + this.templatePage.currentPage = 1 | ||
| 48 | + this.requestPageData() | ||
| 49 | + }) | ||
| 50 | + | ||
| 51 | + // 获取预约 | ||
| 52 | + EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => { | ||
| 53 | + Logger.debug(TAG, 'receiveEvent LIVE_ROOM_SUBSCRIBE: ' + str) | ||
| 54 | + if (str) { | ||
| 55 | + // 跳转指定频道场景,传参底导id、频道id | ||
| 56 | + const model: ReserveItemBean = JSON.parse(str) | ||
| 57 | + Logger.debug(TAG, '是否关注元数据0:' + ` ${model.liveId}`) | ||
| 58 | + | ||
| 59 | + for (let compItem of this.templatePage.compList.getDataArray()) { | ||
| 60 | + let compBean = compItem as CompDTO | ||
| 61 | + if (compBean.operDataList && compBean.operDataList[0]) { | ||
| 62 | + let liveStr = new String(model.liveId) | ||
| 63 | + if (compBean.operDataList[0].objectId == liveStr) { | ||
| 64 | + compBean.operDataList[0].reserveItemBean.subscribe = model.subscribe | ||
| 65 | + let time = DateTimeUtils.getTimeStamp().toString() | ||
| 66 | + compBean.timestamp = time | ||
| 67 | + break | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + }) | ||
| 43 | } | 74 | } |
| 44 | 75 | ||
| 45 | aboutToDisappear(): void { | 76 | aboutToDisappear(): void { |
| @@ -51,6 +82,7 @@ export default struct TemplatePageComponent { | @@ -51,6 +82,7 @@ export default struct TemplatePageComponent { | ||
| 51 | this.LoadingLayout() | 82 | this.LoadingLayout() |
| 52 | } else if (this.templatePage.pageCompType === TemplatePageStateType.LOADED) { | 83 | } else if (this.templatePage.pageCompType === TemplatePageStateType.LOADED) { |
| 53 | 84 | ||
| 85 | + | ||
| 54 | CustomPullToRefresh({ | 86 | CustomPullToRefresh({ |
| 55 | alldata: this.pageData, | 87 | alldata: this.pageData, |
| 56 | scroller: this.templateScroller, | 88 | scroller: this.templateScroller, |
| @@ -63,7 +95,7 @@ export default struct TemplatePageComponent { | @@ -63,7 +95,7 @@ export default struct TemplatePageComponent { | ||
| 63 | this.templatePage.resolve = resolve | 95 | this.templatePage.resolve = resolve |
| 64 | this.requestPageData(resolve) | 96 | this.requestPageData(resolve) |
| 65 | }, | 97 | }, |
| 66 | - }) | 98 | + }).backgroundColor(this.listColor) |
| 67 | 99 | ||
| 68 | } else { | 100 | } else { |
| 69 | EmptyComponent({ | 101 | EmptyComponent({ |
| @@ -10,7 +10,12 @@ export class TemplatePageConstant { | @@ -10,7 +10,12 @@ export class TemplatePageConstant { | ||
| 10 | /** | 10 | /** |
| 11 | * 直播中 | 11 | * 直播中 |
| 12 | */ | 12 | */ |
| 13 | - public static LIVE_HORIZONTAL_CARD: string = "LIVE_HORIZONTAL_CARD" | 13 | + public static LIVE_HORIZONTAL_PAGE: string = "live_horizontal_page" |
| 14 | + | ||
| 15 | + /** | ||
| 16 | + * 直播预告 | ||
| 17 | + */ | ||
| 18 | + public static LIVE_PORTEND_PAGE :string = 'live_portend_page' | ||
| 14 | 19 | ||
| 15 | 20 | ||
| 16 | } | 21 | } |
| 1 | import { CompDTO } from 'wdBean/Index'; | 1 | import { CompDTO } from 'wdBean/Index'; |
| 2 | import { CompStyle } from 'wdConstant/Index'; | 2 | import { CompStyle } from 'wdConstant/Index'; |
| 3 | -import { NetworkUtil } from 'wdKit/Index'; | 3 | +import { DateTimeUtils, NetworkUtil } from 'wdKit/Index'; |
| 4 | import PageViewModel from '../../../viewmodel/PageViewModel'; | 4 | import PageViewModel from '../../../viewmodel/PageViewModel'; |
| 5 | import { WDViewDefaultType } from '../../view/EmptyComponent'; | 5 | import { WDViewDefaultType } from '../../view/EmptyComponent'; |
| 6 | import { BasePageHelp } from './BasePageHelp'; | 6 | import { BasePageHelp } from './BasePageHelp'; |
| @@ -51,9 +51,16 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -51,9 +51,16 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 51 | */ | 51 | */ |
| 52 | private treatDiffBusinessDataSource() { | 52 | private treatDiffBusinessDataSource() { |
| 53 | 53 | ||
| 54 | - if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_HORIZONTAL_CARD) { | 54 | + if (this.pageModel.isLoading) { |
| 55 | + return | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_HORIZONTAL_PAGE) { | ||
| 55 | // 直播列表 | 59 | // 直播列表 |
| 56 | this.requestLiveListData(this.pageModel.resolve) | 60 | this.requestLiveListData(this.pageModel.resolve) |
| 61 | + } else if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_PORTEND_PAGE) { | ||
| 62 | + // 直播预告 | ||
| 63 | + this.requestLivePortendData(this.pageModel.resolve) | ||
| 57 | } | 64 | } |
| 58 | 65 | ||
| 59 | } | 66 | } |
| @@ -76,21 +83,22 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -76,21 +83,22 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 76 | this.pageModel.hasMore = false | 83 | this.pageModel.hasMore = false |
| 77 | } | 84 | } |
| 78 | 85 | ||
| 79 | - | ||
| 80 | // 依据业务请求获取的数据,转换成compDTO数据 | 86 | // 依据业务请求获取的数据,转换成compDTO数据 |
| 87 | + let time = DateTimeUtils.getTimeStamp().toString() | ||
| 81 | let pageContentList: CompDTO[] = [] // 收集页面组件、稿件和本地组件容器 | 88 | let pageContentList: CompDTO[] = [] // 收集页面组件、稿件和本地组件容器 |
| 82 | for (let contentDto of liveReviewDTO.list) { | 89 | for (let contentDto of liveReviewDTO.list) { |
| 83 | let compDTO: CompDTO = new CompDTO() | 90 | let compDTO: CompDTO = new CompDTO() |
| 84 | compDTO.compType = 'appStyle' | 91 | compDTO.compType = 'appStyle' |
| 85 | contentDto.appStyle = CompStyle.Card_Comp_Live_Big_Image_02 | 92 | contentDto.appStyle = CompStyle.Card_Comp_Live_Big_Image_02 |
| 93 | + if (this.pageModel.isEmitter) { | ||
| 94 | + contentDto.timestamp = time | ||
| 95 | + } | ||
| 86 | compDTO.operDataList.push(contentDto) | 96 | compDTO.operDataList.push(contentDto) |
| 87 | pageContentList.push(compDTO) | 97 | pageContentList.push(compDTO) |
| 88 | } | 98 | } |
| 89 | 99 | ||
| 90 | // 推送数据到懒加载机制 | 100 | // 推送数据到懒加载机制 |
| 91 | this.pushDataToPage(pageContentList) | 101 | this.pushDataToPage(pageContentList) |
| 92 | - // 完成业务请求加载 | ||
| 93 | - this.pageModel.isLoading = false | ||
| 94 | // 批查 | 102 | // 批查 |
| 95 | this.allCompBatchRequest(pageContentList) | 103 | this.allCompBatchRequest(pageContentList) |
| 96 | 104 | ||
| @@ -104,10 +112,66 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -104,10 +112,66 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 104 | } | 112 | } |
| 105 | 113 | ||
| 106 | this.resolveEnd(resolve) | 114 | this.resolveEnd(resolve) |
| 115 | + // 完成业务请求加载 | ||
| 116 | + this.pageModel.isLoading = false | ||
| 107 | } | 117 | } |
| 108 | 118 | ||
| 109 | 119 | ||
| 110 | /** | 120 | /** |
| 121 | + * 请求直播预告数据 | ||
| 122 | + */ | ||
| 123 | + private async requestLivePortendData(resolve?: (value: string | PromiseLike<string>) => void) { | ||
| 124 | + | ||
| 125 | + this.pageModel.isLoading = true | ||
| 126 | + | ||
| 127 | + const liveReviewDTO = await PageViewModel.getLiveMoreUrl(2, this.pageModel.currentPage, this.pageModel.pageSize) | ||
| 128 | + | ||
| 129 | + if (liveReviewDTO && liveReviewDTO.list && liveReviewDTO.list.length > 0) { | ||
| 130 | + | ||
| 131 | + if (liveReviewDTO.list.length === this.pageModel.pageSize) { | ||
| 132 | + this.pageModel.hasMore = true | ||
| 133 | + } else { | ||
| 134 | + this.pageModel.hasMore = false | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + // 依据业务请求获取的数据,转换成compDTO数据 | ||
| 138 | + let time = DateTimeUtils.getTimeStamp().toString() | ||
| 139 | + let pageContentList: CompDTO[] = [] // 收集页面组件、稿件和本地组件容器 | ||
| 140 | + for (let contentDto of liveReviewDTO.list) { | ||
| 141 | + let compDTO: CompDTO = new CompDTO() | ||
| 142 | + compDTO.compType = 'appStyle' | ||
| 143 | + contentDto.appStyle = CompStyle.Card_Comp_Live_Big_Image_01 | ||
| 144 | + if (this.pageModel.isEmitter) { | ||
| 145 | + contentDto.timestamp = time | ||
| 146 | + } | ||
| 147 | + compDTO.operDataList.push(contentDto) | ||
| 148 | + | ||
| 149 | + pageContentList.push(compDTO) | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + // 推送数据到懒加载机制 | ||
| 153 | + this.pushDataToPage(pageContentList) | ||
| 154 | + | ||
| 155 | + // 批查直播预约状态 | ||
| 156 | + this.getAppointmentInfo(pageContentList) | ||
| 157 | + | ||
| 158 | + | ||
| 159 | + } else { | ||
| 160 | + | ||
| 161 | + this.pageModel.hasMore = false | ||
| 162 | + if (this.pageModel.currentPage === 1) { | ||
| 163 | + // 无业务数据 | ||
| 164 | + this.pageNoHaveData() | ||
| 165 | + } | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + this.resolveEnd(resolve) | ||
| 169 | + | ||
| 170 | + // 完成业务请求加载 | ||
| 171 | + this.pageModel.isLoading = false | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + /** | ||
| 111 | * 处理页面批查业务方法 | 175 | * 处理页面批查业务方法 |
| 112 | * @param list | 176 | * @param list |
| 113 | */ | 177 | */ |
| @@ -116,21 +180,6 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -116,21 +180,6 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 116 | // 获取直播房间的动态数据 | 180 | // 获取直播房间的动态数据 |
| 117 | this.getLiveRoomDataInfo(compList) | 181 | this.getLiveRoomDataInfo(compList) |
| 118 | 182 | ||
| 119 | - // 测试数据 | ||
| 120 | - // setTimeout(() => { | ||
| 121 | - // let time = DateTimeUtils.getTimeStamp().toString() | ||
| 122 | - // let index = 1 | ||
| 123 | - // let compBean = compList[index] as CompDTO | ||
| 124 | - // let contentBean = compBean.operDataList[0] | ||
| 125 | - // contentBean.newsTitle = '熬阿斯蒂芬' | ||
| 126 | - // //comp.operDataList[0].newsTitle = '测试111' | ||
| 127 | - // let liveRoomBean: LiveRoomDataBean = {} as LiveRoomDataBean; | ||
| 128 | - // liveRoomBean.pv = 6555 | ||
| 129 | - // contentBean.liveRoomDataBean = liveRoomBean | ||
| 130 | - // compBean.timestamp = time | ||
| 131 | - // Logger.debug("ZZZXXXXX", | ||
| 132 | - // "-----setTimeout--------->" + time) | ||
| 133 | - // }, 4 * 1000) | ||
| 134 | } | 183 | } |
| 135 | 184 | ||
| 136 | 185 | ||
| @@ -145,11 +194,11 @@ export class TemplatePageHelp extends BasePageHelp { | @@ -145,11 +194,11 @@ export class TemplatePageHelp extends BasePageHelp { | ||
| 145 | this.pageModel.compList.clear() | 194 | this.pageModel.compList.clear() |
| 146 | } | 195 | } |
| 147 | // 懒加载,推送数据 | 196 | // 懒加载,推送数据 |
| 148 | - for (let contentDto of pageContentList) { | ||
| 149 | - this.pageModel.compList.push(contentDto) | ||
| 150 | - } | 197 | + this.pageModel.compList.push(...pageContentList) |
| 151 | //完成业务数据请求 | 198 | //完成业务数据请求 |
| 152 | this.pageModel.pageCompType = TemplatePageStateType.LOADED | 199 | this.pageModel.pageCompType = TemplatePageStateType.LOADED |
| 200 | + this.pageModel.haveDataShow = true | ||
| 201 | + | ||
| 153 | } | 202 | } |
| 154 | 203 | ||
| 155 | 204 |
| @@ -21,16 +21,18 @@ export default class TemplatePageModel { | @@ -21,16 +21,18 @@ export default class TemplatePageModel { | ||
| 21 | * 识别不同页面的业务类型 | 21 | * 识别不同页面的业务类型 |
| 22 | */ | 22 | */ |
| 23 | pageDataSourceType: string = '' | 23 | pageDataSourceType: string = '' |
| 24 | - | ||
| 25 | // 页码 | 24 | // 页码 |
| 26 | currentPage: number = 1 | 25 | currentPage: number = 1 |
| 27 | // 一页最多信息量 | 26 | // 一页最多信息量 |
| 28 | pageSize: number = 20 | 27 | pageSize: number = 20 |
| 29 | // 是否支持加载更多数据 | 28 | // 是否支持加载更多数据 |
| 30 | - hasMore:boolean = false | 29 | + hasMore: boolean = false |
| 31 | // 是否正在请求数据 | 30 | // 是否正在请求数据 |
| 32 | isLoading: boolean = false | 31 | isLoading: boolean = false |
| 33 | - | 32 | + // 页面已有数据展示 |
| 33 | + haveDataShow: boolean = false | ||
| 34 | + // 接收Emitter事件,需要刷新界面,此时就需要对展示业务进行驱动更新 | ||
| 35 | + isEmitter: boolean = false | ||
| 34 | /** | 36 | /** |
| 35 | * 此字段可驱动组件展示不同业务的组件, | 37 | * 此字段可驱动组件展示不同业务的组件, |
| 36 | */ | 38 | */ |
| @@ -39,6 +41,5 @@ export default class TemplatePageModel { | @@ -39,6 +41,5 @@ export default class TemplatePageModel { | ||
| 39 | * 异常状态 ——> 记录在获取数据中的不同状态,如无数据、无网络等情况 | 41 | * 异常状态 ——> 记录在获取数据中的不同状态,如无数据、无网络等情况 |
| 40 | */ | 42 | */ |
| 41 | noNormalState: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default | 43 | noNormalState: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default |
| 42 | - | ||
| 43 | resolve?: (value: string | PromiseLike<string>) => void | 44 | resolve?: (value: string | PromiseLike<string>) => void |
| 44 | } | 45 | } |
| @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio | ||
| 25 | import { CardParser } from '../CardParser' | 25 | import { CardParser } from '../CardParser' |
| 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; | 26 | import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; |
| 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; | 27 | import PageFollowHelper from '../../viewmodel/PageFollowHelper'; |
| 28 | +import { MineFollowListItem } from '../../viewmodel/MineFollowListItem'; | ||
| 28 | 29 | ||
| 29 | const TAG = 'PeopleShipMainComponent'; | 30 | const TAG = 'PeopleShipMainComponent'; |
| 30 | 31 | ||
| @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent { | ||
| 228 | this.followList = [] | 229 | this.followList = [] |
| 229 | this.getRmhRecommendInfo(resolve) | 230 | this.getRmhRecommendInfo(resolve) |
| 230 | } else { | 231 | } else { |
| 231 | - this.followList = [] | ||
| 232 | - this.followList.push(...followInfo.list) | ||
| 233 | - this.attentionList = [] | 232 | + |
| 234 | this.currentPage = 1 | 233 | this.currentPage = 1 |
| 235 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) | 234 | this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) |
| 236 | - this.getAttentionContentListData(resolve) | 235 | + this.getAttentionContentListData(resolve,followInfo) |
| 237 | } | 236 | } |
| 238 | } else { | 237 | } else { |
| 239 | this.followList = [] | 238 | this.followList = [] |
| @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent { | ||
| 273 | } | 272 | } |
| 274 | 273 | ||
| 275 | // 获取关注 | 274 | // 获取关注 |
| 276 | - private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void) { | 275 | + private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 277 | if (this.isLoading && this.currentPage != 1) { | 276 | if (this.isLoading && this.currentPage != 1) { |
| 278 | if (resolve) { | 277 | if (resolve) { |
| 279 | resolve('') | 278 | resolve('') |
| @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent { | ||
| 291 | } else { | 290 | } else { |
| 292 | this.hasMore = false; | 291 | this.hasMore = false; |
| 293 | } | 292 | } |
| 294 | - if (this.currentPage == 1) { | ||
| 295 | - this.attentionList = [] | ||
| 296 | - } | 293 | + |
| 297 | //批量查询各类型内容动态数据接口 | 294 | //批量查询各类型内容动态数据接口 |
| 298 | - this.checkContentInteractData(listData.list, resolve) | 295 | + this.checkContentInteractData(listData.list, resolve,myFollowInfor) |
| 299 | } else { | 296 | } else { |
| 300 | this.hasMore = false; | 297 | this.hasMore = false; |
| 301 | this.resolveEnd(true, resolve) | 298 | this.resolveEnd(true, resolve) |
| @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent { | ||
| 307 | } | 304 | } |
| 308 | 305 | ||
| 309 | // 批量查询各类型内容动态数据接口 | 306 | // 批量查询各类型内容动态数据接口 |
| 310 | - private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void) { | 307 | + private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) { |
| 311 | // 批量查询内容当前用户点赞、收藏状态 | 308 | // 批量查询内容当前用户点赞、收藏状态 |
| 312 | try { | 309 | try { |
| 313 | // 获取列表数据 | 310 | // 获取列表数据 |
| @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent { | ||
| 324 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) | 321 | let listData = await PeopleShipMainViewModel.getContentInteractInfo(params) |
| 325 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) | 322 | Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`) |
| 326 | this.resolveEnd(true, resolve) | 323 | this.resolveEnd(true, resolve) |
| 324 | + | ||
| 325 | + if (this.currentPage == 1) { | ||
| 326 | + this.attentionList = [] | ||
| 327 | + this.followList = [] | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + if(myFollowInfor){ | ||
| 331 | + this.followList.push(...myFollowInfor.list) | ||
| 332 | + } | ||
| 327 | list.forEach((element: ContentDTO) => { | 333 | list.forEach((element: ContentDTO) => { |
| 328 | // 获取 interactData 数据 | 334 | // 获取 interactData 数据 |
| 329 | if (listData && listData.length > 0) { | 335 | if (listData && listData.length > 0) { |
| 1 | -import { ContentDTO, ReserveBean, ReserveItemBean } from 'wdBean/Index'; | ||
| 2 | -import { ProcessUtils } from 'wdRouter/Index'; | ||
| 3 | -import PageViewModel from '../../viewmodel/PageViewModel'; | ||
| 4 | -import { Logger, EmitterEventId, EmitterUtils, ToastUtils } from 'wdKit/Index'; | ||
| 5 | -import { router } from '@kit.ArkUI'; | ||
| 6 | -import { LiveModel } from '../../viewmodel/LiveModel'; | ||
| 7 | -import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType'; | ||
| 8 | -import { EmptyComponent } from '../view/EmptyComponent'; | ||
| 9 | -import { ErrorComponent } from '../view/ErrorComponent'; | ||
| 10 | -import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh'; | ||
| 11 | -import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData'; | ||
| 12 | -import { HttpUtils } from 'wdNetwork/Index'; | ||
| 13 | -import { WDRouterPage, WDRouterRule } from 'wdRouter' | ||
| 14 | -import { LazyDataSource } from 'wdKit/Index'; | ||
| 15 | -import LoadMoreLayout from '../page/LoadMoreLayout' | ||
| 16 | -import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | ||
| 17 | -import { TrackConstants, Tracking, TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index'; | 1 | +import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 2 | +import CommonPageTitle from '../page/CommonPageTitle'; | ||
| 3 | +import TemplatePageComponent from '../page/template/TemplatePageComponent'; | ||
| 4 | +import { TemplatePageConstant } from '../page/template/TemplatePageConstant'; | ||
| 18 | 5 | ||
| 19 | const TAG: string = 'ReserveMorePage'; | 6 | const TAG: string = 'ReserveMorePage'; |
| 20 | 7 | ||
| @@ -29,58 +16,27 @@ const TAG: string = 'ReserveMorePage'; | @@ -29,58 +16,27 @@ const TAG: string = 'ReserveMorePage'; | ||
| 29 | @Entry | 16 | @Entry |
| 30 | @Component | 17 | @Component |
| 31 | struct ReserveMorePage { | 18 | struct ReserveMorePage { |
| 32 | - @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | ||
| 33 | - private reserveList: ReserveItemBean[] = [] | ||
| 34 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | 19 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; |
| 35 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 20 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 36 | - type: number = 2; | ||
| 37 | - pageSize: number = 20; | ||
| 38 | title: string = '直播预告' | 21 | title: string = '直播预告' |
| 39 | - //是否预约过直播 | ||
| 40 | - @State isAppointmentLive: boolean = false | ||
| 41 | - @State contentDTO: ContentDTO = {} as ContentDTO; | ||
| 42 | - @State private hasMore: boolean = true | ||
| 43 | - @State private currentPage: number = 1 | ||
| 44 | - @State private isLoading: boolean = false | ||
| 45 | - @State viewType: ViewType = ViewType.LOADING | ||
| 46 | - private scroller: Scroller = new Scroller() | ||
| 47 | - @State reservedIds: string[] = [] | ||
| 48 | - @State isShow: boolean = false | ||
| 49 | - @State private liveId: string = '' | ||
| 50 | - @State isLoadingAttention: boolean = false | ||
| 51 | - @State loadImg: boolean = false; | 22 | + |
| 52 | private pageId: string = TrackConstants.PageName.Live_Appointment_List | 23 | private pageId: string = TrackConstants.PageName.Live_Appointment_List |
| 53 | private pageName: string = TrackConstants.PageName.Live_Appointment_List | 24 | private pageName: string = TrackConstants.PageName.Live_Appointment_List |
| 54 | private pageShowStartTime: number = 0 | 25 | private pageShowStartTime: number = 0 |
| 55 | 26 | ||
| 56 | build() { | 27 | build() { |
| 57 | Column() { | 28 | Column() { |
| 58 | - this.TabbarNormal() | ||
| 59 | - if (this.viewType == ViewType.LOADING) { | ||
| 60 | - this.LoadingLayout() | ||
| 61 | - } else if (this.viewType == ViewType.ERROR) { | ||
| 62 | - ErrorComponent() | ||
| 63 | - .onTouch(() => { | ||
| 64 | - if (this.viewType === ViewType.ERROR) { | ||
| 65 | - this.getData() | ||
| 66 | - } | ||
| 67 | - }) | ||
| 68 | - } else if (this.viewType == ViewType.EMPTY) { | ||
| 69 | - EmptyComponent() | ||
| 70 | - } else { | ||
| 71 | - CustomPullToRefresh({ | ||
| 72 | - alldata: this.data, | ||
| 73 | - scroller: this.scroller, | ||
| 74 | - hasMore: false, | ||
| 75 | - customList: () => { | ||
| 76 | - this.ListLayout() | ||
| 77 | - }, | ||
| 78 | - onRefresh: (resolve) => { | ||
| 79 | - this.currentPage = 1 | ||
| 80 | - this.getData(resolve) | ||
| 81 | - }, | ||
| 82 | - }).backgroundColor($r('app.color.color_F5F5F5')) | ||
| 83 | - } | 29 | + |
| 30 | + //常见标题 | ||
| 31 | + CommonPageTitle({ title: this.title }) | ||
| 32 | + // 通用模板组件 | ||
| 33 | + TemplatePageComponent({ | ||
| 34 | + pageDataSourceType: TemplatePageConstant.LIVE_PORTEND_PAGE, | ||
| 35 | + listColor: $r('app.color.color_F5F5F5'), | ||
| 36 | + pageId: this.pageId, | ||
| 37 | + pageName: this.pageName | ||
| 38 | + }) | ||
| 39 | + | ||
| 84 | 40 | ||
| 85 | }.height('100%').backgroundColor('#FFFFFF').padding({ | 41 | }.height('100%').backgroundColor('#FFFFFF').padding({ |
| 86 | top: px2vp(this.topSafeHeight), | 42 | top: px2vp(this.topSafeHeight), |
| @@ -93,300 +49,9 @@ struct ReserveMorePage { | @@ -93,300 +49,9 @@ struct ReserveMorePage { | ||
| 93 | LoadingLayout() { | 49 | LoadingLayout() { |
| 94 | } | 50 | } |
| 95 | 51 | ||
| 96 | - @Builder | ||
| 97 | - ListLayout() { | ||
| 98 | - List({ scroller: this.scroller }) { | ||
| 99 | - // 下拉刷新 | ||
| 100 | - LazyForEach(this.data, (contentDTO: ContentDTO, index: number) => { | ||
| 101 | - ListItem() { | ||
| 102 | - this.buildItem(contentDTO, index) | ||
| 103 | - } | ||
| 104 | - }, | ||
| 105 | - (contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString() | ||
| 106 | - ) | ||
| 107 | - // 加载更多 | ||
| 108 | - ListItem() { | ||
| 109 | - if (this.hasMore && this.data && this.data.totalCount() > 0) { | ||
| 110 | - LoadMoreLayout({ isVisible: this.hasMore }) | ||
| 111 | - } else if (!this.hasMore && !this.isLoading) { | ||
| 112 | - PeopleShipNoMoreData() | ||
| 113 | - } | ||
| 114 | - } | ||
| 115 | - } | ||
| 116 | - .cachedCount(8) | ||
| 117 | - .edgeEffect(EdgeEffect.None) | ||
| 118 | - .scrollBar(BarState.Off) | ||
| 119 | - .backgroundColor('#F5F5F5') | ||
| 120 | - .height('calc(100% - 44vp)') | ||
| 121 | - .onReachEnd(() => { | ||
| 122 | - Logger.debug(TAG, "触底了"); | ||
| 123 | - if (!this.isLoading && this.hasMore) { | ||
| 124 | - //加载分页数据 | ||
| 125 | - this.currentPage++; | ||
| 126 | - this.getData() | ||
| 127 | - } | ||
| 128 | - }) | ||
| 129 | - } | ||
| 130 | - | ||
| 131 | - /** | ||
| 132 | - * 组件项 | ||
| 133 | - * | ||
| 134 | - * @param programmeBean item 组件项, 上面icon,下面标题 | ||
| 135 | - */ | ||
| 136 | - @Builder | ||
| 137 | - buildItem(item: ContentDTO, index: number) { | ||
| 138 | - Column() { | ||
| 139 | - Stack() { | ||
| 140 | - Image(this.loadImg ? item.fullColumnImgUrls[0]?.url : '') | ||
| 141 | - .width('100%') | ||
| 142 | - .aspectRatio(16 / 9) | ||
| 143 | - .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : $r('app.color.color_33A3A3A3')) | ||
| 144 | - .objectFit(ImageFit.Contain) | ||
| 145 | - .borderWidth(0.5) | ||
| 146 | - .borderColor($r('app.color.color_0D000000')) | ||
| 147 | - .borderRadius({ | ||
| 148 | - topLeft: '4vp', | ||
| 149 | - topRight: '4vp' | ||
| 150 | - }) | ||
| 151 | - this.LiveImage() | ||
| 152 | - | ||
| 153 | - } | ||
| 154 | - .alignContent(Alignment.BottomEnd) | ||
| 155 | - | ||
| 156 | - Text(item.newsTitle) | ||
| 157 | - .fontSize(17) | ||
| 158 | - .maxLines(2) | ||
| 159 | - .lineHeight(25) | ||
| 160 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 161 | - .margin({ top: 4, left: 12, right: 12 }) | ||
| 162 | - .alignSelf(ItemAlign.Start) | ||
| 163 | - Row() { | ||
| 164 | - if (item.liveInfo && item.liveInfo.liveStartTime) { | ||
| 165 | - Row() { | ||
| 166 | - Image($r('app.media.reserve_play_icon')) | ||
| 167 | - .width(20) | ||
| 168 | - .height(20) | ||
| 169 | - .margin({ | ||
| 170 | - left: 10, | ||
| 171 | - top: 2, | ||
| 172 | - bottom: 2, | ||
| 173 | - right: 6 | ||
| 174 | - }) | ||
| 175 | - | ||
| 176 | - Text(this.getReserveDate(item.liveInfo.liveStartTime, 1)) | ||
| 177 | - .fontSize(12) | ||
| 178 | - .fontWeight(500) | ||
| 179 | - .fontColor('#ED2800') | ||
| 180 | - .fontFamily('PingFang SC-Medium') | ||
| 181 | - .maxLines(1) | ||
| 182 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 183 | - .margin({ top: 8, bottom: 8 }) | ||
| 184 | - .align(Alignment.Start) | ||
| 185 | - | ||
| 186 | - Image($r('app.media.point_icon')) | ||
| 187 | - .objectFit(ImageFit.Auto) | ||
| 188 | - .interpolation(ImageInterpolation.High) | ||
| 189 | - .width(6) | ||
| 190 | - .height(16) | ||
| 191 | - .margin(2) | ||
| 192 | - | ||
| 193 | - Text(this.getReserveDate(item.liveInfo.liveStartTime, 2)) | ||
| 194 | - .fontSize(12) | ||
| 195 | - .fontWeight(500) | ||
| 196 | - .fontColor('#ED2800') | ||
| 197 | - .fontFamily('PingFang SC-Medium') | ||
| 198 | - .maxLines(1) | ||
| 199 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 200 | - .margin({ top: 8, bottom: 8, right: 10 }) | ||
| 201 | - .align(Alignment.Start) | ||
| 202 | - } | ||
| 203 | - .backgroundColor('#F5F5F5') | ||
| 204 | - .margin(12) | ||
| 205 | - } | ||
| 206 | - // 预约 | ||
| 207 | - Row() { | ||
| 208 | - LoadingProgress() | ||
| 209 | - .width(20) | ||
| 210 | - .height(20) | ||
| 211 | - .color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) | ||
| 212 | - .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible : | ||
| 213 | - Visibility.None) | ||
| 214 | - | ||
| 215 | - Text(!this.isReserved(item) ? '预约' : '已预约') | ||
| 216 | - .fontSize($r('app.float.vp_12')) | ||
| 217 | - .fontWeight(500) | ||
| 218 | - .fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC')) | ||
| 219 | - .width('100%') | ||
| 220 | - .height('100%') | ||
| 221 | - .textAlign(TextAlign.Center) | ||
| 222 | - .visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.None : | ||
| 223 | - Visibility.Visible) | ||
| 224 | - .margin({ | ||
| 225 | - right: '10vp' | ||
| 226 | - }) | ||
| 227 | - .textShadow({ | ||
| 228 | - radius: 2, | ||
| 229 | - color: 'rgba(0,0,0,0.3)', | ||
| 230 | - offsetY: 2 | ||
| 231 | - }) | ||
| 232 | - .backgroundColor(!this.isReserved(item) ? $r('app.color.color_ED2800') : $r('app.color.color_F5F5F5')) | ||
| 233 | - .borderRadius(3) | ||
| 234 | - | ||
| 235 | - } | ||
| 236 | - .onClick(() => { | ||
| 237 | - this.bookAndCancel(item) | ||
| 238 | - }) | ||
| 239 | - .justifyContent(FlexAlign.Center) | ||
| 240 | - .alignItems(VerticalAlign.Center) | ||
| 241 | - .borderRadius(3) | ||
| 242 | - .width('52vp') | ||
| 243 | - .height('24vp') | ||
| 244 | - .margin({ right: 12 }) | ||
| 245 | - | ||
| 246 | - } | ||
| 247 | - .width('100%') | ||
| 248 | - .justifyContent(FlexAlign.SpaceBetween) | ||
| 249 | - | ||
| 250 | - } | ||
| 251 | - .borderRadius(4) | ||
| 252 | - .backgroundColor(Color.White) | ||
| 253 | - .width('calc(100% - 24vp)') | ||
| 254 | - .margin({ | ||
| 255 | - left: '12vp', | ||
| 256 | - right: '12vp', | ||
| 257 | - top: index == 0 ? '12vp' : '8vp' | ||
| 258 | - }) | ||
| 259 | - .onClick(() => { | ||
| 260 | - | ||
| 261 | - // 内容点击埋点 | ||
| 262 | - TrackingContent.common(TrackConstants.EventType.Click, | ||
| 263 | - item.pageId, | ||
| 264 | - item.pageId, | ||
| 265 | - TrackParamConvert.program(item)) | ||
| 266 | - | ||
| 267 | - ProcessUtils.processPage(item) | ||
| 268 | - }) | ||
| 269 | - .onVisibleAreaChange([0, 1], (isVisiable: boolean, ratio: number) => { | ||
| 270 | - if (isVisiable) { | ||
| 271 | - // 内容曝光埋点 | ||
| 272 | - TrackingContent.common(TrackConstants.EventType.Show, | ||
| 273 | - item.pageId, | ||
| 274 | - item.pageId, | ||
| 275 | - TrackParamConvert.program(item)) | ||
| 276 | - } | ||
| 277 | - }) | ||
| 278 | - } | ||
| 279 | - | ||
| 280 | - /*导航栏*/ | ||
| 281 | - @Builder | ||
| 282 | - TabbarNormal() { | ||
| 283 | - RelativeContainer() { | ||
| 284 | - //标题栏目 | ||
| 285 | - Image($r('app.media.icon_arrow_left')) | ||
| 286 | - .width(24) | ||
| 287 | - .height(24) | ||
| 288 | - .objectFit(ImageFit.Auto) | ||
| 289 | - .id("back_icon") | ||
| 290 | - .margin({ | ||
| 291 | - left: '16vp' | ||
| 292 | - }) | ||
| 293 | - .alignRules({ | ||
| 294 | - center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 295 | - left: { anchor: "__container__", align: HorizontalAlign.Start } | ||
| 296 | - }) | ||
| 297 | - .onClick(() => { | ||
| 298 | - router.back() | ||
| 299 | - }) | ||
| 300 | - | ||
| 301 | - Text(this.title)// .height('42lpx') | ||
| 302 | - .maxLines(1) | ||
| 303 | - .id("title") | ||
| 304 | - .fontSize('18vp') | ||
| 305 | - .fontWeight(400) | ||
| 306 | - .fontColor($r('app.color.color_222222')) | ||
| 307 | - .lineHeight('22vp') | ||
| 308 | - .alignRules({ | ||
| 309 | - center: { anchor: "__container__", align: VerticalAlign.Center }, | ||
| 310 | - middle: { anchor: "__container__", align: HorizontalAlign.Center } | ||
| 311 | - }) | ||
| 312 | - } | ||
| 313 | - .height(44) | ||
| 314 | - .width('100%').backgroundColor('#FFFFFF') | ||
| 315 | - | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - @Builder | ||
| 319 | - LiveImage() { | ||
| 320 | - Row() { | ||
| 321 | - Image($r('app.media.reserve_new_icon')) | ||
| 322 | - .width(14) | ||
| 323 | - .height(14) | ||
| 324 | - .margin({ | ||
| 325 | - right: 3 | ||
| 326 | - }) | ||
| 327 | - Text('预约') | ||
| 328 | - .fontSize('12vp') | ||
| 329 | - .fontWeight(400) | ||
| 330 | - .fontColor(Color.White) | ||
| 331 | - .textShadow({ | ||
| 332 | - radius: 2, | ||
| 333 | - color: 'rgba(0,0,0,0.3)', | ||
| 334 | - offsetY: 2 | ||
| 335 | - }) | ||
| 336 | - } | ||
| 337 | - .backgroundColor(Color.Transparent) | ||
| 338 | - .margin({ right: 8, bottom: 8 }) | ||
| 339 | - } | ||
| 340 | - | ||
| 341 | - async aboutToAppear(): Promise<void> { | ||
| 342 | - this.loadImg = await onlyWifiLoadImg(); | ||
| 343 | - // PageViewModel.get | ||
| 344 | - this.currentPage = 1 | ||
| 345 | - this.getData() | ||
| 346 | - // 登录成功 | ||
| 347 | - EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => { | ||
| 348 | - this.currentPage = 1 | ||
| 349 | - this.getData() | ||
| 350 | - }) | ||
| 351 | - | ||
| 352 | - // 获取预约 | ||
| 353 | - EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => { | ||
| 354 | - Logger.debug(TAG, 'receiveEvent LIVE_ROOM_SUBSCRIBE: ' + str) | ||
| 355 | - if (str) { | ||
| 356 | - // 跳转指定频道场景,传参底导id、频道id | ||
| 357 | - const model: ReserveItemBean = JSON.parse(str) | ||
| 358 | - Logger.debug(TAG, '是否关注元数据0:' + ` ${model.liveId}`) | ||
| 359 | - if (model && model.liveId && this.reserveList) { | ||
| 360 | - // 修改源数据 | ||
| 361 | - this.reserveList.forEach((element) => { | ||
| 362 | - if (element.liveId == model.liveId) { | ||
| 363 | - if (element && element.subscribe != model.subscribe) { | ||
| 364 | - Logger.debug(TAG, '是否关注元数据2:' + ` ${JSON.stringify(element.subscribe)}`) | ||
| 365 | - element.subscribe = !element.subscribe | ||
| 366 | - Logger.debug(TAG, '是否关注元数据3:' + ` ${JSON.stringify(element.subscribe)}`) | ||
| 367 | - this.isShow = true | ||
| 368 | - if (element.subscribe) { | ||
| 369 | - this.reservedIds.push(element.liveId.toString()) | ||
| 370 | - } else { | ||
| 371 | - const num = this.reservedIds.indexOf(element.liveId.toString()) | ||
| 372 | - if (num >= 0 && num < this.reservedIds.length) { | ||
| 373 | - this.reservedIds.splice(num, 1) | ||
| 374 | - } | ||
| 375 | - } | ||
| 376 | - } | ||
| 377 | - } | ||
| 378 | - }) | ||
| 379 | - } | ||
| 380 | - } | ||
| 381 | - }) | ||
| 382 | - } | ||
| 383 | 52 | ||
| 384 | onPageShow(): void { | 53 | onPageShow(): void { |
| 385 | this.pageShowStartTime = Date.now() | 54 | this.pageShowStartTime = Date.now() |
| 386 | - if (this.isShow) { | ||
| 387 | - this.data.reloadData() | ||
| 388 | - this.isShow = false | ||
| 389 | - } | ||
| 390 | } | 55 | } |
| 391 | 56 | ||
| 392 | onPageHide(): void { | 57 | onPageHide(): void { |
| @@ -394,221 +59,4 @@ struct ReserveMorePage { | @@ -394,221 +59,4 @@ struct ReserveMorePage { | ||
| 394 | TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId, this.pageName, duration) | 59 | TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId, this.pageName, duration) |
| 395 | } | 60 | } |
| 396 | 61 | ||
| 397 | - private async getData(resolve?: (value: string | PromiseLike<string>) => void) { | ||
| 398 | - if (this.isLoading) { | ||
| 399 | - if (resolve) { | ||
| 400 | - resolve('已更新至最新') | ||
| 401 | - } | ||
| 402 | - return | ||
| 403 | - } | ||
| 404 | - this.isLoading = true | ||
| 405 | - try { | ||
| 406 | - const liveReviewDTO = await PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize) | ||
| 407 | - | ||
| 408 | - if (liveReviewDTO && liveReviewDTO.list && liveReviewDTO.list.length > 0) { | ||
| 409 | - if (liveReviewDTO.list.length === this.pageSize) { | ||
| 410 | - this.hasMore = true; | ||
| 411 | - } else { | ||
| 412 | - this.hasMore = false; | ||
| 413 | - } | ||
| 414 | - if (this.currentPage == 1) { | ||
| 415 | - this.data.clear() | ||
| 416 | - this.reserveList = [] | ||
| 417 | - this.reservedIds = [] | ||
| 418 | - } | ||
| 419 | - | ||
| 420 | - liveReviewDTO.list.forEach((content) => { | ||
| 421 | - content.pageId = this.pageId | ||
| 422 | - }) | ||
| 423 | - this.data.push(...liveReviewDTO.list) | ||
| 424 | - //批量查询关注状态 | ||
| 425 | - this.getAppointmentInfo(liveReviewDTO.list) | ||
| 426 | - } else { | ||
| 427 | - this.hasMore = false; | ||
| 428 | - } | ||
| 429 | - this.resolveEnd(true, resolve) | ||
| 430 | - if (liveReviewDTO.list.length == 0 && this.currentPage == 1) { | ||
| 431 | - this.viewType = ViewType.EMPTY | ||
| 432 | - } | ||
| 433 | - } catch (exception) { | ||
| 434 | - this.resolveEnd(false, resolve) | ||
| 435 | - } | ||
| 436 | - // PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => { | ||
| 437 | - // // this.operDataList = [] | ||
| 438 | - // // this.operDataList.push(...liveReviewDTO.list) | ||
| 439 | - // this.data.push(...liveReviewDTO.list) | ||
| 440 | - // | ||
| 441 | - // // this.getAppointmentInfo() | ||
| 442 | - // }) | ||
| 443 | - } | ||
| 444 | - | ||
| 445 | - private resolveEnd(isTop: boolean, resolve?: (value: string | PromiseLike<string>) => void) { | ||
| 446 | - if (resolve) { | ||
| 447 | - if (this.currentPage == 1 && isTop) { | ||
| 448 | - resolve('已更新至最新') | ||
| 449 | - } else { | ||
| 450 | - resolve('') | ||
| 451 | - } | ||
| 452 | - } | ||
| 453 | - if (this.currentPage == 1 && !isTop) { | ||
| 454 | - this.viewType = ViewType.ERROR | ||
| 455 | - } else { | ||
| 456 | - this.viewType = ViewType.LOADED | ||
| 457 | - } | ||
| 458 | - this.isLoading = false | ||
| 459 | - } | ||
| 460 | - | ||
| 461 | - async getAppointmentInfo(list: ContentDTO[]) { | ||
| 462 | - if (HttpUtils.getUserId()) { | ||
| 463 | - const reserveBean = this.transformToLiveDetailsBeans(list) | ||
| 464 | - Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(reserveBean)}`) | ||
| 465 | - LiveModel.getAppointmentStatus(reserveBean).then((result) => { | ||
| 466 | - Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(result)}`) | ||
| 467 | - if (result && result.length > 0) { | ||
| 468 | - this.reserveList.push(...result) | ||
| 469 | - // this.reserveStatus = res; | ||
| 470 | - result.map((item: ReserveItemBean) => { | ||
| 471 | - if (item.subscribe) { | ||
| 472 | - this.reservedIds.push(item.liveId.toString()) | ||
| 473 | - } | ||
| 474 | - }) | ||
| 475 | - } | ||
| 476 | - }).catch(() => { | ||
| 477 | - // this.data.push(...list) | ||
| 478 | - }) | ||
| 479 | - } else { | ||
| 480 | - // this.data.push(...list) | ||
| 481 | - | ||
| 482 | - } | ||
| 483 | - } | ||
| 484 | - | ||
| 485 | - // 判断是否预约 | ||
| 486 | - isReserved(item: ContentDTO) { | ||
| 487 | - return this.reservedIds.includes(item.objectId) | ||
| 488 | - } | ||
| 489 | - | ||
| 490 | - getAttentionItem(item: ContentDTO) { | ||
| 491 | - const objc = this.reserveList.find((element: ReserveItemBean) => { | ||
| 492 | - return element.liveId.toString() == item.objectId | ||
| 493 | - }) | ||
| 494 | - return objc | ||
| 495 | - } | ||
| 496 | - | ||
| 497 | - // 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组 | ||
| 498 | - transformToLiveDetailsBeans(list: ContentDTO[]): ReserveBean[] { | ||
| 499 | - const liveDetailsBeans: ReserveBean[] = []; | ||
| 500 | - list.forEach(item => { | ||
| 501 | - liveDetailsBeans.push({ | ||
| 502 | - relationId: item.relId, | ||
| 503 | - liveId: item.objectId, | ||
| 504 | - }); | ||
| 505 | - }); | ||
| 506 | - return liveDetailsBeans | ||
| 507 | - } | ||
| 508 | - | ||
| 509 | - // 预约/取消预约 | ||
| 510 | - async bookAndCancel(item: ContentDTO) { | ||
| 511 | - | ||
| 512 | - // 未登录,跳转登录 | ||
| 513 | - if (!HttpUtils.getUserId()) { | ||
| 514 | - WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | ||
| 515 | - return | ||
| 516 | - } | ||
| 517 | - if (!this.isLoadingAttention && this.liveId.length == 0) { | ||
| 518 | - this.isLoadingAttention = true | ||
| 519 | - this.liveId = item.objectId | ||
| 520 | - const reserveItem = this.getAttentionItem(item) | ||
| 521 | - if (reserveItem) { | ||
| 522 | - this.isLoadingAttention = true | ||
| 523 | - this.liveId = reserveItem.liveId.toString() | ||
| 524 | - try { | ||
| 525 | - | ||
| 526 | - // 埋点 | ||
| 527 | - Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click", | ||
| 528 | - TrackParamConvert.program(item)) | ||
| 529 | - | ||
| 530 | - const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), | ||
| 531 | - !reserveItem.subscribe); | ||
| 532 | - if (res.code == 0) { | ||
| 533 | - ToastUtils.shortToast(!reserveItem.subscribe ? '预约成功' : '取消预约成功') | ||
| 534 | - // 修改源数据 | ||
| 535 | - this.reserveList.forEach((element) => { | ||
| 536 | - if (element.liveId.toString() == item.objectId) { | ||
| 537 | - Logger.debug(TAG, '是否关注元数据:' + ` ${JSON.stringify(element.subscribe)}`) | ||
| 538 | - element.subscribe = !element.subscribe | ||
| 539 | - Logger.debug(TAG, '是否关注元数据1:' + ` ${JSON.stringify(element.subscribe)}`) | ||
| 540 | - if (element.subscribe) { | ||
| 541 | - this.reservedIds.push(element.liveId.toString()) | ||
| 542 | - } else { | ||
| 543 | - const num = this.reservedIds.indexOf(element.liveId.toString()) | ||
| 544 | - if (num >= 0 && num < this.reservedIds.length) { | ||
| 545 | - this.reservedIds.splice(num, 1) | ||
| 546 | - } | ||
| 547 | - } | ||
| 548 | - } | ||
| 549 | - }) | ||
| 550 | - | ||
| 551 | - } | ||
| 552 | - this.isLoadingAttention = false | ||
| 553 | - this.liveId = '' | ||
| 554 | - } catch (e) { | ||
| 555 | - this.liveId = '' | ||
| 556 | - this.isLoadingAttention = false | ||
| 557 | - } | ||
| 558 | - } else { | ||
| 559 | - this.liveId = '' | ||
| 560 | - this.isLoadingAttention = false | ||
| 561 | - } | ||
| 562 | - } | ||
| 563 | - } | ||
| 564 | - | ||
| 565 | - getReserveDate(eventDateTimeString: string, type: number): string { | ||
| 566 | - // 解析事件的日期和时间 | ||
| 567 | - const eventDateTime = new Date(eventDateTimeString); | ||
| 568 | - const currentDateTime = new Date(); | ||
| 569 | - | ||
| 570 | - // 截取事件时间的小时和分钟(假设事件时间是按照24小时制) | ||
| 571 | - const eventHour = eventDateTime.getHours(); | ||
| 572 | - const eventMinutes = eventDateTime.getMinutes(); | ||
| 573 | - const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 | ||
| 574 | - if (type === 1) { | ||
| 575 | - // 判断是否是今天 | ||
| 576 | - const eventDate = eventDateTime.setHours(0, 0, 0, 0); | ||
| 577 | - const currentDate = currentDateTime.setHours(0, 0, 0, 0); | ||
| 578 | - if (eventDate === currentDate) { | ||
| 579 | - return `今天`; | ||
| 580 | - } else { | ||
| 581 | - const month = eventDateTime.getMonth() + 1; | ||
| 582 | - const date = eventDateTime.getDate(); | ||
| 583 | - return `${month}月${date}日`; | ||
| 584 | - } | ||
| 585 | - } else { | ||
| 586 | - return `${eventTimeStr}`; | ||
| 587 | - } | ||
| 588 | - } | ||
| 589 | - | ||
| 590 | - // getReserveDate(eventDateTimeString: string, type: number): string { | ||
| 591 | - // // 解析事件的日期和时间 | ||
| 592 | - // const eventDateTime = new Date(eventDateTimeString); | ||
| 593 | - // const currentDateTime = new Date(); | ||
| 594 | - // | ||
| 595 | - // // 截取事件时间的小时和分钟(假设事件时间是按照24小时制) | ||
| 596 | - // const eventHour = eventDateTime.getHours(); | ||
| 597 | - // const eventMinutes = eventDateTime.getMinutes(); | ||
| 598 | - // const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数 | ||
| 599 | - // | ||
| 600 | - // if (type === 1) { | ||
| 601 | - // // 如果是今天 | ||
| 602 | - // if (eventDateTime.setHours(0,0,0,0) === currentDateTime.setHours(0,0,0,0)) { | ||
| 603 | - // return `今天`; | ||
| 604 | - // } else { | ||
| 605 | - // // 如果事件不在今天 | ||
| 606 | - // const month = eventDateTime.getMonth() + 1; // 月份从0开始 | ||
| 607 | - // const date = eventDateTime.getDate(); | ||
| 608 | - // return `${month}月${date}日`; | ||
| 609 | - // } | ||
| 610 | - // } else { | ||
| 611 | - // return `${eventTimeStr}`; | ||
| 612 | - // } | ||
| 613 | - // } | ||
| 614 | } | 62 | } |
| @@ -8,6 +8,7 @@ import { SPHelper } from 'wdKit/Index' | @@ -8,6 +8,7 @@ import { SPHelper } from 'wdKit/Index' | ||
| 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' | 8 | import { WDRouterPage, WDRouterRule } from 'wdRouter' |
| 9 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' | 9 | import { TrackingButton, TrackConstants } from 'wdTracking/Index' |
| 10 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 10 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| 11 | +import { Logger } from 'wdKit'; | ||
| 11 | 12 | ||
| 12 | const TAG = "FirstTabTopSearchComponent" | 13 | const TAG = "FirstTabTopSearchComponent" |
| 13 | 14 | ||
| @@ -73,6 +74,7 @@ export struct FirstTabTopSearchComponent { | @@ -73,6 +74,7 @@ export struct FirstTabTopSearchComponent { | ||
| 73 | .backgroundImage($r('app.media.background_search')) | 74 | .backgroundImage($r('app.media.background_search')) |
| 74 | .backgroundImageSize(ImageSize.Cover) | 75 | .backgroundImageSize(ImageSize.Cover) |
| 75 | .onClick(() => { | 76 | .onClick(() => { |
| 77 | + Logger.info(TAG, `搜索按钮点击: 新闻`); | ||
| 76 | TrackingButton.searchClick( TrackConstants.PageName.Search, "NEWS") | 78 | TrackingButton.searchClick( TrackConstants.PageName.Search, "NEWS") |
| 77 | let params = { 'tabName': "NEWS" } as Record<string, string> | 79 | let params = { 'tabName': "NEWS" } as Record<string, string> |
| 78 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage,params) | 80 | WDRouterRule.jumpWithPage(WDRouterPage.searchPage,params) |
| @@ -21,7 +21,7 @@ export struct SearchHistoryComponent{ | @@ -21,7 +21,7 @@ export struct SearchHistoryComponent{ | ||
| 21 | }, | 21 | }, |
| 22 | title: "确认清空历史记录?", | 22 | title: "确认清空历史记录?", |
| 23 | tipShow:false, | 23 | tipShow:false, |
| 24 | - leftTextColor:$r('app.color.color_648DF2') | 24 | + leftTextColor:$r('app.color.color_333333') |
| 25 | }), | 25 | }), |
| 26 | autoCancel: true, | 26 | autoCancel: true, |
| 27 | alignment: DialogAlignment.Center, | 27 | alignment: DialogAlignment.Center, |
| @@ -291,6 +291,12 @@ export struct SearchResultContentComponent { | @@ -291,6 +291,12 @@ export struct SearchResultContentComponent { | ||
| 291 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 291 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 292 | } | 292 | } |
| 293 | } else { | 293 | } else { |
| 294 | + if(this.data.get(index + 1).sameContentListSize > 0) { | ||
| 295 | + Divider() | ||
| 296 | + .width('100%') | ||
| 297 | + .color($r('app.color.color_F5F5F5')) | ||
| 298 | + .strokeWidth(4) | ||
| 299 | + } | ||
| 294 | CardParser({compDTO:new CompDTO, contentDTO: item }) | 300 | CardParser({compDTO:new CompDTO, contentDTO: item }) |
| 295 | } | 301 | } |
| 296 | if (index != this.data.totalCount() - 1) { | 302 | if (index != this.data.totalCount() - 1) { |
| @@ -47,7 +47,7 @@ export struct AboutPageUI { | @@ -47,7 +47,7 @@ export struct AboutPageUI { | ||
| 47 | context.getApplicationContext(); | 47 | context.getApplicationContext(); |
| 48 | let appVerion = AppUtils.getAppVersionName() | 48 | let appVerion = AppUtils.getAppVersionName() |
| 49 | if (StringUtils.isNotEmpty(appVerion)) { | 49 | if (StringUtils.isNotEmpty(appVerion)) { |
| 50 | - this.version = "版本号:" + appVerion | 50 | + this.version = "版本号:" + appVerion + '.' + AppUtils.getBuildVersion() |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 |
| @@ -270,18 +270,20 @@ export class PageViewModel extends BaseViewModel { | @@ -270,18 +270,20 @@ export class PageViewModel extends BaseViewModel { | ||
| 270 | * @param pageSize | 270 | * @param pageSize |
| 271 | * @returns | 271 | * @returns |
| 272 | */ | 272 | */ |
| 273 | - async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> { | ||
| 274 | - return new Promise<LiveReviewDTO>((success, error) => { | 273 | + async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO | null> { |
| 274 | + return new Promise<LiveReviewDTO| null>((success, error) => { | ||
| 275 | Logger.info(TAG, `getLiveMoreUrl pageInfo start`); | 275 | Logger.info(TAG, `getLiveMoreUrl pageInfo start`); |
| 276 | PageRepository.fetchLiveMoreUrl(type, pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => { | 276 | PageRepository.fetchLiveMoreUrl(type, pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => { |
| 277 | if (!resDTO || !resDTO.data) { | 277 | if (!resDTO || !resDTO.data) { |
| 278 | Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty'); | 278 | Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty'); |
| 279 | - error('resDTO is empty'); | 279 | + //error('resDTO is empty'); |
| 280 | + success(null); | ||
| 280 | return | 281 | return |
| 281 | } | 282 | } |
| 282 | if (resDTO.code != 0) { | 283 | if (resDTO.code != 0) { |
| 283 | Logger.error(TAG, `getLiveMoreUrl then code:${resDTO.code}, message:${resDTO.message}`); | 284 | Logger.error(TAG, `getLiveMoreUrl then code:${resDTO.code}, message:${resDTO.message}`); |
| 284 | - error('resDTO Response Code is failure'); | 285 | + //error('resDTO Response Code is failure'); |
| 286 | + success(null); | ||
| 285 | return | 287 | return |
| 286 | } | 288 | } |
| 287 | // let navResStr = JSON.stringify(navResDTO); | 289 | // let navResStr = JSON.stringify(navResDTO); |
| @@ -289,7 +291,8 @@ export class PageViewModel extends BaseViewModel { | @@ -289,7 +291,8 @@ export class PageViewModel extends BaseViewModel { | ||
| 289 | success(resDTO.data); | 291 | success(resDTO.data); |
| 290 | }).catch((err: Error) => { | 292 | }).catch((err: Error) => { |
| 291 | Logger.error(TAG, `getLiveMoreUrl catch, error.name : ${err.name}, error.message:${err.message}`); | 293 | Logger.error(TAG, `getLiveMoreUrl catch, error.name : ${err.name}, error.message:${err.message}`); |
| 292 | - error(err); | 294 | + //error(err); |
| 295 | + success(null); | ||
| 293 | }) | 296 | }) |
| 294 | }) | 297 | }) |
| 295 | } | 298 | } |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 10 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 11 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 12 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 13 | - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer", | ||
| 14 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter" | ||
| 15 | - }, | ||
| 16 | - "packages": { | ||
| 17 | - "@ohos/axios@2.2.0": { | ||
| 18 | - "name": "@ohos/axios", | ||
| 19 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 20 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 21 | - "registryType": "ohpm" | ||
| 22 | - }, | ||
| 23 | - "wdBean@../wdBean": { | ||
| 24 | - "name": "wdbean", | ||
| 25 | - "resolved": "../wdBean", | ||
| 26 | - "registryType": "local" | ||
| 27 | - }, | ||
| 28 | - "wdConstant@../../commons/wdConstant": { | ||
| 29 | - "name": "wdconstant", | ||
| 30 | - "resolved": "../../commons/wdConstant", | ||
| 31 | - "registryType": "local" | ||
| 32 | - }, | ||
| 33 | - "wdKit@../../commons/wdKit": { | ||
| 34 | - "name": "wdkit", | ||
| 35 | - "resolved": "../../commons/wdKit", | ||
| 36 | - "registryType": "local" | ||
| 37 | - }, | ||
| 38 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 39 | - "name": "wdnetwork", | ||
| 40 | - "resolved": "../../commons/wdNetwork", | ||
| 41 | - "registryType": "local", | ||
| 42 | - "dependencies": { | ||
| 43 | - "wdConstant": "file:../wdConstant", | ||
| 44 | - "wdKit": "file:../wdKit", | ||
| 45 | - "@ohos/axios": "^2.1.1" | ||
| 46 | - } | ||
| 47 | - }, | ||
| 48 | - "wdPlayer@../wdPlayer": { | ||
| 49 | - "name": "wdplayer", | ||
| 50 | - "resolved": "../wdPlayer", | ||
| 51 | - "registryType": "local", | ||
| 52 | - "dependencies": { | ||
| 53 | - "wdKit": "file:../../commons/wdKit" | ||
| 54 | - } | ||
| 55 | - }, | ||
| 56 | - "wdRouter@../../commons/wdRouter": { | ||
| 57 | - "name": "wdrouter", | ||
| 58 | - "resolved": "../../commons/wdRouter", | ||
| 59 | - "registryType": "local", | ||
| 60 | - "dependencies": { | ||
| 61 | - "wdKit": "file:../wdKit", | ||
| 62 | - "wdBean": "file:../../features/wdBean" | ||
| 63 | - } | ||
| 64 | - } | ||
| 65 | - } | ||
| 66 | -} |
| @@ -33,6 +33,7 @@ export interface recommentVideoListParams { | @@ -33,6 +33,7 @@ export interface recommentVideoListParams { | ||
| 33 | interface contentListItem { | 33 | interface contentListItem { |
| 34 | contentId: string; | 34 | contentId: string; |
| 35 | contentType: number; | 35 | contentType: number; |
| 36 | + contentRelId?:string | ||
| 36 | } | 37 | } |
| 37 | 38 | ||
| 38 | export interface contentListParams { | 39 | export interface contentListParams { |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0", | ||
| 10 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 11 | - "wdComponent@../wdComponent": "wdComponent@../wdComponent", | ||
| 12 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 13 | - "wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi", | ||
| 14 | - "wdDetailPlayShortVideo@../wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../wdDetailPlayShortVideo", | ||
| 15 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 16 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 17 | - "wdLogin@../wdLogin": "wdLogin@../wdLogin", | ||
| 18 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 19 | - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer", | ||
| 20 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 21 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | ||
| 22 | - }, | ||
| 23 | - "packages": { | ||
| 24 | - "@ohos/axios@2.2.0": { | ||
| 25 | - "name": "@ohos/axios", | ||
| 26 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 27 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 28 | - "registryType": "ohpm" | ||
| 29 | - }, | ||
| 30 | - "@ohos/lottie@2.0.0": { | ||
| 31 | - "name": "@ohos/lottie", | ||
| 32 | - "integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==", | ||
| 33 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har", | ||
| 34 | - "registryType": "ohpm" | ||
| 35 | - }, | ||
| 36 | - "wdBean@../wdBean": { | ||
| 37 | - "name": "wdbean", | ||
| 38 | - "resolved": "../wdBean", | ||
| 39 | - "registryType": "local" | ||
| 40 | - }, | ||
| 41 | - "wdComponent@../wdComponent": { | ||
| 42 | - "name": "wdcomponent", | ||
| 43 | - "resolved": "../wdComponent", | ||
| 44 | - "registryType": "local", | ||
| 45 | - "dependencies": { | ||
| 46 | - "@ohos/lottie": "2.0.0", | ||
| 47 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 48 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 49 | - "wdLogin": "file:../../features/wdLogin", | ||
| 50 | - "wdKit": "file:../../commons/wdKit", | ||
| 51 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 52 | - "wdBean": "file:../../features/wdBean", | ||
| 53 | - "wdDetailPlayShortVideo": "file:../../features/wdDetailPlayShortVideo", | ||
| 54 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 55 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 56 | - "wdJsBridge": "file:../../commons/wdJsBridge" | ||
| 57 | - } | ||
| 58 | - }, | ||
| 59 | - "wdConstant@../../commons/wdConstant": { | ||
| 60 | - "name": "wdconstant", | ||
| 61 | - "resolved": "../../commons/wdConstant", | ||
| 62 | - "registryType": "local" | ||
| 63 | - }, | ||
| 64 | - "wdDetailPlayApi@../wdDetailPlayApi": { | ||
| 65 | - "name": "wddetailplayapi", | ||
| 66 | - "resolved": "../wdDetailPlayApi", | ||
| 67 | - "registryType": "local", | ||
| 68 | - "dependencies": { | ||
| 69 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 70 | - "wdKit": "file:../../commons/wdKit", | ||
| 71 | - "wdBean": "file:../../features/wdBean", | ||
| 72 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 73 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 74 | - } | ||
| 75 | - }, | ||
| 76 | - "wdDetailPlayShortVideo@../wdDetailPlayShortVideo": { | ||
| 77 | - "name": "wddetailplayshortvideo", | ||
| 78 | - "resolved": "../wdDetailPlayShortVideo", | ||
| 79 | - "registryType": "local", | ||
| 80 | - "dependencies": { | ||
| 81 | - "@ohos/lottie": "2.0.0", | ||
| 82 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 83 | - "wdKit": "file:../../commons/wdKit", | ||
| 84 | - "wdBean": "file:../../features/wdBean", | ||
| 85 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 86 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 87 | - "wdDetailPlayApi": "file:../../features/wdDetailPlayApi" | ||
| 88 | - } | ||
| 89 | - }, | ||
| 90 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 91 | - "name": "wdjsbridge", | ||
| 92 | - "resolved": "../../commons/wdJsBridge", | ||
| 93 | - "registryType": "local" | ||
| 94 | - }, | ||
| 95 | - "wdKit@../../commons/wdKit": { | ||
| 96 | - "name": "wdkit", | ||
| 97 | - "resolved": "../../commons/wdKit", | ||
| 98 | - "registryType": "local" | ||
| 99 | - }, | ||
| 100 | - "wdLogin@../wdLogin": { | ||
| 101 | - "name": "wdlogin", | ||
| 102 | - "resolved": "../wdLogin", | ||
| 103 | - "registryType": "local", | ||
| 104 | - "dependencies": { | ||
| 105 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 106 | - "wdKit": "file:../../commons/wdKit", | ||
| 107 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 108 | - "wdBean": "file:../../features/wdBean", | ||
| 109 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 110 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 111 | - } | ||
| 112 | - }, | ||
| 113 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 114 | - "name": "wdnetwork", | ||
| 115 | - "resolved": "../../commons/wdNetwork", | ||
| 116 | - "registryType": "local", | ||
| 117 | - "dependencies": { | ||
| 118 | - "wdConstant": "file:../wdConstant", | ||
| 119 | - "wdKit": "file:../wdKit", | ||
| 120 | - "@ohos/axios": "^2.1.1" | ||
| 121 | - } | ||
| 122 | - }, | ||
| 123 | - "wdPlayer@../wdPlayer": { | ||
| 124 | - "name": "wdplayer", | ||
| 125 | - "resolved": "../wdPlayer", | ||
| 126 | - "registryType": "local", | ||
| 127 | - "dependencies": { | ||
| 128 | - "wdKit": "file:../../commons/wdKit" | ||
| 129 | - } | ||
| 130 | - }, | ||
| 131 | - "wdRouter@../../commons/wdRouter": { | ||
| 132 | - "name": "wdrouter", | ||
| 133 | - "resolved": "../../commons/wdRouter", | ||
| 134 | - "registryType": "local", | ||
| 135 | - "dependencies": { | ||
| 136 | - "wdKit": "file:../wdKit", | ||
| 137 | - "wdBean": "file:../../features/wdBean" | ||
| 138 | - } | ||
| 139 | - }, | ||
| 140 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 141 | - "name": "wdwebcomponent", | ||
| 142 | - "resolved": "../../commons/wdWebComponent", | ||
| 143 | - "registryType": "local", | ||
| 144 | - "dependencies": { | ||
| 145 | - "wdConstant": "file:../wdConstant", | ||
| 146 | - "wdKit": "file:../wdKit", | ||
| 147 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 148 | - "wdBean": "file:../../features/wdBean", | ||
| 149 | - "wdRouter": "file:../wdRouter" | ||
| 150 | - } | ||
| 151 | - } | ||
| 152 | - } | ||
| 153 | -} |
| @@ -43,6 +43,7 @@ export struct DetailPlayVLivePage { | @@ -43,6 +43,7 @@ export struct DetailPlayVLivePage { | ||
| 43 | @State isPlayerError: boolean = false | 43 | @State isPlayerError: boolean = false |
| 44 | @State isCanplay: boolean = false | 44 | @State isCanplay: boolean = false |
| 45 | @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗" | 45 | @State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗" |
| 46 | + | ||
| 46 | dialogToast: CustomDialogController = new CustomDialogController({ | 47 | dialogToast: CustomDialogController = new CustomDialogController({ |
| 47 | builder: CustomToast({ | 48 | builder: CustomToast({ |
| 48 | bgColor: 0xB3000000, | 49 | bgColor: 0xB3000000, |
| @@ -135,7 +136,7 @@ export struct DetailPlayVLivePage { | @@ -135,7 +136,7 @@ export struct DetailPlayVLivePage { | ||
| 135 | PlayerInfoComponent({ | 136 | PlayerInfoComponent({ |
| 136 | playerController: this.playerController, | 137 | playerController: this.playerController, |
| 137 | swiperController: this.swiperController, | 138 | swiperController: this.swiperController, |
| 138 | - swiperIndex: $swiperIndex | 139 | + swiperIndex: $swiperIndex, |
| 139 | }) | 140 | }) |
| 140 | 141 | ||
| 141 | // 直播资源加载失败 | 142 | // 直播资源加载失败 |
| @@ -24,7 +24,7 @@ export struct PlayerComponent { | @@ -24,7 +24,7 @@ export struct PlayerComponent { | ||
| 24 | // 播放失败 | 24 | // 播放失败 |
| 25 | @Link isPlayerError: boolean | 25 | @Link isPlayerError: boolean |
| 26 | @Link isCanplay: boolean | 26 | @Link isCanplay: boolean |
| 27 | - | 27 | + @State isLarge:boolean = false |
| 28 | pageShowChange() { | 28 | pageShowChange() { |
| 29 | this.playerController?.play() | 29 | this.playerController?.play() |
| 30 | } | 30 | } |
| @@ -34,7 +34,6 @@ export struct PlayerComponent { | @@ -34,7 +34,6 @@ export struct PlayerComponent { | ||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | aboutToAppear(){ | 36 | aboutToAppear(){ |
| 37 | - | ||
| 38 | if (this.playerController) { | 37 | if (this.playerController) { |
| 39 | this.playerController.onCanplay = () => { | 38 | this.playerController.onCanplay = () => { |
| 40 | this.isCanplay = true | 39 | this.isCanplay = true |
| @@ -52,6 +51,16 @@ export struct PlayerComponent { | @@ -52,6 +51,16 @@ export struct PlayerComponent { | ||
| 52 | } | 51 | } |
| 53 | 52 | ||
| 54 | } | 53 | } |
| 54 | + this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => { | ||
| 55 | + if(width>height){ | ||
| 56 | + this.isLarge = false | ||
| 57 | + if(width > 2){ | ||
| 58 | + this.liveStreamType = 0 | ||
| 59 | + } | ||
| 60 | + }else{ | ||
| 61 | + this.isLarge = true | ||
| 62 | + } | ||
| 63 | + } | ||
| 55 | } | 64 | } |
| 56 | 65 | ||
| 57 | 66 | ||
| @@ -113,7 +122,7 @@ export struct PlayerComponent { | @@ -113,7 +122,7 @@ export struct PlayerComponent { | ||
| 113 | this.contentTrackingDict() | 122 | this.contentTrackingDict() |
| 114 | this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam); | 123 | this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam); |
| 115 | } | 124 | } |
| 116 | - }).margin({ top: 195 }).height(211) | 125 | + }).margin({ top: this.isLarge?0:195 }).height(this.isLarge?'100%': 211) |
| 117 | } | 126 | } |
| 118 | 127 | ||
| 119 | PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible) | 128 | PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible) |
| @@ -11,6 +11,7 @@ export struct PlayerInfoComponent { | @@ -11,6 +11,7 @@ export struct PlayerInfoComponent { | ||
| 11 | @Consume isShowControl: boolean | 11 | @Consume isShowControl: boolean |
| 12 | @Link swiperIndex: number | 12 | @Link swiperIndex: number |
| 13 | 13 | ||
| 14 | + | ||
| 14 | build() { | 15 | build() { |
| 15 | Column() { | 16 | Column() { |
| 16 | Swiper(this.swiperController) { | 17 | Swiper(this.swiperController) { |
| 1 | import lottie from '@ohos/lottie' | 1 | import lottie from '@ohos/lottie' |
| 2 | import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' | 2 | import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index' |
| 3 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' | 3 | import { LiveFollowComponent, LottieView } from 'wdComponent/Index' |
| 4 | -import { NumberFormatterUtils } from 'wdKit/Index' | 4 | +import { NumberFormatterUtils, WindowModel } from 'wdKit/Index' |
| 5 | +import { window } from '@kit.ArkUI' | ||
| 6 | +import { WDAliPlayerController } from 'wdPlayer/Index' | ||
| 7 | +import { DisplayDirection } from 'wdConstant/Index' | ||
| 5 | 8 | ||
| 6 | /** | 9 | /** |
| 7 | * 沉浸式直播--- 头部标题 | 10 | * 沉浸式直播--- 头部标题 |
| @@ -12,6 +15,22 @@ export struct PlayerTitleComponent { | @@ -12,6 +15,22 @@ export struct PlayerTitleComponent { | ||
| 12 | @Consume liveRoomDataBean: LiveRoomDataBean | 15 | @Consume liveRoomDataBean: LiveRoomDataBean |
| 13 | @Consume liveState: string | 16 | @Consume liveState: string |
| 14 | @Consume contentDetailData: ContentDetailDTO | 17 | @Consume contentDetailData: ContentDetailDTO |
| 18 | + @Consume displayDirection: DisplayDirection | ||
| 19 | + @State isLarge:boolean = false | ||
| 20 | + private playerController?: WDAliPlayerController | ||
| 21 | + | ||
| 22 | + aboutToAppear(): void { | ||
| 23 | + if (!this.playerController) { | ||
| 24 | + return | ||
| 25 | + } | ||
| 26 | + this.playerController.onVideoSizePlayerTitleComponentBack = (width: number, height: number) => { | ||
| 27 | + if(width>height){ | ||
| 28 | + this.isLarge = false | ||
| 29 | + }else{ | ||
| 30 | + this.isLarge = true | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | + } | ||
| 15 | aboutToDisappear(): void { | 34 | aboutToDisappear(): void { |
| 16 | if (this.contentDetailData.liveInfo?.liveState == 'running') { | 35 | if (this.contentDetailData.liveInfo?.liveState == 'running') { |
| 17 | lottie.destroy('live_status_wait') | 36 | lottie.destroy('live_status_wait') |
| @@ -21,11 +40,42 @@ export struct PlayerTitleComponent { | @@ -21,11 +40,42 @@ export struct PlayerTitleComponent { | ||
| 21 | build() { | 40 | build() { |
| 22 | Column() { | 41 | Column() { |
| 23 | Row() { | 42 | Row() { |
| 43 | + //返回键 | ||
| 44 | + Image($r('app.media.icon_arrow_left_white')) | ||
| 45 | + .width(24) | ||
| 46 | + .aspectRatio(1) | ||
| 47 | + .visibility(this.isLarge ? Visibility.Visible : Visibility.None) | ||
| 48 | + .margin({ | ||
| 49 | + right: 10 | ||
| 50 | + }) | ||
| 51 | + .onClick(() => { | ||
| 52 | + WindowModel.shared.setPreferredOrientation(this.isLarge ? | ||
| 53 | + window.Orientation.PORTRAIT : | ||
| 54 | + window.Orientation.LANDSCAPE_INVERTED) | ||
| 55 | + WindowModel.shared.setSpecificSystemBarEnabled(true) | ||
| 56 | + this.isLarge = false | ||
| 57 | + this.displayDirection = DisplayDirection.VERTICAL | ||
| 58 | + if(this.playerController){ | ||
| 59 | + if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 60 | + this.playerController.onVideoSizePlayerComponentBack(2,1); | ||
| 61 | + } | ||
| 62 | + if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 63 | + this.playerController.onVideoSizePlayerUIComponentMethod(2,1); | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + }) | ||
| 24 | Text(this.contentDetailData.newsTitle || '') | 67 | Text(this.contentDetailData.newsTitle || '') |
| 25 | .maxLines(2) | 68 | .maxLines(2) |
| 26 | .fontSize(16) | 69 | .fontSize(16) |
| 27 | .fontWeight(500) | 70 | .fontWeight(500) |
| 28 | .fontColor(Color.White) | 71 | .fontColor(Color.White) |
| 72 | + Blank().layoutWeight(1) | ||
| 73 | + //分享按钮 | ||
| 74 | + Image($r('app.media.icon_share')) | ||
| 75 | + .width(24) | ||
| 76 | + .aspectRatio(1) | ||
| 77 | + .visibility(this.isLarge ? Visibility.Visible : Visibility.None) | ||
| 78 | + .margin({right:16}) | ||
| 29 | }.margin({ bottom: 10 }) | 79 | }.margin({ bottom: 10 }) |
| 30 | 80 | ||
| 31 | Row() { | 81 | Row() { |
| @@ -9,12 +9,24 @@ import { PlayerVideoControlComponent } from './PlayerVideoControlComponent'; | @@ -9,12 +9,24 @@ import { PlayerVideoControlComponent } from './PlayerVideoControlComponent'; | ||
| 9 | @Component | 9 | @Component |
| 10 | export struct PlayerUIComponent { | 10 | export struct PlayerUIComponent { |
| 11 | private playerController?: WDAliPlayerController | 11 | private playerController?: WDAliPlayerController |
| 12 | + @State isSmall:boolean = false | ||
| 12 | @Consume isShowControl: boolean | 13 | @Consume isShowControl: boolean |
| 13 | - | 14 | + aboutToAppear() { |
| 15 | + if (!this.playerController) { | ||
| 16 | + return | ||
| 17 | + } | ||
| 18 | + this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => { | ||
| 19 | + if(width>height){ | ||
| 20 | + this.isSmall = true | ||
| 21 | + }else{ | ||
| 22 | + this.isSmall = false | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | + } | ||
| 14 | build() { | 26 | build() { |
| 15 | Stack() { | 27 | Stack() { |
| 16 | // 标题 | 28 | // 标题 |
| 17 | - PlayerTitleComponent() | 29 | + PlayerTitleComponent({ playerController: this.playerController }) |
| 18 | 30 | ||
| 19 | PlayerCommentComponent() | 31 | PlayerCommentComponent() |
| 20 | .visibility(this.isShowControl ? Visibility.Hidden : Visibility.Visible) | 32 | .visibility(this.isShowControl ? Visibility.Hidden : Visibility.Visible) |
| @@ -23,11 +35,11 @@ export struct PlayerUIComponent { | @@ -23,11 +35,11 @@ export struct PlayerUIComponent { | ||
| 23 | .markAnchor({ y: '100%' }) | 35 | .markAnchor({ y: '100%' }) |
| 24 | 36 | ||
| 25 | PlayerVideoControlComponent({ playerController: this.playerController }) | 37 | PlayerVideoControlComponent({ playerController: this.playerController }) |
| 26 | - .visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden) | 38 | + .visibility(this.isShowControl ? Visibility.Visible : this.isSmall? Visibility.Visible:Visibility.Hidden) |
| 27 | .animation({ duration: 500 }) | 39 | .animation({ duration: 500 }) |
| 28 | - .position({ y: '100%' }) | ||
| 29 | - .markAnchor({ y: '100%' }) | ||
| 30 | - | 40 | + // .position({ y: '100%' }) |
| 41 | + // .markAnchor({ y: '100%' }) | ||
| 42 | + .margin({ top: this.isSmall?195 +211 - 105:0}) | ||
| 31 | } | 43 | } |
| 32 | .height('100%') | 44 | .height('100%') |
| 33 | .width('100%') | 45 | .width('100%') |
| 1 | import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index' | 1 | import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index' |
| 2 | -import { LiveRoomDataBean } from 'wdBean/Index' | 2 | +import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index' |
| 3 | +import { WindowModel } from 'wdKit/Index' | ||
| 4 | +import { window } from '@kit.ArkUI' | ||
| 5 | +import { DisplayDirection } from 'wdConstant/Index' | ||
| 3 | 6 | ||
| 4 | 7 | ||
| 5 | @Component | 8 | @Component |
| @@ -11,6 +14,8 @@ export struct PlayerVideoControlComponent { | @@ -11,6 +14,8 @@ export struct PlayerVideoControlComponent { | ||
| 11 | @State progressVal: number = 0; | 14 | @State progressVal: number = 0; |
| 12 | //是否处于播放状态中 | 15 | //是否处于播放状态中 |
| 13 | @State isPlayStatus: boolean = true | 16 | @State isPlayStatus: boolean = true |
| 17 | + @Consume displayDirection: DisplayDirection | ||
| 18 | + @Consume contentDetailData: ContentDetailDTO | ||
| 14 | 19 | ||
| 15 | aboutToAppear(): void { | 20 | aboutToAppear(): void { |
| 16 | if (this.playerController) { | 21 | if (this.playerController) { |
| @@ -34,24 +39,54 @@ export struct PlayerVideoControlComponent { | @@ -34,24 +39,54 @@ export struct PlayerVideoControlComponent { | ||
| 34 | getBottomUIComponent() { | 39 | getBottomUIComponent() { |
| 35 | Row() { | 40 | Row() { |
| 36 | this.playOrPauseBtn() | 41 | this.playOrPauseBtn() |
| 37 | - Text(this.currentTime) | ||
| 38 | - .fontColor(Color.White) | ||
| 39 | - .fontWeight(600) | ||
| 40 | - .fontSize('12fp') | ||
| 41 | - .margin({ | ||
| 42 | - left: 16 | ||
| 43 | - }) | ||
| 44 | 42 | ||
| 45 | - this.playProgressView() | 43 | + if(this.contentDetailData.liveInfo?.liveState == 'running'){ |
| 44 | + Blank().layoutWeight(1) | ||
| 45 | + }else{ | ||
| 46 | + Text(this.currentTime) | ||
| 47 | + .fontColor(Color.White) | ||
| 48 | + .fontWeight(600) | ||
| 49 | + .fontSize('12fp') | ||
| 50 | + .margin({ | ||
| 51 | + left: 16 | ||
| 52 | + }) | ||
| 53 | + this.playProgressView() | ||
| 54 | + Text(this.totalTime) | ||
| 55 | + .fontColor(Color.White) | ||
| 56 | + .fontWeight(600) | ||
| 57 | + .fontSize('12fp') | ||
| 58 | + .margin({ | ||
| 59 | + right: 16 | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | + //全屏按钮 | ||
| 63 | + Image($r('app.media.icon_live_player_full_screen')) | ||
| 64 | + .height(32) | ||
| 65 | + .width(32) | ||
| 66 | + .padding(5) | ||
| 67 | + .borderRadius($r('app.float.vp_16')) | ||
| 68 | + .border({width:0.5}) | ||
| 69 | + .borderColor(0x4DFFFFFF) | ||
| 70 | + .backgroundColor(0x4D222222) | ||
| 71 | + .margin({right:10}) | ||
| 72 | + .onClick(() => { | ||
| 73 | + WindowModel.shared.setSpecificSystemBarEnabled(false) | ||
| 74 | + this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL | ||
| 75 | + WindowModel.shared.setPreferredOrientation( | ||
| 76 | + window.Orientation.LANDSCAPE_INVERTED) | ||
| 77 | + if(this.playerController){ | ||
| 78 | + if(this.playerController.onVideoSizePlayerUIComponentMethod){ | ||
| 79 | + this.playerController.onVideoSizePlayerUIComponentMethod(1,2) | ||
| 80 | + } | ||
| 81 | + if(this.playerController.onVideoSizePlayerComponentBack){ | ||
| 82 | + this.playerController.onVideoSizePlayerComponentBack(1,2) | ||
| 83 | + } | ||
| 46 | 84 | ||
| 47 | - Text(this.totalTime) | ||
| 48 | - .fontColor(Color.White) | ||
| 49 | - .fontWeight(600) | ||
| 50 | - .fontSize('12fp') | ||
| 51 | - .margin({ | ||
| 52 | - right: 16 | 85 | + if(this.playerController.onVideoSizePlayerTitleComponentBack){ |
| 86 | + this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | ||
| 87 | + } | ||
| 88 | + } | ||
| 53 | }) | 89 | }) |
| 54 | - | ||
| 55 | } | 90 | } |
| 56 | .alignItems(VerticalAlign.Center) | 91 | .alignItems(VerticalAlign.Center) |
| 57 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) | 92 | // .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] }) |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0", | ||
| 10 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 11 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 12 | - "wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi", | ||
| 13 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 14 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 15 | - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer", | ||
| 16 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter" | ||
| 17 | - }, | ||
| 18 | - "packages": { | ||
| 19 | - "@ohos/axios@2.2.0": { | ||
| 20 | - "name": "@ohos/axios", | ||
| 21 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 22 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 23 | - "registryType": "ohpm" | ||
| 24 | - }, | ||
| 25 | - "@ohos/lottie@2.0.0": { | ||
| 26 | - "name": "@ohos/lottie", | ||
| 27 | - "integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==", | ||
| 28 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har", | ||
| 29 | - "registryType": "ohpm" | ||
| 30 | - }, | ||
| 31 | - "wdBean@../wdBean": { | ||
| 32 | - "name": "wdbean", | ||
| 33 | - "resolved": "../wdBean", | ||
| 34 | - "registryType": "local" | ||
| 35 | - }, | ||
| 36 | - "wdConstant@../../commons/wdConstant": { | ||
| 37 | - "name": "wdconstant", | ||
| 38 | - "resolved": "../../commons/wdConstant", | ||
| 39 | - "registryType": "local" | ||
| 40 | - }, | ||
| 41 | - "wdDetailPlayApi@../wdDetailPlayApi": { | ||
| 42 | - "name": "wddetailplayapi", | ||
| 43 | - "resolved": "../wdDetailPlayApi", | ||
| 44 | - "registryType": "local", | ||
| 45 | - "dependencies": { | ||
| 46 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 47 | - "wdKit": "file:../../commons/wdKit", | ||
| 48 | - "wdBean": "file:../../features/wdBean", | ||
| 49 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 50 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 51 | - } | ||
| 52 | - }, | ||
| 53 | - "wdKit@../../commons/wdKit": { | ||
| 54 | - "name": "wdkit", | ||
| 55 | - "resolved": "../../commons/wdKit", | ||
| 56 | - "registryType": "local" | ||
| 57 | - }, | ||
| 58 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 59 | - "name": "wdnetwork", | ||
| 60 | - "resolved": "../../commons/wdNetwork", | ||
| 61 | - "registryType": "local", | ||
| 62 | - "dependencies": { | ||
| 63 | - "wdConstant": "file:../wdConstant", | ||
| 64 | - "wdKit": "file:../wdKit", | ||
| 65 | - "@ohos/axios": "^2.1.1" | ||
| 66 | - } | ||
| 67 | - }, | ||
| 68 | - "wdPlayer@../wdPlayer": { | ||
| 69 | - "name": "wdplayer", | ||
| 70 | - "resolved": "../wdPlayer", | ||
| 71 | - "registryType": "local", | ||
| 72 | - "dependencies": { | ||
| 73 | - "wdKit": "file:../../commons/wdKit" | ||
| 74 | - } | ||
| 75 | - }, | ||
| 76 | - "wdRouter@../../commons/wdRouter": { | ||
| 77 | - "name": "wdrouter", | ||
| 78 | - "resolved": "../../commons/wdRouter", | ||
| 79 | - "registryType": "local", | ||
| 80 | - "dependencies": { | ||
| 81 | - "wdKit": "file:../wdKit", | ||
| 82 | - "wdBean": "file:../../features/wdBean" | ||
| 83 | - } | ||
| 84 | - } | ||
| 85 | - } | ||
| 86 | -} |
| @@ -58,6 +58,7 @@ export struct DetailPlayShortVideoPage { | @@ -58,6 +58,7 @@ export struct DetailPlayShortVideoPage { | ||
| 58 | PageName: string = '' | 58 | PageName: string = '' |
| 59 | @State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用" | 59 | @State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用" |
| 60 | @Consume onlyWifiLoadVideo: boolean | 60 | @Consume onlyWifiLoadVideo: boolean |
| 61 | + @Consume toastTextVisible: boolean | ||
| 61 | 62 | ||
| 62 | /** | 63 | /** |
| 63 | * 页面显示重查用户关注、点赞等信息 | 64 | * 页面显示重查用户关注、点赞等信息 |
| @@ -169,9 +170,12 @@ export struct DetailPlayShortVideoPage { | @@ -169,9 +170,12 @@ export struct DetailPlayShortVideoPage { | ||
| 169 | } | 170 | } |
| 170 | 171 | ||
| 171 | async aboutToAppear() { | 172 | async aboutToAppear() { |
| 172 | - if(await onlyWifiLoadVideo()){ | ||
| 173 | - this.onlyWifiLoadVideo = true | 173 | + if (!this.onlyWifiLoadVideo) { |
| 174 | + this.onlyWifiLoadVideo = await onlyWifiLoadVideo() | ||
| 175 | + this.toastTextVisible = this.onlyWifiLoadVideo ? false : true | ||
| 176 | + console.log(TAG, 'this.onlyWifiLoadVideo', this.onlyWifiLoadVideo) | ||
| 174 | } | 177 | } |
| 178 | + | ||
| 175 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape | 179 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape |
| 176 | this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) / | 180 | this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) / |
| 177 | (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9) | 181 | (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9) |
| @@ -280,7 +284,7 @@ export struct DetailPlayShortVideoPage { | @@ -280,7 +284,7 @@ export struct DetailPlayShortVideoPage { | ||
| 280 | playerController: this.playerController | 284 | playerController: this.playerController |
| 281 | }) | 285 | }) |
| 282 | 286 | ||
| 283 | - if (!this.onlyWifiLoadVideo) { | 287 | + if (this.toastTextVisible) { |
| 284 | this.buildContent() | 288 | this.buildContent() |
| 285 | } | 289 | } |
| 286 | 290 | ||
| @@ -357,6 +361,7 @@ export struct DetailPlayShortVideoPage { | @@ -357,6 +361,7 @@ export struct DetailPlayShortVideoPage { | ||
| 357 | }) | 361 | }) |
| 358 | .onClick(() => { | 362 | .onClick(() => { |
| 359 | this.onlyWifiLoadVideo = true | 363 | this.onlyWifiLoadVideo = true |
| 364 | + this.toastTextVisible = false | ||
| 360 | this.playerController?.play() | 365 | this.playerController?.play() |
| 361 | this.imageVisible = false | 366 | this.imageVisible = false |
| 362 | }) | 367 | }) |
| @@ -403,7 +408,8 @@ export struct DetailPlayShortVideoPage { | @@ -403,7 +408,8 @@ export struct DetailPlayShortVideoPage { | ||
| 403 | this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl, this.PageName, this.PageName, | 408 | this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl, this.PageName, this.PageName, |
| 404 | this.pageParam); | 409 | this.pageParam); |
| 405 | } | 410 | } |
| 406 | - } | 411 | + }, |
| 412 | + liftVideo: $showCommentList, | ||
| 407 | }) | 413 | }) |
| 408 | .width(this.playerWidth) | 414 | .width(this.playerWidth) |
| 409 | .height(this.playerHeight) | 415 | .height(this.playerHeight) |
| @@ -40,6 +40,7 @@ export struct DetailVideoListPage { | @@ -40,6 +40,7 @@ export struct DetailVideoListPage { | ||
| 40 | pageShowTime:number = 0; | 40 | pageShowTime:number = 0; |
| 41 | pageHideTime:number = 0; | 41 | pageHideTime:number = 0; |
| 42 | @Provide onlyWifiLoadVideo: boolean = false | 42 | @Provide onlyWifiLoadVideo: boolean = false |
| 43 | + @Provide toastTextVisible: boolean = false | ||
| 43 | 44 | ||
| 44 | async aboutToAppear(): Promise<void> { | 45 | async aboutToAppear(): Promise<void> { |
| 45 | // 注册监听网络连接 | 46 | // 注册监听网络连接 |
| @@ -65,6 +65,7 @@ export struct VideoChannelDetail { | @@ -65,6 +65,7 @@ export struct VideoChannelDetail { | ||
| 65 | pageShowTime: number = 0; | 65 | pageShowTime: number = 0; |
| 66 | pageHideTime: number = 0; | 66 | pageHideTime: number = 0; |
| 67 | @Provide onlyWifiLoadVideo: boolean = false | 67 | @Provide onlyWifiLoadVideo: boolean = false |
| 68 | + @Provide toastTextVisible: boolean = false | ||
| 68 | 69 | ||
| 69 | autoRefreshChange() { | 70 | autoRefreshChange() { |
| 70 | if (this.topNavIndex === 0 && !this.isRequesting) { | 71 | if (this.topNavIndex === 0 && !this.isRequesting) { |
| @@ -13,7 +13,6 @@ export struct PlayerBottomView { | @@ -13,7 +13,6 @@ export struct PlayerBottomView { | ||
| 13 | @Consume isDragging?: boolean | 13 | @Consume isDragging?: boolean |
| 14 | @Consume contentDetailData: ContentDetailDTO | 14 | @Consume contentDetailData: ContentDetailDTO |
| 15 | @Consume displayDirection: DisplayDirection | 15 | @Consume displayDirection: DisplayDirection |
| 16 | - @Consume onlyWifiLoadVideo: boolean | ||
| 17 | 16 | ||
| 18 | aboutToAppear(): void { | 17 | aboutToAppear(): void { |
| 19 | 18 |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 10 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 11 | - "wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi", | ||
| 12 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 13 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 14 | - "wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer", | ||
| 15 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter" | ||
| 16 | - }, | ||
| 17 | - "packages": { | ||
| 18 | - "@ohos/axios@2.2.0": { | ||
| 19 | - "name": "@ohos/axios", | ||
| 20 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 21 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 22 | - "registryType": "ohpm" | ||
| 23 | - }, | ||
| 24 | - "wdBean@../wdBean": { | ||
| 25 | - "name": "wdbean", | ||
| 26 | - "resolved": "../wdBean", | ||
| 27 | - "registryType": "local" | ||
| 28 | - }, | ||
| 29 | - "wdConstant@../../commons/wdConstant": { | ||
| 30 | - "name": "wdconstant", | ||
| 31 | - "resolved": "../../commons/wdConstant", | ||
| 32 | - "registryType": "local" | ||
| 33 | - }, | ||
| 34 | - "wdDetailPlayApi@../wdDetailPlayApi": { | ||
| 35 | - "name": "wddetailplayapi", | ||
| 36 | - "resolved": "../wdDetailPlayApi", | ||
| 37 | - "registryType": "local", | ||
| 38 | - "dependencies": { | ||
| 39 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 40 | - "wdKit": "file:../../commons/wdKit", | ||
| 41 | - "wdBean": "file:../../features/wdBean", | ||
| 42 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 43 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 44 | - } | ||
| 45 | - }, | ||
| 46 | - "wdKit@../../commons/wdKit": { | ||
| 47 | - "name": "wdkit", | ||
| 48 | - "resolved": "../../commons/wdKit", | ||
| 49 | - "registryType": "local" | ||
| 50 | - }, | ||
| 51 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 52 | - "name": "wdnetwork", | ||
| 53 | - "resolved": "../../commons/wdNetwork", | ||
| 54 | - "registryType": "local", | ||
| 55 | - "dependencies": { | ||
| 56 | - "wdConstant": "file:../wdConstant", | ||
| 57 | - "wdKit": "file:../wdKit", | ||
| 58 | - "@ohos/axios": "^2.1.1" | ||
| 59 | - } | ||
| 60 | - }, | ||
| 61 | - "wdPlayer@../wdPlayer": { | ||
| 62 | - "name": "wdplayer", | ||
| 63 | - "resolved": "../wdPlayer", | ||
| 64 | - "registryType": "local", | ||
| 65 | - "dependencies": { | ||
| 66 | - "wdKit": "file:../../commons/wdKit" | ||
| 67 | - } | ||
| 68 | - }, | ||
| 69 | - "wdRouter@../../commons/wdRouter": { | ||
| 70 | - "name": "wdrouter", | ||
| 71 | - "resolved": "../../commons/wdRouter", | ||
| 72 | - "registryType": "local", | ||
| 73 | - "dependencies": { | ||
| 74 | - "wdKit": "file:../wdKit", | ||
| 75 | - "wdBean": "file:../../features/wdBean" | ||
| 76 | - } | ||
| 77 | - } | ||
| 78 | - } | ||
| 79 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 10 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 11 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 12 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 13 | - "wdLogin@../wdLogin": "wdLogin@../wdLogin", | ||
| 14 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 15 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 16 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | ||
| 17 | - }, | ||
| 18 | - "packages": { | ||
| 19 | - "@ohos/axios@2.2.0": { | ||
| 20 | - "name": "@ohos/axios", | ||
| 21 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 22 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 23 | - "registryType": "ohpm" | ||
| 24 | - }, | ||
| 25 | - "wdBean@../wdBean": { | ||
| 26 | - "name": "wdbean", | ||
| 27 | - "resolved": "../wdBean", | ||
| 28 | - "registryType": "local" | ||
| 29 | - }, | ||
| 30 | - "wdConstant@../../commons/wdConstant": { | ||
| 31 | - "name": "wdconstant", | ||
| 32 | - "resolved": "../../commons/wdConstant", | ||
| 33 | - "registryType": "local" | ||
| 34 | - }, | ||
| 35 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 36 | - "name": "wdjsbridge", | ||
| 37 | - "resolved": "../../commons/wdJsBridge", | ||
| 38 | - "registryType": "local" | ||
| 39 | - }, | ||
| 40 | - "wdKit@../../commons/wdKit": { | ||
| 41 | - "name": "wdkit", | ||
| 42 | - "resolved": "../../commons/wdKit", | ||
| 43 | - "registryType": "local" | ||
| 44 | - }, | ||
| 45 | - "wdLogin@../wdLogin": { | ||
| 46 | - "name": "wdlogin", | ||
| 47 | - "resolved": "../wdLogin", | ||
| 48 | - "registryType": "local", | ||
| 49 | - "dependencies": { | ||
| 50 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 51 | - "wdKit": "file:../../commons/wdKit", | ||
| 52 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 53 | - "wdBean": "file:../../features/wdBean", | ||
| 54 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 55 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 56 | - } | ||
| 57 | - }, | ||
| 58 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 59 | - "name": "wdnetwork", | ||
| 60 | - "resolved": "../../commons/wdNetwork", | ||
| 61 | - "registryType": "local", | ||
| 62 | - "dependencies": { | ||
| 63 | - "wdConstant": "file:../wdConstant", | ||
| 64 | - "wdKit": "file:../wdKit", | ||
| 65 | - "@ohos/axios": "^2.1.1" | ||
| 66 | - } | ||
| 67 | - }, | ||
| 68 | - "wdRouter@../../commons/wdRouter": { | ||
| 69 | - "name": "wdrouter", | ||
| 70 | - "resolved": "../../commons/wdRouter", | ||
| 71 | - "registryType": "local", | ||
| 72 | - "dependencies": { | ||
| 73 | - "wdKit": "file:../wdKit", | ||
| 74 | - "wdBean": "file:../../features/wdBean", | ||
| 75 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 76 | - "wdConstant": "file:../../commons/wdConstant" | ||
| 77 | - } | ||
| 78 | - }, | ||
| 79 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 80 | - "name": "wdwebcomponent", | ||
| 81 | - "resolved": "../../commons/wdWebComponent", | ||
| 82 | - "registryType": "local", | ||
| 83 | - "dependencies": { | ||
| 84 | - "wdConstant": "file:../wdConstant", | ||
| 85 | - "wdKit": "file:../wdKit", | ||
| 86 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 87 | - "wdBean": "file:../../features/wdBean", | ||
| 88 | - "wdRouter": "file:../wdRouter" | ||
| 89 | - } | ||
| 90 | - } | ||
| 91 | - } | ||
| 92 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 10 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 11 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 12 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 13 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 14 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 15 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | ||
| 16 | - }, | ||
| 17 | - "packages": { | ||
| 18 | - "@ohos/axios@2.2.0": { | ||
| 19 | - "name": "@ohos/axios", | ||
| 20 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 21 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 22 | - "registryType": "ohpm" | ||
| 23 | - }, | ||
| 24 | - "wdBean@../wdBean": { | ||
| 25 | - "name": "wdbean", | ||
| 26 | - "resolved": "../wdBean", | ||
| 27 | - "registryType": "local" | ||
| 28 | - }, | ||
| 29 | - "wdConstant@../../commons/wdConstant": { | ||
| 30 | - "name": "wdconstant", | ||
| 31 | - "resolved": "../../commons/wdConstant", | ||
| 32 | - "registryType": "local" | ||
| 33 | - }, | ||
| 34 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 35 | - "name": "wdjsbridge", | ||
| 36 | - "resolved": "../../commons/wdJsBridge", | ||
| 37 | - "registryType": "local" | ||
| 38 | - }, | ||
| 39 | - "wdKit@../../commons/wdKit": { | ||
| 40 | - "name": "wdkit", | ||
| 41 | - "resolved": "../../commons/wdKit", | ||
| 42 | - "registryType": "local" | ||
| 43 | - }, | ||
| 44 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 45 | - "name": "wdnetwork", | ||
| 46 | - "resolved": "../../commons/wdNetwork", | ||
| 47 | - "registryType": "local", | ||
| 48 | - "dependencies": { | ||
| 49 | - "wdConstant": "file:../wdConstant", | ||
| 50 | - "wdKit": "file:../wdKit", | ||
| 51 | - "@ohos/axios": "^2.1.1" | ||
| 52 | - } | ||
| 53 | - }, | ||
| 54 | - "wdRouter@../../commons/wdRouter": { | ||
| 55 | - "name": "wdrouter", | ||
| 56 | - "resolved": "../../commons/wdRouter", | ||
| 57 | - "registryType": "local", | ||
| 58 | - "dependencies": { | ||
| 59 | - "wdKit": "file:../wdKit", | ||
| 60 | - "wdBean": "file:../../features/wdBean" | ||
| 61 | - } | ||
| 62 | - }, | ||
| 63 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 64 | - "name": "wdwebcomponent", | ||
| 65 | - "resolved": "../../commons/wdWebComponent", | ||
| 66 | - "registryType": "local", | ||
| 67 | - "dependencies": { | ||
| 68 | - "wdConstant": "file:../wdConstant", | ||
| 69 | - "wdKit": "file:../wdKit", | ||
| 70 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 71 | - "wdBean": "file:../../features/wdBean", | ||
| 72 | - "wdRouter": "file:../wdRouter" | ||
| 73 | - } | ||
| 74 | - } | ||
| 75 | - } | ||
| 76 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 9 | - "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 10 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 11 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit" | ||
| 12 | - }, | ||
| 13 | - "packages": { | ||
| 14 | - "@umeng/analytics@1.0.19": { | ||
| 15 | - "name": "@umeng/analytics", | ||
| 16 | - "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 17 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 18 | - "registryType": "ohpm" | ||
| 19 | - }, | ||
| 20 | - "@umeng/common@1.0.21": { | ||
| 21 | - "name": "@umeng/common", | ||
| 22 | - "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 23 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 24 | - "registryType": "ohpm", | ||
| 25 | - "dependencies": { | ||
| 26 | - "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 27 | - } | ||
| 28 | - }, | ||
| 29 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 30 | - "name": "libcommon.so", | ||
| 31 | - "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 32 | - "registryType": "local" | ||
| 33 | - }, | ||
| 34 | - "wdKit@../../commons/wdKit": { | ||
| 35 | - "name": "wdkit", | ||
| 36 | - "resolved": "../../commons/wdKit", | ||
| 37 | - "registryType": "local", | ||
| 38 | - "dependencies": { | ||
| 39 | - "@umeng/common": "^1.0.21", | ||
| 40 | - "@umeng/analytics": "^1.0.19" | ||
| 41 | - } | ||
| 42 | - } | ||
| 43 | - } | ||
| 44 | -} |
| @@ -41,7 +41,17 @@ export class WDAliPlayerController { | @@ -41,7 +41,17 @@ export class WDAliPlayerController { | ||
| 41 | private startTime: number = 0 | 41 | private startTime: number = 0 |
| 42 | public errorCode?: number | 42 | public errorCode?: number |
| 43 | public errorMesage?: string | 43 | public errorMesage?: string |
| 44 | + | ||
| 45 | + //onVideoSizeChange , onVideoSizeMethod同样的方法,不同地方使用 | ||
| 46 | + //AliPlayerRenderView回调 | ||
| 44 | public onVideoSizeChange?: (width: number, height: number) => void; | 47 | public onVideoSizeChange?: (width: number, height: number) => void; |
| 48 | + //PlayerUIComponent回调 | ||
| 49 | + public onVideoSizePlayerUIComponentMethod?: (width: number, height: number) => void; | ||
| 50 | + //PlayerComponent | ||
| 51 | + public onVideoSizePlayerComponentBack?: (width: number, height: number) => void; | ||
| 52 | + //PlayerTitleComponent | ||
| 53 | + public onVideoSizePlayerTitleComponentBack?: (width: number, height: number) => void; | ||
| 54 | + | ||
| 45 | public onBufferUpdate?: (buffered: number, duration: number) => void; | 55 | public onBufferUpdate?: (buffered: number, duration: number) => void; |
| 46 | public onTimeUpdate?: (position: number, duration: number) => void; | 56 | public onTimeUpdate?: (position: number, duration: number) => void; |
| 47 | public onVolumeUpdate?: (volume: number) => void; | 57 | public onVolumeUpdate?: (volume: number) => void; |
| @@ -170,6 +180,17 @@ export class WDAliPlayerController { | @@ -170,6 +180,17 @@ export class WDAliPlayerController { | ||
| 170 | if (this.onVideoSizeChange) { | 180 | if (this.onVideoSizeChange) { |
| 171 | this.onVideoSizeChange(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight()); | 181 | this.onVideoSizeChange(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight()); |
| 172 | } | 182 | } |
| 183 | + if(this.onVideoSizePlayerUIComponentMethod){ | ||
| 184 | + this.onVideoSizePlayerUIComponentMethod(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight()); | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + if(this.onVideoSizePlayerTitleComponentBack){ | ||
| 188 | + this.onVideoSizePlayerTitleComponentBack(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight()); | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + if(this.onVideoSizePlayerComponentBack){ | ||
| 192 | + this.onVideoSizePlayerComponentBack(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight()); | ||
| 193 | + } | ||
| 173 | if (this.onCanplay) { | 194 | if (this.onCanplay) { |
| 174 | this.onCanplay() | 195 | this.onCanplay() |
| 175 | } else { | 196 | } else { |
| @@ -49,6 +49,9 @@ export struct WDPlayerRenderView { | @@ -49,6 +49,9 @@ export struct WDPlayerRenderView { | ||
| 49 | @State videoHeight: number = 9 | 49 | @State videoHeight: number = 9 |
| 50 | @State videoRatio: number = 16 / 9 | 50 | @State videoRatio: number = 16 / 9 |
| 51 | @State selfSize: Size = new Size('100%', '100%'); | 51 | @State selfSize: Size = new Size('100%', '100%'); |
| 52 | + | ||
| 53 | + // 是否上推视频中 | ||
| 54 | + @Link liftVideo: boolean | ||
| 52 | private enableAliPlayer = false | 55 | private enableAliPlayer = false |
| 53 | 56 | ||
| 54 | aboutToAppear() { | 57 | aboutToAppear() { |
| @@ -61,7 +64,7 @@ export struct WDPlayerRenderView { | @@ -61,7 +64,7 @@ export struct WDPlayerRenderView { | ||
| 61 | 64 | ||
| 62 | this.playerController.onVideoSizeChange = (width: number, height: number) => { | 65 | this.playerController.onVideoSizeChange = (width: number, height: number) => { |
| 63 | // console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`) | 66 | // console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`) |
| 64 | - Logger.info(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`) | 67 | + Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`) |
| 65 | this.videoWidth = width; | 68 | this.videoWidth = width; |
| 66 | this.videoHeight = height; | 69 | this.videoHeight = height; |
| 67 | this.videoRatio = width / height | 70 | this.videoRatio = width / height |
| @@ -127,6 +130,21 @@ export struct WDPlayerRenderView { | @@ -127,6 +130,21 @@ export struct WDPlayerRenderView { | ||
| 127 | 130 | ||
| 128 | if (info.size.width > 0 && info.size.height > 0) { | 131 | if (info.size.width > 0 && info.size.height > 0) { |
| 129 | 132 | ||
| 133 | + if (!this.liftVideo) { | ||
| 134 | + if (this.videoHeight > 0 && this.videoWidth > 0) { | ||
| 135 | + this.xComponentController.setXComponentSurfaceRect({ | ||
| 136 | + surfaceWidth: info.size.width, | ||
| 137 | + surfaceHeight: info.size.width / this.videoRatio, | ||
| 138 | + }); | ||
| 139 | + return | ||
| 140 | + } | ||
| 141 | + this.xComponentController.setXComponentSurfaceRect({ | ||
| 142 | + surfaceWidth: info.size.width, | ||
| 143 | + surfaceHeight: info.size.height, | ||
| 144 | + }); | ||
| 145 | + return | ||
| 146 | + } | ||
| 147 | + | ||
| 130 | // 竖屏 | 148 | // 竖屏 |
| 131 | if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) { | 149 | if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) { |
| 132 | let ratio = this.videoWidth / this.videoHeight | 150 | let ratio = this.videoWidth / this.videoHeight |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 10 | - "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 11 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 12 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 13 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 14 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 15 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 16 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 17 | - "wdShareBase@../../commons/wdShareBase": "wdShareBase@../../commons/wdShareBase" | ||
| 18 | - }, | ||
| 19 | - "packages": { | ||
| 20 | - "@ohos/axios@2.2.0": { | ||
| 21 | - "name": "@ohos/axios", | ||
| 22 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 23 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 24 | - "registryType": "ohpm" | ||
| 25 | - }, | ||
| 26 | - "@umeng/analytics@1.0.19": { | ||
| 27 | - "name": "@umeng/analytics", | ||
| 28 | - "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 29 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 30 | - "registryType": "ohpm" | ||
| 31 | - }, | ||
| 32 | - "@umeng/common@1.0.21": { | ||
| 33 | - "name": "@umeng/common", | ||
| 34 | - "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 35 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 36 | - "registryType": "ohpm", | ||
| 37 | - "dependencies": { | ||
| 38 | - "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 39 | - } | ||
| 40 | - }, | ||
| 41 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 42 | - "name": "libcommon.so", | ||
| 43 | - "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 44 | - "registryType": "local" | ||
| 45 | - }, | ||
| 46 | - "wdBean@../wdBean": { | ||
| 47 | - "name": "wdbean", | ||
| 48 | - "resolved": "../wdBean", | ||
| 49 | - "registryType": "local" | ||
| 50 | - }, | ||
| 51 | - "wdConstant@../../commons/wdConstant": { | ||
| 52 | - "name": "wdconstant", | ||
| 53 | - "resolved": "../../commons/wdConstant", | ||
| 54 | - "registryType": "local" | ||
| 55 | - }, | ||
| 56 | - "wdKit@../../commons/wdKit": { | ||
| 57 | - "name": "wdkit", | ||
| 58 | - "resolved": "../../commons/wdKit", | ||
| 59 | - "registryType": "local", | ||
| 60 | - "dependencies": { | ||
| 61 | - "@umeng/common": "^1.0.21", | ||
| 62 | - "@umeng/analytics": "^1.0.19" | ||
| 63 | - } | ||
| 64 | - }, | ||
| 65 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 66 | - "name": "wdnetwork", | ||
| 67 | - "resolved": "../../commons/wdNetwork", | ||
| 68 | - "registryType": "local", | ||
| 69 | - "dependencies": { | ||
| 70 | - "wdConstant": "file:../wdConstant", | ||
| 71 | - "wdKit": "file:../wdKit", | ||
| 72 | - "@ohos/axios": "^2.1.1" | ||
| 73 | - } | ||
| 74 | - }, | ||
| 75 | - "wdRouter@../../commons/wdRouter": { | ||
| 76 | - "name": "wdrouter", | ||
| 77 | - "resolved": "../../commons/wdRouter", | ||
| 78 | - "registryType": "local", | ||
| 79 | - "dependencies": { | ||
| 80 | - "wdKit": "file:../wdKit", | ||
| 81 | - "wdBean": "file:../../features/wdBean", | ||
| 82 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 83 | - "wdConstant": "file:../../commons/wdConstant" | ||
| 84 | - } | ||
| 85 | - }, | ||
| 86 | - "wdShareBase@../../commons/wdShareBase": { | ||
| 87 | - "name": "wdsharebase", | ||
| 88 | - "resolved": "../../commons/wdShareBase", | ||
| 89 | - "registryType": "local", | ||
| 90 | - "packageType": "InterfaceHar" | ||
| 91 | - } | ||
| 92 | - } | ||
| 93 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@sensorsdata/analytics@^0.0.2": "@sensorsdata/analytics@0.0.2", | ||
| 10 | - "@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19", | ||
| 11 | - "@umeng/common@^1.0.21": "@umeng/common@1.0.21", | ||
| 12 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 13 | - "wdBean@../wdBean": "wdBean@../wdBean", | ||
| 14 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 15 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 16 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork" | ||
| 17 | - }, | ||
| 18 | - "packages": { | ||
| 19 | - "@ohos/axios@2.2.0": { | ||
| 20 | - "name": "@ohos/axios", | ||
| 21 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 22 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 23 | - "registryType": "ohpm" | ||
| 24 | - }, | ||
| 25 | - "@sensorsdata/analytics@0.0.2": { | ||
| 26 | - "name": "@sensorsdata/analytics", | ||
| 27 | - "integrity": "sha512-SQCEmOw8ftGJmKtPl/1qUczZqu/yoQ4F2QHpK2Mayk+XctvNDSHn4QWengHj/pg36AopvuVfa0i6KR9c4KiIuQ==", | ||
| 28 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@sensorsdata/analytics/-/analytics-0.0.2.har", | ||
| 29 | - "registryType": "ohpm" | ||
| 30 | - }, | ||
| 31 | - "@umeng/analytics@1.0.19": { | ||
| 32 | - "name": "@umeng/analytics", | ||
| 33 | - "integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==", | ||
| 34 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har", | ||
| 35 | - "registryType": "ohpm" | ||
| 36 | - }, | ||
| 37 | - "@umeng/common@1.0.21": { | ||
| 38 | - "name": "@umeng/common", | ||
| 39 | - "integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==", | ||
| 40 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har", | ||
| 41 | - "registryType": "ohpm", | ||
| 42 | - "dependencies": { | ||
| 43 | - "libcommon.so": "./src/main/cpp/types/libcommon" | ||
| 44 | - } | ||
| 45 | - }, | ||
| 46 | - "libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": { | ||
| 47 | - "name": "libcommon.so", | ||
| 48 | - "resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon", | ||
| 49 | - "registryType": "local" | ||
| 50 | - }, | ||
| 51 | - "wdBean@../wdBean": { | ||
| 52 | - "name": "wdbean", | ||
| 53 | - "resolved": "../wdBean", | ||
| 54 | - "registryType": "local" | ||
| 55 | - }, | ||
| 56 | - "wdConstant@../../commons/wdConstant": { | ||
| 57 | - "name": "wdconstant", | ||
| 58 | - "resolved": "../../commons/wdConstant", | ||
| 59 | - "registryType": "local" | ||
| 60 | - }, | ||
| 61 | - "wdKit@../../commons/wdKit": { | ||
| 62 | - "name": "wdkit", | ||
| 63 | - "resolved": "../../commons/wdKit", | ||
| 64 | - "registryType": "local", | ||
| 65 | - "dependencies": { | ||
| 66 | - "@umeng/common": "^1.0.21", | ||
| 67 | - "@umeng/analytics": "^1.0.19" | ||
| 68 | - } | ||
| 69 | - }, | ||
| 70 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 71 | - "name": "wdnetwork", | ||
| 72 | - "resolved": "../../commons/wdNetwork", | ||
| 73 | - "registryType": "local", | ||
| 74 | - "dependencies": { | ||
| 75 | - "wdConstant": "file:../wdConstant", | ||
| 76 | - "wdKit": "file:../wdKit", | ||
| 77 | - "@ohos/axios": "^2.1.1" | ||
| 78 | - } | ||
| 79 | - } | ||
| 80 | - } | ||
| 81 | -} |
| @@ -22,7 +22,7 @@ export class TrackingButton { | @@ -22,7 +22,7 @@ export class TrackingButton { | ||
| 22 | params["pageId"] = pageId | 22 | params["pageId"] = pageId |
| 23 | params["pageName"] = pageName | 23 | params["pageName"] = pageName |
| 24 | 24 | ||
| 25 | - Tracking.event("search_button_click ", params) | 25 | + Tracking.event("search_button_click", params) |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | } | 28 | } |
sight_harmony/oh-package-lock.json5
deleted
100644 → 0
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@mpaas/compress@^1.0.0": "@mpaas/compress@1.0.0", | ||
| 9 | - "@mpaas/fake-island@^1.0.0": "@mpaas/fake-island@1.0.0", | ||
| 10 | - "@mpaas/framework@0.0.2": "@mpaas/framework@0.0.2", | ||
| 11 | - "@mpaas/framework@^0.0.2": "@mpaas/framework@0.0.2", | ||
| 12 | - "@mpaas/fs-ext@^1.0.0": "@mpaas/fs-ext@1.0.0", | ||
| 13 | - "@mpaas/lang@^1.0.0": "@mpaas/lang@1.0.0", | ||
| 14 | - "@mpaas/path@^1.0.0": "@mpaas/path@1.0.0", | ||
| 15 | - "@mpaas/rpc@^0.0.2": "@mpaas/rpc@0.0.2", | ||
| 16 | - "@mpaas/shuckle@^1.0.0": "@mpaas/shuckle@1.0.0", | ||
| 17 | - "@mpaas/trace-log@^0.0.2": "@mpaas/trace-log@0.0.2", | ||
| 18 | - "@mpaas/transport_build@^0.0.2": "@mpaas/transport_build@0.0.2", | ||
| 19 | - "@mpaas/udid@0.0.2": "@mpaas/udid@0.0.2", | ||
| 20 | - "@mpaas/upgrade@0.0.2": "@mpaas/upgrade@0.0.2", | ||
| 21 | - "@ohos/crypto-js@^2.0.2": "@ohos/crypto-js@2.0.3", | ||
| 22 | - "@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16", | ||
| 23 | - "@ohos/pulltorefresh@^2.0.5": "@ohos/pulltorefresh@2.0.5", | ||
| 24 | - "dayjs@^1.11.7": "dayjs@1.11.7", | ||
| 25 | - "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress": "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress", | ||
| 26 | - "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api": "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api", | ||
| 27 | - "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types": "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types", | ||
| 28 | - "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types": "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types", | ||
| 29 | - "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types": "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types", | ||
| 30 | - "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle": "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle", | ||
| 31 | - "long@^5.2.1": "long@5.2.1", | ||
| 32 | - "pako@^2.1.0": "pako@2.1.0" | ||
| 33 | - }, | ||
| 34 | - "packages": { | ||
| 35 | - "@mpaas/compress@1.0.0": { | ||
| 36 | - "name": "@mpaas/compress", | ||
| 37 | - "integrity": "sha512-x/aUK/zKjoUnd4kYGNAI1JMcEY2n4N6Rn+F+zcIYs8WLgobY6kFXTphLJ/NlSgjJklc2009U8zeStvtjon1zaQ==", | ||
| 38 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/compress/compress-1.0.0.har", | ||
| 39 | - "registryType": "ohpm", | ||
| 40 | - "dependencies": { | ||
| 41 | - "libcompress.so": "file:./src/main/cpp/types/libcompress" | ||
| 42 | - } | ||
| 43 | - }, | ||
| 44 | - "@mpaas/fake-island@1.0.0": { | ||
| 45 | - "name": "@mpaas/fake-island", | ||
| 46 | - "integrity": "sha512-cEt0Zsie0rwfvnYmqA+6pa93L6NLkJKwiqJCoE9Z2hFjhk9s4RSz7F0AUuj4WobrpdElXuipoCNFPXWLb4ZBlA==", | ||
| 47 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fake-island/fake-island-1.0.0.har", | ||
| 48 | - "registryType": "ohpm", | ||
| 49 | - "dependencies": { | ||
| 50 | - "libgwcli.so": "file:./types" | ||
| 51 | - } | ||
| 52 | - }, | ||
| 53 | - "@mpaas/framework@0.0.2": { | ||
| 54 | - "name": "@mpaas/framework", | ||
| 55 | - "integrity": "sha512-nNpCI44zvg4fN9GNM5m31LdqfLrej9mMo/+BMny8QK+/Jvc3m/itE45bWZZ7unfflq40H2t4YOgtNAIW3m8MaA==", | ||
| 56 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/framework/framework-0.0.2.har", | ||
| 57 | - "registryType": "ohpm", | ||
| 58 | - "dependencies": { | ||
| 59 | - "libframework_api.so": "file:./src/main/cpp/types/libframework_api", | ||
| 60 | - "@mpaas/udid": "0.0.2" | ||
| 61 | - } | ||
| 62 | - }, | ||
| 63 | - "@mpaas/fs-ext@1.0.0": { | ||
| 64 | - "name": "@mpaas/fs-ext", | ||
| 65 | - "integrity": "sha512-4TGUdrkmVSFktp1NcRdcs4uLYH6GvN1aTkMD2z8TJLztz5Hq5fMrvuznsmwTsSaRxGfGuyHPER8enMQo8wcfKA==", | ||
| 66 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fs-ext/fs-ext-1.0.0.har", | ||
| 67 | - "registryType": "ohpm", | ||
| 68 | - "dependencies": { | ||
| 69 | - "@mpaas/path": "^1.0.0" | ||
| 70 | - } | ||
| 71 | - }, | ||
| 72 | - "@mpaas/lang@1.0.0": { | ||
| 73 | - "name": "@mpaas/lang", | ||
| 74 | - "integrity": "sha512-dcQ2QPrvwZgBhoGUjAbSFfkReDkwqEPMTzy/Xk05dhIB9VVznpLPahlQLVi0Am1FPATCT8J7DDrko9aJLOba+w==", | ||
| 75 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/lang/lang-1.0.0.har", | ||
| 76 | - "registryType": "ohpm", | ||
| 77 | - "dependencies": { | ||
| 78 | - "liblang.so": "file:./types" | ||
| 79 | - } | ||
| 80 | - }, | ||
| 81 | - "@mpaas/path@1.0.0": { | ||
| 82 | - "name": "@mpaas/path", | ||
| 83 | - "integrity": "sha512-TNjPaVOiq4DTiNFexSeI9isxeJ1H4q9Vieh3Bnv66o0U/e7rwV1qjEUtMvihX3MlsX0VKVkT0Xyf/wm18l4XYw==", | ||
| 84 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/path/path-1.0.0.har", | ||
| 85 | - "registryType": "ohpm" | ||
| 86 | - }, | ||
| 87 | - "@mpaas/rpc@0.0.2": { | ||
| 88 | - "name": "@mpaas/rpc", | ||
| 89 | - "integrity": "sha512-BeiXDHW77CpZF5x4nuQc+3A7MfhFfU3+Wc73gac/ZRhIPuAAzfLmlzm5alqdm6oiWAw17ERQydUSG4SQSCHQ4g==", | ||
| 90 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/rpc/rpc-0.0.2.har", | ||
| 91 | - "registryType": "ohpm", | ||
| 92 | - "dependencies": { | ||
| 93 | - "@mpaas/transport_build": "^0.0.2", | ||
| 94 | - "@mpaas/lang": "^1.0.0", | ||
| 95 | - "@mpaas/framework": "^0.0.2" | ||
| 96 | - } | ||
| 97 | - }, | ||
| 98 | - "@mpaas/shuckle@1.0.0": { | ||
| 99 | - "name": "@mpaas/shuckle", | ||
| 100 | - "integrity": "sha512-B0MhrNzwG9pIoPxYVBldyenQWtWfTv5twd/0Ur1LbMpbp09AQ5wrZjKgDoeUtsIls9gzL9T8ngDZU6mRn8SYgQ==", | ||
| 101 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/shuckle/shuckle-1.0.0.har", | ||
| 102 | - "registryType": "ohpm", | ||
| 103 | - "dependencies": { | ||
| 104 | - "libshuckle.so": "file:./src/main/cpp/types/libshuckle", | ||
| 105 | - "@mpaas/framework": "^0.0.2" | ||
| 106 | - } | ||
| 107 | - }, | ||
| 108 | - "@mpaas/trace-log@0.0.2": { | ||
| 109 | - "name": "@mpaas/trace-log", | ||
| 110 | - "integrity": "sha512-Llsdnx3L2tJJDg9vwJY01YsK4IOSmCo4SmAIW9yFHTzylrzFSWdFefRhJbNlkQQilXdYygEkBByXVvT1wFSmAg==", | ||
| 111 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/trace-log/trace-log-0.0.2.har", | ||
| 112 | - "registryType": "ohpm", | ||
| 113 | - "dependencies": { | ||
| 114 | - "@mpaas/lang": "^1.0.0", | ||
| 115 | - "@mpaas/fs-ext": "^1.0.0", | ||
| 116 | - "@mpaas/path": "^1.0.0", | ||
| 117 | - "@mpaas/framework": "0.0.2", | ||
| 118 | - "libmplog.so": "file:types", | ||
| 119 | - "dayjs": "^1.11.7" | ||
| 120 | - } | ||
| 121 | - }, | ||
| 122 | - "@mpaas/transport_build@0.0.2": { | ||
| 123 | - "name": "@mpaas/transport_build", | ||
| 124 | - "integrity": "sha512-utz9C/cKIWbYrNiTBjk1gUhPH4/M73G64hWlrYKDpkfJHJmdYcQmmYV3v7Jit1z7Qg7hhu0aOaZzShqdQdC7rg==", | ||
| 125 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/transport_build/transport_build-0.0.2.har", | ||
| 126 | - "registryType": "ohpm", | ||
| 127 | - "dependencies": { | ||
| 128 | - "@ohos/crypto-js": "^2.0.2", | ||
| 129 | - "dayjs": "^1.11.7", | ||
| 130 | - "pako": "^2.1.0", | ||
| 131 | - "@mpaas/fake-island": "^1.0.0", | ||
| 132 | - "long": "^5.2.1", | ||
| 133 | - "@mpaas/framework": "^0.0.2", | ||
| 134 | - "@mpaas/shuckle": "^1.0.0", | ||
| 135 | - "@mpaas/compress": "^1.0.0" | ||
| 136 | - } | ||
| 137 | - }, | ||
| 138 | - "@mpaas/udid@0.0.2": { | ||
| 139 | - "name": "@mpaas/udid", | ||
| 140 | - "integrity": "sha512-YFLSgBOrIjjmcFm4Cn2BB1tspHKHdB4qipVl4MUhHHDfiUYbLIVuv7x5xB9xPuPf0gKO8rx0yqUuzkaNDoNsAw==", | ||
| 141 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/udid/udid-0.0.2.har", | ||
| 142 | - "registryType": "ohpm" | ||
| 143 | - }, | ||
| 144 | - "@mpaas/upgrade@0.0.2": { | ||
| 145 | - "name": "@mpaas/upgrade", | ||
| 146 | - "integrity": "sha512-VWamULIoJPA6nxUADwwNXd3uOspZeYAsRh05pApVilIdum5ktIMXIFl71jAKsChs3jtrhs9y5EShoZD4MZrGsA==", | ||
| 147 | - "resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/upgrade/upgrade-0.0.2.har", | ||
| 148 | - "registryType": "ohpm", | ||
| 149 | - "dependencies": { | ||
| 150 | - "@mpaas/framework": "^0.0.2", | ||
| 151 | - "@mpaas/rpc": "^0.0.2", | ||
| 152 | - "@mpaas/lang": "^1.0.0", | ||
| 153 | - "@mpaas/transport_build": "^0.0.2", | ||
| 154 | - "@mpaas/trace-log": "^0.0.2" | ||
| 155 | - } | ||
| 156 | - }, | ||
| 157 | - "@ohos/crypto-js@2.0.3": { | ||
| 158 | - "name": "@ohos/crypto-js", | ||
| 159 | - "integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==", | ||
| 160 | - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/crypto-js/-/crypto-js-2.0.3.har", | ||
| 161 | - "registryType": "ohpm" | ||
| 162 | - }, | ||
| 163 | - "@ohos/hypium@1.0.16": { | ||
| 164 | - "name": "@ohos/hypium", | ||
| 165 | - "integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==", | ||
| 166 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.16.har", | ||
| 167 | - "registryType": "ohpm" | ||
| 168 | - }, | ||
| 169 | - "@ohos/pulltorefresh@2.0.5": { | ||
| 170 | - "name": "@ohos/pulltorefresh", | ||
| 171 | - "integrity": "sha512-mgBvJ6Ga70LmAoPKTOEPLFJluHUEAaBt2+7wF7R6223Vw6UEbZrof1MyvVOLEHk8Uc64ASIMW/TNQ8AHraTV5A==", | ||
| 172 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/pulltorefresh/-/pulltorefresh-2.0.5.har", | ||
| 173 | - "registryType": "ohpm" | ||
| 174 | - }, | ||
| 175 | - "dayjs@1.11.7": { | ||
| 176 | - "name": "dayjs", | ||
| 177 | - "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==", | ||
| 178 | - "resolved": "https://ohpm.openharmony.cn/ohpm/dayjs/-/dayjs-1.11.7.tgz", | ||
| 179 | - "shasum": "4b296922642f70999544d1144a2c25730fce63e2", | ||
| 180 | - "registryType": "ohpm" | ||
| 181 | - }, | ||
| 182 | - "libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress": { | ||
| 183 | - "name": "libcompress.so", | ||
| 184 | - "resolved": "oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress", | ||
| 185 | - "registryType": "local" | ||
| 186 | - }, | ||
| 187 | - "libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api": { | ||
| 188 | - "name": "libframework_api.so", | ||
| 189 | - "resolved": "oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api", | ||
| 190 | - "registryType": "local" | ||
| 191 | - }, | ||
| 192 | - "libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types": { | ||
| 193 | - "name": "libgwcli.so", | ||
| 194 | - "resolved": "oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types", | ||
| 195 | - "registryType": "local" | ||
| 196 | - }, | ||
| 197 | - "liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types": { | ||
| 198 | - "name": "liblang.so", | ||
| 199 | - "resolved": "oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types", | ||
| 200 | - "registryType": "local" | ||
| 201 | - }, | ||
| 202 | - "libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types": { | ||
| 203 | - "name": "libmplog.so", | ||
| 204 | - "resolved": "oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types", | ||
| 205 | - "registryType": "local" | ||
| 206 | - }, | ||
| 207 | - "libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle": { | ||
| 208 | - "name": "lishuckle.so", | ||
| 209 | - "resolved": "oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle", | ||
| 210 | - "registryType": "local", | ||
| 211 | - "dependencies": { | ||
| 212 | - "@mpaas/framework": "^0.0.2" | ||
| 213 | - } | ||
| 214 | - }, | ||
| 215 | - "long@5.2.1": { | ||
| 216 | - "name": "long", | ||
| 217 | - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==", | ||
| 218 | - "resolved": "https://ohpm.openharmony.cn/ohpm/long/-/long-5.2.1.tgz", | ||
| 219 | - "shasum": "e27595d0083d103d2fa2c20c7699f8e0c92b897f", | ||
| 220 | - "registryType": "ohpm" | ||
| 221 | - }, | ||
| 222 | - "pako@2.1.0": { | ||
| 223 | - "name": "pako", | ||
| 224 | - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", | ||
| 225 | - "resolved": "https://ohpm.openharmony.cn/ohpm/pako/-/pako-2.1.0.tgz", | ||
| 226 | - "shasum": "266cc37f98c7d883545d11335c00fbd4062c9a86", | ||
| 227 | - "registryType": "ohpm" | ||
| 228 | - } | ||
| 229 | - } | ||
| 230 | -} |
| 1 | -{ | ||
| 2 | - "meta": { | ||
| 3 | - "stableOrder": true | ||
| 4 | - }, | ||
| 5 | - "lockfileVersion": 3, | ||
| 6 | - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||
| 7 | - "specifiers": { | ||
| 8 | - "@ohos/axios@^2.1.1": "@ohos/axios@2.2.0", | ||
| 9 | - "@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0", | ||
| 10 | - "wdBean@../../features/wdBean": "wdBean@../../features/wdBean", | ||
| 11 | - "wdComponent@../../features/wdComponent": "wdComponent@../../features/wdComponent", | ||
| 12 | - "wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant", | ||
| 13 | - "wdDetailPlayApi@../../features/wdDetailPlayApi": "wdDetailPlayApi@../../features/wdDetailPlayApi", | ||
| 14 | - "wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo", | ||
| 15 | - "wdHwAbility@../../features/wdHwAbility": "wdHwAbility@../../features/wdHwAbility", | ||
| 16 | - "wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge", | ||
| 17 | - "wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit", | ||
| 18 | - "wdLogin@../../features/wdLogin": "wdLogin@../../features/wdLogin", | ||
| 19 | - "wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork", | ||
| 20 | - "wdPlayer@../../features/wdPlayer": "wdPlayer@../../features/wdPlayer", | ||
| 21 | - "wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter", | ||
| 22 | - "wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent" | ||
| 23 | - }, | ||
| 24 | - "packages": { | ||
| 25 | - "@ohos/axios@2.2.0": { | ||
| 26 | - "name": "@ohos/axios", | ||
| 27 | - "integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==", | ||
| 28 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har", | ||
| 29 | - "registryType": "ohpm" | ||
| 30 | - }, | ||
| 31 | - "@ohos/lottie@2.0.0": { | ||
| 32 | - "name": "@ohos/lottie", | ||
| 33 | - "integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==", | ||
| 34 | - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har", | ||
| 35 | - "registryType": "ohpm" | ||
| 36 | - }, | ||
| 37 | - "wdBean@../../features/wdBean": { | ||
| 38 | - "name": "wdbean", | ||
| 39 | - "resolved": "../../features/wdBean", | ||
| 40 | - "registryType": "local" | ||
| 41 | - }, | ||
| 42 | - "wdComponent@../../features/wdComponent": { | ||
| 43 | - "name": "wdcomponent", | ||
| 44 | - "resolved": "../../features/wdComponent", | ||
| 45 | - "registryType": "local", | ||
| 46 | - "dependencies": { | ||
| 47 | - "@ohos/lottie": "2.0.0", | ||
| 48 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 49 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 50 | - "wdLogin": "file:../../features/wdLogin", | ||
| 51 | - "wdKit": "file:../../commons/wdKit", | ||
| 52 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 53 | - "wdBean": "file:../../features/wdBean", | ||
| 54 | - "wdDetailPlayShortVideo": "file:../../features/wdDetailPlayShortVideo", | ||
| 55 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 56 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 57 | - "wdJsBridge": "file:../../commons/wdJsBridge" | ||
| 58 | - } | ||
| 59 | - }, | ||
| 60 | - "wdConstant@../../commons/wdConstant": { | ||
| 61 | - "name": "wdconstant", | ||
| 62 | - "resolved": "../../commons/wdConstant", | ||
| 63 | - "registryType": "local" | ||
| 64 | - }, | ||
| 65 | - "wdDetailPlayApi@../../features/wdDetailPlayApi": { | ||
| 66 | - "name": "wddetailplayapi", | ||
| 67 | - "resolved": "../../features/wdDetailPlayApi", | ||
| 68 | - "registryType": "local", | ||
| 69 | - "dependencies": { | ||
| 70 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 71 | - "wdKit": "file:../../commons/wdKit", | ||
| 72 | - "wdBean": "file:../../features/wdBean", | ||
| 73 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 74 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 75 | - } | ||
| 76 | - }, | ||
| 77 | - "wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo": { | ||
| 78 | - "name": "wddetailplayshortvideo", | ||
| 79 | - "resolved": "../../features/wdDetailPlayShortVideo", | ||
| 80 | - "registryType": "local", | ||
| 81 | - "dependencies": { | ||
| 82 | - "@ohos/lottie": "2.0.0", | ||
| 83 | - "wdPlayer": "file:../../features/wdPlayer", | ||
| 84 | - "wdKit": "file:../../commons/wdKit", | ||
| 85 | - "wdBean": "file:../../features/wdBean", | ||
| 86 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 87 | - "wdNetwork": "file:../../commons/wdNetwork", | ||
| 88 | - "wdDetailPlayApi": "file:../../features/wdDetailPlayApi" | ||
| 89 | - } | ||
| 90 | - }, | ||
| 91 | - "wdHwAbility@../../features/wdHwAbility": { | ||
| 92 | - "name": "wdhwability", | ||
| 93 | - "resolved": "../../features/wdHwAbility", | ||
| 94 | - "registryType": "local", | ||
| 95 | - "dependencies": { | ||
| 96 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 97 | - "wdLogin": "file:../../features/wdLogin", | ||
| 98 | - "wdKit": "file:../../commons/wdKit", | ||
| 99 | - "wdBean": "file:../../features/wdBean", | ||
| 100 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 101 | - }, | ||
| 102 | - "packageType": "InterfaceHar" | ||
| 103 | - }, | ||
| 104 | - "wdJsBridge@../../commons/wdJsBridge": { | ||
| 105 | - "name": "wdjsbridge", | ||
| 106 | - "resolved": "../../commons/wdJsBridge", | ||
| 107 | - "registryType": "local" | ||
| 108 | - }, | ||
| 109 | - "wdKit@../../commons/wdKit": { | ||
| 110 | - "name": "wdkit", | ||
| 111 | - "resolved": "../../commons/wdKit", | ||
| 112 | - "registryType": "local" | ||
| 113 | - }, | ||
| 114 | - "wdLogin@../../features/wdLogin": { | ||
| 115 | - "name": "wdlogin", | ||
| 116 | - "resolved": "../../features/wdLogin", | ||
| 117 | - "registryType": "local", | ||
| 118 | - "dependencies": { | ||
| 119 | - "wdConstant": "file:../../commons/wdConstant", | ||
| 120 | - "wdKit": "file:../../commons/wdKit", | ||
| 121 | - "wdWebComponent": "file:../../commons/wdWebComponent", | ||
| 122 | - "wdBean": "file:../../features/wdBean", | ||
| 123 | - "wdRouter": "file:../../commons/wdRouter", | ||
| 124 | - "wdNetwork": "file:../../commons/wdNetwork" | ||
| 125 | - } | ||
| 126 | - }, | ||
| 127 | - "wdNetwork@../../commons/wdNetwork": { | ||
| 128 | - "name": "wdnetwork", | ||
| 129 | - "resolved": "../../commons/wdNetwork", | ||
| 130 | - "registryType": "local", | ||
| 131 | - "dependencies": { | ||
| 132 | - "wdConstant": "file:../wdConstant", | ||
| 133 | - "wdKit": "file:../wdKit", | ||
| 134 | - "@ohos/axios": "^2.1.1" | ||
| 135 | - } | ||
| 136 | - }, | ||
| 137 | - "wdPlayer@../../features/wdPlayer": { | ||
| 138 | - "name": "wdplayer", | ||
| 139 | - "resolved": "../../features/wdPlayer", | ||
| 140 | - "registryType": "local", | ||
| 141 | - "dependencies": { | ||
| 142 | - "wdKit": "file:../../commons/wdKit" | ||
| 143 | - } | ||
| 144 | - }, | ||
| 145 | - "wdRouter@../../commons/wdRouter": { | ||
| 146 | - "name": "wdrouter", | ||
| 147 | - "resolved": "../../commons/wdRouter", | ||
| 148 | - "registryType": "local", | ||
| 149 | - "dependencies": { | ||
| 150 | - "wdKit": "file:../wdKit", | ||
| 151 | - "wdBean": "file:../../features/wdBean" | ||
| 152 | - } | ||
| 153 | - }, | ||
| 154 | - "wdWebComponent@../../commons/wdWebComponent": { | ||
| 155 | - "name": "wdwebcomponent", | ||
| 156 | - "resolved": "../../commons/wdWebComponent", | ||
| 157 | - "registryType": "local", | ||
| 158 | - "dependencies": { | ||
| 159 | - "wdConstant": "file:../wdConstant", | ||
| 160 | - "wdKit": "file:../wdKit", | ||
| 161 | - "wdJsBridge": "file:../wdJsBridge", | ||
| 162 | - "wdBean": "file:../../features/wdBean", | ||
| 163 | - "wdRouter": "file:../wdRouter" | ||
| 164 | - } | ||
| 165 | - } | ||
| 166 | - } | ||
| 167 | -} |
| @@ -151,7 +151,7 @@ struct Index { | @@ -151,7 +151,7 @@ struct Index { | ||
| 151 | TapGesture() | 151 | TapGesture() |
| 152 | .onAction((event: GestureEvent) => { | 152 | .onAction((event: GestureEvent) => { |
| 153 | if (this.AudioSuspension.playerController) { | 153 | if (this.AudioSuspension.playerController) { |
| 154 | - this.AudioSuspension.playerController.get().switchPlayOrPause() | 154 | + this.AudioSuspension.playerController.get().pause() |
| 155 | this.AudioSuspension.minimize() | 155 | this.AudioSuspension.minimize() |
| 156 | } | 156 | } |
| 157 | })) | 157 | })) |
| @@ -37,6 +37,8 @@ export struct VideoChannelPage { | @@ -37,6 +37,8 @@ export struct VideoChannelPage { | ||
| 37 | aboutToAppear(): void { | 37 | aboutToAppear(): void { |
| 38 | this.setBarBackgroundColor() | 38 | this.setBarBackgroundColor() |
| 39 | console.log(TAG, 'aboutToAppear') | 39 | console.log(TAG, 'aboutToAppear') |
| 40 | + | ||
| 41 | + console.log('XY', '----VideoChannel-------aboutToAppear') | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | /** | 44 | /** |
| 1 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; | 1 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; |
| 2 | import { window } from '@kit.ArkUI'; | 2 | import { window } from '@kit.ArkUI'; |
| 3 | import { BusinessError } from '@kit.BasicServicesKit'; | 3 | import { BusinessError } from '@kit.BasicServicesKit'; |
| 4 | -import { NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; | 4 | +import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit'; |
| 5 | import { ProcessUtils } from 'wdRouter'; | 5 | import { ProcessUtils } from 'wdRouter'; |
| 6 | import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel' | 6 | import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel' |
| 7 | 7 | ||
| @@ -79,8 +79,11 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -79,8 +79,11 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 79 | pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | 79 | pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { |
| 80 | return new Promise((resolve, reject) => { | 80 | return new Promise((resolve, reject) => { |
| 81 | pageLoader.loadContent('pages/MainPage') | 81 | pageLoader.loadContent('pages/MainPage') |
| 82 | - .then(() => { | 82 | + .then( async () => { |
| 83 | if (NetworkUtil.isNetConnected()) { | 83 | if (NetworkUtil.isNetConnected()) { |
| 84 | + if (await FastClickUtil.isMinDelayTime()) { | ||
| 85 | + return | ||
| 86 | + } | ||
| 84 | DailyPaperTopicModel.getDailyPaperTopic().then(dailyPaperTopicBean => { | 87 | DailyPaperTopicModel.getDailyPaperTopic().then(dailyPaperTopicBean => { |
| 85 | if (dailyPaperTopicBean && dailyPaperTopicBean.id > 0) { | 88 | if (dailyPaperTopicBean && dailyPaperTopicBean.id > 0) { |
| 86 | SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id); | 89 | SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id); |
-
Please register or login to post a comment