wangliang_wd

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
... ... @@ -8,4 +8,6 @@
/.clangd
/.clang-format
/.clang-tidy
**/.test
\ No newline at end of file
**/.test
**/oh-package-lock.json5
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -50,6 +50,13 @@
"compileSdkVersion": "5.0.0(12)",
"compatibleSdkVersion": "5.0.0(12)",
"runtimeOS": "HarmonyOS",
"buildOption": {
"arkOptions": {
"buildProfileFields": {
"BUILD_VERSION": ""
}
}
},
},
{
"name": "productRELEASE",
... ... @@ -57,6 +64,13 @@
"compileSdkVersion": "5.0.0(12)",
"compatibleSdkVersion": "5.0.0(12)",
"runtimeOS": "HarmonyOS",
"buildOption": {
"arkOptions": {
"buildProfileFields": {
"BUILD_VERSION": ""
}
}
}
}
],
"buildModeSet": [
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -3,4 +3,6 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
/BuildProfile.ets
\ No newline at end of file
... ...
export default class BuildProfile {
static readonly HAR_VERSION = '1.0.0';
static readonly BUILD_MODE_NAME = 'debug';
static readonly DEBUG = true;
static readonly TARGET_NAME = 'default';
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -2,7 +2,9 @@
"apiType": "stageMode",
"buildOption": {
"arkOptions": {
// "apPath": "./modules.ap" /* Profile used for profile-guided optimization (PGO), a compiler optimization technique to improve app runtime performance. */
"buildProfileFields": {
"BUILD_TIME": ""
}
}
},
"buildOptionSet": [
... ... @@ -16,6 +18,9 @@
"./obfuscation-rules.txt"
]
}
},
"buildProfileFields": {
"BUILD_TIME": ""
}
}
},
... ...
import { hspTasks } from '@ohos/hvigor-ohos-plugin';
import { appTasks, OhosAppContext, OhosPluginId } from '@ohos/hvigor-ohos-plugin';
import { hvigor, getNode } from '@ohos/hvigor'
// 获取根节点
const rootNode = getNode(__filename);
// 为根节点添加一个afterNodeEvaluate hook 在hook中修改根目录下的build-profile.json5的内容并使能
rootNode.afterNodeEvaluate(node => {
// 获取app插件的上下文对象
const appContext = node.getContext(OhosPluginId.OHOS_HSP_PLUGIN) as OhosHspContext;
// 通过上下文对象获取从根目录build-profile.json5文件中读出来的obj对象
const buildProfileOpt = appContext.getBuildProfileOpt();
buildProfileOpt['buildOption']['arkOptions']['buildProfileFields'] = {
"BUILD_VERSION": getBuildVersion(),
};
// 将obj对象设置回上下文对象以使能到构建的过程与结果中
appContext.setBuildProfileOpt(buildProfileOpt);
})
export default {
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins: [] /* Custom plugin to extend the functionality of Hvigor. */
}
function getBuildVersion() {
// build时间作为版本
let now = new Date()
let year = now.getFullYear()
let month = ('0' + (now.getMonth() + 1)).slice(-2)
let day = ('0' + (now.getDate())).slice(-2)
let hours = ('0' + (now.getHours())).slice(-2)
let minutes = ('0' + (now.getMinutes())).slice(-2)
let str = year + month + day + hours + minutes
return str;
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19",
"@umeng/common@^1.0.21": "@umeng/common@1.0.21",
"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"
},
"packages": {
"@umeng/analytics@1.0.19": {
"name": "@umeng/analytics",
"integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har",
"registryType": "ohpm"
},
"@umeng/common@1.0.21": {
"name": "@umeng/common",
"integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har",
"registryType": "ohpm",
"dependencies": {
"libcommon.so": "./src/main/cpp/types/libcommon"
}
},
"libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": {
"name": "libcommon.so",
"resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
"registryType": "local"
}
}
}
\ No newline at end of file
import bundleManager from '@ohos.bundle.bundleManager';
import common from '@ohos.app.ability.common';
import { Logger } from './Logger';
import BuildProfile from 'BuildProfile';
const TAG: string = 'AppUtils';
... ... @@ -8,9 +9,14 @@ const TAG: string = 'AppUtils';
* 与应用相关属性或操作
*/
export class AppUtils {
private static buildVersion: string = ''
static {
AppUtils.buildVersion = BuildProfile.BUILD_VERSION;
}
/**
* 获取应用名称
* 即:咪咕视频
* 即:人民日报
*/
static getAppName(context: common.Context): string {
// todo:获取到的是 $string:app_name
... ... @@ -20,7 +26,6 @@ export class AppUtils {
/**
* 获取应用的包名
* 即:com.cmcc.myapplication
*/
static getPackageName(context: common.Context): string {
return context.applicationInfo?.name;
... ... @@ -60,7 +65,6 @@ export class AppUtils {
}
static getOSName() {
// TODO: 待确认,暂时写死Android
return "Harmony"
}
... ... @@ -74,5 +78,12 @@ export class AppUtils {
}
return '';
}
/**
* 应用build版本,时间,如:'202405291450'
*/
static getBuildVersion(): string {
return AppUtils.buildVersion;
}
}
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19",
"@umeng/common@^1.0.21": "@umeng/common@1.0.21",
"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",
"wdConstant@../wdConstant": "wdConstant@../wdConstant",
"wdKit@../wdKit": "wdKit@../wdKit"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@umeng/analytics@1.0.19": {
"name": "@umeng/analytics",
"integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har",
"registryType": "ohpm"
},
"@umeng/common@1.0.21": {
"name": "@umeng/common",
"integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har",
"registryType": "ohpm",
"dependencies": {
"libcommon.so": "./src/main/cpp/types/libcommon"
}
},
"libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": {
"name": "libcommon.so",
"resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
"registryType": "local"
},
"wdConstant@../wdConstant": {
"name": "wdconstant",
"resolved": "../wdConstant",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local",
"dependencies": {
"@umeng/common": "^1.0.21",
"@umeng/analytics": "^1.0.19"
}
}
}
}
\ No newline at end of file
... ... @@ -40,9 +40,6 @@ instance.interceptors.request.use(
// 公共请求参数
// config.params.key = key
Logger.debug('HttpRequest', 'request: ' + config.url)
// TODO 临时打印token,测试token失效。待删除
Logger.debug('HttpRequest', 'request token: ' + config?.headers?.get('RMRB-X-TOKEN'))
Logger.debug('HttpRequest', 'request cookie: ' + config?.headers?.get('cookie'))
return config;
},
(error: AxiosError) => {
... ...
... ... @@ -16,7 +16,7 @@ export class HttpParams {
headers['plat'] = DeviceUtil.getPlat()
headers['Content-Type'] = 'application/json; charset=utf-8'
headers['device_id'] = DeviceUtil.clientId()
headers['build_version'] = HttpParams.getVersion()
headers['build_version'] = AppUtils.getBuildVersion()
headers['adcode'] = HttpUtils.getProvinceCode()
headers['os_version'] = DeviceUtil.getOsVersion()
headers['system'] = AppUtils.getOSName()
... ... @@ -80,9 +80,4 @@ export class HttpParams {
headers['city_dode'] = encodeURI(cityCode)
}
}
private static getVersion() {
// TODO build时间,待对接build生成属性
return '202401242103';
}
}
\ No newline at end of file
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"wdBean@../../features/wdBean": "wdBean@../../features/wdBean",
"wdKit@../wdKit": "wdKit@../wdKit"
},
"packages": {
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local"
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"wdBean@../../features/wdBean": "wdBean@../../features/wdBean",
"wdConstant@../wdConstant": "wdConstant@../wdConstant",
"wdJsBridge@../wdJsBridge": "wdJsBridge@../wdJsBridge",
"wdKit@../wdKit": "wdKit@../wdKit",
"wdRouter@../wdRouter": "wdRouter@../wdRouter"
},
"packages": {
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdConstant@../wdConstant": {
"name": "wdconstant",
"resolved": "../wdConstant",
"registryType": "local"
},
"wdJsBridge@../wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../wdJsBridge",
"registryType": "local"
},
"wdKit@../wdKit": {
"name": "wdkit",
"resolved": "../wdKit",
"registryType": "local"
},
"wdRouter@../wdRouter": {
"name": "wdrouter",
"resolved": "../wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -8,6 +8,7 @@ import { RmhInfoDTO } from '../detail/RmhInfoDTO';
import { commentInfo } from './commentInfo';
import { BaseDTO } from '../component/BaseDTO';
import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
import { ReserveItemBean } from '../live/ReserveItemBean';
export class ContentShareInfoDTO {
shareTitle: string = ''
... ... @@ -67,8 +68,8 @@ export class ContentDTO implements BaseDTO {
vImageUrl: string = '';
screenType: string = '';
source: string = '';
objectId: string = '';
objectType: string = '';
objectId: string = '';
objectLevel: string = '';
channelId: string = '';
relId: string = '';
... ... @@ -115,7 +116,11 @@ export class ContentDTO implements BaseDTO {
//本地字段:时间轴专题页节点组件时间;【如果开启模糊则显示时间->左右;0:否,1:是】
timeBlurred:number = 0
top:number = 0
// 直播预约状态
reserveItemBean : ReserveItemBean = new ReserveItemBean(-1,this.relId,false)
// keyGenerator相关字符串,用于刷新list布局
timestamp: String = '1'
// 自定义参数,用于跳转对应页面时 传递targetLayout参数用
customParamTargetLayout?: string
... ...
@Observed export class ReserveItemBean {
@Observed export class ReserveItemBean {
liveId: number
relationId: string
subscribe: boolean
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdDetailPlayShortVideo@../wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../wdDetailPlayShortVideo",
"wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdLogin@../wdLogin": "wdLogin@../wdLogin",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@ohos/lottie@2.0.0": {
"name": "@ohos/lottie",
"integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdDetailPlayShortVideo@../wdDetailPlayShortVideo": {
"name": "wddetailplayshortvideo",
"resolved": "../wdDetailPlayShortVideo",
"registryType": "local",
"dependencies": {
"@ohos/lottie": "2.0.0",
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdDetailPlayApi": "file:../../features/wdDetailPlayApi"
}
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdLogin@../wdLogin": {
"name": "wdlogin",
"resolved": "../wdLogin",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
}
\ No newline at end of file
... ... @@ -19,6 +19,7 @@ import { SearchContentComponent } from './cardview/SearchContentComponent';
import { DateTimeUtils } from 'wdKit/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LiveBigImage02Component } from './cardview/LiveBigImage02Component';
import { LiveBigImage01Component } from './cardview/LiveBigImage01Component';
/**
* card适配器,卡片样式汇总,依据ContentDTO#appStyle
... ... @@ -26,13 +27,13 @@ import { LiveBigImage02Component } from './cardview/LiveBigImage02Component';
*/
@Component
export struct CardParser {
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State compIndex: number = 0;
@ObjectLink compDTO: CompDTO
pageShowTime:number = 0;
pageHideTime:number = 0;
pageShowTime: number = 0;
pageHideTime: number = 0;
aboutToAppear(): void {
console.log('CardParser-', JSON.stringify(this.contentDTO))
... ... @@ -46,8 +47,9 @@ export struct CardParser {
onPageHide(): void {
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
duration = Math.floor((this.pageHideTime - this.pageShowTime) / 1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,
TrackConstants.PageName.Customer_Personal, duration)
}
build() {
... ... @@ -58,41 +60,136 @@ export struct CardParser {
contentBuilder(contentDTO: ContentDTO) {
// Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO })
if (!!contentDTO.contentText) {
SearchContentComponent({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
SearchContentComponent({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else {
if (contentDTO.appStyle === CompStyle.Card_02) {
Card2Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
Card2Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_03) {
Card3Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
}else if (contentDTO.appStyle === CompStyle.Card_04) {
Card4Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
} else if (contentDTO.appStyle === CompStyle.Card_05) {
Card5Component({ compDTO: this.compDTO, contentDTO, titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName})
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13 ) {
Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO, pageId: this.pageId, pageName: this.pageName })
Card3Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_04) {
Card4Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_05) {
Card5Component({
compDTO: this.compDTO,
contentDTO,
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) {
Card6Component({
compDTO: this.compDTO,
contentDTO: this.contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_10) {
Card10Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
Card10Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_11) {
Card11Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
Card11Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_12) {
Card12Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
Card12Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_14) {
Card14Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card14Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_15) {
Card15Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card15Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_16) {
Card16Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card16Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_17) {
Card17Component({ compDTO: this.compDTO, contentDTO, pageId: this.pageId, pageName: this.pageName })
Card17Component({
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_19) {
Card19Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card19Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_20) {
Card20Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card20Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_21) {
Card21Component({ contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Card21Component({
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) {
LiveBigImage01Component({
contentDTO: contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
index: this.compIndex
})
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) {
LiveBigImage02Component({ contentDTO:contentDTO, compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
}else {
LiveBigImage02Component({
contentDTO: contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else {
// todo:组件未实现 / Component Not Implemented
// Text(contentDTO.appStyle)
// .width(CommonConstants.FULL_PARENT)
... ...
... ... @@ -58,7 +58,7 @@ export struct CompParser {
this.compDTO.operDataList = this.noneAudioItems;
}
// 金刚卡屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
this.audioItems = this.compDTO.operDataList.filter(item => {
return item.objectType === '13' || item.linkUrl.includes('audiotopic')
})
... ... @@ -96,9 +96,17 @@ export struct CompParser {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
HorizontalStrokeCardThreeTwoRadioForMoreComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else {
HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
HorizontalStrokeCardThreeTwoRadioForOneComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
}
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
... ... @@ -113,7 +121,12 @@ export struct CompParser {
// Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
ZhGridLayout02NewsContent({ compDTO: this.compDTO, operDataList: this.compDTO.operDataList, pageId: this.pageId, pageName: this.pageName })
ZhGridLayout02NewsContent({
compDTO: this.compDTO,
operDataList: this.compDTO.operDataList,
pageId: this.pageId,
pageName: this.pageName
})
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
... ... @@ -139,24 +152,39 @@ export struct CompParser {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Card2Component({
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Card_09) {
//时间链卡
Card9Component({
compDTO: this.compDTO,
contentDTO:this.compDTO.operDataList[0],
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if(this.compDTO.compStyle === CompStyle.Card_13){
Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
} else if (this.compDTO.compStyle === CompStyle.Card_13) {
Card6Component({
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if(this.compDTO.compStyle === CompStyle.Card_03){
Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
} else if (this.compDTO.compStyle === CompStyle.Card_03) {
Card3Component({
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
... ... @@ -170,7 +198,13 @@ export struct CompParser {
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') {
CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName });
CardParser({
contentDTO: this.compDTO.operDataList[0],
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
compIndex: this.compIndex
});
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else {
// Text(this.compDTO.compStyle)
... ...
... ... @@ -784,13 +784,13 @@ export struct DynamicDetailComponent {
return
}
const params: postExecuteLikeParams = {
status: this.newsStatusOfUser?.likeStatus === '1' ? 0 : 1,
status: this.newsStatusOfUser?.likeStatus == '1' ? 0 : 1,
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
}
ContentDetailRequest.postExecuteLike(params).then(res => {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus === '1') {
this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1'
if (this.newsStatusOfUser.likeStatus == '1') {
this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1
} else {
this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1
... ... @@ -798,7 +798,7 @@ export struct DynamicDetailComponent {
console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum)
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
TrackingContent.like(this.newsStatusOfUser?.likeStatus === '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
TrackingContent.like(this.newsStatusOfUser?.likeStatus == '1', TrackConstants.PageName.DynamicDetail, TrackConstants.PageName.DynamicDetail,
{
'contentType': `${this.contentDetailData.newsType}`,
'contentId': `${this.contentDetailData.newsId}`,
... ...
import { ContentDTO, NewspaperListItemBean, NewspaperPositionItemBean, Params } from 'wdBean';
import { StringUtils } from 'wdKit';
import { ProcessUtils } from 'wdRouter';
import { TrackingContent,TrackConstants } from 'wdTracking/Index';
import { TrackingContent, TrackConstants } from 'wdTracking/Index';
import { newsSkeleton } from './skeleton/newsSkeleton';
@Component
... ... @@ -21,21 +21,22 @@ export struct ENewspaperItemComponent {
aboutToAppear(): void {
for (let index = 0; index < this.newspaperListItemBean.items.length; index++) {
const element = this.newspaperListItemBean.items[index];
TrackingContent.common(TrackConstants.EventType.Show,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'contentName':element.title,
'contentType':element.newsType,
'contentId':element.newsId,
'panelNumber':this.newspaperListItemBean.pageNum,
'panelName':this.newspaperListItemBean.pageName,
'readMode':'1',
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.NewsPaperPage,
TrackConstants.PageName.NewsPaperPage
, {
'contentName': element.title,
'contentType': element.newsType,
'contentId': element.newsId,
'panelNumber': this.newspaperListItemBean.pageNum,
'panelName': this.newspaperListItemBean.pageName,
'readMode': '1',
})
}
}
build() {
Stack() {
newsSkeleton()
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
Image(this.newspaperListItemBean.pagePic)
.width(px2vp(this.itemPicWidth))
.height(px2vp(this.itemPicHeight))
... ... @@ -48,6 +49,8 @@ export struct ENewspaperItemComponent {
})
.objectFit(ImageFit.Fill)
.visibility(this.isShowSkeleton ? Visibility.None : Visibility.Visible)
newsSkeleton()
.visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
if (this.contentWidth !== 0) {
Canvas(this.context)
.width(px2vp(this.contentWidth))
... ... @@ -58,7 +61,12 @@ export struct ENewspaperItemComponent {
})
}
}
.padding({ top:14, right: 10, bottom: 14, left: 10 })
.padding({
top: 14,
right: 10,
bottom: 14,
left: 10
})
.backgroundColor(Color.White)
.width('100%')
.onTouch((event: TouchEvent) => {
... ... @@ -88,21 +96,22 @@ export struct ENewspaperItemComponent {
if (this.itemBeanClicked != null && this.itemBeanClicked.newsId != 0) {
//公共跳转
let content: ContentDTO = {
objectId:this.itemBeanClicked.newsId+'',
objectType:this.itemBeanClicked.newsType+'',
relId:this.itemBeanClicked.relId+'',
relType:this.itemBeanClicked.relType ?? '0'
objectId: this.itemBeanClicked.newsId + '',
objectType: this.itemBeanClicked.newsType + '',
relId: this.itemBeanClicked.relId + '',
relType: this.itemBeanClicked.relType ?? '0'
} as ContentDTO
ProcessUtils.processPage(content)
//内容点击
TrackingContent.clickWithEvent('current_Number_Panel_content_click',TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage
,{
'contentName':this.itemBeanClicked.title,
'contentType':this.itemBeanClicked.newsType,
'contentId':this.itemBeanClicked.newsId,
'panelNumber':this.newspaperListItemBean.pageNum,
'panelName':this.newspaperListItemBean.pageName,
'readMode':'1',
TrackingContent.clickWithEvent('current_Number_Panel_content_click', TrackConstants.PageName.NewsPaperPage,
TrackConstants.PageName.NewsPaperPage
, {
'contentName': this.itemBeanClicked.title,
'contentType': this.itemBeanClicked.newsType,
'contentId': this.itemBeanClicked.newsId,
'panelNumber': this.newspaperListItemBean.pageNum,
'panelName': this.newspaperListItemBean.pageName,
'readMode': '1',
})
this.itemBeanClicked = {} as NewspaperPositionItemBean
}
... ...
... ... @@ -373,8 +373,11 @@ export struct ImageAndTextPageComponent {
status: this.newsStatusOfUser?.likeStatus == '1' ? '0' : '1',
contentId: this.contentDetailData?.newsId + '',
contentType: this.contentDetailData?.newsType + '',
contentRelId: this.contentDetailData?.reLInfo?.relId || '' + '',
}
console.log(TAG, '点赞、取消点赞params', JSON.stringify(params))
PageRepository.postExecuteLike(params).then(res => {
console.log(TAG, '点赞、res', JSON.stringify(res))
console.log(TAG, '点赞、取消点赞', 'toggleLikeStatus==',)
if (this.newsStatusOfUser) {
//内容点赞、取消点赞Tracking 1点赞 0取消点赞
... ...
... ... @@ -91,14 +91,14 @@ export struct MorningEveningPaperComponent {
private AudioSuspension = new AudioSuspensionModel()
onCancel() {
Logger.info(TAG, "cj2024 onCancel = ")
console.log(TAG, "cj2024 onCancel = ")
}
/**
* 回调无用
**/
onConfirm() {
Logger.info(TAG, "cj2024 onConfirm = ")
console.log(TAG, "cj2024 onConfirm = ")
// if (this.playerController != undefined) {
//
// }
... ... @@ -108,10 +108,10 @@ export struct MorningEveningPaperComponent {
// 续播判断
changeContinue() {
Logger.info(TAG, "cj2024 changeContinue = 1")
console.log(TAG, "cj2024 changeContinue = 1")
// if (this.nextContId) {
this.playerController.continue = () => {
Logger.info(TAG, "cj2024 changeContinue = 2")
console.log(TAG, "cj2024 changeContinue = 2")
this.playerController?.stop();
// this.playVM.playWithContentId(this.nextContId ?? '');
}
... ... @@ -130,8 +130,8 @@ export struct MorningEveningPaperComponent {
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
const currentTime = new Date().getTime()
Logger.info(TAG, "currentTime = " + currentTime)
Logger.info(TAG, `currentTime = ${currentTime}`)
console.log(TAG, "currentTime = " + currentTime)
console.log(TAG, `currentTime = ${currentTime}`)
try {
// let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
... ... @@ -145,13 +145,13 @@ export struct MorningEveningPaperComponent {
let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN)
const dateShow = new Date(dateTime)
this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日`
Logger.info(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate)
Logger.info(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title)
console.log(TAG, "pageInfoBean topicDate = " + this.pageInfoBean?.topicInfo?.topicDate)
console.log(TAG, "pageInfoBean title = " + this.pageInfoBean?.topicInfo?.title)
Logger.info(TAG, "pageInfoBean dateTime = " + dateTime)
Logger.info(TAG, "pageInfoBean subTitle = " + this.subTitle)
console.log(TAG, "pageInfoBean dateTime = " + dateTime)
console.log(TAG, "pageInfoBean subTitle = " + this.subTitle)
Logger.info(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean))
console.log(TAG, "this.pageInfoBean = " + JSON.stringify(this.pageInfoBean))
this.isHasTopView = this.pageInfoBean?.topicInfo?.frontLinkObject?true:false
let coverUrl = this.isHasTopView?this.pageInfoBean?.topicInfo?.frontLinkObject?.coverUrl as string :''
... ... @@ -159,21 +159,22 @@ export struct MorningEveningPaperComponent {
let compInfoBean = await MorningEveningViewModel.getMorningEveningCompInfo(pageInfoBean?.id, pageInfoBean?.groups[0]?.id, currentTime + "", pageInfoBean?.topicInfo?.topicId)
// this.compInfoBean = compInfoBean
Logger.info(TAG, "compInfoBean = " + JSON.stringify(compInfoBean))
console.log(TAG, "compInfoBean = " + JSON.stringify(compInfoBean))
if (compInfoBean?.compList[0]) {
this.compListItem = compInfoBean?.compList[0]
Logger.debug(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`)
console.log(TAG, '获取评论数据' + `${this.compListItem.operDataList.length}`)
if (this.compListItem.operDataList && this.compListItem.operDataList.length > 0) {
this.getAllContentInteractData(this.compListItem.operDataList)
}
Logger.debug(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList))
console.log(TAG, 'compInfoBean?.compList[0].audioDataList', JSON.stringify(compInfoBean?.compList[0].audioDataList))
if (compInfoBean?.compList[0].audioDataList) {
this.audioPlayUrl = compInfoBean?.compList[0].audioDataList[0].audioUrl
this.audioTitle = compInfoBean?.compList[0].audioDataList[0].title
console.log(TAG, 'this.audioPlayUrl', this.audioPlayUrl)
}
}
Logger.info(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
console.log(TAG, "compInfoBean compStyle = " + compInfoBean.compList[0].compStyle)
this.playerController.onTimeUpdate = (position, duration) => {
this.currentTime = DateFormatUtil.secondToTime(position);
this.totalTime = DateFormatUtil.secondToTime(duration);
... ... @@ -203,10 +204,10 @@ export struct MorningEveningPaperComponent {
contentType: Number(item.objectType ?? '1')
})
})
Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(params)}`)
console.log(TAG, '获取评论数据' + `${JSON.stringify(params)}`)
this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params)
Logger.debug(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`)
console.log(TAG, '获取评论数据' + `${JSON.stringify(this.commentList)}`)
} catch (exception) {
... ... @@ -216,7 +217,7 @@ export struct MorningEveningPaperComponent {
async setComponentBgColor(imageUrl: string) {
// 图片转换为PixelMap对象
// const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
Logger.debug(TAG, "compInfoBean compStyle = " + imageUrl)
console.log(TAG, "compInfoBean compStyle = " + imageUrl)
if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) {
const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
... ... @@ -237,11 +238,11 @@ export struct MorningEveningPaperComponent {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getLargestProportionColor();
Logger.debug(TAG, "compInfoBean compStyle = " + color)
console.log(TAG, "compInfoBean compStyle = " + color)
// color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
Logger.debug(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
});
}
... ... @@ -267,10 +268,11 @@ export struct MorningEveningPaperComponent {
topicInfoView({ frontLinkObject: this.pageInfoBean?.topicInfo?.frontLinkObject })
}
if (this.audioPlayUrl !== ""){
ListItem() {
this.AudioBarView()
}
}
if (this.audioPlayUrl !== ""){
ListItem() {
this.AudioBarView()
}
}
... ... @@ -310,8 +312,11 @@ export struct MorningEveningPaperComponent {
@Builder
topPaperTitle(){
Column(){
PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}).margin({top:this.topSafeHeight})
}.height(44+this.topSafeHeight).backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor)
PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo})
.margin({top:this.topSafeHeight})
}
.height(44+this.topSafeHeight)
.backgroundColor(this.isHasTopView?(this.scrollOffset > 100?this.mixedBgColor:''):this.mixedBgColor)
}
@Builder
... ... @@ -350,12 +355,12 @@ export struct MorningEveningPaperComponent {
.margin({ left: 10 })// .alignSelf(ItemAlign.Center)
.objectFit(ImageFit.Contain)
.onClick(() => {
Logger.info("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying)
console.log("TAG", "cj compInfoBean onClick1 = " + this.isAudioPlaying)
// dialog.open()
// this.playerController.firstPlay(this.audioPlayUrl, this.audioTitle)
this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle)
Logger.info(TAG, "this.audioPlayUrl = " + this.audioPlayUrl)
Logger.info("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying)
console.log(TAG, "this.audioPlayUrl = " + this.audioPlayUrl)
console.log("TAG", "cj compInfoBean onClick2 = " + this.isAudioPlaying)
})
}
// .aspectRatio(7 / 4)
... ...
... ... @@ -66,7 +66,7 @@ export struct Card10Component {
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_18'))
.fontWeight(600)
.maxLines(2)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.onClick((event: ClickEvent) => {
... ...
... ... @@ -75,7 +75,8 @@ export struct Card4Component {
Span(this.contentDTO.newsTitle)
}
}
.fontSize($r('app.float.font_size_18'))
.fontSize(17.5)
.lineHeight(27)
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
... ...
import { CompDTO, ContentDTO } from 'wdBean';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { hasClicked } from '../../utils/persistentStorage';
import { ToastUtils } from 'wdKit/Index';
import { router } from '@kit.ArkUI';
import { TrackConstants, Tracking, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
import { HttpUtils } from 'wdNetwork/Index';
import { LiveModel } from '../../viewmodel/LiveModel';
const TAG: string = 'LiveBigImage01Component';
/**
* 本地样式卡:直播预约卡
*/
@Component
export struct LiveBigImage01Component {
@ObjectLink compDTO: CompDTO
@State pageId: string = '';
@State pageName: string = '';
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@State clicked: boolean = false;
index: number = 0
@State isLoadingAttention: boolean = false
async aboutToAppear() {
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId, curRouter)
this.loadImg = await onlyWifiLoadImg();
}
build() {
Column() {
Stack() {
Image(this.loadImg ? this.contentDTO.fullColumnImgUrls[0]?.url : '')
.width('100%')
.aspectRatio(16 / 9)
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : $r('app.color.color_33A3A3A3'))
.objectFit(ImageFit.Contain)
.borderWidth(0.5)
.borderColor($r('app.color.color_0D000000'))
.borderRadius({
topLeft: '4vp',
topRight: '4vp'
})
this.LiveImage()
}
.alignContent(Alignment.BottomEnd)
Text(this.contentDTO.newsTitle)
.fontSize(17)
.maxLines(2)
.lineHeight(25)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 4, left: 12, right: 12 })
.alignSelf(ItemAlign.Start)
Row() {
if (this.contentDTO.liveInfo && this.contentDTO.liveInfo.liveStartTime) {
Row() {
Image($r('app.media.reserve_play_icon'))
.width(20)
.height(20)
.margin({
left: 10,
top: 2,
bottom: 2,
right: 6
})
Text(this.getReserveDate(this.contentDTO.liveInfo.liveStartTime, 1))
.fontSize(12)
.fontWeight(500)
.fontColor('#ED2800')
.fontFamily('PingFang SC-Medium')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 8, bottom: 8 })
.align(Alignment.Start)
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width(6)
.height(16)
.margin(2)
Text(this.getReserveDate(this.contentDTO.liveInfo.liveStartTime, 2))
.fontSize(12)
.fontWeight(500)
.fontColor('#ED2800')
.fontFamily('PingFang SC-Medium')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 8, bottom: 8, right: 10 })
.align(Alignment.Start)
}
.backgroundColor('#F5F5F5')
.margin(12)
}
// 预约
Row() {
LoadingProgress()
.width(20)
.height(20)
.color(!this.isReserved() ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
.visibility((this.isLoadingAttention) ? Visibility.Visible :
Visibility.None)
Text(!this.isReserved() ? '预约' : '已预约')
.fontSize($r('app.float.vp_12'))
.fontWeight(500)
.fontColor(!this.isReserved() ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
.width('100%')
.height('100%')
.textAlign(TextAlign.Center)
.visibility((this.isLoadingAttention) ? Visibility.None :
Visibility.Visible)
.margin({
right: '10vp'
})
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
.backgroundColor(!this.isReserved() ? $r('app.color.color_ED2800') : $r('app.color.color_F5F5F5'))
.borderRadius(3)
}
.onClick(() => {
this.bookAndCancel(this.contentDTO)
})
.justifyContent(FlexAlign.Center)
.alignItems(VerticalAlign.Center)
.borderRadius(3)
.width('52vp')
.height('24vp')
.margin({ right: 12 })
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
}
.borderRadius(4)
.backgroundColor(Color.White)
.width('calc(100% - 24vp)')
.margin({
left: '12vp',
right: '12vp',
top: this.index == 0 ? '12vp' : '8vp'
})
.onClick(() => {
// 内容点击埋点
TrackingContent.common(TrackConstants.EventType.Click,
this.pageId,
this.pageId,
TrackParamConvert.program(this.contentDTO))
ProcessUtils.processPage(this.contentDTO)
})
.onVisibleAreaChange([0, 1], (isVisiable: boolean, ratio: number) => {
if (isVisiable) {
// 内容曝光埋点
TrackingContent.common(TrackConstants.EventType.Show,
this.pageId,
this.pageId,
TrackParamConvert.program(this.contentDTO))
}
})
}
@Builder
LiveImage() {
Row() {
Image($r('app.media.reserve_new_icon'))
.width(14)
.height(14)
.margin({
right: 3
})
Text('预约')
.fontSize('12vp')
.fontWeight(400)
.fontColor(Color.White)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
.backgroundColor(Color.Transparent)
.margin({ right: 8, bottom: 8 })
}
getReserveDate(eventDateTimeString: string, type: number): string {
// 解析事件的日期和时间
const eventDateTime = new Date(eventDateTimeString);
const currentDateTime = new Date();
// 截取事件时间的小时和分钟(假设事件时间是按照24小时制)
const eventHour = eventDateTime.getHours();
const eventMinutes = eventDateTime.getMinutes();
const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数
if (type === 1) {
// 判断是否是今天
const eventDate = eventDateTime.setHours(0, 0, 0, 0);
const currentDate = currentDateTime.setHours(0, 0, 0, 0);
if (eventDate === currentDate) {
return `今天`;
} else {
const month = eventDateTime.getMonth() + 1;
const date = eventDateTime.getDate();
return `${month}月${date}日`;
}
} else {
return `${eventTimeStr}`;
}
}
// 预约/取消预约
async bookAndCancel(item: ContentDTO) {
// 未登录,跳转登录
if (!HttpUtils.getUserId()) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
if (!this.isLoadingAttention) {
this.isLoadingAttention = true
const reserveItem = item.reserveItemBean
if (reserveItem) {
this.isLoadingAttention = true
try {
// 埋点
Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click",
TrackParamConvert.program(item))
const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(),
!reserveItem.subscribe);
if (res.code == 0) {
ToastUtils.shortToast(!reserveItem.subscribe ? '预约成功' : '取消预约成功')
reserveItem.subscribe = !reserveItem.subscribe ? true : false
}
this.isLoadingAttention = false
} catch (e) {
this.isLoadingAttention = false
}
} else {
this.isLoadingAttention = false
}
}
}
// 判断是否预约
isReserved() {
if (this.compDTO.operDataList[0].reserveItemBean == undefined) {
return false
}
return this.compDTO.operDataList[0].reserveItemBean.subscribe
}
}
\ No newline at end of file
... ...
... ... @@ -2,12 +2,11 @@ import { CompDTO, ContentDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
import { SearchShowRed, textItem, titleInitRes } from '../../utils/searchShowRed';
import { DateTimeUtils } from 'wdKit/Index';
import { LottieView } from '../lottie/LottieView';
import { router } from '@kit.ArkUI';
const TAG: string = 'Card6Component-Card13Component';
const TAG: string = 'LiveBigImage02Component';
/**
* 本地样式卡:直播大图卡
... ...
... ... @@ -30,14 +30,15 @@ export struct MoreComponent {
Card9Component({ compDTO: new CompDTO, contentDTO:item, pageId: "", pageName: "" })
}
})
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(4)
} else {
Column() {
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
Row() {
Text('点击展开更多相似')
.fontSize(16)
... ...
... ... @@ -34,7 +34,7 @@ export struct SearchContentComponent {
}
titleInit() {
const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title);
const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.contentText || '');
// this.titleMarked = titleInitRes.titleMarked;
this.textArr = titleInitRes.textArr;
}
... ...
... ... @@ -48,7 +48,8 @@ export struct ZhGridLayout02NewsContent {
Image(this.loadImg ? item == undefined ? '' : item.fullColumnImgUrls[0].url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(95)
// .height(95)
.aspectRatio(167 / 95)
.borderWidth(0.5)
.borderColor($r('app.color.color_0D000000'))
.borderRadius(4)
... ...
... ... @@ -90,7 +90,9 @@ export struct ZhSingleRow03 {
}
async aboutToAppear(): Promise<void> {
this.getReserveState();
if (HttpUtils.getUserId()) {
this.getReserveState();
}
this.loadImg = await onlyWifiLoadImg();
}
... ...
... ... @@ -174,7 +174,7 @@ export struct ZhSingleRow06 {
this.loadImg
? item.operDataList[0]?.commentInfo?.userHeaderUrl
? item.operDataList[0].commentInfo.userHeaderUrl
: $r('app.media.default_head')
: $r('app.media.icon_default_head_mater')
: $r('app.media.icon_default_head_mater'))
.width(32)
.height(32)
... ...
... ... @@ -23,7 +23,7 @@ struct LiveMorePage {
//常见标题
CommonPageTitle({ title: this.title })
// 通用模板组件
TemplatePageComponent({ pageDataSourceType: TemplatePageConstant.LIVE_HORIZONTAL_CARD })
TemplatePageComponent({ pageDataSourceType: TemplatePageConstant.LIVE_HORIZONTAL_PAGE })
}
.height('100%')
... ...
... ... @@ -256,6 +256,7 @@ export struct TopNavigationComponentNew {
'right': { 'anchor': '__container__', 'align': HorizontalAlign.End }
})
.onClick(() => {
Logger.info(TAG, `搜索按钮点击: 人民号`);
TrackingButton.searchClick(TrackConstants.PageName.Search, "PEOPLE")
let params = { 'tabName': "PEOPLE" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.searchPage, params)
... ... @@ -479,6 +480,8 @@ export struct TopNavigationComponentNew {
//处理新闻tab顶导频道数据
this.topNavListHandle()
this.changePage(this.currentTopNavSelectedIndex)
console.log('XY', '----TopNavigation-------aboutToAppear'+this.navItem.name)
}
onTopNavigationDataUpdated() {
... ... @@ -487,9 +490,10 @@ export struct TopNavigationComponentNew {
}
updateCurrentTopNavSelectedIndex() {
Logger.info(TAG, `this.navItem 埋点参数topStyle: ${this.navItem.topStyle}`);
// 顶部tab埋点
if (CompUtils.isVideo(this.navItem)) {
if (CompUtils.isNews(this.navItem)) {
const tab = this.myChannelList[this.currentTopNavSelectedIndex]
Logger.info(TAG, `新闻tab埋点: ${JSON.stringify(tab)}`);
... ... @@ -498,7 +502,7 @@ export struct TopNavigationComponentNew {
"tabName": tab.name,
"pageId": tab.pageId,
}
Tracking.event("home_page_tab_click ", params)
Tracking.event("home_page_tab_click", params)
} else if (CompUtils.isRMH(this.navItem)) {
const tab = this.topNavList[this.currentTopNavSelectedIndex]
Logger.info(TAG, `人民号tab埋点: ${JSON.stringify(tab)}`);
... ...
import { ArrayList } from '@kit.ArkTS'
import { CompDTO, ContentDTO, LiveRoomDataBean } from 'wdBean/Index'
import { CompDTO, ContentDTO, LiveRoomDataBean, ReserveBean, ReserveItemBean } from 'wdBean/Index'
import { DateTimeUtils, Logger } from 'wdKit/Index'
import { HttpUtils } from 'wdNetwork/Index'
import { LiveModel } from '../../../viewmodel/LiveModel'
import PageViewModel from '../../../viewmodel/PageViewModel'
const TAG: string = 'BaseTemplateHelp'
export class BasePageHelp {
/**
* 请求获取直播房间的动态数据
* @param list
* 批查直播预约数据
* @param compList
*/
async getAppointmentInfo(compList: CompDTO[]) {
if (HttpUtils.getUserId()) {
let time = DateTimeUtils.getTimeStamp().toString()
Logger.debug(TAG, 'getAppointmentInfo-->'+time)
const reserveBean = this.transformToLiveDetailsBeans(compList)
LiveModel.getAppointmentStatus(reserveBean).then((result) => {
Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(result)}`)
if (result && result.length > 0) {
for (let item of result) {
for (let compItem of compList) {
if (item.liveId.toString() == compItem.operDataList[0].objectId) {
compItem.operDataList[0].reserveItemBean = item
compItem.timestamp = time
break
}
}
}
}
}).catch(() => {
})
} else {
}
}
// 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组
transformToLiveDetailsBeans(compList: CompDTO[]): ReserveBean[] {
let list: ContentDTO[] = []
compList.forEach(compBean => {
if (compBean.operDataList && compBean.operDataList.length > 0) {
list.push(compBean.operDataList[0])
}
})
const liveDetailsBeans: ReserveBean[] = [];
list.forEach(item => {
liveDetailsBeans.push({
relationId: item.relId,
liveId: item.objectId,
});
});
return liveDetailsBeans
}
/**
* 直播回看的批查数据
* @param list
* 请求获取直播房间的动态数据
* @param compList
*/
getLiveRoomDataInfo(compList: CompDTO[]) {
getLiveRoomDataInfo(compList: CompDTO[]) {
let list: ContentDTO[] = []
compList.forEach((comp: CompDTO) => {
list.push(...comp.operDataList)
list.push(...comp.operDataList)
})
let time = DateTimeUtils.getTimeStamp().toString()
... ... @@ -48,6 +97,7 @@ export class BasePageHelp {
}).catch(() => {
})
}
/**
* 获取业务内容 objectId 集合穿 如1,2,3
* @param pageContentList
... ...
import { CompDTO, ContentDTO } from 'wdBean/Index'
import { LazyDataSource, Logger } from 'wdKit/Index'
import { CompDTO, ContentDTO, ReserveItemBean } from 'wdBean/Index'
import { DateTimeUtils, EmitterEventId, EmitterUtils, LazyDataSource, Logger } from 'wdKit/Index'
import { CompParser } from '../../CompParser'
import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh'
import { PeopleShipNoMoreData } from '../../reusable/PeopleShipNoMoreData'
... ... @@ -23,7 +23,6 @@ const TAG: string = 'TemplatePageComponent';
*/
@Component
export default struct TemplatePageComponent {
// 模板页面的数据驱动对象
@State private templatePage: TemplatePageModel = new TemplatePageModel
// 此内容主要因CustomPullToRefresh需要,目前没任何业务意义要求
... ... @@ -32,7 +31,7 @@ export default struct TemplatePageComponent {
private templateScroller: Scroller = new Scroller()
//识别不同页面的业务类型
pageDataSourceType: string = ''
@State listColor: Resource = $r('app.color.color_fff')
// 埋点字段
pageId: string = ''
pageName: string = ''
... ... @@ -40,6 +39,38 @@ export default struct TemplatePageComponent {
async aboutToAppear() {
Logger.debug(TAG, 'aboutToAppear')
this.requestPageData()
// 登录成功
EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => {
Logger.debug(TAG, 'receiveEvent-----LOGIN_SUCCESS----------')
this.templatePage.isEmitter = true
this.templatePage.currentPage = 1
this.requestPageData()
})
// 获取预约
EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => {
Logger.debug(TAG, 'receiveEvent LIVE_ROOM_SUBSCRIBE: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
const model: ReserveItemBean = JSON.parse(str)
Logger.debug(TAG, '是否关注元数据0:' + ` ${model.liveId}`)
for (let compItem of this.templatePage.compList.getDataArray()) {
let compBean = compItem as CompDTO
if (compBean.operDataList && compBean.operDataList[0]) {
let liveStr = new String(model.liveId)
if (compBean.operDataList[0].objectId == liveStr) {
compBean.operDataList[0].reserveItemBean.subscribe = model.subscribe
let time = DateTimeUtils.getTimeStamp().toString()
compBean.timestamp = time
break
}
}
}
}
})
}
aboutToDisappear(): void {
... ... @@ -51,6 +82,7 @@ export default struct TemplatePageComponent {
this.LoadingLayout()
} else if (this.templatePage.pageCompType === TemplatePageStateType.LOADED) {
CustomPullToRefresh({
alldata: this.pageData,
scroller: this.templateScroller,
... ... @@ -63,7 +95,7 @@ export default struct TemplatePageComponent {
this.templatePage.resolve = resolve
this.requestPageData(resolve)
},
})
}).backgroundColor(this.listColor)
} else {
EmptyComponent({
... ...
... ... @@ -10,7 +10,12 @@ export class TemplatePageConstant {
/**
* 直播中
*/
public static LIVE_HORIZONTAL_CARD: string = "LIVE_HORIZONTAL_CARD"
public static LIVE_HORIZONTAL_PAGE: string = "live_horizontal_page"
/**
* 直播预告
*/
public static LIVE_PORTEND_PAGE :string = 'live_portend_page'
}
\ No newline at end of file
... ...
import { CompDTO } from 'wdBean/Index';
import { CompStyle } from 'wdConstant/Index';
import { NetworkUtil } from 'wdKit/Index';
import { DateTimeUtils, NetworkUtil } from 'wdKit/Index';
import PageViewModel from '../../../viewmodel/PageViewModel';
import { WDViewDefaultType } from '../../view/EmptyComponent';
import { BasePageHelp } from './BasePageHelp';
... ... @@ -51,9 +51,16 @@ export class TemplatePageHelp extends BasePageHelp {
*/
private treatDiffBusinessDataSource() {
if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_HORIZONTAL_CARD) {
if (this.pageModel.isLoading) {
return
}
if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_HORIZONTAL_PAGE) {
// 直播列表
this.requestLiveListData(this.pageModel.resolve)
} else if (this.pageModel.pageDataSourceType === TemplatePageConstant.LIVE_PORTEND_PAGE) {
// 直播预告
this.requestLivePortendData(this.pageModel.resolve)
}
}
... ... @@ -76,21 +83,22 @@ export class TemplatePageHelp extends BasePageHelp {
this.pageModel.hasMore = false
}
// 依据业务请求获取的数据,转换成compDTO数据
let time = DateTimeUtils.getTimeStamp().toString()
let pageContentList: CompDTO[] = [] // 收集页面组件、稿件和本地组件容器
for (let contentDto of liveReviewDTO.list) {
let compDTO: CompDTO = new CompDTO()
compDTO.compType = 'appStyle'
contentDto.appStyle = CompStyle.Card_Comp_Live_Big_Image_02
if (this.pageModel.isEmitter) {
contentDto.timestamp = time
}
compDTO.operDataList.push(contentDto)
pageContentList.push(compDTO)
}
// 推送数据到懒加载机制
this.pushDataToPage(pageContentList)
// 完成业务请求加载
this.pageModel.isLoading = false
// 批查
this.allCompBatchRequest(pageContentList)
... ... @@ -104,10 +112,66 @@ export class TemplatePageHelp extends BasePageHelp {
}
this.resolveEnd(resolve)
// 完成业务请求加载
this.pageModel.isLoading = false
}
/**
* 请求直播预告数据
*/
private async requestLivePortendData(resolve?: (value: string | PromiseLike<string>) => void) {
this.pageModel.isLoading = true
const liveReviewDTO = await PageViewModel.getLiveMoreUrl(2, this.pageModel.currentPage, this.pageModel.pageSize)
if (liveReviewDTO && liveReviewDTO.list && liveReviewDTO.list.length > 0) {
if (liveReviewDTO.list.length === this.pageModel.pageSize) {
this.pageModel.hasMore = true
} else {
this.pageModel.hasMore = false
}
// 依据业务请求获取的数据,转换成compDTO数据
let time = DateTimeUtils.getTimeStamp().toString()
let pageContentList: CompDTO[] = [] // 收集页面组件、稿件和本地组件容器
for (let contentDto of liveReviewDTO.list) {
let compDTO: CompDTO = new CompDTO()
compDTO.compType = 'appStyle'
contentDto.appStyle = CompStyle.Card_Comp_Live_Big_Image_01
if (this.pageModel.isEmitter) {
contentDto.timestamp = time
}
compDTO.operDataList.push(contentDto)
pageContentList.push(compDTO)
}
// 推送数据到懒加载机制
this.pushDataToPage(pageContentList)
// 批查直播预约状态
this.getAppointmentInfo(pageContentList)
} else {
this.pageModel.hasMore = false
if (this.pageModel.currentPage === 1) {
// 无业务数据
this.pageNoHaveData()
}
}
this.resolveEnd(resolve)
// 完成业务请求加载
this.pageModel.isLoading = false
}
/**
* 处理页面批查业务方法
* @param list
*/
... ... @@ -116,21 +180,6 @@ export class TemplatePageHelp extends BasePageHelp {
// 获取直播房间的动态数据
this.getLiveRoomDataInfo(compList)
// 测试数据
// setTimeout(() => {
// let time = DateTimeUtils.getTimeStamp().toString()
// let index = 1
// let compBean = compList[index] as CompDTO
// let contentBean = compBean.operDataList[0]
// contentBean.newsTitle = '熬阿斯蒂芬'
// //comp.operDataList[0].newsTitle = '测试111'
// let liveRoomBean: LiveRoomDataBean = {} as LiveRoomDataBean;
// liveRoomBean.pv = 6555
// contentBean.liveRoomDataBean = liveRoomBean
// compBean.timestamp = time
// Logger.debug("ZZZXXXXX",
// "-----setTimeout--------->" + time)
// }, 4 * 1000)
}
... ... @@ -145,11 +194,11 @@ export class TemplatePageHelp extends BasePageHelp {
this.pageModel.compList.clear()
}
// 懒加载,推送数据
for (let contentDto of pageContentList) {
this.pageModel.compList.push(contentDto)
}
this.pageModel.compList.push(...pageContentList)
//完成业务数据请求
this.pageModel.pageCompType = TemplatePageStateType.LOADED
this.pageModel.haveDataShow = true
}
... ...
... ... @@ -21,16 +21,18 @@ export default class TemplatePageModel {
* 识别不同页面的业务类型
*/
pageDataSourceType: string = ''
// 页码
currentPage: number = 1
// 一页最多信息量
pageSize: number = 20
// 是否支持加载更多数据
hasMore:boolean = false
hasMore: boolean = false
// 是否正在请求数据
isLoading: boolean = false
// 页面已有数据展示
haveDataShow: boolean = false
// 接收Emitter事件,需要刷新界面,此时就需要对展示业务进行驱动更新
isEmitter: boolean = false
/**
* 此字段可驱动组件展示不同业务的组件,
*/
... ... @@ -39,6 +41,5 @@ export default class TemplatePageModel {
* 异常状态 ——> 记录在获取数据中的不同状态,如无数据、无网络等情况
*/
noNormalState: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
resolve?: (value: string | PromiseLike<string>) => void
}
\ No newline at end of file
... ...
... ... @@ -25,6 +25,7 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio
import { CardParser } from '../CardParser'
import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
import PageFollowHelper from '../../viewmodel/PageFollowHelper';
import { MineFollowListItem } from '../../viewmodel/MineFollowListItem';
const TAG = 'PeopleShipMainComponent';
... ... @@ -228,12 +229,10 @@ export struct PeopleShipMainComponent {
this.followList = []
this.getRmhRecommendInfo(resolve)
} else {
this.followList = []
this.followList.push(...followInfo.list)
this.attentionList = []
this.currentPage = 1
this.loadTime = DateTimeUtils.getCurDate(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
this.getAttentionContentListData(resolve)
this.getAttentionContentListData(resolve,followInfo)
}
} else {
this.followList = []
... ... @@ -273,7 +272,7 @@ export struct PeopleShipMainComponent {
}
// 获取关注
private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void) {
private async getAttentionContentListData(resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) {
if (this.isLoading && this.currentPage != 1) {
if (resolve) {
resolve('')
... ... @@ -291,11 +290,9 @@ export struct PeopleShipMainComponent {
} else {
this.hasMore = false;
}
if (this.currentPage == 1) {
this.attentionList = []
}
//批量查询各类型内容动态数据接口
this.checkContentInteractData(listData.list, resolve)
this.checkContentInteractData(listData.list, resolve,myFollowInfor)
} else {
this.hasMore = false;
this.resolveEnd(true, resolve)
... ... @@ -307,7 +304,7 @@ export struct PeopleShipMainComponent {
}
// 批量查询各类型内容动态数据接口
private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void) {
private async checkContentInteractData(list: ContentDTO[], resolve?: (value: string | PromiseLike<string>) => void,myFollowInfor?:MineFollowListItem) {
// 批量查询内容当前用户点赞、收藏状态
try {
// 获取列表数据
... ... @@ -324,6 +321,15 @@ export struct PeopleShipMainComponent {
let listData = await PeopleShipMainViewModel.getContentInteractInfo(params)
Logger.debug('PeopleShipMainComponent', '获取页面信息' + `${JSON.stringify(listData)}`)
this.resolveEnd(true, resolve)
if (this.currentPage == 1) {
this.attentionList = []
this.followList = []
}
if(myFollowInfor){
this.followList.push(...myFollowInfor.list)
}
list.forEach((element: ContentDTO) => {
// 获取 interactData 数据
if (listData && listData.length > 0) {
... ...
import { ContentDTO, ReserveBean, ReserveItemBean } from 'wdBean/Index';
import { ProcessUtils } from 'wdRouter/Index';
import PageViewModel from '../../viewmodel/PageViewModel';
import { Logger, EmitterEventId, EmitterUtils, ToastUtils } from 'wdKit/Index';
import { router } from '@kit.ArkUI';
import { LiveModel } from '../../viewmodel/LiveModel';
import { ViewType } from 'wdConstant/src/main/ets/enum/ViewType';
import { EmptyComponent } from '../view/EmptyComponent';
import { ErrorComponent } from '../view/ErrorComponent';
import { CustomPullToRefresh } from '../reusable/CustomPullToRefresh';
import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
import { HttpUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { LazyDataSource } from 'wdKit/Index';
import LoadMoreLayout from '../page/LoadMoreLayout'
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { TrackConstants, Tracking, TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import CommonPageTitle from '../page/CommonPageTitle';
import TemplatePageComponent from '../page/template/TemplatePageComponent';
import { TemplatePageConstant } from '../page/template/TemplatePageConstant';
const TAG: string = 'ReserveMorePage';
... ... @@ -29,58 +16,27 @@ const TAG: string = 'ReserveMorePage';
@Entry
@Component
struct ReserveMorePage {
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
private reserveList: ReserveItemBean[] = []
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
type: number = 2;
pageSize: number = 20;
title: string = '直播预告'
//是否预约过直播
@State isAppointmentLive: boolean = false
@State contentDTO: ContentDTO = {} as ContentDTO;
@State private hasMore: boolean = true
@State private currentPage: number = 1
@State private isLoading: boolean = false
@State viewType: ViewType = ViewType.LOADING
private scroller: Scroller = new Scroller()
@State reservedIds: string[] = []
@State isShow: boolean = false
@State private liveId: string = ''
@State isLoadingAttention: boolean = false
@State loadImg: boolean = false;
private pageId: string = TrackConstants.PageName.Live_Appointment_List
private pageName: string = TrackConstants.PageName.Live_Appointment_List
private pageShowStartTime: number = 0
build() {
Column() {
this.TabbarNormal()
if (this.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.viewType == ViewType.ERROR) {
ErrorComponent()
.onTouch(() => {
if (this.viewType === ViewType.ERROR) {
this.getData()
}
})
} else if (this.viewType == ViewType.EMPTY) {
EmptyComponent()
} else {
CustomPullToRefresh({
alldata: this.data,
scroller: this.scroller,
hasMore: false,
customList: () => {
this.ListLayout()
},
onRefresh: (resolve) => {
this.currentPage = 1
this.getData(resolve)
},
}).backgroundColor($r('app.color.color_F5F5F5'))
}
//常见标题
CommonPageTitle({ title: this.title })
// 通用模板组件
TemplatePageComponent({
pageDataSourceType: TemplatePageConstant.LIVE_PORTEND_PAGE,
listColor: $r('app.color.color_F5F5F5'),
pageId: this.pageId,
pageName: this.pageName
})
}.height('100%').backgroundColor('#FFFFFF').padding({
top: px2vp(this.topSafeHeight),
... ... @@ -93,300 +49,9 @@ struct ReserveMorePage {
LoadingLayout() {
}
@Builder
ListLayout() {
List({ scroller: this.scroller }) {
// 下拉刷新
LazyForEach(this.data, (contentDTO: ContentDTO, index: number) => {
ListItem() {
this.buildItem(contentDTO, index)
}
},
(contentDTO: ContentDTO, contentIndex: number) => contentDTO.pageId + contentIndex.toString()
)
// 加载更多
ListItem() {
if (this.hasMore && this.data && this.data.totalCount() > 0) {
LoadMoreLayout({ isVisible: this.hasMore })
} else if (!this.hasMore && !this.isLoading) {
PeopleShipNoMoreData()
}
}
}
.cachedCount(8)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.backgroundColor('#F5F5F5')
.height('calc(100% - 44vp)')
.onReachEnd(() => {
Logger.debug(TAG, "触底了");
if (!this.isLoading && this.hasMore) {
//加载分页数据
this.currentPage++;
this.getData()
}
})
}
/**
* 组件项
*
* @param programmeBean item 组件项, 上面icon,下面标题
*/
@Builder
buildItem(item: ContentDTO, index: number) {
Column() {
Stack() {
Image(this.loadImg ? item.fullColumnImgUrls[0]?.url : '')
.width('100%')
.aspectRatio(16 / 9)
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : $r('app.color.color_33A3A3A3'))
.objectFit(ImageFit.Contain)
.borderWidth(0.5)
.borderColor($r('app.color.color_0D000000'))
.borderRadius({
topLeft: '4vp',
topRight: '4vp'
})
this.LiveImage()
}
.alignContent(Alignment.BottomEnd)
Text(item.newsTitle)
.fontSize(17)
.maxLines(2)
.lineHeight(25)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 4, left: 12, right: 12 })
.alignSelf(ItemAlign.Start)
Row() {
if (item.liveInfo && item.liveInfo.liveStartTime) {
Row() {
Image($r('app.media.reserve_play_icon'))
.width(20)
.height(20)
.margin({
left: 10,
top: 2,
bottom: 2,
right: 6
})
Text(this.getReserveDate(item.liveInfo.liveStartTime, 1))
.fontSize(12)
.fontWeight(500)
.fontColor('#ED2800')
.fontFamily('PingFang SC-Medium')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 8, bottom: 8 })
.align(Alignment.Start)
Image($r('app.media.point_icon'))
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
.width(6)
.height(16)
.margin(2)
Text(this.getReserveDate(item.liveInfo.liveStartTime, 2))
.fontSize(12)
.fontWeight(500)
.fontColor('#ED2800')
.fontFamily('PingFang SC-Medium')
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ top: 8, bottom: 8, right: 10 })
.align(Alignment.Start)
}
.backgroundColor('#F5F5F5')
.margin(12)
}
// 预约
Row() {
LoadingProgress()
.width(20)
.height(20)
.color(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
.visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.Visible :
Visibility.None)
Text(!this.isReserved(item) ? '预约' : '已预约')
.fontSize($r('app.float.vp_12'))
.fontWeight(500)
.fontColor(!this.isReserved(item) ? $r('app.color.color_fff') : $r('app.color.color_CCCCCC'))
.width('100%')
.height('100%')
.textAlign(TextAlign.Center)
.visibility((this.isLoadingAttention && this.liveId == item.objectId) ? Visibility.None :
Visibility.Visible)
.margin({
right: '10vp'
})
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
.backgroundColor(!this.isReserved(item) ? $r('app.color.color_ED2800') : $r('app.color.color_F5F5F5'))
.borderRadius(3)
}
.onClick(() => {
this.bookAndCancel(item)
})
.justifyContent(FlexAlign.Center)
.alignItems(VerticalAlign.Center)
.borderRadius(3)
.width('52vp')
.height('24vp')
.margin({ right: 12 })
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
}
.borderRadius(4)
.backgroundColor(Color.White)
.width('calc(100% - 24vp)')
.margin({
left: '12vp',
right: '12vp',
top: index == 0 ? '12vp' : '8vp'
})
.onClick(() => {
// 内容点击埋点
TrackingContent.common(TrackConstants.EventType.Click,
item.pageId,
item.pageId,
TrackParamConvert.program(item))
ProcessUtils.processPage(item)
})
.onVisibleAreaChange([0, 1], (isVisiable: boolean, ratio: number) => {
if (isVisiable) {
// 内容曝光埋点
TrackingContent.common(TrackConstants.EventType.Show,
item.pageId,
item.pageId,
TrackParamConvert.program(item))
}
})
}
/*导航栏*/
@Builder
TabbarNormal() {
RelativeContainer() {
//标题栏目
Image($r('app.media.icon_arrow_left'))
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.id("back_icon")
.margin({
left: '16vp'
})
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.onClick(() => {
router.back()
})
Text(this.title)// .height('42lpx')
.maxLines(1)
.id("title")
.fontSize('18vp')
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.lineHeight('22vp')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
}
.height(44)
.width('100%').backgroundColor('#FFFFFF')
}
@Builder
LiveImage() {
Row() {
Image($r('app.media.reserve_new_icon'))
.width(14)
.height(14)
.margin({
right: 3
})
Text('预约')
.fontSize('12vp')
.fontWeight(400)
.fontColor(Color.White)
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetY: 2
})
}
.backgroundColor(Color.Transparent)
.margin({ right: 8, bottom: 8 })
}
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
// PageViewModel.get
this.currentPage = 1
this.getData()
// 登录成功
EmitterUtils.receiveEvent(EmitterEventId.LOGIN_SUCCESS, () => {
this.currentPage = 1
this.getData()
})
// 获取预约
EmitterUtils.receiveEvent(EmitterEventId.LIVE_ROOM_SUBSCRIBE, (str?: string) => {
Logger.debug(TAG, 'receiveEvent LIVE_ROOM_SUBSCRIBE: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
const model: ReserveItemBean = JSON.parse(str)
Logger.debug(TAG, '是否关注元数据0:' + ` ${model.liveId}`)
if (model && model.liveId && this.reserveList) {
// 修改源数据
this.reserveList.forEach((element) => {
if (element.liveId == model.liveId) {
if (element && element.subscribe != model.subscribe) {
Logger.debug(TAG, '是否关注元数据2:' + ` ${JSON.stringify(element.subscribe)}`)
element.subscribe = !element.subscribe
Logger.debug(TAG, '是否关注元数据3:' + ` ${JSON.stringify(element.subscribe)}`)
this.isShow = true
if (element.subscribe) {
this.reservedIds.push(element.liveId.toString())
} else {
const num = this.reservedIds.indexOf(element.liveId.toString())
if (num >= 0 && num < this.reservedIds.length) {
this.reservedIds.splice(num, 1)
}
}
}
}
})
}
}
})
}
onPageShow(): void {
this.pageShowStartTime = Date.now()
if (this.isShow) {
this.data.reloadData()
this.isShow = false
}
}
onPageHide(): void {
... ... @@ -394,221 +59,4 @@ struct ReserveMorePage {
TrackingPageBrowse.trackCommonPageExposureEnd(this.pageId, this.pageName, duration)
}
private async getData(resolve?: (value: string | PromiseLike<string>) => void) {
if (this.isLoading) {
if (resolve) {
resolve('已更新至最新')
}
return
}
this.isLoading = true
try {
const liveReviewDTO = await PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize)
if (liveReviewDTO && liveReviewDTO.list && liveReviewDTO.list.length > 0) {
if (liveReviewDTO.list.length === this.pageSize) {
this.hasMore = true;
} else {
this.hasMore = false;
}
if (this.currentPage == 1) {
this.data.clear()
this.reserveList = []
this.reservedIds = []
}
liveReviewDTO.list.forEach((content) => {
content.pageId = this.pageId
})
this.data.push(...liveReviewDTO.list)
//批量查询关注状态
this.getAppointmentInfo(liveReviewDTO.list)
} else {
this.hasMore = false;
}
this.resolveEnd(true, resolve)
if (liveReviewDTO.list.length == 0 && this.currentPage == 1) {
this.viewType = ViewType.EMPTY
}
} catch (exception) {
this.resolveEnd(false, resolve)
}
// PageViewModel.getLiveMoreUrl(this.type, this.currentPage, this.pageSize).then(async (liveReviewDTO) => {
// // this.operDataList = []
// // this.operDataList.push(...liveReviewDTO.list)
// this.data.push(...liveReviewDTO.list)
//
// // this.getAppointmentInfo()
// })
}
private resolveEnd(isTop: boolean, resolve?: (value: string | PromiseLike<string>) => void) {
if (resolve) {
if (this.currentPage == 1 && isTop) {
resolve('已更新至最新')
} else {
resolve('')
}
}
if (this.currentPage == 1 && !isTop) {
this.viewType = ViewType.ERROR
} else {
this.viewType = ViewType.LOADED
}
this.isLoading = false
}
async getAppointmentInfo(list: ContentDTO[]) {
if (HttpUtils.getUserId()) {
const reserveBean = this.transformToLiveDetailsBeans(list)
Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(reserveBean)}`)
LiveModel.getAppointmentStatus(reserveBean).then((result) => {
Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(result)}`)
if (result && result.length > 0) {
this.reserveList.push(...result)
// this.reserveStatus = res;
result.map((item: ReserveItemBean) => {
if (item.subscribe) {
this.reservedIds.push(item.liveId.toString())
}
})
}
}).catch(() => {
// this.data.push(...list)
})
} else {
// this.data.push(...list)
}
}
// 判断是否预约
isReserved(item: ContentDTO) {
return this.reservedIds.includes(item.objectId)
}
getAttentionItem(item: ContentDTO) {
const objc = this.reserveList.find((element: ReserveItemBean) => {
return element.liveId.toString() == item.objectId
})
return objc
}
// 这个函数遍历liveReviewDTO.list并转换为LiveDetailsBean数组
transformToLiveDetailsBeans(list: ContentDTO[]): ReserveBean[] {
const liveDetailsBeans: ReserveBean[] = [];
list.forEach(item => {
liveDetailsBeans.push({
relationId: item.relId,
liveId: item.objectId,
});
});
return liveDetailsBeans
}
// 预约/取消预约
async bookAndCancel(item: ContentDTO) {
// 未登录,跳转登录
if (!HttpUtils.getUserId()) {
WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
return
}
if (!this.isLoadingAttention && this.liveId.length == 0) {
this.isLoadingAttention = true
this.liveId = item.objectId
const reserveItem = this.getAttentionItem(item)
if (reserveItem) {
this.isLoadingAttention = true
this.liveId = reserveItem.liveId.toString()
try {
// 埋点
Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click",
TrackParamConvert.program(item))
const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(),
!reserveItem.subscribe);
if (res.code == 0) {
ToastUtils.shortToast(!reserveItem.subscribe ? '预约成功' : '取消预约成功')
// 修改源数据
this.reserveList.forEach((element) => {
if (element.liveId.toString() == item.objectId) {
Logger.debug(TAG, '是否关注元数据:' + ` ${JSON.stringify(element.subscribe)}`)
element.subscribe = !element.subscribe
Logger.debug(TAG, '是否关注元数据1:' + ` ${JSON.stringify(element.subscribe)}`)
if (element.subscribe) {
this.reservedIds.push(element.liveId.toString())
} else {
const num = this.reservedIds.indexOf(element.liveId.toString())
if (num >= 0 && num < this.reservedIds.length) {
this.reservedIds.splice(num, 1)
}
}
}
})
}
this.isLoadingAttention = false
this.liveId = ''
} catch (e) {
this.liveId = ''
this.isLoadingAttention = false
}
} else {
this.liveId = ''
this.isLoadingAttention = false
}
}
}
getReserveDate(eventDateTimeString: string, type: number): string {
// 解析事件的日期和时间
const eventDateTime = new Date(eventDateTimeString);
const currentDateTime = new Date();
// 截取事件时间的小时和分钟(假设事件时间是按照24小时制)
const eventHour = eventDateTime.getHours();
const eventMinutes = eventDateTime.getMinutes();
const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数
if (type === 1) {
// 判断是否是今天
const eventDate = eventDateTime.setHours(0, 0, 0, 0);
const currentDate = currentDateTime.setHours(0, 0, 0, 0);
if (eventDate === currentDate) {
return `今天`;
} else {
const month = eventDateTime.getMonth() + 1;
const date = eventDateTime.getDate();
return `${month}月${date}日`;
}
} else {
return `${eventTimeStr}`;
}
}
// getReserveDate(eventDateTimeString: string, type: number): string {
// // 解析事件的日期和时间
// const eventDateTime = new Date(eventDateTimeString);
// const currentDateTime = new Date();
//
// // 截取事件时间的小时和分钟(假设事件时间是按照24小时制)
// const eventHour = eventDateTime.getHours();
// const eventMinutes = eventDateTime.getMinutes();
// const eventTimeStr = `${eventHour}:${eventMinutes.toString().padStart(2, '0')}开始`; // 格式化时间,确保分钟是两位数
//
// if (type === 1) {
// // 如果是今天
// if (eventDateTime.setHours(0,0,0,0) === currentDateTime.setHours(0,0,0,0)) {
// return `今天`;
// } else {
// // 如果事件不在今天
// const month = eventDateTime.getMonth() + 1; // 月份从0开始
// const date = eventDateTime.getDate();
// return `${month}月${date}日`;
// }
// } else {
// return `${eventTimeStr}`;
// }
// }
}
\ No newline at end of file
... ...
... ... @@ -8,6 +8,7 @@ import { SPHelper } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter'
import { TrackingButton, TrackConstants } from 'wdTracking/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { Logger } from 'wdKit';
const TAG = "FirstTabTopSearchComponent"
... ... @@ -73,6 +74,7 @@ export struct FirstTabTopSearchComponent {
.backgroundImage($r('app.media.background_search'))
.backgroundImageSize(ImageSize.Cover)
.onClick(() => {
Logger.info(TAG, `搜索按钮点击: 新闻`);
TrackingButton.searchClick( TrackConstants.PageName.Search, "NEWS")
let params = { 'tabName': "NEWS" } as Record<string, string>
WDRouterRule.jumpWithPage(WDRouterPage.searchPage,params)
... ...
... ... @@ -21,7 +21,7 @@ export struct SearchHistoryComponent{
},
title: "确认清空历史记录?",
tipShow:false,
leftTextColor:$r('app.color.color_648DF2')
leftTextColor:$r('app.color.color_333333')
}),
autoCancel: true,
alignment: DialogAlignment.Center,
... ...
... ... @@ -291,6 +291,12 @@ export struct SearchResultContentComponent {
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
} else {
if(this.data.get(index + 1).sameContentListSize > 0) {
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
.strokeWidth(4)
}
CardParser({compDTO:new CompDTO, contentDTO: item })
}
if (index != this.data.totalCount() - 1) {
... ...
... ... @@ -47,7 +47,7 @@ export struct AboutPageUI {
context.getApplicationContext();
let appVerion = AppUtils.getAppVersionName()
if (StringUtils.isNotEmpty(appVerion)) {
this.version = "版本号:" + appVerion
this.version = "版本号:" + appVerion + '.' + AppUtils.getBuildVersion()
}
}
... ...
... ... @@ -270,18 +270,20 @@ export class PageViewModel extends BaseViewModel {
* @param pageSize
* @returns
*/
async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO> {
return new Promise<LiveReviewDTO>((success, error) => {
async getLiveMoreUrl(type: number, pageNum: number, pageSize: number): Promise<LiveReviewDTO | null> {
return new Promise<LiveReviewDTO| null>((success, error) => {
Logger.info(TAG, `getLiveMoreUrl pageInfo start`);
PageRepository.fetchLiveMoreUrl(type, pageNum, pageSize).then((resDTO: ResponseDTO<LiveReviewDTO>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getLiveMoreUrl then navResDTO is empty');
error('resDTO is empty');
//error('resDTO is empty');
success(null);
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `getLiveMoreUrl then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
//error('resDTO Response Code is failure');
success(null);
return
}
// let navResStr = JSON.stringify(navResDTO);
... ... @@ -289,7 +291,8 @@ export class PageViewModel extends BaseViewModel {
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getLiveMoreUrl catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
//error(err);
success(null);
})
})
}
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
}
\ No newline at end of file
... ... @@ -33,6 +33,7 @@ export interface recommentVideoListParams {
interface contentListItem {
contentId: string;
contentType: number;
contentRelId?:string
}
export interface contentListParams {
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdComponent@../wdComponent": "wdComponent@../wdComponent",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdDetailPlayShortVideo@../wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../wdDetailPlayShortVideo",
"wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdLogin@../wdLogin": "wdLogin@../wdLogin",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@ohos/lottie@2.0.0": {
"name": "@ohos/lottie",
"integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdComponent@../wdComponent": {
"name": "wdcomponent",
"resolved": "../wdComponent",
"registryType": "local",
"dependencies": {
"@ohos/lottie": "2.0.0",
"wdConstant": "file:../../commons/wdConstant",
"wdPlayer": "file:../../features/wdPlayer",
"wdLogin": "file:../../features/wdLogin",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdDetailPlayShortVideo": "file:../../features/wdDetailPlayShortVideo",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdJsBridge": "file:../../commons/wdJsBridge"
}
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdDetailPlayShortVideo@../wdDetailPlayShortVideo": {
"name": "wddetailplayshortvideo",
"resolved": "../wdDetailPlayShortVideo",
"registryType": "local",
"dependencies": {
"@ohos/lottie": "2.0.0",
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdDetailPlayApi": "file:../../features/wdDetailPlayApi"
}
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdLogin@../wdLogin": {
"name": "wdlogin",
"resolved": "../wdLogin",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
}
\ No newline at end of file
... ... @@ -43,6 +43,7 @@ export struct DetailPlayVLivePage {
@State isPlayerError: boolean = false
@State isCanplay: boolean = false
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
... ... @@ -135,7 +136,7 @@ export struct DetailPlayVLivePage {
PlayerInfoComponent({
playerController: this.playerController,
swiperController: this.swiperController,
swiperIndex: $swiperIndex
swiperIndex: $swiperIndex,
})
// 直播资源加载失败
... ...
... ... @@ -24,7 +24,7 @@ export struct PlayerComponent {
// 播放失败
@Link isPlayerError: boolean
@Link isCanplay: boolean
@State isLarge:boolean = false
pageShowChange() {
this.playerController?.play()
}
... ... @@ -34,7 +34,6 @@ export struct PlayerComponent {
}
aboutToAppear(){
if (this.playerController) {
this.playerController.onCanplay = () => {
this.isCanplay = true
... ... @@ -52,6 +51,16 @@ export struct PlayerComponent {
}
}
this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => {
if(width>height){
this.isLarge = false
if(width > 2){
this.liveStreamType = 0
}
}else{
this.isLarge = true
}
}
}
... ... @@ -113,7 +122,7 @@ export struct PlayerComponent {
this.contentTrackingDict()
this.playerController?.firstPlay(this.playUrl, TrackConstants.PageName.Live_Detail, this.pageParam);
}
}).margin({ top: 195 }).height(211)
}).margin({ top: this.isLarge?0:195 }).height(this.isLarge?'100%': 211)
}
PictureLoading().visibility(this.isCanplay ? Visibility.None : Visibility.Visible)
... ...
... ... @@ -11,6 +11,7 @@ export struct PlayerInfoComponent {
@Consume isShowControl: boolean
@Link swiperIndex: number
build() {
Column() {
Swiper(this.swiperController) {
... ...
import lottie from '@ohos/lottie'
import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
import { NumberFormatterUtils } from 'wdKit/Index'
import { NumberFormatterUtils, WindowModel } from 'wdKit/Index'
import { window } from '@kit.ArkUI'
import { WDAliPlayerController } from 'wdPlayer/Index'
import { DisplayDirection } from 'wdConstant/Index'
/**
* 沉浸式直播--- 头部标题
... ... @@ -12,6 +15,22 @@ export struct PlayerTitleComponent {
@Consume liveRoomDataBean: LiveRoomDataBean
@Consume liveState: string
@Consume contentDetailData: ContentDetailDTO
@Consume displayDirection: DisplayDirection
@State isLarge:boolean = false
private playerController?: WDAliPlayerController
aboutToAppear(): void {
if (!this.playerController) {
return
}
this.playerController.onVideoSizePlayerTitleComponentBack = (width: number, height: number) => {
if(width>height){
this.isLarge = false
}else{
this.isLarge = true
}
}
}
aboutToDisappear(): void {
if (this.contentDetailData.liveInfo?.liveState == 'running') {
lottie.destroy('live_status_wait')
... ... @@ -21,11 +40,42 @@ export struct PlayerTitleComponent {
build() {
Column() {
Row() {
//返回键
Image($r('app.media.icon_arrow_left_white'))
.width(24)
.aspectRatio(1)
.visibility(this.isLarge ? Visibility.Visible : Visibility.None)
.margin({
right: 10
})
.onClick(() => {
WindowModel.shared.setPreferredOrientation(this.isLarge ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
if(this.playerController.onVideoSizePlayerUIComponentMethod){
this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
}
}
})
Text(this.contentDetailData.newsTitle || '')
.maxLines(2)
.fontSize(16)
.fontWeight(500)
.fontColor(Color.White)
Blank().layoutWeight(1)
//分享按钮
Image($r('app.media.icon_share'))
.width(24)
.aspectRatio(1)
.visibility(this.isLarge ? Visibility.Visible : Visibility.None)
.margin({right:16})
}.margin({ bottom: 10 })
Row() {
... ...
... ... @@ -9,12 +9,24 @@ import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
@Component
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@State isSmall:boolean = false
@Consume isShowControl: boolean
aboutToAppear() {
if (!this.playerController) {
return
}
this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => {
if(width>height){
this.isSmall = true
}else{
this.isSmall = false
}
}
}
build() {
Stack() {
// 标题
PlayerTitleComponent()
PlayerTitleComponent({ playerController: this.playerController })
PlayerCommentComponent()
.visibility(this.isShowControl ? Visibility.Hidden : Visibility.Visible)
... ... @@ -23,11 +35,11 @@ export struct PlayerUIComponent {
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController })
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.visibility(this.isShowControl ? Visibility.Visible : this.isSmall? Visibility.Visible:Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
.markAnchor({ y: '100%' })
// .position({ y: '100%' })
// .markAnchor({ y: '100%' })
.margin({ top: this.isSmall?195 +211 - 105:0})
}
.height('100%')
.width('100%')
... ...
import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index'
import { LiveRoomDataBean } from 'wdBean/Index'
import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'
import { WindowModel } from 'wdKit/Index'
import { window } from '@kit.ArkUI'
import { DisplayDirection } from 'wdConstant/Index'
@Component
... ... @@ -11,6 +14,8 @@ export struct PlayerVideoControlComponent {
@State progressVal: number = 0;
//是否处于播放状态中
@State isPlayStatus: boolean = true
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
aboutToAppear(): void {
if (this.playerController) {
... ... @@ -34,24 +39,54 @@ export struct PlayerVideoControlComponent {
getBottomUIComponent() {
Row() {
this.playOrPauseBtn()
Text(this.currentTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
left: 16
})
this.playProgressView()
if(this.contentDetailData.liveInfo?.liveState == 'running'){
Blank().layoutWeight(1)
}else{
Text(this.currentTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
left: 16
})
this.playProgressView()
Text(this.totalTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
right: 16
})
}
//全屏按钮
Image($r('app.media.icon_live_player_full_screen'))
.height(32)
.width(32)
.padding(5)
.borderRadius($r('app.float.vp_16'))
.border({width:0.5})
.borderColor(0x4DFFFFFF)
.backgroundColor(0x4D222222)
.margin({right:10})
.onClick(() => {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
if(this.playerController){
if(this.playerController.onVideoSizePlayerUIComponentMethod){
this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
}
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(1,2)
}
Text(this.totalTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
right: 16
if(this.playerController.onVideoSizePlayerTitleComponentBack){
this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
}
}
})
}
.alignItems(VerticalAlign.Center)
// .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@ohos/lottie@2.0.0": {
"name": "@ohos/lottie",
"integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
}
\ No newline at end of file
... ... @@ -58,6 +58,7 @@ export struct DetailPlayShortVideoPage {
PageName: string = ''
@State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用"
@Consume onlyWifiLoadVideo: boolean
@Consume toastTextVisible: boolean
/**
* 页面显示重查用户关注、点赞等信息
... ... @@ -169,9 +170,12 @@ export struct DetailPlayShortVideoPage {
}
async aboutToAppear() {
if(await onlyWifiLoadVideo()){
this.onlyWifiLoadVideo = true
if (!this.onlyWifiLoadVideo) {
this.onlyWifiLoadVideo = await onlyWifiLoadVideo()
this.toastTextVisible = this.onlyWifiLoadVideo ? false : true
console.log(TAG, 'this.onlyWifiLoadVideo', this.onlyWifiLoadVideo)
}
this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape
this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /
(this.contentDetailData.videoInfo[0]?.resolutionHeight || 9)
... ... @@ -280,7 +284,7 @@ export struct DetailPlayShortVideoPage {
playerController: this.playerController
})
if (!this.onlyWifiLoadVideo) {
if (this.toastTextVisible) {
this.buildContent()
}
... ... @@ -357,6 +361,7 @@ export struct DetailPlayShortVideoPage {
})
.onClick(() => {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.imageVisible = false
})
... ... @@ -403,7 +408,8 @@ export struct DetailPlayShortVideoPage {
this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl, this.PageName, this.PageName,
this.pageParam);
}
}
},
liftVideo: $showCommentList,
})
.width(this.playerWidth)
.height(this.playerHeight)
... ...
... ... @@ -40,6 +40,7 @@ export struct DetailVideoListPage {
pageShowTime:number = 0;
pageHideTime:number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
async aboutToAppear(): Promise<void> {
// 注册监听网络连接
... ...
... ... @@ -65,6 +65,7 @@ export struct VideoChannelDetail {
pageShowTime: number = 0;
pageHideTime: number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
autoRefreshChange() {
if (this.topNavIndex === 0 && !this.isRequesting) {
... ...
... ... @@ -13,7 +13,6 @@ export struct PlayerBottomView {
@Consume isDragging?: boolean
@Consume contentDetailData: ContentDetailDTO
@Consume displayDirection: DisplayDirection
@Consume onlyWifiLoadVideo: boolean
aboutToAppear(): void {
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../wdDetailPlayApi": "wdDetailPlayApi@../wdDetailPlayApi",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../wdPlayer": "wdPlayer@../wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../wdPlayer": {
"name": "wdplayer",
"resolved": "../wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdLogin@../wdLogin": "wdLogin@../wdLogin",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdLogin@../wdLogin": {
"name": "wdlogin",
"resolved": "../wdLogin",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean",
"wdNetwork": "file:../../commons/wdNetwork",
"wdConstant": "file:../../commons/wdConstant"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19",
"@umeng/common@^1.0.21": "@umeng/common@1.0.21",
"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",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit"
},
"packages": {
"@umeng/analytics@1.0.19": {
"name": "@umeng/analytics",
"integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har",
"registryType": "ohpm"
},
"@umeng/common@1.0.21": {
"name": "@umeng/common",
"integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har",
"registryType": "ohpm",
"dependencies": {
"libcommon.so": "./src/main/cpp/types/libcommon"
}
},
"libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": {
"name": "libcommon.so",
"resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local",
"dependencies": {
"@umeng/common": "^1.0.21",
"@umeng/analytics": "^1.0.19"
}
}
}
}
\ No newline at end of file
... ... @@ -41,7 +41,17 @@ export class WDAliPlayerController {
private startTime: number = 0
public errorCode?: number
public errorMesage?: string
//onVideoSizeChange , onVideoSizeMethod同样的方法,不同地方使用
//AliPlayerRenderView回调
public onVideoSizeChange?: (width: number, height: number) => void;
//PlayerUIComponent回调
public onVideoSizePlayerUIComponentMethod?: (width: number, height: number) => void;
//PlayerComponent
public onVideoSizePlayerComponentBack?: (width: number, height: number) => void;
//PlayerTitleComponent
public onVideoSizePlayerTitleComponentBack?: (width: number, height: number) => void;
public onBufferUpdate?: (buffered: number, duration: number) => void;
public onTimeUpdate?: (position: number, duration: number) => void;
public onVolumeUpdate?: (volume: number) => void;
... ... @@ -170,6 +180,17 @@ export class WDAliPlayerController {
if (this.onVideoSizeChange) {
this.onVideoSizeChange(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight());
}
if(this.onVideoSizePlayerUIComponentMethod){
this.onVideoSizePlayerUIComponentMethod(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight());
}
if(this.onVideoSizePlayerTitleComponentBack){
this.onVideoSizePlayerTitleComponentBack(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight());
}
if(this.onVideoSizePlayerComponentBack){
this.onVideoSizePlayerComponentBack(this.avPlayer?.getVideoWidth(), this.avPlayer?.getVideoHeight());
}
if (this.onCanplay) {
this.onCanplay()
} else {
... ...
... ... @@ -49,6 +49,9 @@ export struct WDPlayerRenderView {
@State videoHeight: number = 9
@State videoRatio: number = 16 / 9
@State selfSize: Size = new Size('100%', '100%');
// 是否上推视频中
@Link liftVideo: boolean
private enableAliPlayer = false
aboutToAppear() {
... ... @@ -61,7 +64,7 @@ export struct WDPlayerRenderView {
this.playerController.onVideoSizeChange = (width: number, height: number) => {
// console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`)
Logger.info(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`)
Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`)
this.videoWidth = width;
this.videoHeight = height;
this.videoRatio = width / height
... ... @@ -127,6 +130,21 @@ export struct WDPlayerRenderView {
if (info.size.width > 0 && info.size.height > 0) {
if (!this.liftVideo) {
if (this.videoHeight > 0 && this.videoWidth > 0) {
this.xComponentController.setXComponentSurfaceRect({
surfaceWidth: info.size.width,
surfaceHeight: info.size.width / this.videoRatio,
});
return
}
this.xComponentController.setXComponentSurfaceRect({
surfaceWidth: info.size.width,
surfaceHeight: info.size.height,
});
return
}
// 竖屏
if (this.videoHeight > 0 && this.videoWidth > 0 && this.videoWidth < this.videoHeight) {
let ratio = this.videoWidth / this.videoHeight
... ...
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19",
"@umeng/common@^1.0.21": "@umeng/common@1.0.21",
"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",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdShareBase@../../commons/wdShareBase": "wdShareBase@../../commons/wdShareBase"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@umeng/analytics@1.0.19": {
"name": "@umeng/analytics",
"integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har",
"registryType": "ohpm"
},
"@umeng/common@1.0.21": {
"name": "@umeng/common",
"integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har",
"registryType": "ohpm",
"dependencies": {
"libcommon.so": "./src/main/cpp/types/libcommon"
}
},
"libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": {
"name": "libcommon.so",
"resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
"registryType": "local"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local",
"dependencies": {
"@umeng/common": "^1.0.21",
"@umeng/analytics": "^1.0.19"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean",
"wdNetwork": "file:../../commons/wdNetwork",
"wdConstant": "file:../../commons/wdConstant"
}
},
"wdShareBase@../../commons/wdShareBase": {
"name": "wdsharebase",
"resolved": "../../commons/wdShareBase",
"registryType": "local",
"packageType": "InterfaceHar"
}
}
}
\ No newline at end of file
... ... @@ -3,4 +3,5 @@
/.preview
/build
/.cxx
/.test
\ No newline at end of file
/.test
/oh-package-lock.json5
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@sensorsdata/analytics@^0.0.2": "@sensorsdata/analytics@0.0.2",
"@umeng/analytics@^1.0.19": "@umeng/analytics@1.0.19",
"@umeng/common@^1.0.21": "@umeng/common@1.0.21",
"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",
"wdBean@../wdBean": "wdBean@../wdBean",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@sensorsdata/analytics@0.0.2": {
"name": "@sensorsdata/analytics",
"integrity": "sha512-SQCEmOw8ftGJmKtPl/1qUczZqu/yoQ4F2QHpK2Mayk+XctvNDSHn4QWengHj/pg36AopvuVfa0i6KR9c4KiIuQ==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@sensorsdata/analytics/-/analytics-0.0.2.har",
"registryType": "ohpm"
},
"@umeng/analytics@1.0.19": {
"name": "@umeng/analytics",
"integrity": "sha512-0m9z5l8to+POjDl9UkCQC8s4P+e2E1OILwUglC7ME4QwqfH44e59GLJtQdwF0h6kwpsy3YBft4SoWK8MYbuP7g==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/analytics/-/analytics-1.0.19.har",
"registryType": "ohpm"
},
"@umeng/common@1.0.21": {
"name": "@umeng/common",
"integrity": "sha512-EbXsd4OoRisTQf5egNY/+z1D2bvrYw9VwC2xu3EJA9TiDPSbnaJZ5+yltA/Se6yZ4oCcFvq6e5/AAfPuumunbw==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@umeng/common/-/common-1.0.21.har",
"registryType": "ohpm",
"dependencies": {
"libcommon.so": "./src/main/cpp/types/libcommon"
}
},
"libcommon.so@../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon": {
"name": "libcommon.so",
"resolved": "../../oh_modules/.ohpm/@umeng+common@1.0.21/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
"registryType": "local"
},
"wdBean@../wdBean": {
"name": "wdbean",
"resolved": "../wdBean",
"registryType": "local"
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local",
"dependencies": {
"@umeng/common": "^1.0.21",
"@umeng/analytics": "^1.0.19"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
}
}
}
\ No newline at end of file
... ... @@ -22,7 +22,7 @@ export class TrackingButton {
params["pageId"] = pageId
params["pageName"] = pageName
Tracking.event("search_button_click ", params)
Tracking.event("search_button_click", params)
}
}
\ No newline at end of file
... ...
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@mpaas/compress@^1.0.0": "@mpaas/compress@1.0.0",
"@mpaas/fake-island@^1.0.0": "@mpaas/fake-island@1.0.0",
"@mpaas/framework@0.0.2": "@mpaas/framework@0.0.2",
"@mpaas/framework@^0.0.2": "@mpaas/framework@0.0.2",
"@mpaas/fs-ext@^1.0.0": "@mpaas/fs-ext@1.0.0",
"@mpaas/lang@^1.0.0": "@mpaas/lang@1.0.0",
"@mpaas/path@^1.0.0": "@mpaas/path@1.0.0",
"@mpaas/rpc@^0.0.2": "@mpaas/rpc@0.0.2",
"@mpaas/shuckle@^1.0.0": "@mpaas/shuckle@1.0.0",
"@mpaas/trace-log@^0.0.2": "@mpaas/trace-log@0.0.2",
"@mpaas/transport_build@^0.0.2": "@mpaas/transport_build@0.0.2",
"@mpaas/udid@0.0.2": "@mpaas/udid@0.0.2",
"@mpaas/upgrade@0.0.2": "@mpaas/upgrade@0.0.2",
"@ohos/crypto-js@^2.0.2": "@ohos/crypto-js@2.0.3",
"@ohos/hypium@1.0.16": "@ohos/hypium@1.0.16",
"@ohos/pulltorefresh@^2.0.5": "@ohos/pulltorefresh@2.0.5",
"dayjs@^1.11.7": "dayjs@1.11.7",
"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",
"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",
"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",
"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",
"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",
"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",
"long@^5.2.1": "long@5.2.1",
"pako@^2.1.0": "pako@2.1.0"
},
"packages": {
"@mpaas/compress@1.0.0": {
"name": "@mpaas/compress",
"integrity": "sha512-x/aUK/zKjoUnd4kYGNAI1JMcEY2n4N6Rn+F+zcIYs8WLgobY6kFXTphLJ/NlSgjJklc2009U8zeStvtjon1zaQ==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/compress/compress-1.0.0.har",
"registryType": "ohpm",
"dependencies": {
"libcompress.so": "file:./src/main/cpp/types/libcompress"
}
},
"@mpaas/fake-island@1.0.0": {
"name": "@mpaas/fake-island",
"integrity": "sha512-cEt0Zsie0rwfvnYmqA+6pa93L6NLkJKwiqJCoE9Z2hFjhk9s4RSz7F0AUuj4WobrpdElXuipoCNFPXWLb4ZBlA==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fake-island/fake-island-1.0.0.har",
"registryType": "ohpm",
"dependencies": {
"libgwcli.so": "file:./types"
}
},
"@mpaas/framework@0.0.2": {
"name": "@mpaas/framework",
"integrity": "sha512-nNpCI44zvg4fN9GNM5m31LdqfLrej9mMo/+BMny8QK+/Jvc3m/itE45bWZZ7unfflq40H2t4YOgtNAIW3m8MaA==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/framework/framework-0.0.2.har",
"registryType": "ohpm",
"dependencies": {
"libframework_api.so": "file:./src/main/cpp/types/libframework_api",
"@mpaas/udid": "0.0.2"
}
},
"@mpaas/fs-ext@1.0.0": {
"name": "@mpaas/fs-ext",
"integrity": "sha512-4TGUdrkmVSFktp1NcRdcs4uLYH6GvN1aTkMD2z8TJLztz5Hq5fMrvuznsmwTsSaRxGfGuyHPER8enMQo8wcfKA==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/fs-ext/fs-ext-1.0.0.har",
"registryType": "ohpm",
"dependencies": {
"@mpaas/path": "^1.0.0"
}
},
"@mpaas/lang@1.0.0": {
"name": "@mpaas/lang",
"integrity": "sha512-dcQ2QPrvwZgBhoGUjAbSFfkReDkwqEPMTzy/Xk05dhIB9VVznpLPahlQLVi0Am1FPATCT8J7DDrko9aJLOba+w==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/lang/lang-1.0.0.har",
"registryType": "ohpm",
"dependencies": {
"liblang.so": "file:./types"
}
},
"@mpaas/path@1.0.0": {
"name": "@mpaas/path",
"integrity": "sha512-TNjPaVOiq4DTiNFexSeI9isxeJ1H4q9Vieh3Bnv66o0U/e7rwV1qjEUtMvihX3MlsX0VKVkT0Xyf/wm18l4XYw==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/path/path-1.0.0.har",
"registryType": "ohpm"
},
"@mpaas/rpc@0.0.2": {
"name": "@mpaas/rpc",
"integrity": "sha512-BeiXDHW77CpZF5x4nuQc+3A7MfhFfU3+Wc73gac/ZRhIPuAAzfLmlzm5alqdm6oiWAw17ERQydUSG4SQSCHQ4g==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/rpc/rpc-0.0.2.har",
"registryType": "ohpm",
"dependencies": {
"@mpaas/transport_build": "^0.0.2",
"@mpaas/lang": "^1.0.0",
"@mpaas/framework": "^0.0.2"
}
},
"@mpaas/shuckle@1.0.0": {
"name": "@mpaas/shuckle",
"integrity": "sha512-B0MhrNzwG9pIoPxYVBldyenQWtWfTv5twd/0Ur1LbMpbp09AQ5wrZjKgDoeUtsIls9gzL9T8ngDZU6mRn8SYgQ==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/shuckle/shuckle-1.0.0.har",
"registryType": "ohpm",
"dependencies": {
"libshuckle.so": "file:./src/main/cpp/types/libshuckle",
"@mpaas/framework": "^0.0.2"
}
},
"@mpaas/trace-log@0.0.2": {
"name": "@mpaas/trace-log",
"integrity": "sha512-Llsdnx3L2tJJDg9vwJY01YsK4IOSmCo4SmAIW9yFHTzylrzFSWdFefRhJbNlkQQilXdYygEkBByXVvT1wFSmAg==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/trace-log/trace-log-0.0.2.har",
"registryType": "ohpm",
"dependencies": {
"@mpaas/lang": "^1.0.0",
"@mpaas/fs-ext": "^1.0.0",
"@mpaas/path": "^1.0.0",
"@mpaas/framework": "0.0.2",
"libmplog.so": "file:types",
"dayjs": "^1.11.7"
}
},
"@mpaas/transport_build@0.0.2": {
"name": "@mpaas/transport_build",
"integrity": "sha512-utz9C/cKIWbYrNiTBjk1gUhPH4/M73G64hWlrYKDpkfJHJmdYcQmmYV3v7Jit1z7Qg7hhu0aOaZzShqdQdC7rg==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/transport_build/transport_build-0.0.2.har",
"registryType": "ohpm",
"dependencies": {
"@ohos/crypto-js": "^2.0.2",
"dayjs": "^1.11.7",
"pako": "^2.1.0",
"@mpaas/fake-island": "^1.0.0",
"long": "^5.2.1",
"@mpaas/framework": "^0.0.2",
"@mpaas/shuckle": "^1.0.0",
"@mpaas/compress": "^1.0.0"
}
},
"@mpaas/udid@0.0.2": {
"name": "@mpaas/udid",
"integrity": "sha512-YFLSgBOrIjjmcFm4Cn2BB1tspHKHdB4qipVl4MUhHHDfiUYbLIVuv7x5xB9xPuPf0gKO8rx0yqUuzkaNDoNsAw==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/udid/udid-0.0.2.har",
"registryType": "ohpm"
},
"@mpaas/upgrade@0.0.2": {
"name": "@mpaas/upgrade",
"integrity": "sha512-VWamULIoJPA6nxUADwwNXd3uOspZeYAsRh05pApVilIdum5ktIMXIFl71jAKsChs3jtrhs9y5EShoZD4MZrGsA==",
"resolved": "https://mpaas-ohpm.oss-cn-hangzhou.aliyuncs.com/dist/@mpaas/upgrade/upgrade-0.0.2.har",
"registryType": "ohpm",
"dependencies": {
"@mpaas/framework": "^0.0.2",
"@mpaas/rpc": "^0.0.2",
"@mpaas/lang": "^1.0.0",
"@mpaas/transport_build": "^0.0.2",
"@mpaas/trace-log": "^0.0.2"
}
},
"@ohos/crypto-js@2.0.3": {
"name": "@ohos/crypto-js",
"integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==",
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/crypto-js/-/crypto-js-2.0.3.har",
"registryType": "ohpm"
},
"@ohos/hypium@1.0.16": {
"name": "@ohos/hypium",
"integrity": "sha512-PC3jpwKERg68V+4dmKU+SLjNps9i5JcQH57rQriaTsh62NBgVZs4SceMmNOtrIOyldbEJ5mXSwoZwiG/nkRmTw==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.16.har",
"registryType": "ohpm"
},
"@ohos/pulltorefresh@2.0.5": {
"name": "@ohos/pulltorefresh",
"integrity": "sha512-mgBvJ6Ga70LmAoPKTOEPLFJluHUEAaBt2+7wF7R6223Vw6UEbZrof1MyvVOLEHk8Uc64ASIMW/TNQ8AHraTV5A==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/pulltorefresh/-/pulltorefresh-2.0.5.har",
"registryType": "ohpm"
},
"dayjs@1.11.7": {
"name": "dayjs",
"integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==",
"resolved": "https://ohpm.openharmony.cn/ohpm/dayjs/-/dayjs-1.11.7.tgz",
"shasum": "4b296922642f70999544d1144a2c25730fce63e2",
"registryType": "ohpm"
},
"libcompress.so@oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress": {
"name": "libcompress.so",
"resolved": "oh_modules/.ohpm/@mpaas+compress@1.0.0/oh_modules/@mpaas/compress/src/main/cpp/types/libcompress",
"registryType": "local"
},
"libframework_api.so@oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api": {
"name": "libframework_api.so",
"resolved": "oh_modules/.ohpm/@mpaas+framework@0.0.2/oh_modules/@mpaas/framework/src/main/cpp/types/libframework_api",
"registryType": "local"
},
"libgwcli.so@oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types": {
"name": "libgwcli.so",
"resolved": "oh_modules/.ohpm/@mpaas+fake-island@1.0.0/oh_modules/@mpaas/fake-island/types",
"registryType": "local"
},
"liblang.so@oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types": {
"name": "liblang.so",
"resolved": "oh_modules/.ohpm/@mpaas+lang@1.0.0/oh_modules/@mpaas/lang/types",
"registryType": "local"
},
"libmplog.so@oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types": {
"name": "libmplog.so",
"resolved": "oh_modules/.ohpm/@mpaas+trace-log@0.0.2/oh_modules/@mpaas/trace-log/types",
"registryType": "local"
},
"libshuckle.so@oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle": {
"name": "lishuckle.so",
"resolved": "oh_modules/.ohpm/@mpaas+shuckle@1.0.0/oh_modules/@mpaas/shuckle/src/main/cpp/types/libshuckle",
"registryType": "local",
"dependencies": {
"@mpaas/framework": "^0.0.2"
}
},
"long@5.2.1": {
"name": "long",
"integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==",
"resolved": "https://ohpm.openharmony.cn/ohpm/long/-/long-5.2.1.tgz",
"shasum": "e27595d0083d103d2fa2c20c7699f8e0c92b897f",
"registryType": "ohpm"
},
"pako@2.1.0": {
"name": "pako",
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
"resolved": "https://ohpm.openharmony.cn/ohpm/pako/-/pako-2.1.0.tgz",
"shasum": "266cc37f98c7d883545d11335c00fbd4062c9a86",
"registryType": "ohpm"
}
}
}
\ No newline at end of file
{
"meta": {
"stableOrder": true
},
"lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/axios@^2.1.1": "@ohos/axios@2.2.0",
"@ohos/lottie@2.0.0": "@ohos/lottie@2.0.0",
"wdBean@../../features/wdBean": "wdBean@../../features/wdBean",
"wdComponent@../../features/wdComponent": "wdComponent@../../features/wdComponent",
"wdConstant@../../commons/wdConstant": "wdConstant@../../commons/wdConstant",
"wdDetailPlayApi@../../features/wdDetailPlayApi": "wdDetailPlayApi@../../features/wdDetailPlayApi",
"wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo": "wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo",
"wdHwAbility@../../features/wdHwAbility": "wdHwAbility@../../features/wdHwAbility",
"wdJsBridge@../../commons/wdJsBridge": "wdJsBridge@../../commons/wdJsBridge",
"wdKit@../../commons/wdKit": "wdKit@../../commons/wdKit",
"wdLogin@../../features/wdLogin": "wdLogin@../../features/wdLogin",
"wdNetwork@../../commons/wdNetwork": "wdNetwork@../../commons/wdNetwork",
"wdPlayer@../../features/wdPlayer": "wdPlayer@../../features/wdPlayer",
"wdRouter@../../commons/wdRouter": "wdRouter@../../commons/wdRouter",
"wdWebComponent@../../commons/wdWebComponent": "wdWebComponent@../../commons/wdWebComponent"
},
"packages": {
"@ohos/axios@2.2.0": {
"name": "@ohos/axios",
"integrity": "sha512-v1QBWk6DfcN8wUW3D0ieFbHTR1taSI5cOgxp5l6B5cegXuNYhSc8ggKlAIXe6h/14LsfM+NW0ZGfSXcNEIM5yA==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.2.0.har",
"registryType": "ohpm"
},
"@ohos/lottie@2.0.0": {
"name": "@ohos/lottie",
"integrity": "sha512-jFEFYfuqGO323aMiwtzHmDGRJI0qTxjZD2Lzbn+LxRdoHSfu5OVu22I8gVm5ej019tCw3WOk547NHZ2GuWiNSg==",
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/lottie/-/lottie-2.0.0.har",
"registryType": "ohpm"
},
"wdBean@../../features/wdBean": {
"name": "wdbean",
"resolved": "../../features/wdBean",
"registryType": "local"
},
"wdComponent@../../features/wdComponent": {
"name": "wdcomponent",
"resolved": "../../features/wdComponent",
"registryType": "local",
"dependencies": {
"@ohos/lottie": "2.0.0",
"wdConstant": "file:../../commons/wdConstant",
"wdPlayer": "file:../../features/wdPlayer",
"wdLogin": "file:../../features/wdLogin",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdDetailPlayShortVideo": "file:../../features/wdDetailPlayShortVideo",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdJsBridge": "file:../../commons/wdJsBridge"
}
},
"wdConstant@../../commons/wdConstant": {
"name": "wdconstant",
"resolved": "../../commons/wdConstant",
"registryType": "local"
},
"wdDetailPlayApi@../../features/wdDetailPlayApi": {
"name": "wddetailplayapi",
"resolved": "../../features/wdDetailPlayApi",
"registryType": "local",
"dependencies": {
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdDetailPlayShortVideo@../../features/wdDetailPlayShortVideo": {
"name": "wddetailplayshortvideo",
"resolved": "../../features/wdDetailPlayShortVideo",
"registryType": "local",
"dependencies": {
"@ohos/lottie": "2.0.0",
"wdPlayer": "file:../../features/wdPlayer",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork",
"wdDetailPlayApi": "file:../../features/wdDetailPlayApi"
}
},
"wdHwAbility@../../features/wdHwAbility": {
"name": "wdhwability",
"resolved": "../../features/wdHwAbility",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdLogin": "file:../../features/wdLogin",
"wdKit": "file:../../commons/wdKit",
"wdBean": "file:../../features/wdBean",
"wdNetwork": "file:../../commons/wdNetwork"
},
"packageType": "InterfaceHar"
},
"wdJsBridge@../../commons/wdJsBridge": {
"name": "wdjsbridge",
"resolved": "../../commons/wdJsBridge",
"registryType": "local"
},
"wdKit@../../commons/wdKit": {
"name": "wdkit",
"resolved": "../../commons/wdKit",
"registryType": "local"
},
"wdLogin@../../features/wdLogin": {
"name": "wdlogin",
"resolved": "../../features/wdLogin",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../../commons/wdConstant",
"wdKit": "file:../../commons/wdKit",
"wdWebComponent": "file:../../commons/wdWebComponent",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../../commons/wdRouter",
"wdNetwork": "file:../../commons/wdNetwork"
}
},
"wdNetwork@../../commons/wdNetwork": {
"name": "wdnetwork",
"resolved": "../../commons/wdNetwork",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"@ohos/axios": "^2.1.1"
}
},
"wdPlayer@../../features/wdPlayer": {
"name": "wdplayer",
"resolved": "../../features/wdPlayer",
"registryType": "local",
"dependencies": {
"wdKit": "file:../../commons/wdKit"
}
},
"wdRouter@../../commons/wdRouter": {
"name": "wdrouter",
"resolved": "../../commons/wdRouter",
"registryType": "local",
"dependencies": {
"wdKit": "file:../wdKit",
"wdBean": "file:../../features/wdBean"
}
},
"wdWebComponent@../../commons/wdWebComponent": {
"name": "wdwebcomponent",
"resolved": "../../commons/wdWebComponent",
"registryType": "local",
"dependencies": {
"wdConstant": "file:../wdConstant",
"wdKit": "file:../wdKit",
"wdJsBridge": "file:../wdJsBridge",
"wdBean": "file:../../features/wdBean",
"wdRouter": "file:../wdRouter"
}
}
}
}
\ No newline at end of file
... ... @@ -151,7 +151,7 @@ struct Index {
TapGesture()
.onAction((event: GestureEvent) => {
if (this.AudioSuspension.playerController) {
this.AudioSuspension.playerController.get().switchPlayOrPause()
this.AudioSuspension.playerController.get().pause()
this.AudioSuspension.minimize()
}
}))
... ...
... ... @@ -37,6 +37,8 @@ export struct VideoChannelPage {
aboutToAppear(): void {
this.setBarBackgroundColor()
console.log(TAG, 'aboutToAppear')
console.log('XY', '----VideoChannel-------aboutToAppear')
}
/**
... ...
import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
import { window } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
import { NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit';
import { ProcessUtils } from 'wdRouter';
import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel'
... ... @@ -79,8 +79,11 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
return new Promise((resolve, reject) => {
pageLoader.loadContent('pages/MainPage')
.then(() => {
.then( async () => {
if (NetworkUtil.isNetConnected()) {
if (await FastClickUtil.isMinDelayTime()) {
return
}
DailyPaperTopicModel.getDailyPaperTopic().then(dailyPaperTopicBean => {
if (dailyPaperTopicBean && dailyPaperTopicBean.id > 0) {
SPHelper.default.saveSync('dailyPaperTopicPageId', dailyPaperTopicBean.id);
... ...