detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  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>品牌:{{ productInfo.brandName }}</span
  26. ><i></i><span>产地:{{ 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-normal',
  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: #bc1724 !important;
  83. }
  84. .simple-swiper {
  85. .swiper-pagination-bullet-active {
  86. background: #bc1724;
  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/normal/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/normal/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. .row {
  250. line-height: 24px;
  251. i {
  252. position: relative;
  253. margin: 0 16px;
  254. &::after {
  255. content: '';
  256. display: block;
  257. width: 1px;
  258. height: 16px;
  259. background: #999999;
  260. position: absolute;
  261. top: 0;
  262. left: 0;
  263. }
  264. }
  265. span {
  266. font-size: 18px;
  267. color: #999999;
  268. }
  269. }
  270. .sncode.mobile {
  271. display: none;
  272. }
  273. .sncode.pc {
  274. font-size: 18px;
  275. color: #282828;
  276. }
  277. .supplier,
  278. .maker {
  279. font-size: 20px;
  280. color: #282828;
  281. }
  282. .auth {
  283. width: 100%;
  284. min-height: 114px;
  285. background: #bc1724;
  286. margin-top: 56px;
  287. box-sizing: border-box;
  288. padding: 24px;
  289. .auth-icon {
  290. height: 28px;
  291. background: url(~assets/theme-images/normal/pc/icon-auth2.png) no-repeat left center;
  292. background-size: auto 28px;
  293. margin-bottom: 10px;
  294. }
  295. .auth-info {
  296. font-size: 0;
  297. span {
  298. font-size: 20px;
  299. color: #fff;
  300. }
  301. }
  302. }
  303. }
  304. }
  305. .page-content {
  306. margin-top: 16px;
  307. box-sizing: border-box;
  308. padding: 24px;
  309. .device-params {
  310. .title {
  311. font-size: 28px;
  312. color: #282828;
  313. font-weight: bold;
  314. }
  315. .line {
  316. height: 1px;
  317. background: #ececec;
  318. position: relative;
  319. margin-top: 10px;
  320. margin-bottom: 20px;
  321. &::after {
  322. content: '';
  323. position: absolute;
  324. width: 73px;
  325. height: 2px;
  326. background: #bc1724;
  327. left: 0;
  328. bottom: 0;
  329. }
  330. }
  331. }
  332. }
  333. }
  334. }
  335. // 移动端
  336. @media screen and (max-width: 768px) {
  337. .device-detail {
  338. .detail-title {
  339. display: none;
  340. }
  341. .auth-card-content {
  342. width: 100vw;
  343. height: 100vh;
  344. position: fixed;
  345. left: 0;
  346. top: 0;
  347. display: flex;
  348. justify-content: center;
  349. align-items: center;
  350. z-index: 9;
  351. .auth-card-popup {
  352. position: relative;
  353. width: 86vw;
  354. img {
  355. display: block;
  356. width: 100%;
  357. height: auto;
  358. }
  359. .el-icon-circle-close {
  360. position: absolute;
  361. top: -8vw;
  362. right: 0;
  363. font-size: 7vw;
  364. color: #fff;
  365. cursor: pointer;
  366. }
  367. }
  368. }
  369. .page-top,
  370. .page-content {
  371. margin: 0 auto;
  372. background: #fff;
  373. }
  374. .page-top {
  375. .swiper-body {
  376. position: relative;
  377. width: 100vw;
  378. height: 100vw;
  379. background: #f7f7f7;
  380. .device-image {
  381. width: 100%;
  382. height: 100%;
  383. }
  384. ::v-deep {
  385. img {
  386. width: 100vw;
  387. height: 100vw;
  388. }
  389. }
  390. .auth-seal {
  391. position: absolute;
  392. width: 13.8vw;
  393. height: 13.8vw;
  394. background: url(~assets/theme-images/normal/h5/icon-auth-seal.png) no-repeat center;
  395. background-size: 13.8vw;
  396. right: 4vw;
  397. bottom: 4vw;
  398. z-index: 2;
  399. }
  400. .auth-card {
  401. position: absolute;
  402. width: auto;
  403. height: 20.6vw;
  404. display: block;
  405. bottom: 4vw;
  406. left: 4vw;
  407. z-index: 2;
  408. }
  409. .auth-logo {
  410. position: absolute;
  411. max-width: 18vw;
  412. max-height: 18vw;
  413. top: 4vw;
  414. left: 4vw;
  415. z-index: 2;
  416. }
  417. }
  418. .device-info {
  419. position: relative;
  420. .section {
  421. word-break: break-all;
  422. padding: 4vw 4vw 0;
  423. }
  424. .logo {
  425. width: 18vw;
  426. height: 18vw;
  427. border-radius: 50%;
  428. // background: #d8d8d8;
  429. border: 0.1vw solid #d8d8d8;
  430. box-sizing: border-box;
  431. position: absolute;
  432. right: 4vw;
  433. top: 5.8vw;
  434. .logo-swiper {
  435. width: 18vw;
  436. height: 18vw;
  437. overflow: hidden;
  438. border-radius: 50%;
  439. }
  440. ::v-deep {
  441. img {
  442. width: 18vw;
  443. height: 18vw;
  444. border-radius: 50%;
  445. }
  446. }
  447. &::after {
  448. content: '';
  449. position: absolute;
  450. z-index: 1;
  451. right: 0.7vw;
  452. bottom: 0;
  453. display: block;
  454. width: 3.6vw;
  455. height: 3.6vw;
  456. background: url(~assets/theme-images/normal/h5/icon-auth-ren.png) no-repeat center;
  457. background-size: 3.6vw;
  458. }
  459. img {
  460. display: block;
  461. width: 100%;
  462. height: 100%;
  463. // background: pink;
  464. border-radius: 50%;
  465. }
  466. }
  467. .name {
  468. font-size: 5.4vw;
  469. color: #282828;
  470. line-height: 7.4vw;
  471. margin-bottom: 2.4vw;
  472. font-weight: bold;
  473. }
  474. .sncode.pc {
  475. display: none;
  476. }
  477. .sncode.mobile {
  478. margin: 2.4vw 0 5.6vw;
  479. color: #282828;
  480. font-size: 4vw;
  481. }
  482. .row {
  483. line-height: 4.7vw;
  484. i {
  485. position: relative;
  486. margin: 0 4vw;
  487. &::after {
  488. content: '';
  489. display: block;
  490. width: 0.2vw;
  491. height: 3vw;
  492. background: #282828;
  493. position: absolute;
  494. top: 1vw;
  495. left: 0;
  496. }
  497. }
  498. span {
  499. font-size: 3.6vw;
  500. color: #282828;
  501. }
  502. }
  503. .row,
  504. .maker {
  505. margin-bottom: 1.2vw;
  506. }
  507. .supplier,
  508. .maker {
  509. font-size: 3.6vw;
  510. color: #282828;
  511. }
  512. .auth {
  513. // width: 100%;
  514. margin: 0 4vw;
  515. min-height: 20vw;
  516. background: #bc1724;
  517. margin-top: 4vw;
  518. box-sizing: border-box;
  519. padding: 5.2vw 4vw;
  520. border-radius: 1.2vw;
  521. .auth-icon {
  522. height: 4.9vw;
  523. background: url(~assets/theme-images/normal/h5/icon-auth2.png) no-repeat left center;
  524. background-size: auto 4.9vw;
  525. margin-bottom: 1vw;
  526. }
  527. .auth-info {
  528. font-size: 0;
  529. span {
  530. font-size: 3.6vw;
  531. line-height: 6.4vw;
  532. color: #fff;
  533. font-weight: bold;
  534. }
  535. }
  536. }
  537. }
  538. }
  539. .page-content {
  540. .device-params {
  541. padding: 8vw 4vw;
  542. box-sizing: border-box;
  543. .title {
  544. font-size: 4.6vw;
  545. color: #282828;
  546. font-weight: bold;
  547. }
  548. .line {
  549. // height: 0.2vw;
  550. // background: #ececec;
  551. position: relative;
  552. margin-top: 4.7vw;
  553. margin-bottom: 1.2vw;
  554. }
  555. }
  556. }
  557. }
  558. }
  559. </style>