feat: 电子药箱小程序 - 4Tab药品管理

- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡
- 药品百科: 搜索 + 分类筛选 + 20种药品静态数据
- 惠教中心: 4条药品使用指南课程
- 我的: 家庭成员信息管理
- 自定义TabBar + navigation-bar组件
- SVG药品分类插图
This commit is contained in:
陈誉午
2026-07-29 11:20:52 +08:00
commit 994b267f5c
683 changed files with 43849 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+44
View File
@@ -0,0 +1,44 @@
@import "../../variables";
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 999;
opacity: 0;
transition: opacity 0.5s ease;
overscroll-behavior: none;
}
.mask.show {
opacity: 1;
}
.mask.hide {
opacity: 0;
}
.content {
width: 100%;
max-height: 90%;
background: #fff;
// background: linear-gradient(180deg, #edf0f7 0%, #e7ebf4 100%);
// box-shadow: 0 28rpx 70rpx rgba(11, 18, 35, 0.18);
border-top-left-radius: $primary-gap;
border-top-right-radius: $primary-border-radius;
padding: $primary-gap;
transform: translateY(100%);
transition: transform 0.5s ease;
}
.content.show {
transform: translateY(0);
}
.content.hide {
transform: translateY(100%);
}
+47
View File
@@ -0,0 +1,47 @@
// @ts-nocheck
const systemInfo = wx.getWindowInfo();
Component({
properties: {
visible: {
type: Boolean,
value: false,
observer(newVal:any) {
if (newVal) {
//先挂载再执行动画
this.setData({ showSelf: true }, () => {
setTimeout(() => {
this.setData({
popupAnimate: 'show',
maskAnimate: 'show'
})
}, 20)
})
} else {
//先执行动画,不见了再卸载
this.setData({
popupAnimate: 'hide',
maskAnimate: 'hide'
})
// 等动画结束再卸载
setTimeout(() => {
this.setData({ showSelf: false })
}, 500) //和transition一致
}
}
}
},
data: {
showSelf: false,
safeBottom: systemInfo.safeArea.bottom - systemInfo.safeArea.height, //底部的安全距离,避免被返回键挡住了
popupAnimate: '',
maskAnimate: ''
},
methods: {
handleClose() {
this.triggerEvent('close');
},
emptyEvent() {
}
}
})
+7
View File
@@ -0,0 +1,7 @@
<!-- 下半弹窗 -->
<view wx:if="{{showSelf}}" class="mask {{maskAnimate}}" bind:tap="handleClose" catchtouchmove="emptyEvent" >
<view class="content {{popupAnimate}}" style="padding-bottom: {{safeBottom}}rpx;" catchtap="emptyEvent" catchtouchmove="emptyEvent">
<slot name="header"></slot>
<slot></slot>
</view>
</view>