detail.vue 16 KB

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