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,17 @@
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="120" height="120" fill="white" />
<circle cx="61.8007" cy="61.7718" r="37.3382" fill="#F1F4F8" />
<path d="M38.7914 32.1616L42.3397 34.9207L46.0604 32.3987L44.5327 36.626L48.0811 39.3852L43.5886 39.2386L42.0609 43.4659L40.8121 39.148L36.3196 39.0015L40.0403 36.4794L38.7914 32.1616Z" fill="#E4E9F2" />
<path d="M96.3955 30.1173L98.5437 33.3677L102.299 32.329L99.8714 35.3765L102.02 38.6269L98.3711 37.26L95.9437 40.3074L96.1163 36.4151L92.4678 35.0482L96.2229 34.0096L96.3955 30.1173Z" fill="#E4E9F2" />
<path d="M95.7779 59.7847L97.2519 62.015L99.8286 61.3023L98.1629 63.3934L99.637 65.6237L97.1335 64.6858L95.4678 66.7769L95.5863 64.1061L93.0828 63.1682L95.6595 62.4555L95.7779 59.7847Z" fill="#E4E9F2" />
<path d="M76.7294 73.4798L77.6579 74.8846L79.2809 74.4357L78.2317 75.7528L79.1602 77.1577L77.5833 76.5669L76.5341 77.884L76.6087 76.2017L75.0319 75.611L76.6548 75.1621L76.7294 73.4798Z" fill="#E4E9F2" />
<circle cx="70.7092" cy="28.5833" r="15.6223" fill="#D0D6E0" />
<circle cx="75.0989" cy="20.3211" r="2.96953" fill="white" />
<circle cx="66.3196" cy="24.9681" r="4.51885" fill="white" />
<circle cx="75.0985" cy="27.5526" r="1.16199" fill="white" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.9725 62.8588C39.0288 55.6985 51.3725 55.9787 59.0932 63.6994C66.814 71.4202 67.0942 83.7639 59.9339 91.8202L30.9725 62.8588Z" fill="#D0D7E1" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.23 82.7164C37.658 81.1129 30.2064 80.2135 20.9762 89.4437C27.1212 90.3924 29.7633 91.9633 30.3162 92.6302L40.23 82.7164ZM40.2302 82.7172C41.8336 85.2893 42.733 92.7409 33.5029 101.971C32.5542 95.8261 30.9832 93.184 30.3163 92.6311L40.2302 82.7172Z" fill="#D0D7E1" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M87.9143 34.9197C86.7325 43.3188 81.595 62.8891 70.4978 73.9863C59.4006 85.0836 46.5168 83.5345 41.4614 81.3726L41.4611 81.3729C41.461 81.3727 41.4609 81.3726 41.4608 81.3724C39.299 76.317 37.7499 63.4332 48.8472 52.3359C59.9444 41.2387 79.5147 36.1012 87.9138 34.9195L87.9144 34.9188C87.9144 34.919 87.9144 34.9192 87.9143 34.9194C87.9144 34.9194 87.9146 34.9193 87.9147 34.9193L87.9143 34.9197Z" fill="#E4E9F2" />
<circle cx="67.1296" cy="52.8925" r="6.2769" transform="rotate(45 67.1296 52.8925)" fill="white" stroke="#D0D7E1" stroke-width="2" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.6945 98.1349C25.0757 95.2991 26.7679 88.7026 30.4907 84.9798C34.2136 81.2569 38.5675 81.8073 40.281 82.5484L40.2822 82.5472C41.0237 84.2595 41.5756 88.6151 37.8515 92.3391C34.1287 96.062 27.5322 97.7541 24.6964 98.1354L24.6941 98.1377C24.6942 98.137 24.6943 98.1363 24.6944 98.1356C24.6941 98.1357 24.6939 98.1357 24.6936 98.1357L24.6945 98.1349Z" fill="#E4E9F2" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@@ -0,0 +1 @@
{"component":true,"usingComponents":{"drawer":"../../../../pubComponents/drawer/drawer","mp-icon":"weui-miniprogram/icon/icon"}}
@@ -0,0 +1,95 @@
<drawer id="withdrawDrawer" needCancel="{{false}}" bind:myCancel="closeWithdrawModal">
<view class="withdraw-content">
<mp-icon icon="close" size="{{18}}" color="#fff" class="close-icon" bindtap="closeWithdrawModal" />
<view class="cover"></view>
<view class="wrapper">
<!-- WIN and Step 0 -->
<block wx:if="{{mergedCurrent.result === 1 && luckymoney.withdrawStep === 0}}">
<view class="congrat">{{mergedCurrent.ClaimText || (isPoint ? '恭喜你,抢到积分红包' : '恭喜你,抢到现金红包')}}</view>
<view class="amount">
{{isPoint ? mergedCurrent.Amount : mergedCurrent.Amount / 100}}
<text class="unit">{{isPoint ? mergedCurrent.RewardsPointsUnit : '元'}}</text>
</view>
</block>
<!-- LOSE or ATTENDED -->
<block wx:if="{{mergedCurrent.result === 2 || mergedCurrent.result === 4}}">
<view class="congrat">{{mergedCurrent.ClaimText || '很遗憾,未抢到红包'}}</view>
</block>
<!-- UNATTENDED -->
<block wx:if="{{mergedCurrent.result === 3}}">
<view class="congrat">很遗憾,你未提前报名参加</view>
</block>
<!-- ERROR (< 0) -->
<block wx:if="{{mergedCurrent.result < 0}}">
<image src="./assets/fail.svg" class="fail-svg" />
<view class="congrat" style="margin-bottom: 0">抢红包的人太多了</view>
<view class="small-text">努力计算中...</view>
<button class="refresh-btn" type="warn" bindtap="refreshResult">刷新</button>
</block>
<!-- Step 0 List -->
<block wx:if="{{mergedCurrent.result > 0 && luckymoney.withdrawStep === 0}}">
<view class="splitter"></view>
<view class="header">红包手气榜</view>
<scroll-view scroll-y class="withdraw-list">
<view class="list-inner">
<view wx:for="{{mergedCurrent.RedPacketWinner}}" wx:key="index" class="item">
<view class="item-name">{{item.UserName}}</view>
<view class="item-count">
<block wx:if="{{isPoint}}">{{item.Amount || '0'}} {{mergedCurrent.RewardsPointsUnit}}</block>
<block wx:else>{{item.Amount / 100}} 元</block>
</view>
</view>
</view>
</scroll-view>
</block>
<!-- Step 1 Input -->
<block wx:if="{{luckymoney.withdrawStep === 1}}">
<block wx:if="{{unableToWithdraw}}">
<image src="./assets/fail.svg" class="fail-svg" />
<view class="congrat" style="margin-bottom: 0; padding: 24rpx; font-weight: normal; font-size: 28rpx;">
当前页未在微信中打开,无法进行到账微信授权。请在微信中打开,登录后再进行提现操作
</view>
</block>
<block wx:else>
<view class="congrat">绑定相关信息进行提现</view>
<block wx:if="{{luckymoney.hasWechatAppInfo && IsOpenWeChatWithdraw}}">
<view class="wechat-wrapper">
<view class="wechat-info">
<block wx:if="{{!luckymoney.wechat}}">暂未绑定微信账号</block>
<block wx:elif="{{luckymoney.wechat.UserId == '0'}}">授权失败,请重试或联系主办方</block>
<block wx:else>{{luckymoney.wechat.WechatName}}</block>
</view>
<view class="auth-btn" bindtap="onHandleWechatRedirect">
{{!luckymoney.wechat ? '立即授权' : '重新授权'}}
</view>
</view>
</block>
<view class="cell-wrapper input-group">
<input class="input" placeholder="请输入手机号" value="{{phoneNumber}}" bindinput="onPhoneInput" />
</view>
<view class="cell-wrapper input-group" style="display: flex; align-items: center;">
<input class="input" placeholder="请输入验证码" value="{{verifyCode}}" bindinput="onVerifyCodeInput" style="flex: 1;" />
<view class="suffix-btn {{cellCountdown > 0 ? 'disabled' : ''}}" bindtap="sendVerifyCode">
{{cellCountdown > 0 ? '重新发送' + cellCountdown + '秒' : '获取验证码'}}
</view>
</view>
<view class="error-notice">{{cellError}}</view>
</block>
</block>
<!-- Withdraw Button -->
<block wx:if="{{mergedCurrent.result === 1 && !isPoint && canWithdraw}}">
<button class="withdraw-button" hover-class="withdraw-button-hover" bindtap="onWithdrawClick">
立即提现
</button>
</block>
</view>
</view>
</drawer>
@@ -0,0 +1 @@
.withdraw-content{width:100%;background-color:#fff;color:#000;position:relative;border-top-left-radius:16rpx;border-top-right-radius:16rpx;overflow:hidden}.close-icon{position:absolute;top:16rpx;right:32rpx;z-index:10}.cover{height:160rpx;width:100%;background:url('https://p1-live.byteimg.com/tos-cn-i-gjr78lqtd0/188bae6f3e2d41f2bcf74b20c32b9b56~tplv-gjr78lqtd0-image.image');background-repeat:no-repeat;background-size:cover;position:absolute;top:0;left:0}.wrapper{padding-top:176rpx;display:flex;flex-direction:column;align-items:center;padding-bottom:40rpx}.congrat{font-weight:500;font-size:calc(34rpx + .5 * (1rem - 16px));line-height:calc(48rpx + .5 * (1rem - 16px));color:#161823;margin-bottom:40rpx;width:calc(100% - 64rpx);text-align:center;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;max-width:480rpx}.small-text{font-size:calc(28rpx + .5 * (1rem - 16px));font-weight:400;color:#86909c}.amount{color:#feb400;font-size:calc(100rpx + .5 * (1rem - 16px));line-height:calc(100rpx + .5 * (1rem - 16px));font-weight:700;font-family:DIN Alternate;margin-top:-20rpx;margin-bottom:20rpx}.unit{font-weight:400;font-size:calc(28rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));position:relative;bottom:2rpx}.splitter{border-bottom:1px dashed #c9cdd4;width:calc(100% - 64rpx);margin:40rpx 0 20rpx}.header{font-size:calc(24rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));color:#86909c;background:#fff;margin-top:-40rpx;padding:0 32rpx}.withdraw-list{margin:32rpx 0;min-height:200rpx;max-height:320rpx;width:calc(100% - 64rpx)}.list-inner{width:100%}.item{display:flex;justify-content:space-between;font-size:calc(28rpx + .5 * (1rem - 16px));color:#1d2129;padding:12rpx 0;margin-right:12rpx}.item:not(:last-child){border-bottom:.5px dashed #e5e8ef}.item-name{max-width:400rpx;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-count{font-weight:500}.wechat-wrapper{margin-bottom:40rpx;padding:0 40rpx;height:calc(120rpx + .5 * (1rem - 16px));width:calc(100% - 64rpx);background:#efefef;border-radius:4rpx;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;font-size:calc(28rpx + .5 * (1rem - 16px))}.auth-btn{color:#fe2c55;background:0 0}.cell-wrapper{width:calc(100% - 64rpx);margin-bottom:16rpx}.input-group{height:88rpx;border:1px solid #e6e8eb;border-radius:8rpx;box-sizing:border-box;display:flex;align-items:center;padding:0 24rpx}.input{height:100%;width:100%;font-size:calc(28rpx + .5 * (1rem - 16px));color:#282f38}.suffix-btn{color:#fe2c55;font-size:calc(28rpx + .5 * (1rem - 16px));white-space:nowrap;padding-left:20rpx}.suffix-btn.disabled{color:#ccc}.error-notice{height:calc(40rpx + .5 * (1rem - 16px));line-height:calc(40rpx + .5 * (1rem - 16px));color:red;width:calc(100% - 64rpx);text-align:left;margin:4rpx 0;font-size:calc(24rpx + .5 * (1rem - 16px))}.withdraw-button{width:calc(100% - 64rpx)!important;height:calc(88rpx + .5 * (1rem - 16px));line-height:calc(88rpx + .5 * (1rem - 16px));margin-bottom:40rpx;color:#fff;font-weight:500;font-size:calc(32rpx + .5 * (1rem - 16px));border-radius:8rpx;padding:0;background-color:#fe2c55;box-shadow:none}.withdraw-button::after{border:none}.withdraw-button-hover{background-color:#d62548;opacity:.8}.withdraw-button[disabled]{opacity:.6;background-color:#fe2c55!important;color:#fff!important}.fail-svg{width:calc(240rpx + .5 * (1rem - 16px));height:calc(240rpx + .5 * (1rem - 16px));margin-bottom:20rpx}.refresh-btn{margin-top:64rpx;width:300rpx!important;background-color:#fe2c55}