feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { pillImg, syringeImg, heartImg, educationImg } from '../../../utils/drug-images';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
drugList: [
|
||||
{
|
||||
id: 101,
|
||||
image: educationImg,
|
||||
title: '阿莫西林使用指南',
|
||||
desc: '了解抗生素的正确使用方法与注意事项',
|
||||
tag: '抗生素',
|
||||
readCount: '12,580',
|
||||
},
|
||||
{
|
||||
id: 102,
|
||||
image: pillImg,
|
||||
title: '布洛芬用药须知',
|
||||
desc: '解热镇痛安全用药,避免过量与禁忌',
|
||||
tag: '解热镇痛',
|
||||
readCount: '9,346',
|
||||
},
|
||||
{
|
||||
id: 103,
|
||||
image: syringeImg,
|
||||
title: '胰岛素注射教程',
|
||||
desc: '糖尿病患者必看:正确注射方法与部位轮换',
|
||||
tag: '降糖药',
|
||||
readCount: '7,892',
|
||||
},
|
||||
{
|
||||
id: 104,
|
||||
image: heartImg,
|
||||
title: '高血压用药管理',
|
||||
desc: '长期服药患者的日常管理与生活方式调整',
|
||||
tag: '心血管',
|
||||
readCount: '15,230',
|
||||
},
|
||||
],
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({ selected: 2 });
|
||||
}
|
||||
},
|
||||
goDetail(e: WechatMiniprogram.TouchEvent) {
|
||||
const { id } = e.currentTarget.dataset;
|
||||
wx.navigateTo({ url: `/pages/drug-guide/index?id=${id}` });
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user