惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
H
Help Net Security
Last Week in AI
Last Week in AI
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
B
Blog
C
Check Point Blog
T
Tailwind CSS Blog
云风的 BLOG
云风的 BLOG
D
Docker
Recent Announcements
Recent Announcements
Vercel News
Vercel News
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
月光博客
月光博客
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
The Register - Security
The Register - Security
V
Visual Studio Blog
F
Full Disclosure
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
PCI Perspectives
PCI Perspectives
Cisco Talos Blog
Cisco Talos Blog
博客园 - Franky
D
DataBreaches.Net
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
T
Tenable Blog
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy

人人都是产品经理

为什么你的产品找不到差异化?90%的失败都卡在第一步上(下) – 人人都是产品经理, 3年从30万到1300万用户、获2200万美元融资,这个AI教育产品用“抽卡”破解了获客难题 – 人人都是产品经理, 园区招商系统怎么做才能真正帮到去化?我加了这一个功能,推广链接转发400次阅读过万 – 人人都是产品经理, AI大事件:OpenAI发完网络安全模型又搞药物研发,小鹏汽车要抓”DeepSeek时刻” – 人人都是产品经理, 电商不是卖货,是一场更残酷的产品经理实战 – 人人都是产品经理, 没想到,活动营销又回来了! – 人人都是产品经理, 为何All-in海外KOC:一场关于AI时代窗口期的豪赌 – 人人都是产品经理, 重新理解企业的内部协作 – 人人都是产品经理, 苹果的 AI 战略到底是什么? – 人人都是产品经理, 医疗智能体·第2讲——合规护城河:等保、PIPL与HIPAA的架构实战 – 人人都是产品经理, 向量知识库五步法:从“答非所问”到“精准回复” – 人人都是产品经理, 鸿蒙PC三方库构建总指挥HPKBUILD(sha)库为例 – 人人都是产品经理, 何时该用LLM?AI产品经理的LLM设计指南 – 人人都是产品经理, 医疗信息领域的需求方、决策方、准入方以及关注点(二) – 人人都是产品经理, 即梦涨价:一场被误读的「傲慢」 – 人人都是产品经理, 面试AI PM必答题:Hermes和OpenClaw的区别,如何讲清楚业务价值 – 人人都是产品经理, AI的下一张船票:世界模型——AI产品经理必须理解的技术拐点 – 人人都是产品经理, 小红书做GEO,怎么让AI信你?记住这 3 个重要信息 – 人人都是产品经理, 5 家印度 AI 初创公司,看看印度 AI 再做什么 – 人人都是产品经理, AI项目跨团队协作:产品技术业务如何不打架 – 人人都是产品经理, Agentic Workflow(智能体工作流):让AI从”答案生成器”变成”数字员工” – 人人都是产品经理, lycium_plusplus 项目全景解读:OpenHarmony 三方库构建的“大管家” – 人人都是产品经理, 从爆单救火到前置履约:两套预采策略,把生鲜大促履约效率拉满 – 人人都是产品经理, 什么时候该补货?我用一轮数据做了一个决定 – 人人都是产品经理, 从“机械兜底”到“动态分流”:AI客服重复进线治理的4大底层逻辑 – 人人都是产品经理, 抖音拼效率,红书拼洞察 – 人人都是产品经理, 全民狂欢与退潮——为什么龙虾这波热潮冷却得如此之快? – 人人都是产品经理, Stripe押注!MPP重塑全球支付 – 人人都是产品经理, 小红书GEO:AI引用你的内容,不是因为你对,而是因为你看起来可信 – 人人都是产品经理, 前百度副总裁押注办公Agent,日韩付费爆发,Manus迎来强劲对手 – 人人都是产品经理, 企事业单位数字化的业务供需本质 – 人人都是产品经理, 医疗智能体·第1讲——医疗信息化重构:从“辅助软件”到“自主智能体”的范式转移 – 人人都是产品经理, 粉丝量就是空气!!! – 人人都是产品经理, 用户说“薯片碎了”,机器回“要买吗?”:意图识别的翻车与破局 – 人人都是产品经理, RAG召回准确率从75到90 我做对了这三件事 – 人人都是产品经理, AI大事件:Anthropic改收费、OpenAI发安全版、手术机器人纳入医保、阿里发布”秒悟” – 人人都是产品经理, Chrome 推出 Skills 新功能,Agent 重塑上网方式 – 人人都是产品经理, GitHub前创始人拿了a16z的1700万美元,做Agent时代的Git – 人人都是产品经理 拷贝或克隆其他 Flutter OH 项目到本地后无法运行 – 人人都是产品经理, 优惠券设计:优惠券创建 – 人人都是产品经理, 不用死磕文档!AI 助手 1 小时搞定飞书 CLI 安装 + 配置 + 知识库 – 人人都是产品经理, 用小龙虾做竞品分析报告:从2天到20分钟,我是怎么做到的 – 人人都是产品经理 用小龙虾做市场分析报告:搞懂这3个公式,市场规模不再靠猜 – 人人都是产品经理, 你早就在做 Harness 工程,只是不知道它叫这个名字 – 人人都是产品经理, Think Long就够?你可能想多了! – 人人都是产品经理, 货代SRM实战:供应商准入怎么做,才能让资源池不是通讯录而是可交付网络? – 人人都是产品经理, 如何做好用户调研?详解基本技巧 – 人人都是产品经理, 木鸟、途家、美团对打,平台春天行动开“卷” – 人人都是产品经理, 入职才发现公司不靠谱?小红书从业者求职避坑指南 – 人人都是产品经理, 美国 AI 三巨头联手封堵,中国 AI 突围之路在何方 – 人人都是产品经理, 小红书,放在需求对面的镜子 – 人人都是产品经理, AI 会带来大规模失业吗? – 人人都是产品经理, 从出单到补货前,我第一次犹豫:该不该放大? – 人人都是产品经理, Flutter 三方库鸿蒙化适配:5 种高效检查方式,快速判断是否需要适配 – 人人都是产品经理, 从做产品进阶拿结果:医美机构产品经理转岗科室运营经理 – 人人都是产品经理, 阿里HappyHorse,一场关于“Token经济”的阳谋 – 人人都是产品经理, To B AI:客户留存落地的观察与思考 – 人人都是产品经理, AI产品的“生命线”——数据采集、标注、清洗的产品化设计 – 人人都是产品经理, 谈谈AI Agent(二):当“孩子”能自己“体验世界”时,你该学什么? – 人人都是产品经理, UI/UX设计师的3层能力进阶,前两层让你活下来,第三层…才是真正的分水岭 – 人人都是产品经理, 2分钟 → 30秒,效率提升75%:B端产品经理如何用「规则枷锁」驯服AI幻觉? – 人人都是产品经理, 还没来得及学OpenClaw,来了个更猛的:Hermes Agent – 人人都是产品经理, AI日报:宇树机器人跑出10m/s刷新世界纪录 – 人人都是产品经理, 一文说透基金互金如何用情绪价值引导用户决策做转化 – 人人都是产品经理, 当浏览器开始替你”看”网页:AI 浏览器正在亲手拆掉它脚下的那张网 – 人人都是产品经理, 0代码,一天时间我Vibe Coding了个网站 – 人人都是产品经理, Hermes 和 OpenClaw 之争,Agent 的能力应该“装上去”还是“长出来”? – 人人都是产品经理 视频生成的“桌子”,字节Seedance 2掀完,阿里快乐马掀 – 人人都是产品经理, 从听不懂到完全信任:我的 Codex 深度产品体验 – 人人都是产品经理, 当虚拟偶像有了北京户口,与真人偶像还有什么区别? – 人人都是产品经理, 会说,远远比会做更重要 —— 对 SBTI 爆火现象的五层观察 – 人人都是产品经理, AI产品经理必看:当“搭环境”比“选模型”更重要,你的认知还在2024年吗? – 人人都是产品经理, 2026年AI产品商业化核心逻辑:从功能demo到规模化营收的3个必破卡点 – 人人都是产品经理, 京东围绕供应链,卷起裤腿下场的那些事儿 – 人人都是产品经理, SBTI一夜刷屏:它赢在了“太会说人话” – 人人都是产品经理, 折扣零售的真相:不是便宜,而是价值感! – 人人都是产品经理, 和甲方吵了一架,最后加钱做了——我学到的ToB产品经理生存法则 – 人人都是产品经理, 和几位小红书操盘手聊了8小时,干货全在这 – 人人都是产品经理, 智谱GLM-5.1登场,开源模型首超Opus4.6!!! – 人人都是产品经理 Anthropic收入凭什么反超OpenAI,终于有人把这事说清楚了 – 人人都是产品经理, 史上最有故事感的技术报告——Claude最强模型Mythos 7个极其精彩的细节 – 人人都是产品经理, 模型不是壁垒,Harness 也不是 – 人人都是产品经理, 抖音本地生活业务思考21 – 人人都是产品经理, Superpowers:145k Star的AI编码框架,到底是什么来头? Superpowers:145k Star的AI编码框架,到底是什么来头? – 人人都是产品经理, OpenAI 的路走错了,Anthropic Harness 解法启示:模型需要实践专科生 – 人人都是产品经理, 画原型图的前一步:设计站点地图 – 人人都是产品经理, 给 DeepSeek 的最后一封催更信 – 人人都是产品经理, 手把手教你用 Claude Code 搭建 AI 营销团队:5 个 Agent、12 项技能,独立完成研究、写作、设计全流程 – 人人都是产品经理, 你以为大模型在学语言?不,它在重新发明语言学 – 人人都是产品经理 所谓Skill,不过是AI时代的工业垃圾 – 人人都是产品经理, 聊一聊内容传播的几个方法 – 人人都是产品经理, 当平台开始吃掉生态:从 OpenClaw 被封杀,读懂 Anthropic 的这盘棋 – 人人都是产品经理, 你装了 10 个 AI 插件,Obsidian 还是一个文件夹 – 人人都是产品经理 关于AI智能体架构演进的系统性思考:从单体试水到多体协同的重构 – 人人都是产品经理, 当“人”变成Skill,我们又该何去何从? – 人人都是产品经理 Mythos 事件:前沿 AI 治理的意外实验 – 人人都是产品经理, 货代CRM:信用与风险管理怎么做,才能把坏账风险拦在放货之前? – 人人都是产品经理, 从HR收集自拍照到员工自助录入——我见证了园区人脸识别从”不可用”到”真好用”的全过程 – 人人都是产品经理 千问闯关AI混沌期:阿里画靶,吴嘉张弓,马云射箭? – 人人都是产品经理,
【推荐+1】HarmonyOS官方模板优秀案例(第13期:运动健康 · 运动健身)
华为开发者联盟 · 2025-11-10 · via 人人都是产品经理

为支持开发者单独获取特定场景的页面和功能,本模板将功能完全自闭环的部分能力抽离出独立的行业组件模块,不依赖公共基础能力包,开发者可以单独集成,开箱即用,降低使用难度。

ExerciseAndFitness  

├──commons

│  ├──lib_account/src/main/ets                            // 账号登录模块            

│  │    ├──components

│  │    │   └──AgreePrivacyBox.ets                        // 隐私同意勾选            

│  │    ├──constants                                      // 常量                      

│  │    ├──pages  

│  │    │   ├──HuaweiLoginPage.ets                        // 华为账号登录页面

│  │    │   ├──OtherLoginPage.ets                         // 其他方式登录页面

│  │    │   └──ProtocolWebView.ets                        // 协议H5        

│  │    ├──services                                       // 服务api            

│  │    ├──utils  

│  │    │   ├──ErrorCodeHelper.ets                        // 错误码处理工具类

│  │    │   ├──HuaweiAuthUtils.ets                        // 华为认证工具类

│  │    │   ├──LoginSheetUtils.ets                        // 统一登录半模态弹窗

│  │    │   └──WXApiUtils.ets                             // 微信登录事件处理类      

│  │    └──viewmodels                                     // 视图模型

│  │

│  ├──lib_api/src/main/ets                              // 服务端api模块  

│  │    ├──database                                       // 数据库

│  │    ├──params                                         // 请求响应参数

│  │    └──services                                       // 服务api  

│  │

│  ├──lib_common/src/main/ets                             // 基础模块            

│  │    ├──components                                     // 通用组件            

│  │    ├──constants                                      // 通用常量

│  │    ├──dialogs                                        // 通用弹窗

│  │    ├──mocks                                          // 模拟数据

│  │    ├──models                                         // 状态观测模型

│  │    ├──types                                          // 类型

│  │    └──utils                                          // 通用方法                      

│  │

│  └──lib_widget/src/main/ets                             // 通用UI模块            

│       └──components

│           └──NavHeaderBar.ets                           // 自定义标题栏

├──components

│  ├──aggregated_payment                                  // 通用支付组件

│  ├──module_chart                                        // 图表组件

│  ├──module_feedback                                     // 意见反馈组件

│  ├──module_imagepreview                                 // 图片预览组件

│  ├──module_player                                       // 播放组件

│  ├──module_search                                       // 搜索组件

│  └──module_transition                                   // 动画组件        

│      

├──features

│  ├──home/src/main/ets                                   // 首页模块                  

│  │    ├──pages

│  │    │   ├──CommonKnowledgeActivatePage.ets            // 激活页

│  │    │   ├──CommonKnowledgeDrawPage.ets                // 拉伸页

│  │    │   ├──CommonKnowledgeEquipPage.ets               // 装备页

│  │    │   ├──CommonKnowledgePage.ets                    // 常识页面

│  │    │   ├──CommonKnowledgeStrainPage.ets              // 避免受伤页

│  │    │   ├──CommonKnowledgeWarmPage.ets                // 热身页

│  │    │   ├──CommonKnowledgeYogaPage.ets                // 瑜伽页

│  │    │   └──HomePage.ets                               // 首页页面

│  │    └──viewmodels  

│  │        └──CommonKnowledgePageVM.ets                  // 常识页面视图模块

│  ├──course/src/main/ets                                 // 课程模块    

│  │    ├──pages

│  │    │   ├──AdvancedCoursePage.ets                     // 进阶课程页面

│  │    │   ├──CourseDetailPage.ets                       // 课程详情页面

│  │    │   ├──CoursePage.ets                             // 课程页面

│  │    │   ├──CoursePlayer.ets                           // 课程视频

│  │    │   ├──CourseSearch.ets                           // 课程搜索

│  │    │   ├──FilterPage.ets                             // 课程筛选

│  │    │   └──HotCoursePage.ets                          // 热门课程

│  │    └──viewmodels

│  │        ├──AddDateDialog.ets                          // 添加日程

│  │        ├──AdvancedCoursePageVM.ets                   // 进阶课程视图模型

│  │        ├──Calendar.ets                               // 日历

│  │        ├──CoursePageVM.ets                           // 课程视图模型

│  │        ├──CustomDialog.ets                           // 自定义弹窗

│  │        └──HotCoursePageVM.ets                        // 热门课程视图模型                  

│  │

│  ├──mine/src/main/ets                                   // 我的模块            

│  │    ├──components

│  │    │   ├──CourseItemComponent.ets                    // 课程组件

│  │    │   ├──LeftSwipeComponent.ets                     // 左滑组件

│  │    │   ├──VipBenefits.ets                            // VIP权益

│  │    │   ├──VipOpen.ets                                // 开通VIP

│  │    │   ├──VipOperation.ets                           // VIP操作

│  │    │   └──VipPackage.ets                             // VIP套餐包            

│  │    ├──constants                                      // 常量        

│  │    ├──model                                          // 模型        

│  │    ├──preview                                        // 预览          

│  │    ├──types                                          // 类型        

│  │    ├──utils                                          // 工具类        

│  │    ├──viewmodels                                     // 视图模型

│  │    └──pages

│  │        ├──HistoryPage.ets                            // 我的足迹

│  │        ├──MarkPage.ets                               // 我的收藏

│  │        ├──RecordPage.ets                             // 运动记录

│  │        ├──VIPPage.ets                                // 会员页面

│  │        └──MinePage.ets                               // 我的页面              

│  │

│  ├──plan/src/main/ets                                   // 计划模块                  

│  │    ├──pages

│  │    │   ├──CoursePlanPage.ets                         // 课程计划详情页面

│  │    │   ├──PlanPage.ets                               // 计划主页

│  │    │   └──RecommendationCoursePage.ets               // 推荐课程页面      

│  │    └──viewmodels                                    

│  │        └──PlanPageVM.ets                             // 计划视图模块

│  │

│  └──setting/src/main/ets                                // 设置模块            

│       ├──components

│       │   ├──SettingCard.ets                            // 设置卡片

│       │   └──SettingSelectDialog.ets                    // 设置选项弹窗              

│       │──pages

│       │   ├──SettingAbout.ets                           // 关于页面

│       │   ├──SettingH5.ets                              // H5页面

│       │   ├──SettingNetwork.ets                         // 视频播放设置页面

│       │   ├──SettingPage.ets                            // 设置页面

│       │   ├──SettingPersonal.ets                        // 编辑个人信息页面

│       │   └──SettingPrivacy.ets                         // 隐私设置页面        

│       ├──types                                          // 类型          

│       └──viewmodels                                     // 视图模型

└──products

   └──phone/src/main/ets                                  // phone模块

        ├──common                        

        │   ├──AppTheme.ets                               // 应用主题色

        │   ├──AppUtils.ets                               // 应用设置工具类

        │   ├──Constants.ets                              // 业务常量

        │   ├──NetworkUtils.ets                           // 网络工具类

        │   ├──Types.ets                                  // 数据模型

        │   ├──WantUtils.ets                              // want工具类

        │   └──WindowUtils.ets                            // 窗口工具类

        ├──components                    

        │   └──CustomTabBar.ets                           // 应用底部Tab

        │──pages  

        │   ├──AgreeDialogPage.ets                        // 隐私同意弹窗

        │   ├──GuidePage_*.ets                            // 引导页面

        │   ├──Index.ets                                  // 入口页面

        │   ├──IndexPage.ets                              // 应用主页面

        │   ├──PrivacyPage.ets                            // 查看隐私协议页面

        │   ├──SafePage.ets                               // 隐私同意页面

        │   └──SplashPage.ets                             // 开屏广告页面      

        └──viewmodels                                     // 视图模型

​@Builder

markerBuilder() {

// 是否在图表content内&&是否有数据

if (this.customUiInfo.isInbounds && this.customUiInfo.data && this.customUiInfo.y) {

Column() {

Text() {

Span(`${this.customUiInfo.data.getY()}分钟`);

}

.fontSize($r(‘sys.float.Body_M’));

}

.borderRadius(99)

.justifyContent(FlexAlign.Center)

.padding(12)

.backgroundColor(Color.White)

.shadow({

radius: 20,

offsetX: 0,

offsetY: 0,

color: ‘#33000000’,

})

.width(this.customUiInfo.width)

.height(this.customUiInfo.height)

.margin({ left: this.customUiInfo.x, top: this.customUiInfo.y })

.onAppear(() => {

const timer = setTimeout(() => {

this.customUiInfo.showUi = false;

clearTimeout(timer);

}, 2000);

})

.alignItems(HorizontalAlign.Start)

.onClick(() => {

this.customUiInfo.showUi = false;

});

}

}

async initChartSetting() {

// 显示描述

this.model.getDescription()?.setEnabled(false);

// 初始化动画时长

this.model.animateY(1000);

// 显示图例

this.model.getLegend()?.setEnabled(false);

// 设置额外偏移量

this.model.setExtraOffsets(10, 10, 10, 5);

// 绘制柱状体阴影背景

this.model.setDrawBarShadow(false);

// 柱状体上方显示数值

this.model.setDrawValueAboveBar(false);

// 为图表添加数据选择的监听器

this.model.setOnChartValueSelectedListener(this._valueSelectedListener);

// 绘制图表背景色

this.model.setDrawGridBackground(false);

// 设置左轴

const leftAxis = this.model.getAxisLeft();

if (leftAxis) {

leftAxis.setAxisMinimum(0);

leftAxis.setGridColor(ChartColor.argb(60, 0, 0, 0));

leftAxis.setTextColor(ChartColor.argb(200, 0, 0, 0));

leftAxis.setAxisLineColor(ChartColor.rgb(255, 255, 255));

leftAxis.setLabelXOffset(-10);

}

// 设置右轴不显示

this.model.getAxisRight()?.setEnabled(false);

const xAxis = this.model.getXAxis();

if (xAxis) {

xAxis.setValueFormatter(new MyAxisValueFormatter(this.chartData.month));

xAxis.setPosition(XAxisPosition.BOTTOM);

xAxis.setDrawGridLines(false);

xAxis.setAxisLineColor(ChartColor.argb(60, 0, 0, 0));

xAxis.setTextColor(ChartColor.argb(200, 0, 0, 0));

}

// 初始化图表数据

this.getChartData();

}

async getChartData() {

const month = new Date(this.chartData.month);

this.model.getXAxis()?.setValueFormatter(new MyAxisValueFormatter(this.chartData.month));

const totalDayNum = new Date(month.getFullYear(), month.getMonth() + 1, 0).getDate();

this.displayData = [];

for (let i = 1; i <= totalDayNum; i++) {

const bill = this.chartData.data.find((item) => {

const day = item.date.split(‘-‘)[2];

return Number(day) === i;

});

if (bill) {

this.displayData.push({

date: bill.date,

value: bill.value,

});

} else {

const date = dayjs().set(‘month’, month.getMonth()).set(‘date’, i);

this.displayData.push({

date: date.format(‘YYYY-MM-DD’),

value: 0,

});

}

}

await this.setData();

}

async setData() {

let dataSetList: JArrayList<IBarDataSet> = new JArrayList<IBarDataSet>();

let values: JArrayList<BarEntry> = new JArrayList<BarEntry>();

for (let i = 0; i < this.displayData.length; i++) {

values.add(new BarEntry(i + 1, this.displayData[i].value));

}

let dataSet: BarDataSet = new BarDataSet(values, ‘DataSet’);

dataSet.setColorByColor(this.initColor);

dataSet.setDrawValues(false);

dataSet.setHighLightColor(this.highlightColor);

// 显示数据格式化

dataSetList.add(dataSet);

let barData: BarData = new BarData(dataSetList);

barData.setBarWidth(0.85);

if (this.model) {

this.model.setData(barData);

}

return barData;

}

// 设置窗口方向

setR(orientation: number) {

window.getLastWindow(getContext(this)).then((win) => {

win.setPreferredOrientation(orientation).then(() => {

}).catch(() => {

})

}).catch(() => {

})

}

// 设置沉浸式窗口

setFullScreen(isLayoutFullScreen: boolean) {

window.getLastWindow(getContext(this)).then((win: window.Window) => {

win.setWindowLayoutFullScreen(isLayoutFullScreen).then(() => {

}).catch(() => {

})

}).catch(() => {

})

this.fullScreen(isLayoutFullScreen)

this.setComponentHeight()

}

regDisplayListener(): void {

display.on(‘foldStatusChange’, async (curFoldStatus: display.FoldStatus) => {

// 同一个状态重复触发不做处理

if (this.curFoldStatus === curFoldStatus) {

return;

}

this.curFoldStatus = curFoldStatus;

this.setComponentHeight()

})

}

setComponentHeight() {

let screenWidth = display.getDefaultDisplaySync().width

if (this.curFoldStatus === display.FoldStatus.FOLD_STATUS_FOLDED ||

this.curFoldStatus === display.FoldStatus.FOLD_STATUS_UNKNOWN) {

this.componentHeight = ‘100%’

} else {

if (this.isLayoutFullScreen) {

let height = (this.getUIContext().px2vp(screenWidth) – 32) * 9 / 16

this.componentHeight = height.toString() + ‘vp’

} else {

this.componentHeight = ‘100%’

}

}

}

async aboutToAppear() {

if (this.movieItems && this.movieItems.length > 0) {

this.playerVM.movieItemList = this.movieItems

this.playerVM.movieItem = this.playerVM.movieItemList[this.playerIndex]

}

PipManager.getInstance().init(getContext(this), this.playerVM.navId)

window.getLastWindow(getContext(this)).then((currentWindow: window.Window) => {

this.mWindow = currentWindow;

// 获取窗口属性

let properties = currentWindow.getWindowProperties();

let rect = properties.windowRect;

if (this.getUIContext().px2vp(rect.height) <= 680) {

this.windowStatusType = 5

this.playerVM.windowStatusType = this.windowStatusType

this.isLayoutFullScreen = false

this.setR(1)

this.setFullScreen(false)

}

currentWindow.on(‘windowStatusChange’, (windowStatusType) => {

this.windowStatusType = windowStatusType

this.playerVM.windowStatusType = this.windowStatusType

if (windowStatusType === 5) {

this.isLayoutFullScreen = false

this.setR(1)

this.setFullScreen(false)

}

});

})

this.isLayoutFullScreen = true

this.setR(this.isLayoutFullScreen ? 2 : 1)

this.setFullScreen(this.isLayoutFullScreen)

emitter.on(‘playerPause’, (event: emitter.EventData) => {

let isPlaying = event.data!.isPlaying as boolean

if (isPlaying) {

PipManager.getInstance().player.isResetPause = false

PipManager.getInstance().player.isPlaying = true

} else {

PipManager.getInstance().player.isResetPause = true

PipManager.getInstance().player.isPlaying = false

}

})

emitter.on(‘autoStartPip’, () => {

if (this.playerVM.autoStartEnabled) {

if (PipManager.getInstance().player.isPipOpen) {

} else {

PipManager.getInstance().startPip()

PipManager.getInstance().updatePiPControlStatus();

}

} else {

if (PipManager.getInstance().player.isPipOpen) {

} else {

PipManager.getInstance().player.isPlaying = false

}

}

})

emitter.on(‘chapterDetailBack’, () => {

if (!PipManager.getInstance().player.isPipOpen) {

// 释放AVPlayer资源

PipManager.getInstance().stopPip()

PipManager.getInstance().player.isCreate = true

PipManager.getInstance().player.release();

}

})

if (display.isFoldable()) {

this.regDisplayListener();

}

this.curFoldStatus = display.getFoldStatus()

this.setComponentHeight()

}

aboutToDisappear() {

// 释放AVPlayer资源

PipManager.getInstance().player.isCreate = true

PipManager.getInstance().player.release();

this.setR(1)

this.setFullScreen(true)

this.isLayoutFullScreen = false

}

@Builder

xComponentView() {

Column() {

XComponent({

type: XComponentType.SURFACE,

controller: PipManager.getInstance().getXComponentController()

})

.id(‘XComponent01’)

.layoutWeight(1)

.onLoad(() => {

this.surfaceId = PipManager.getInstance().getXComponentController().getXComponentSurfaceId();

// 将surfaceId设置给媒体源

PipManager.getInstance().getXComponentController().onSurfaceCreated(this.surfaceId)

PipManager.getInstance().player.init(this.courseId, this.playerVM.movieItem.movieUrl,

this.playerVM.movieItem.learnProgress)

PipManager.getInstance().player.callbackTimeUpdate = (vol: number, total: number) => {

this.callbackTimeUpdate(vol, total)

this.playerVM.movieItem.learnProgress = Math.floor(vol / total * 100)

}

})

}

.width(‘100%’)

.height(this.componentHeight)

}

在commons/lib_api/src/main/ets/params/response/AuthorResponse.ets文件中将云侧开发者自定义的数据结构转换为端侧数据结构。