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

推荐订阅源

J
Java Code Geeks
月光博客
月光博客
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
B
Blog
博客园_首页
G
Google Developers Blog
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
P
Proofpoint News Feed
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI

人人都是产品经理

为什么你的产品找不到差异化?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官方模板优秀案例(第14期:美食行业 · ...
华为开发者联盟 · 2025-11-10 · via 人人都是产品经理

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

CateringOrders

  ├─commons/common/src/main

  │  ├─ets

  │  │  ├─cardManager

  │  │  │      CardManager.ets                // 卡片管理

  │  │  │      EntryContext.ets               // 应用上下文

  │  │  │      SubscriberClass.ets            // 卡片公共事件

  │  │  ├─components

  │  │  │      NavHeaderBar.ets               // navigation页面抬头

  │  │  │      CommonConfirmDialog.ets        // 确认弹窗

  │  │  │      LoadingDialog.ets              // 加载中弹窗

  │  │  ├─constants

  │  │  │      Common.ets                     // 公共常量

  │  │  ├─mapper

  │  │  │      Index.ets                      // 数据映射

  │  │  ├─models

  │  │  │      RouterModel.ets                // 路由参数对象

  │  │  │      StorageModel.ets               // AppStorage参数对象

  │  │  │      TabBarModel.ets                // 底部导航栏对象

  │  │  └─utils

  │  │         AsWebRichText.ets              // asweb富文本展示

  │  │         Logger.ets                     // 日志方法

  │  │         PermissionUtil.ets             // 权限申请方法

  │  │         RouterModule.ets               // 路由工具方法

  │  │         Utils.ets                      // 公共方法

  │  └─resources

  ├─commons/network/src/main

  │  ├─ets

  │  │  ├─apis

  │  │  │      APIList.ets                    // 网络请求API

  │  │  │      AxiosHttp.ets                  // 网络请求封装

  │  │  │      AxiosModel.ets                 // 网络请求对象

  │  │  │      HttpRequest.ets                // 网络请求

  │  │  ├─constants

  │  │  │      Index.ets                      // 网络请求常量

  │  │  ├─mocks

  │  │  │  └─MockData

  │  │  │         Order.ets                   // 点餐mock数据

  │  │  │         Store.ets                   // 店铺mock数据

  │  │  │         User.ets                    // 用户mock数据

  │  │  │      AxiosMock.ets                  // mock请求

  │  │  │      RequestMock.ets                // mock API

  │  │  └─types

  │  │         Order.ets                      // 点餐抽象类

  │  │         Request.ets                    // 请求参数抽象类

  │  │         Response.ets                   // 响应参数抽象类

  │  │         Store.ets                      // 店铺抽象类

  │  │         User.ets                       // 用户抽象类

  │  └─resources

  │─components/base_ui/src/main  

  │  ├─ets

  │  │  ├─components

  │  │  │      BusinessTimeDialog.ets         // 店铺休息组件

  │  │  │      CallTelSheetBuilder.ets        // 拨号组件

  │  │  │      CouponCardComp.ets             // 优惠券组件

  │  │  │      OrderGoodsCard.ets             // 订单商品组件

  │  │  │      PayTypeDialog.ets              // 支付弹窗组件

  │  │  │      SheetHeaderComp.ets            // 半模态标题组件

  │  │  ├─constants

  │  │  │      Index.ets                      // 常量数据

  │  │  ├─models

  │  │  │      Index.ets                      // 数据类型

  │  │  └─utils

  │  │         Index.ets                      // 工具方法

  │─components/goods_detail/src/main  

  │  ├─ets

  │  │  ├─components

  │  │  │      GoodsDetail                    // 商品详情组件

  │  │  ├─constants

  │  │  │      Index.ets                      // 常量数据

  │  │  └─models

  │  │         Index.ets                     // 数据类型

  │─components/my_wallet/src/main  

  │  ├─ets

  │  │  ├─components

  │  │  │      MyWallet                       // 我的钱包组件

  │  │  │      RechargeRecordComp             // 充值记录组件

  │  │  ├─models

  │  │  │      Index.ets                      // 数据类型

  │  │  └─utils

  │  │         Logger.ets                     // 日志方法

  │─components/select_store/src/main  

  │  ├─ets

  │  │  ├─components

  │  │  │      HwMapComp                      // 华为地图组件

  │  │  │      SelectStore                    // 选择店铺组件

  │  │  │      StoreCard                      // 店铺卡片组件

  │  │  └─models

  │  │         Index.ets                      // 数据类型

  │─components/snack_sized_deal/src/main  

  │  ├─ets

  │  │  ├─components

  │  │  │      SnackSizedDeal                 // 超值加购组件

  │  │  ├─constants

  │  │  │      Index.ets                      // 常量数据

  │  │  └─models

  │  │         Index.ets                      // 数据类型

  │─features/order/src/main  

  │  ├─ets

  │  │  ├─api

  │  │  │      Index.ets                      // 接口请求封装

  │  │  ├─components

  │  │  │      CustomSelectDialog.ets         // 数据选择半模态弹窗

  │  │  │      GoodInfoComp.ets               // 商品信息组件

  │  │  │      MyCarComp.ets                  // 购物车组件

  │  │  │      MyCarListComp.ets              // 购物车列表组件

  │  │  │      OrderListComp.ets              // 订单内商品列表组件

  │  │  │      TitleComp.ets                  // 点餐标题栏组件

  │  │  ├─constants

  │  │  │      OrderConstant.ets              // 常量数据

  │  │  ├─mapper

  │  │  │      Index.ets                      // 数据映射

  │  │  ├─models

  │  │  │      Index.ets                      // 数据类型

  │  │  │      MustGoodsController.ets        // 必选品控制对象

  │  │  └─pages

  │  │         ConfirmOrderPage.ets           // 确认订单页面

  │  │         GoodDetailPage.ets             // 商品详情页面

  │  │         MerchantDetailPage.ets         // 店铺详情页面

  │  │         OrderPage.ets                  // 点餐页面

  │  │         PreviewImagePage.ets           // 图片预览页面

  │  │         RemarksPage.ets                // 添加备注页面

  │  │         SelectCouponPage.ets           // 选择优惠券页面

  │  │         SelectStorePage.ets            // 选择店铺页面

  │  │         SnackSizedDealPage.ets         // 超值加购页面

  │  └─resources

  │─features/order_list/src/main  

  │  ├─ets

  │  │  ├─api

  │  │  │      Index.ets                      // 接口请求封装

  │  │  ├─components

  │  │  │      ButtonListComp.ets             // 卡片按钮组件

  │  │  │      CommonTab.ets                  // 订单列表tab组件

  │  │  │      OrderCard.ets                  // 订单卡片组件

  │  │  │      OrderTypeComp.ets              // 订单详情顶部组件

  │  │  │      PaymentDetailsComp.ets         // 订单支付详情组件

  │  │  │      ReductionCardComp.ets          // 订单优惠详情组件

  │  │  │      StoreInfoCardComp.ets          // 商户卡片组件

  │  │  ├─mapper

  │  │  │      Index.ets                      // 数据映射

  │  │  ├─models

  │  │  │      Index.ets                      // 订单列表里的数据对象

  │  │  └─pages

  │  │         HwMapPage.ets                  // 商户位置页面

  │  │         OrderDetailPage.ets            // 订单详情页面

  │  │         OrderListPage.ets              // 订单列表页面

  │  └─resources

  │─features/personal_center/src/main  

  │  ├─ets

  │  │  ├─api

  │  │  │      Index.ets                      // 接口请求封装

  │  │  └─pages

  │  │         AnswerPage.ets                 // 常见问题页面

  │  │         FrequentQuestionPage.ets       // 问题答复页面

  │  │         MyCouponsPage.ets              // 我的优惠券页面

  │  │         MyWalletPage.ets               // 我的页面

  │  │         PersonalCenterPage.ets         // 我的钱包页面

  │  │         RechargeRecordPage.ets         // 钱包充值记录页面

  │  │         WalletTermsPage.ets            // 会员储值协议页面

  │  └─resources

  │─preload

  │      handler.js                           // 预加载函数

  │      package.json                         // 预加载函数信息

  └─products/phone/src/main  

     ├─ets

  │  │  ├─api

  │  │  │      Index.ets                      // 接口请求封装

     │  ├─components

     │  │      CustomTabBar.ets               // 自定义底部tab栏组件

     │  ├─entryability

     │  │      EntryAbility.ets               // 应用程序入口

     │  ├─entryformability

     │  │      EntryFormAbility.ets           // 卡片程序入口

  │  │  ├─mapper

  │  │  │      Index.ets                      // 数据映射

     │  ├─pages

     │  │      HomePage.ets                   // 主页面

     │  │      Index.ets                      // 入口页面

     │  └─widget/pages

     │         WidgetCard.ets                 // 卡片页面

     └─resources

// 地图参数初始化

@Local mapController?: map.MapComponentController;
@Local mapEventManager ?: map.MapEventManager;
private marker: Map<string, map.Marker> = new Map<string, map.Marker>()
private mapOption?: mapCommon.MapOptions;
private callback?: AsyncCallback<map.MapComponentController>;
private style: mapCommon.MyLocationStyle = {
anchorU: 0.5,
anchorV: 0.5,
radiusFillColor: 0xff00FFFFFF,
displayType: mapCommon.MyLocationDisplayType.FOLLOW,
};

aboutToAppear(): void {
this.mapOption = {
position: {
target: {
latitude: this.selectLocation.latitude,
longitude: this.selectLocation.longitude,
},
zoom: 15,
},
};

this.callback = async (err, mapController) => {
if (!err) {
this.mapController = mapController;
this.mapEventManager = this.mapController.getEventManager();
this.mapEventManager?.on(‘markerClick’, (marker: map.Marker) => {
console.info(`on-markerClick marker = ${marker.getTitle()}`);
this.changeStore(marker.getTitle())
});

this.mapController.on(‘mapLoad’, () => {
console.info(‘mapLoad success’);
});
this.abilityEnabled();
mapController.setMyLocationStyle(this.style);
this.updateMakers()
}
};
}

// 地图选择店铺后移动镜头

@Monitor(‘selectStore.id’)
cameraChange(monitor: IMonitor) {
if (monitor.value()?.now) {
this.moveCamera(this.selectLocation)
}
}

// 监听位置变化,更新标记
@Monitor(‘locations’)
infoChange(monitor: IMonitor) {
if (monitor.value()?.now) {
this.updateMakers()
}
}

// 更新地图标记位

updateMakers() {
this.mapController?.clear()
this.marker?.clear()
this.locations.forEach(location => {
this.addMarker(location)
})
if (this.selectLocation) {
this.moveCamera(this.selectLocation)
}
}

// 创建地图标记位
async addMarker(location: MapLocation) {
// Marker初始化参数
let markerOptions: mapCommon.MarkerOptions = {
position: {
latitude: location.latitude,
longitude: location.longitude,
},
rotation: 0,
visible: true,
zIndex: 0,
alpha: 1,
anchorU: 0.5,
anchorV: 1,
clickable: true,
draggable: true,
flat: false,
icon: location.icon || ‘ic_store_location.png’,
};
// 创建Marker
let marker = await this.mapController?.addMarker(markerOptions);
if (marker) {
// 设置信息窗的标题
marker.setTitle(location.title);
this.marker.set(location.id, marker)
}
}

// 移动镜头
moveCamera(location: MapLocation) {
this.mapController?.animateCameraStatus(map.newLatLng({
latitude: location.latitude,
longitude: location.longitude,
}, 15), 200).then(() => {
this.marker?.get(location.id)?.setInfoWindowVisible(true)
});
}

// 加载地图组件

build() {
Stack({ alignContent: Alignment.BottomStart }) {
MapComponent({
mapOptions: this.mapOption,
mapCallback: this.callback,
})
}.height(‘100%’).margin({ bottom: this.mapMarginBottom / 2 }).constraintSize({ maxHeight: ‘100%’ })
}

将commons/lib_common/src/main/ets/httprequest/HttpRequestApi.ets文件中的mock接口替换为真实的服务器接口。