traceability.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view class="intro-page common">
  3. <view class="top-class"></view>
  4. <view class="title">
  5. 产品溯源
  6. </view>
  7. <view class="head">
  8. <u-row class="row-class">
  9. <u-col span="4">
  10. <image class="logo-img"
  11. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/logo.png"
  12. mode="aspectFit" />
  13. </u-col>
  14. <u-col span="4">
  15. <image class="commodity-img"
  16. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/commodity.png"
  17. mode="aspectFit" />
  18. </u-col>
  19. <u-col span="4">
  20. <image class="logo-rules"
  21. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/rules.png" @click="openDetail"/>
  22. </u-col>
  23. </u-row>
  24. </view>
  25. <view class="topImg">
  26. <image class="img_1" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/commodity_1.png"
  27. mode="heightFix" />
  28. </view>
  29. <!-- 公司简介内容卡片 -->
  30. <view class="content">
  31. <view class="cardTop"></view>
  32. <view class="content_text">
  33. <view class="content_imgView">
  34. <image class="img_2" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/tongjichanpin.png"
  35. mode="heightFix" />
  36. </view>
  37. <u-row class="row-class" customStyle="margin-bottom: 5px">
  38. <u-col span="4">
  39. <view class="item-left item-text">产品名称</view>
  40. </u-col>
  41. <u-col span="8">
  42. <view class="item-text">{{info.productName}}</view>
  43. </u-col>
  44. </u-row>
  45. <u-row class="row-class" customStyle="margin-bottom: 5px">
  46. <u-col span="4">
  47. <view class="item-left item-text">商标名称</view>
  48. </u-col>
  49. <u-col span="8">
  50. <view class="item-text">超吉炫</view>
  51. </u-col>
  52. </u-row>
  53. <u-row class="row-class" customStyle="margin-bottom: 5px">
  54. <u-col span="4">
  55. <view class="item-left item-text">产品类型</view>
  56. </u-col>
  57. <u-col span="8">
  58. <view class="item-text">低纤槟榔胶果(槟榔制品)</view>
  59. </u-col>
  60. </u-row>
  61. <u-row class="row-class" customStyle="margin-bottom: 5px">
  62. <u-col span="4">
  63. <view class="item-left item-text">生产日期</view>
  64. </u-col>
  65. <u-col span="8">
  66. <view class="item-text">见包装喷码区</view>
  67. </u-col>
  68. </u-row>
  69. <u-row class="row-class" customStyle="margin-bottom: 5px">
  70. <u-col span="4">
  71. <view class="item-left item-text">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</view>
  72. </u-col>
  73. <u-col span="8">
  74. <view class="item-text">{{info.pici}}</view>
  75. </u-col>
  76. </u-row>
  77. <u-row class="row-class" customStyle="margin-bottom: 5px">
  78. <u-col span="4">
  79. <view class="item-left item-text">保&nbsp;&nbsp;质&nbsp;&nbsp;期</view>
  80. </u-col>
  81. <u-col span="8">
  82. <view class="item-text">18个月</view>
  83. </u-col>
  84. </u-row>
  85. <u-row class="row-class" customStyle="margin-bottom: 5px">
  86. <u-col span="4">
  87. <view class="item-left item-text">出&nbsp;&nbsp;品&nbsp;&nbsp;商</view>
  88. </u-col>
  89. <u-col span="8">
  90. <view class="item-text">武汉市胜昌经贸有限公司</view>
  91. </u-col>
  92. </u-row>
  93. <!-- <u-row class="row-class" customStyle="margin-bottom: 5px">
  94. <u-col span="4">
  95. <view class="item-left item-text">销售市场</view>
  96. </u-col>
  97. <u-col span="8">
  98. <view class="item-text">湖南长沙</view>
  99. </u-col>
  100. </u-row> -->
  101. <!-- <u-row class="row-class" customStyle="margin-bottom: 5px">
  102. <u-col span="4">
  103. <view class="item-left item-text">生产厂址</view>
  104. </u-col>
  105. <u-col span="8">
  106. <view class="item-text">湖南湘潭市湘潭县</view>
  107. </u-col>
  108. </u-row> -->
  109. </view>
  110. <view class="return_view">
  111. <view class="return-button" @click="goBack">返回</view>
  112. </view>
  113. </view>
  114. </view>
  115. </template>
  116. <script>
  117. import {
  118. suyuanData
  119. } from '@/api/scan'
  120. import traceabilityMixin from '@/mixins/traceabilityMixin.js'
  121. export default {
  122. mixins: [traceabilityMixin],
  123. onLoad() {
  124. this.scanCode = uni.getStorageSync('scanCode');
  125. // 调用 mixin 中的方法
  126. this.initData(suyuanData);
  127. },
  128. methods: {
  129. // 不再需要定义 initData 方法,使用 mixin 中的方法
  130. openDetail(){
  131. uni.navigateTo({
  132. url: '/pages/cjx/index/rules'
  133. });
  134. }
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. @import url('../../../static/scss/common_cjx.css');
  140. .row-class {
  141. height: 60rpx;
  142. }
  143. .cardTop{
  144. background-image:
  145. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cpsy.png");
  146. }
  147. .theme-text {
  148. height: 10vh;
  149. text-align: center;
  150. line-height: 11vh;
  151. .textImage {
  152. height: 80rpx;
  153. width: 400rpx;
  154. }
  155. }
  156. .intro-card {
  157. margin: 0 32rpx;
  158. background: rgba(131, 100, 71, 0.5);
  159. border-radius: 10rpx;
  160. max-height: 65vh;
  161. overflow: auto;
  162. .intro-view {
  163. border: 2rpx solid #341B10;
  164. padding: 20rpx;
  165. margin: 20rpx;
  166. position: relative;
  167. margin-top: 30rpx;
  168. .intro-label {
  169. background-image:
  170. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/label.png");
  171. /* 使用绝对路径 */
  172. background-size: contain;
  173. background-repeat: no-repeat;
  174. width: 220rpx;
  175. height: 120rpx;
  176. position: absolute;
  177. margin-top: -70rpx;
  178. align-content: center;
  179. margin-left: -28rpx;
  180. .label-title {
  181. font-weight: bold;
  182. font-size: 30rpx;
  183. color: #341B10;
  184. text-align: center;
  185. margin-left: 10px;
  186. height: 120rpx;
  187. line-height: 110rpx;
  188. }
  189. }
  190. .intro-content {
  191. font-size: 28rpx;
  192. color: #5c4322;
  193. line-height: 1.8;
  194. margin-top: 20rpx;
  195. text-align: justify;
  196. }
  197. }
  198. }
  199. .image-display {
  200. text-align: center;
  201. .company-img {
  202. width: 80%;
  203. height: 240rpx;
  204. border-radius: 12rpx;
  205. object-fit: cover;
  206. margin-top: 20rpx;
  207. background: #eee;
  208. }
  209. }
  210. ::v-deep .item-left {
  211. border-radius: 6rpx !important;
  212. text-align: center;
  213. width: 160rpx !important;
  214. }
  215. .item-text {
  216. font-weight: 500;
  217. font-size: 30rpx;
  218. color: #FFFFFF;
  219. }
  220. .content {
  221. height: 69vh;
  222. border-radius: 10rpx;
  223. margin: 0rpx 40rpx;
  224. padding: 10rpx 24rpx;
  225. overflow: auto;
  226. align-items: center;
  227. justify-content: center;
  228. background-image:
  229. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cardBgi.png");
  230. background-size: cover;
  231. background-position: center;
  232. background-repeat: no-repeat;
  233. }
  234. .img_2{
  235. height: 240rpx;
  236. }
  237. .content_imgView{
  238. margin-bottom: 40rpx;
  239. display: flex;
  240. justify-content: center;
  241. }
  242. </style>