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
@@ -0,0 +1 @@
"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Component({options:{styleIsolation:"apply-shared"},externalClasses:["custom-drawer"],properties:{needCancel:{type:Boolean,value:!0},mask:{type:Boolean,value:!0},themeColor:{type:Object,value:null}},data:{flag:!1,wrapAnimate:"wrapAnimate",bgOpacity:0,frameAnimate:"frameAnimate"},methods:{showFrame:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.setData({flag:!0,wrapAnimate:"wrapAnimate",frameAnimate:"frameAnimate"})},hideFrame:function(t){var e=!(!t||"object"!==_typeof(t)||!0!==t.silent),a=this;a.setData({wrapAnimate:"wrapAnimateOut",frameAnimate:"frameAnimateOut"}),e||a.onCancel(),this.timer=setTimeout(function(){a.setData({flag:!1})},400)},onCancel:function(){this.triggerEvent("myCancel")},catchNone:function(){}}});
@@ -0,0 +1 @@
{"component":true,"usingComponents":{}}
@@ -0,0 +1,30 @@
<view wx:if='{{flag}}' class="drawer custom-drawer">
<view
wx:if="{{mask}}"
class='wrap {{wrapAnimate}}'
style='background:rgba(0,0,0,{{bgOpacity}});'
catchtap='hideFrame'
></view>
<view
wx:else
class='wrap {{wrapAnimate}}'
style='background:rgba(0,0,0,{{bgOpacity}});'
catchtap='catchNone'
></view>
<view wx:if="{{mask}}" catchtap='hideFrame' class='frame-wrapper {{frameAnimate}}'>
<view catchtap='catchNone' class='frame' style="background-color: {{themeColor.Fill_7}};">
<!-- 内容 -->
<slot></slot>
<view wx:if="{{needCancel}}" class='cancel' bindtap="hideFrame" hover-class="buttonHover">取消</view>
</view>
</view>
<view wx:else catchtap='catchNone' class='frame-wrapper {{frameAnimate}}'>
<view catchtap='catchNone' class='frame' style="background-color: {{themeColor.Fill_7}};">
<!-- 内容 -->
<slot></slot>
<view wx:if="{{needCancel}}" class='cancel' bindtap="hideFrame" hover-class="buttonHover">取消</view>
</view>
</view>
</view>
@@ -0,0 +1 @@
.wrapAnimate{animation:wrapAnimate .5s ease-in-out forwards}@keyframes wrapAnimate{100%{background:rgba(0,0,0,.35)}}.wrapAnimateOut{animation:wrapAnimateOut .4s ease-in-out forwards}@keyframes wrapAnimateOut{0%{background:rgba(0,0,0,.35)}100%{background:rgba(0,0,0,0)}}.frameAnimate{animation:frameAnimate .5s ease forwards}@keyframes frameAnimate{100%{opacity:1;top:0}}.frameAnimateOut{animation:frameAnimateOut .4s ease forwards}@keyframes frameAnimateOut{0%{opacity:1;top:0}100%{opacity:0;top:100vh}}.drawer{z-index:10000;position:fixed;bottom:0;left:0}.frame-wrapper{position:fixed;height:100vh;width:100vw;z-index:2;top:50vh}.frame{background:#202124;color:#fff;position:absolute;bottom:0;width:100%;padding:0;border-top-left-radius:20rpx;border-top-right-radius:20rpx;z-index:3;box-sizing:border-box;overflow:hidden}.flex{display:flex;align-items:center}.wrap{position:fixed;z-index:1;top:0;left:0;right:0;bottom:0}.cancel{border-top:1px solid rgba(255,255,255,.1);display:flex;align-items:center;justify-content:center;height:calc(56px + .5 * (1rem - 16px));font-size:calc(16px + .5 * (1rem - 16px))}.buttonHover{background-color:#1f1f1f}