quality.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <view class="production-traceability-page">
  3. <!-- 顶部导航栏 -->
  4. <uni-nav-bar
  5. fixed="true"
  6. statusBar="true"
  7. left-icon="back"
  8. title="质检溯源"
  9. background-color="#fff"
  10. color="#000"
  11. @clickLeft="handleBack"
  12. ></uni-nav-bar>
  13. <!-- 主内容区 -->
  14. <view class="content-wrapper">
  15. <!-- 编辑中标签 -->
  16. <view class="edit-tag">编辑中</view>
  17. <!-- 产品图片区域 -->
  18. <view class="product-image-section">
  19. <view class="product-title">
  20. 质检溯源
  21. </view>
  22. <image class="product-image" :src="productImageSrc" mode="aspectFit"></image>
  23. </view>
  24. <!-- 质检信息列表 -->
  25. <view class="info-list">
  26. <!-- 质检详情标题 -->
  27. <view class="info-title">
  28. <text>质检详情</text>
  29. </view>
  30. <view class="info-item">
  31. <text class="info-label">检测依据:</text>
  32. <text class="info-value">《中国药典》2020年版</text>
  33. </view>
  34. <view class="images-section">
  35. <text class="section-subtitle">报告单:</text>
  36. <view class="images-grid">
  37. <image class="detail-image" :src="detailImageSrc" mode="aspectFill"></image>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 底部装饰 -->
  42. <!-- <view class="bottom-decoration">
  43. <image :src="waveIconSrc" mode="aspectFill"></image>
  44. </view> -->
  45. <!-- 返回首页按钮 -->
  46. <!-- <view class="home-button" @click="goToHome">
  47. <image class="home-icon" :src="homeIconSrc" mode="aspectFit"></image>
  48. </view> -->
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. // 使用项目中已有的图标路径
  57. waveIconSrc: '/static/svg-icons/wave.svg',
  58. detailImageSrc: '/static/product/1.svg',
  59. homeIconSrc: '/static/tab/home.png',
  60. productImageSrc: '/static/product/1.svg',
  61. };
  62. },
  63. methods: {
  64. handleBack() {
  65. // 返回上一页
  66. uni.navigateBack();
  67. },
  68. goToHome() {
  69. // 返回首页
  70. uni.switchTab({
  71. url: '/pages/home/home'
  72. });
  73. }
  74. }
  75. };
  76. </script>
  77. <style lang="scss" scoped>
  78. .production-traceability-page {
  79. background-color: #fff;
  80. min-height: 100vh;
  81. background-image: url('/static/svg-icons/bg-pattern.svg');
  82. background-size: cover;
  83. background-position: center;
  84. }
  85. .content-wrapper {
  86. padding: 60rpx 40rpx 60rpx;
  87. position: relative;
  88. }
  89. .edit-tag {
  90. position: absolute;
  91. top: 80rpx;
  92. left: 0;
  93. width: 160rpx;
  94. height: 60rpx;
  95. background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  96. color: #fff;
  97. text-align: center;
  98. line-height: 60rpx;
  99. font-size: 26rpx;
  100. border-radius: 0 30rpx 30rpx 0;
  101. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  102. z-index: 10;
  103. }
  104. .product-image-section {
  105. display: flex;
  106. justify-content: center;
  107. margin-bottom: 40rpx;
  108. background-color: #fff;
  109. padding: 40rpx;
  110. border-radius: 20rpx;
  111. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  112. border: 2rpx solid #ffe6e6;
  113. position: relative;
  114. }
  115. .product-title {
  116. position: absolute;
  117. font-size: 32rpx;
  118. font-weight: bold;
  119. color: #fff;
  120. text-align: center;
  121. margin-bottom: 20rpx;
  122. padding: 10rpx 40rpx;
  123. background: #bd0402;
  124. border-radius: 10rpx;
  125. box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.3);
  126. top: -20rpx;
  127. }
  128. .info-title {
  129. position: absolute;
  130. top: -20rpx;
  131. left: 35%;
  132. background-color: #bd0402;
  133. color: #fff;
  134. text-align: center;
  135. padding: 10rpx 40rpx;
  136. margin-bottom: 30rpx;
  137. border-radius: 10rpx;
  138. font-size: 32rpx;
  139. font-weight: bold;
  140. }
  141. .info-list {
  142. background-color: #fff;
  143. border-radius: 20rpx;
  144. padding: 30rpx;
  145. margin-bottom: 30rpx;
  146. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  147. border: 2rpx solid #ffe6e6;
  148. position: relative;
  149. padding-top: 56rpx;
  150. }
  151. .info-item {
  152. display: flex;
  153. align-items: flex-start;
  154. padding: 20rpx 0;
  155. border-bottom: 1rpx solid #f0f0f0;
  156. }
  157. .info-item:last-child {
  158. border-bottom: none;
  159. }
  160. .info-label {
  161. font-size: 28rpx;
  162. color: #bd0402;
  163. margin-right: 10rpx;
  164. flex: 1;
  165. font-weight: 500;
  166. }
  167. .info-value {
  168. font-size: 28rpx;
  169. color: #333;
  170. flex: 2;
  171. }
  172. .bottom-decoration {
  173. width: 100%;
  174. height: 100rpx;
  175. overflow: hidden;
  176. margin-top: 40rpx;
  177. position: absolute;
  178. bottom: 0;
  179. left: 0;
  180. z-index: -1;
  181. }
  182. .bottom-decoration image {
  183. width: 100%;
  184. height: 100%;
  185. }
  186. .images-section {
  187. // background-color: #fff;
  188. // border-radius: 20rpx;
  189. padding: 20rpx 0;
  190. // margin-bottom: 60rpx;
  191. // box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  192. }
  193. .section-subtitle {
  194. font-size: 28rpx;
  195. color: #bd0402;
  196. margin-bottom: 20rpx;
  197. display: block;
  198. }
  199. .images-grid {
  200. display: flex;
  201. flex-direction: column;
  202. gap: 20rpx;
  203. }
  204. .detail-image {
  205. width: 100%;
  206. height: 400rpx;
  207. border-radius: 10rpx;
  208. }
  209. .home-button {
  210. position: fixed;
  211. bottom: 60rpx;
  212. right: 60rpx;
  213. width: 100rpx;
  214. height: 100rpx;
  215. background-color: #bd0402;
  216. border-radius: 50%;
  217. display: flex;
  218. justify-content: center;
  219. align-items: center;
  220. box-shadow: 0 4rpx 20rpx rgba(189, 4, 2, 0.4);
  221. z-index: 20;
  222. }
  223. .home-icon {
  224. width: 60rpx;
  225. height: 60rpx;
  226. }
  227. </style>