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(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===_typeof(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}({5:function(e,t,r){Component({options:{addGlobalClass:!0,pureDataPattern:/^_/,multipleSlots:!0},properties:{tabs:{type:Array,value:[]},tabClass:{type:String,value:""},containerStyle:{type:String,value:""},swiperClass:{type:String,value:""},swiperStyle:{type:String,value:""},activeClass:{type:String,value:""},tabUnderlineColor:{type:String,value:"#4080FF"},tabActiveTextColor:{type:String,value:"#000000"},tabInactiveTextColor:{type:String,value:"#000000"},tabBackgroundColor:{type:String,value:"#ffffff"},activeTab:{type:Number,value:0},swipeable:{type:Boolean,value:!0},animation:{type:Boolean,value:!0},duration:{type:Number,value:500}},data:{currentView:0},observers:{activeTab:function(e){var t=this.data.tabs.length;if(0!==t){var r=e-1;r<0&&(r=0),r>t-1&&(r=t-1),this.setData({currentView:r})}}},lifetimes:{created:function(){}},methods:{handleTabClick:function(e){var t=e.currentTarget.dataset.index;this.setData({activeTab:t}),this.triggerEvent("tabclick",{index:t})},handleSwiperChange:function(e){var t=e.detail.current;this.setData({activeTab:t}),this.triggerEvent("change",{index:t})}}})}});
@@ -0,0 +1 @@
{"component":true,"usingComponents":{}}
@@ -0,0 +1,20 @@
<view class="weui-tabs" style="{{containerStyle}}">
<view class="weui-tabs-bar__wrp">
<scroll-view scroll-x scroll-into-view="item_{{currentView}}" scroll-with-animation="{{animation}}">
<view class="weui-tabs-bar__content">
<block wx:for="{{tabs}}" wx:key="title">
<view id="item_{{index}}" class="weui-tabs-bar__item" style="background-color: {{tabBackgroundColor}}; color: {{activeTab === index ? tabActiveTextColor : tabInactiveTextColor}};" bindtap="handleTabClick" data-index="{{index}}">
<view class="weui-tabs-bar__title {{tabClass}} {{activeTab === index ? activeClass : ''}}" style="border-bottom-color: {{activeTab === index ? tabUnderlineColor : 'transparent'}}">
<text class="">{{item.title}}</text>
</view>
</view>
</block>
</view>
</scroll-view>
</view>
<swiper class="{{swiperClass}}" style="{{swiperStyle}}" current="{{activeTab}}" duration="{{duration}}" bindchange="handleSwiperChange">
<swiper-item wx:for="{{tabs}}" wx:key="title">
<slot data-set="{{item}}" name="tab-content-{{index}}"></slot>
</swiper-item>
</swiper>
</view>
@@ -0,0 +1 @@
.weui-tabs{--tabs-bar-height:calc(40px + 0.5 * (1rem - 16px));width:100%}.weui-tabs-bar__wrp{width:100%;background-color:transparent}.weui-tabs-bar__content{min-width:100%;white-space:nowrap;height:var(--tabs-bar-height)}.weui-tabs-bar__item{display:inline-flex;align-items:flex-end;justify-content:center;height:100%;max-width:40%;background-color:transparent!important;box-sizing:border-box}.weui-tabs-bar__title{display:inline-flex;align-items:center;justify-content:center;max-width:100%;height:100%;box-sizing:border-box;padding:0 4rpx;border-bottom-width:4rpx;border-bottom-style:solid;border-bottom-color:transparent;font-size:calc(32rpx + .5 * (1rem - 16px))}.weui-tabs-bar__title text{max-width:100%;margin:0 8rpx;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:inherit}.menu-swiper{height:calc(100% - var(--tabs-bar-height));width:100%}.p-swiper{height:480px}