Files
T
陈誉午 994b267f5c feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡
- 药品百科: 搜索 + 分类筛选 + 20种药品静态数据
- 惠教中心: 4条药品使用指南课程
- 我的: 家庭成员信息管理
- 自定义TabBar + navigation-bar组件
- SVG药品分类插图
2026-07-29 11:20:52 +08:00

42 lines
2.8 KiB
Plaintext

<wxs module="m1">
var LotteryAttendIconMap = {
lotteryBox: '../assets/lottery_attend_box.svg',
slotMachine: '../assets/lottery_attend_machine.svg',
};
var getImage = function(AwardThemeUrl, IsUseDarkTheme) {
return LotteryAttendIconMap[AwardThemeUrl] ||
(IsUseDarkTheme ? '../assets/lottery_attend_dark.svg' : '../assets/lottery_attend_default.svg');
}
module.exports.getImage = getImage;
</wxs>
<!-- 多个奖品展示 -->
<view wx:if="{{data.displayAwardItemConfigs && data.displayAwardItemConfigs.length > 1}}" class="lottery-detail-award-wrap{{(data.hasCondition || type === 'result') ? ' lottery-detail-award-wrap-small' : ''}}{{IsUseDarkTheme ? ' lottery-detail-award-wrap-dark' : ''}}{{data.AwardThemeUrl === 'lotteryBox' ? ' lottery-detail-award-wrap-box' : ''}}{{data.AwardThemeUrl === 'slotMachine' ? ' lottery-detail-award-wrap-machine' : ''}}">
<swiper class="lottery-detail-swiper" autoplay="false" circular="true" indicator-dots="true">
<swiper-item wx:for="{{data.displayAwardItemConfigs}}" wx:key="{{item.AwardId}}">
<view class="lottery-detail-award-item">
<image class="lottery-detail-image" src="{{item.AwardItemIcon || 'https://lf-cdn-tos.bytescm.com/obj/static/livesaas-console/static/media/icon-default-award.5c5cef22.svg'}}" />
<view class="lottery-detail-award-wrap-text">
<view class="lottery-detail-text">奖品:{{item.AwardItemName}}</view>
<view wx:if="{{!data.IsHideAwardNum}}" class="lottery-detail-text-num">
奖品数量:{{item.AwardItemCount}}份
</view>
</view>
</view>
</swiper-item>
</swiper>
<image class="lottery-detail-attend" wx:if="{{status === 1}}" src="{{m1.getImage(data.AwardThemeUrl, IsUseDarkTheme)}}" />
</view>
<!-- 单个奖品展示 -->
<view wx:else class="lottery-detail-award-wrap{{(data.hasCondition || type === 'result') ? ' lottery-detail-award-wrap-small' : ''}}{{IsUseDarkTheme ? ' lottery-detail-award-wrap-dark' : ''}}{{data.AwardThemeUrl === 'lotteryBox' ? ' lottery-detail-award-wrap-box' : ''}}{{data.AwardThemeUrl === 'slotMachine' ? ' lottery-detail-award-wrap-machine' : ''}}">
<image class="lottery-detail-image" src="{{data.displayAwardItemConfig.AwardItemIcon || 'https://lf-cdn-tos.bytescm.com/obj/static/livesaas-console/static/media/icon-default-award.5c5cef22.svg'}}" />
<view class="lottery-detail-award-wrap-text">
<view class="lottery-detail-text">
奖品:{{data.displayAwardItemConfig.AwardItemName}}
</view>
<view wx:if="{{!data.IsHideAwardNum}}" class="lottery-detail-text-num">
奖品数量:{{data.displayAwardItemConfig.AwardItemCount}}份
</view>
</view>
<image class="lottery-detail-attend" wx:if="{{status === 1}}" src="{{m1.getImage(data.AwardThemeUrl, IsUseDarkTheme)}}" />
</view>