production.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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">2025-07-24</text>
  33. </view>
  34. <view class="info-item">
  35. <text class="info-label">批生产量:</text>
  36. <text class="info-value">500(Kg)</text>
  37. </view>
  38. <view class="info-item">
  39. <text class="info-label">执行标准:</text>
  40. <text class="info-value">《中国药典》2020年版</text>
  41. </view>
  42. <view class="info-item">
  43. <text class="info-label">加工工序:</text>
  44. <text class="info-value">领料、净选、干燥、筛选、中间体、包装批指令、包装</text>
  45. </view>
  46. </view>
  47. <!-- 底部装饰 -->
  48. <!-- <view class="bottom-decoration">
  49. <image :src="waveIconSrc" mode="aspectFill"></image>
  50. </view> -->
  51. <!-- 返回首页按钮 -->
  52. <!-- <view class="home-button" @click="goToHome">
  53. <image class="home-icon" :src="homeIconSrc" mode="aspectFit"></image>
  54. </view> -->
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. // 使用项目中已有的图标路径
  63. waveIconSrc: '/static/svg-icons/wave.svg',
  64. homeIconSrc: '/static/tab/home.png',
  65. productImageSrc: '/static/product/1.svg',
  66. };
  67. },
  68. methods: {
  69. handleBack() {
  70. // 返回上一页
  71. uni.navigateBack();
  72. },
  73. goToHome() {
  74. // 返回首页
  75. uni.switchTab({
  76. url: '/pages/home/home'
  77. });
  78. }
  79. }
  80. };
  81. </script>
  82. <style lang="scss" scoped>
  83. .production-traceability-page {
  84. background-color: #fff;
  85. min-height: 100vh;
  86. background-image: url('/static/svg-icons/bg-pattern.svg');
  87. background-size: cover;
  88. background-position: center;
  89. }
  90. .content-wrapper {
  91. padding: 60rpx 40rpx 60rpx;
  92. position: relative;
  93. }
  94. .edit-tag {
  95. position: absolute;
  96. top: 80rpx;
  97. left: 0;
  98. width: 160rpx;
  99. height: 60rpx;
  100. background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  101. color: #fff;
  102. text-align: center;
  103. line-height: 60rpx;
  104. font-size: 26rpx;
  105. border-radius: 0 30rpx 30rpx 0;
  106. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  107. z-index: 10;
  108. }
  109. .product-image-section {
  110. display: flex;
  111. justify-content: center;
  112. margin-bottom: 40rpx;
  113. background-color: #fff;
  114. padding: 40rpx;
  115. border-radius: 20rpx;
  116. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  117. border: 2rpx solid #ffe6e6;
  118. position: relative;
  119. }
  120. .product-title {
  121. position: absolute;
  122. font-size: 32rpx;
  123. font-weight: bold;
  124. color: #fff;
  125. text-align: center;
  126. margin-bottom: 20rpx;
  127. padding: 10rpx 40rpx;
  128. background: #bd0402;
  129. border-radius: 10rpx;
  130. box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.3);
  131. top: -20rpx;
  132. }
  133. .info-title {
  134. position: absolute;
  135. top: -20rpx;
  136. left: 35%;
  137. background-color: #bd0402;
  138. color: #fff;
  139. text-align: center;
  140. padding: 10rpx 40rpx;
  141. margin-bottom: 30rpx;
  142. border-radius: 10rpx;
  143. font-size: 32rpx;
  144. font-weight: bold;
  145. }
  146. .info-list {
  147. background-color: #fff;
  148. border-radius: 20rpx;
  149. padding: 30rpx;
  150. margin-bottom: 30rpx;
  151. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  152. border: 2rpx solid #ffe6e6;
  153. position: relative;
  154. padding-top: 56rpx;
  155. }
  156. .info-item {
  157. display: flex;
  158. align-items: flex-start;
  159. padding: 20rpx 0;
  160. border-bottom: 1rpx solid #f0f0f0;
  161. }
  162. .info-item:last-child {
  163. border-bottom: none;
  164. }
  165. .info-label {
  166. font-size: 28rpx;
  167. color: #bd0402;
  168. margin-right: 10rpx;
  169. flex: 1;
  170. font-weight: 500;
  171. }
  172. .info-value {
  173. font-size: 28rpx;
  174. color: #333;
  175. flex: 2;
  176. }
  177. .bottom-decoration {
  178. width: 100%;
  179. height: 100rpx;
  180. overflow: hidden;
  181. margin-top: 40rpx;
  182. position: absolute;
  183. bottom: 0;
  184. left: 0;
  185. z-index: -1;
  186. }
  187. .bottom-decoration image {
  188. width: 100%;
  189. height: 100%;
  190. }
  191. .home-button {
  192. position: fixed;
  193. bottom: 60rpx;
  194. right: 60rpx;
  195. width: 100rpx;
  196. height: 100rpx;
  197. background-color: #bd0402;
  198. border-radius: 50%;
  199. display: flex;
  200. justify-content: center;
  201. align-items: center;
  202. box-shadow: 0 4rpx 20rpx rgba(189, 4, 2, 0.4);
  203. z-index: 20;
  204. }
  205. .home-icon {
  206. width: 60rpx;
  207. height: 60rpx;
  208. }
  209. </style>