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

推荐订阅源

量子位
WordPress大学
WordPress大学
小众软件
小众软件
云风的 BLOG
云风的 BLOG
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
宝玉的分享
宝玉的分享
博客园 - Franky
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
D
Docker
博客园 - 聂微东
C
Check Point Blog
H
Help Net Security

人人都是产品经理

为什么你的产品找不到差异化?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】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文件中将云侧开发者自定义的数据结构转换为端侧数据结构。