detail.vue 16 KB

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