与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
6.2 KiB

1 month ago
  1. <!-- 药品详情页 -->
  2. <view class="detail-page">
  3. <!-- 药品图片轮播 -->
  4. <view class="medicine-images">
  5. <swiper
  6. class="detail-swiper"
  7. indicator-dots="{{medicineData.store.images && medicineData.store.images.length > 0}}"
  8. indicator-color="rgba(255, 255, 255, 0.5)"
  9. indicator-active-color="#3a7ff3"
  10. autoplay="true"
  11. interval="3000"
  12. duration="500"
  13. >
  14. <block wx:for="{{medicineData.store.images}}" wx:key="index">
  15. <swiper-item>
  16. <image
  17. src="{{item}}"
  18. class="detail-image"
  19. mode="aspectFill"
  20. bindtap="previewImage"
  21. data-index="{{index}}"
  22. />
  23. </swiper-item>
  24. </block>
  25. </swiper>
  26. <!-- 药品标签 -->
  27. <view class="detail-tag {{medicineData.category}}">
  28. {{medicineData.categoryText}}
  29. <view class="hot-badge" wx:if="{{medicineData.isHot}}">热销</view>
  30. </view>
  31. </view>
  32. <!-- 药品基本信息 -->
  33. <view class="basic-info-section">
  34. <view class="medicine-name">{{medicineData.name}}</view>
  35. <view class="medicine-spec">{{medicineData.specification}}</view>
  36. <view class="manufacturer">{{medicineData.manufacturer}}</view>
  37. <!-- 价格信息 -->
  38. <view class="price-info">
  39. <view class="current-price">
  40. <text class="price-symbol">¥</text>
  41. <text class="price-value">{{medicineData.price}}</text>
  42. </view>
  43. <view class="original-price" wx:if="{{medicineData.originalPrice}}">
  44. 原价:¥{{medicineData.originalPrice}}
  45. </view>
  46. <view class="sales-count">
  47. 已售:{{medicineData.salesCount}}件
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 适用症状 -->
  52. <view class="info-section">
  53. <view class="section-title">适用症状</view>
  54. <view class="section-content">{{medicineData.indication}}</view>
  55. </view>
  56. <!-- 专家推荐信息 -->
  57. <view class="expert-section">
  58. <view class="section-title">专家推荐</view>
  59. <view class="expert-card">
  60. <view class="expert-header">
  61. <image
  62. src="{{medicineData.expert.avatar || '/images/default-avatar.png'}}"
  63. class="expert-avatar"
  64. mode="aspectFill"
  65. />
  66. <view class="expert-info">
  67. <view class="expert-name">{{medicineData.expert.name}}<text class="expert-title"> | {{medicineData.expert.title}}</text></view>
  68. <view class="expert-hospital">{{medicineData.expert.hospital}}</view>
  69. <view class="expert-experience">
  70. <text class="experience-label">专业:</text>{{medicineData.expert.expertise}}
  71. <text class="experience-label">从业:</text>{{medicineData.expert.years}}年
  72. </view>
  73. </view>
  74. </view>
  75. <view class="expert-reason">
  76. <view class="reason-title">推荐理由</view>
  77. <view class="reason-content">{{medicineData.expert.reason}}</view>
  78. </view>
  79. <view class="recommend-time">推荐时间:{{medicineData.expert.recommendTime}}</view>
  80. </view>
  81. </view>
  82. <!-- 店铺信息 -->
  83. <view class="store-section">
  84. <view class="section-title">推荐店铺</view>
  85. <view class="store-card">
  86. <view class="store-header">
  87. <view class="store-name">{{medicineData.store.name}}</view>
  88. <view class="store-rating" wx:if="{{medicineData.store.rating}}">
  89. <text class="rating-value">{{medicineData.store.rating}}</text>
  90. <text class="rating-star">★</text>
  91. </view>
  92. </view>
  93. <view class="store-info">
  94. <view class="info-item">
  95. <text class="info-icon">📍</text>
  96. <text class="info-text">{{medicineData.store.address}}</text>
  97. <view class="store-distance" wx:if="{{medicineData.store.distance}}">
  98. 距离:{{medicineData.store.distance}}km
  99. </view>
  100. </view>
  101. <view class="info-item">
  102. <text class="info-icon">📞</text>
  103. <text class="info-text">{{medicineData.store.phone}}</text>
  104. </view>
  105. <view class="info-item">
  106. <text class="info-icon">🕒</text>
  107. <text class="info-text">{{medicineData.store.businessHours}}</text>
  108. </view>
  109. <view class="info-item" wx:if="{{medicineData.store.features}}">
  110. <text class="info-icon">⭐</text>
  111. <text class="info-text">{{medicineData.store.features}}</text>
  112. </view>
  113. </view>
  114. <!-- 店铺图片 -->
  115. <view class="store-images" wx:if="{{medicineData.store.images && medicineData.store.images.length > 0}}">
  116. <scroll-view class="store-images-scroll" scroll-x="true">
  117. <block wx:for="{{medicineData.store.images}}" wx:key="index">
  118. <view class="store-image-item" bindtap="previewStoreImage" data-index="{{index}}">
  119. <image src="{{item}}" class="store-image" mode="aspectFill" />
  120. </view>
  121. </block>
  122. </scroll-view>
  123. </view>
  124. <!-- 店铺操作按钮 -->
  125. <view class="store-actions">
  126. <button class="action-btn map-btn" bindtap="openLocation">
  127. <text class="btn-icon">🗺️</text>
  128. <text class="btn-text">查看位置</text>
  129. </button>
  130. <button class="action-btn call-btn" bindtap="makePhoneCall">
  131. <text class="btn-icon">📱</text>
  132. <text class="btn-text">联系店铺</text>
  133. </button>
  134. </view>
  135. </view>
  136. </view>
  137. <!-- 药品详细信息 -->
  138. <view class="details-section">
  139. <view class="section-title">药品详情</view>
  140. <view class="details-grid">
  141. <view class="detail-item">
  142. <view class="item-label">用法用量</view>
  143. <view class="item-value">{{medicineData.details.usage}}</view>
  144. </view>
  145. <view class="detail-item">
  146. <view class="item-label">注意事项</view>
  147. <view class="item-value">{{medicineData.details.precautions}}</view>
  148. </view>
  149. <view class="detail-item">
  150. <view class="item-label">贮藏方式</view>
  151. <view class="item-value">{{medicineData.details.storage}}</view>
  152. </view>
  153. <view class="detail-item">
  154. <view class="item-label">有效期</view>
  155. <view class="item-value">{{medicineData.details.validity}}</view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>