detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. <template>
  2. <div class="device-detail" v-if="productInfo">
  3. <div class="detail-title">设备认证</div>
  4. <div class="page-top">
  5. <div class="swiper-body">
  6. <img :src="productInfo.pcImage" class="device-image" />
  7. <div class="auth-seal"></div>
  8. <img class="auth-card" :src="authCardImage" @click="onShowAuthCard" v-if="!showAuthCard" />
  9. <img class="auth-logo" :src="brandLogoImage" />
  10. </div>
  11. <div class="device-info">
  12. <div class="logo">
  13. <div class="logo-swiper" v-if="clubLogo.length > 1">
  14. <SimpleSwiper :imageList="clubLogo" :pagination="false"></SimpleSwiper>
  15. </div>
  16. <img :src="clubLogo[0]" alt="logo" v-else />
  17. </div>
  18. <div class="section">
  19. <div class="name" v-text="productInfo.productName"></div>
  20. <div class="sncode mobile">
  21. SN码:<span>{{ productInfo.snCode | snCodeRender }}</span>
  22. </div>
  23. <div class="row">
  24. <!-- <span>产地:{{ productInfo.producePlace }}</span> -->
  25. <span class="brand">品牌:{{ productInfo.brandName }}</span>
  26. <span class="place">产地:{{ productInfo.producePlace }}</span>
  27. <!-- <span>品牌:RÖS'S</span><i></i><span>产地:西班牙巴塞罗那</span> -->
  28. </div>
  29. <div class="sncode pc">
  30. SN码:<span>{{ productInfo.snCode | snCodeRender }}</span>
  31. </div>
  32. <div class="maker">制造商:{{ productInfo.manufacturer }}</div>
  33. <div class="supplier">供应商:{{ productInfo.shopName }}</div>
  34. <!-- <div class="supplier">供应商:ACEBELLE生物科技(深圳)有限公司</div> -->
  35. </div>
  36. <div class="auth" v-if="productInfo">
  37. <div class="auth-icon"></div>
  38. <template v-for="item in productInfo.clubList">
  39. <div class="auth-info" :key="item.authId">
  40. <span>该设备由</span>
  41. <span class="font-bold">{{ supplierInfo.shopName }}</span>
  42. <span>官方授权</span>
  43. <span>{{ item.authParty }}</span>
  44. </div>
  45. </template>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="page-content">
  50. <div class="device-params">
  51. <div class="title">相关参数</div>
  52. <div class="line"></div>
  53. <SimpleParamList :paramList="paramListRender" />
  54. </div>
  55. </div>
  56. <!-- 授权牌弹窗 -->
  57. <div class="mask" v-if="showAuthCard" @click="onHideAuthCard"></div>
  58. <transition enter-active-class="animate__zoomIn" leave-active-class="animate__zoomOut">
  59. <div class="auth-card-content animate__animated" v-if="showAuthCard">
  60. <div class="auth-card-popup">
  61. <span class="el-icon-circle-close" @click="onHideAuthCard"></span>
  62. <img :src="authCardImage" />
  63. </div>
  64. </div>
  65. </transition>
  66. </div>
  67. </template>
  68. <script>
  69. import deviceDetailMixin from '@/mixins/deviceDetail'
  70. import { mapGetters } from 'vuex'
  71. export default {
  72. layout: 'app-hyt',
  73. mixins: [deviceDetailMixin],
  74. computed: {
  75. ...mapGetters(['supplierInfo']),
  76. },
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. ::v-deep {
  81. .swiper-pagination-bullet {
  82. background: #4093b5 !important;
  83. }
  84. .simple-swiper {
  85. .swiper-pagination-bullet-active {
  86. background: #4093b5;
  87. }
  88. }
  89. }
  90. .mask {
  91. width: 100vw;
  92. height: 100vh;
  93. position: fixed;
  94. left: 0;
  95. top: 0;
  96. z-index: 8;
  97. background: rgba(0, 0, 0, 0.5);
  98. }
  99. // pc 端
  100. @media screen and (min-width: 768px) {
  101. .device-detail {
  102. margin-bottom: 48px;
  103. .auth-card-content {
  104. width: 100vw;
  105. height: 100vh;
  106. position: fixed;
  107. left: 0;
  108. top: 0;
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. z-index: 9;
  113. .auth-card-popup {
  114. position: relative;
  115. width: 622px;
  116. img {
  117. display: block;
  118. width: 100%;
  119. height: auto;
  120. }
  121. .el-icon-circle-close {
  122. position: absolute;
  123. top: -50px;
  124. right: 0;
  125. font-size: 32px;
  126. color: #fff;
  127. cursor: pointer;
  128. }
  129. }
  130. }
  131. .detail-title {
  132. font-size: 24px;
  133. color: #282828;
  134. margin: 32px auto 24px;
  135. width: 1200px;
  136. }
  137. .page-top,
  138. .page-content {
  139. width: 1200px;
  140. margin: 0 auto;
  141. background: #fff;
  142. }
  143. .page-top {
  144. display: flex;
  145. justify-content: space-between;
  146. align-items: flex-start;
  147. padding: 24px;
  148. padding-right: 40px;
  149. .swiper-body {
  150. position: relative;
  151. width: 540px;
  152. height: 540px;
  153. background: #f7f7f7;
  154. .device-image {
  155. width: 100%;
  156. height: 100%;
  157. }
  158. .auth-seal {
  159. position: absolute;
  160. width: 70px;
  161. height: 70px;
  162. background: url(~assets/theme-images/hyt/pc/icon-auth-seal.png) no-repeat center;
  163. background-size: 70px;
  164. right: 24px;
  165. bottom: 24px;
  166. z-index: 2;
  167. }
  168. .auth-card {
  169. position: absolute;
  170. width: auto;
  171. height: 110px;
  172. display: block;
  173. bottom: 24px;
  174. left: 24px;
  175. z-index: 2;
  176. cursor: pointer;
  177. }
  178. .auth-logo {
  179. position: absolute;
  180. max-width: 120px;
  181. max-height: 120px;
  182. top: 24px;
  183. left: 24px;
  184. z-index: 2;
  185. }
  186. }
  187. .device-info {
  188. width: 572px;
  189. position: relative;
  190. .section {
  191. width: 440px;
  192. word-break: break-all;
  193. }
  194. .logo {
  195. width: 114px;
  196. height: 114px;
  197. border-radius: 50%;
  198. // background: #d8d8d8;
  199. border: 1px solid #d8d8d8;
  200. // box-sizing: border-box;
  201. position: absolute;
  202. right: 0;
  203. top: 0;
  204. .logo-swiper {
  205. width: 112px;
  206. height: 112px;
  207. overflow: hidden;
  208. border-radius: 50%;
  209. }
  210. ::v-deep {
  211. img {
  212. width: 112px;
  213. height: 112px;
  214. border-radius: 50%;
  215. }
  216. }
  217. &::after {
  218. content: '';
  219. position: absolute;
  220. z-index: 1;
  221. right: 6px;
  222. bottom: 0;
  223. display: block;
  224. width: 24px;
  225. height: 24px;
  226. background: url(~assets/theme-images/hyt/pc/icon-auth-ren.png) no-repeat center;
  227. background-size: 23px;
  228. }
  229. img {
  230. display: block;
  231. width: 100%;
  232. height: 100%;
  233. // background: pink;
  234. border-radius: 50%;
  235. }
  236. }
  237. .name {
  238. font-size: 24px;
  239. color: #282828;
  240. line-height: 1.6;
  241. margin-bottom: 24px;
  242. font-weight: bold;
  243. }
  244. .row,
  245. .sncode,
  246. .maker {
  247. margin-bottom: 16px;
  248. }
  249. .brand,
  250. .place {
  251. display: block;
  252. }
  253. .brand {
  254. margin-bottom: 8px;
  255. }
  256. .row {
  257. line-height: 24px;
  258. i {
  259. position: relative;
  260. margin: 0 16px;
  261. &::after {
  262. content: '';
  263. display: block;
  264. width: 1px;
  265. height: 16px;
  266. background: #999999;
  267. position: absolute;
  268. top: 0;
  269. left: 0;
  270. }
  271. }
  272. span {
  273. font-size: 18px;
  274. color: #999999;
  275. }
  276. }
  277. .sncode.mobile {
  278. display: none;
  279. }
  280. .sncode.pc {
  281. font-size: 18px;
  282. color: #282828;
  283. }
  284. .supplier,
  285. .maker {
  286. font-size: 20px;
  287. color: #282828;
  288. }
  289. .auth {
  290. width: 100%;
  291. min-height: 114px;
  292. background: #4093b5;
  293. margin-top: 56px;
  294. box-sizing: border-box;
  295. padding: 24px;
  296. .auth-icon {
  297. height: 28px;
  298. background: url(~assets/theme-images/hyt/pc/icon-auth2.png) no-repeat left center;
  299. background-size: auto 28px;
  300. margin-bottom: 10px;
  301. }
  302. .auth-info {
  303. font-size: 0;
  304. span {
  305. font-size: 20px;
  306. color: #fff;
  307. }
  308. }
  309. }
  310. }
  311. }
  312. .page-content {
  313. margin-top: 16px;
  314. box-sizing: border-box;
  315. padding: 24px;
  316. .device-params {
  317. .title {
  318. font-size: 28px;
  319. color: #282828;
  320. font-weight: bold;
  321. }
  322. .line {
  323. height: 1px;
  324. background: #ececec;
  325. position: relative;
  326. margin-top: 10px;
  327. margin-bottom: 20px;
  328. &::after {
  329. content: '';
  330. position: absolute;
  331. width: 73px;
  332. height: 2px;
  333. background: #4093b5;
  334. left: 0;
  335. bottom: 0;
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. // 移动端
  343. @media screen and (max-width: 768px) {
  344. .device-detail {
  345. .detail-title {
  346. display: none;
  347. }
  348. .auth-card-content {
  349. width: 100vw;
  350. height: 100vh;
  351. position: fixed;
  352. left: 0;
  353. top: 0;
  354. display: flex;
  355. justify-content: center;
  356. align-items: center;
  357. z-index: 9;
  358. .auth-card-popup {
  359. position: relative;
  360. width: 86vw;
  361. img {
  362. display: block;
  363. width: 100%;
  364. height: auto;
  365. }
  366. .el-icon-circle-close {
  367. position: absolute;
  368. top: -8vw;
  369. right: 0;
  370. font-size: 7vw;
  371. color: #fff;
  372. cursor: pointer;
  373. }
  374. }
  375. }
  376. .page-top,
  377. .page-content {
  378. margin: 0 auto;
  379. background: #fff;
  380. }
  381. .page-top {
  382. .swiper-body {
  383. position: relative;
  384. width: 100vw;
  385. height: 100vw;
  386. background: #f7f7f7;
  387. .device-image {
  388. width: 100%;
  389. height: 100%;
  390. }
  391. ::v-deep {
  392. img {
  393. width: 100vw;
  394. height: 100vw;
  395. }
  396. }
  397. .auth-seal {
  398. position: absolute;
  399. width: 13.8vw;
  400. height: 13.8vw;
  401. background: url(~assets/theme-images/hyt/h5/icon-auth-seal.png) no-repeat center;
  402. background-size: 13.8vw;
  403. right: 4vw;
  404. bottom: 4vw;
  405. z-index: 2;
  406. }
  407. .auth-card {
  408. position: absolute;
  409. width: auto;
  410. height: 20.6vw;
  411. display: block;
  412. bottom: 4vw;
  413. left: 4vw;
  414. z-index: 2;
  415. }
  416. .auth-logo {
  417. position: absolute;
  418. max-width: 18vw;
  419. max-height: 18vw;
  420. top: 4vw;
  421. left: 4vw;
  422. z-index: 2;
  423. }
  424. }
  425. .device-info {
  426. position: relative;
  427. .section {
  428. word-break: break-all;
  429. padding: 4vw 4vw 0;
  430. }
  431. .logo {
  432. width: 18vw;
  433. height: 18vw;
  434. border-radius: 50%;
  435. // background: #d8d8d8;
  436. border: 0.1vw solid #d8d8d8;
  437. box-sizing: border-box;
  438. position: absolute;
  439. right: 4vw;
  440. top: 5.8vw;
  441. .logo-swiper {
  442. width: 18vw;
  443. height: 18vw;
  444. overflow: hidden;
  445. border-radius: 50%;
  446. }
  447. ::v-deep {
  448. img {
  449. width: 18vw;
  450. height: 18vw;
  451. border-radius: 50%;
  452. }
  453. }
  454. &::after {
  455. content: '';
  456. position: absolute;
  457. z-index: 1;
  458. right: 0.7vw;
  459. bottom: 0;
  460. display: block;
  461. width: 3.6vw;
  462. height: 3.6vw;
  463. background: url(~assets/theme-images/hyt/h5/icon-auth-ren.png) no-repeat center;
  464. background-size: 3.6vw;
  465. }
  466. img {
  467. display: block;
  468. width: 100%;
  469. height: 100%;
  470. // background: pink;
  471. border-radius: 50%;
  472. }
  473. }
  474. .name {
  475. font-size: 5.4vw;
  476. color: #282828;
  477. line-height: 7.4vw;
  478. margin-bottom: 2.4vw;
  479. font-weight: bold;
  480. max-width: 70vw;
  481. }
  482. .sncode.pc {
  483. display: none;
  484. }
  485. .sncode.mobile {
  486. margin: 2.4vw 0 5.6vw;
  487. color: #282828;
  488. font-size: 4vw;
  489. }
  490. .row {
  491. line-height: 4.7vw;
  492. i {
  493. position: relative;
  494. margin: 0 4vw;
  495. &::after {
  496. content: '';
  497. display: block;
  498. width: 0.2vw;
  499. height: 3vw;
  500. background: #282828;
  501. position: absolute;
  502. top: 1vw;
  503. left: 0;
  504. }
  505. }
  506. span {
  507. font-size: 3.6vw;
  508. color: #282828;
  509. }
  510. }
  511. .row,
  512. .maker {
  513. margin-bottom: 1.2vw;
  514. }
  515. .brand,
  516. .place {
  517. display: block;
  518. }
  519. .brand {
  520. margin-bottom: 1.2vw;
  521. }
  522. .supplier,
  523. .maker {
  524. font-size: 3.6vw;
  525. color: #282828;
  526. }
  527. .auth {
  528. // width: 100%;
  529. margin: 0 4vw;
  530. min-height: 20vw;
  531. background: #4093b5;
  532. margin-top: 4vw;
  533. box-sizing: border-box;
  534. padding: 5.2vw 4vw;
  535. border-radius: 1.2vw;
  536. .auth-icon {
  537. height: 4.9vw;
  538. background: url(~assets/theme-images/hyt/h5/icon-auth2.png) no-repeat left center;
  539. background-size: auto 4.9vw;
  540. margin-bottom: 1vw;
  541. }
  542. .auth-info {
  543. font-size: 0;
  544. span {
  545. font-size: 3.6vw;
  546. line-height: 6.4vw;
  547. color: #fff;
  548. font-weight: bold;
  549. }
  550. }
  551. }
  552. }
  553. }
  554. .page-content {
  555. .device-params {
  556. padding: 8vw 4vw;
  557. box-sizing: border-box;
  558. .title {
  559. font-size: 4.6vw;
  560. color: #282828;
  561. font-weight: bold;
  562. }
  563. .line {
  564. position: relative;
  565. margin-top: 4.7vw;
  566. margin-bottom: 1.2vw;
  567. }
  568. }
  569. }
  570. }
  571. }
  572. </style>