detail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  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 class="font-bold">ROS'S</span>
  49. <span>授予</span>
  50. <span>{{ item.authParty }}</span>
  51. <span>正品拥有</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',
  94. mixins: [deviceDetailMixin],
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. ::v-deep {
  99. .swiper-pagination-bullet {
  100. @include themify($themes) {
  101. background: themed('color') !important;
  102. }
  103. }
  104. .simple-swiper {
  105. .swiper-pagination-bullet-active {
  106. @include themify($themes) {
  107. background: themed('color') !important;
  108. }
  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/ross/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/ross/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. @include themify($themes) {
  310. background: themed('color') !important;
  311. }
  312. margin-top: 56px;
  313. box-sizing: border-box;
  314. padding: 24px;
  315. .auth-icon {
  316. height: 28px;
  317. background: url(~assets/theme-images/ross/pc-icon-auth.png)
  318. no-repeat left center;
  319. background-size: auto 28px;
  320. margin-bottom: 10px;
  321. }
  322. .auth-info {
  323. font-size: 0;
  324. span {
  325. font-size: 20px;
  326. color: #fff;
  327. }
  328. }
  329. }
  330. }
  331. }
  332. .page-content {
  333. margin-top: 16px;
  334. box-sizing: border-box;
  335. padding: 24px;
  336. .device-params {
  337. .title {
  338. font-size: 28px;
  339. color: #282828;
  340. font-weight: bold;
  341. }
  342. .line {
  343. height: 1px;
  344. background: #ececec;
  345. position: relative;
  346. margin-top: 10px;
  347. margin-bottom: 20px;
  348. &::after {
  349. content: '';
  350. position: absolute;
  351. width: 73px;
  352. height: 2px;
  353. @include themify($themes) {
  354. background: themed('color') !important;
  355. }
  356. left: 0;
  357. bottom: 0;
  358. }
  359. }
  360. .params {
  361. width: 100%;
  362. .row {
  363. display: table-row;
  364. width: 100%;
  365. }
  366. .col {
  367. display: table-cell;
  368. font-size: 16px;
  369. padding: 12px 0;
  370. &:nth-child(2n-1) {
  371. color: #999999;
  372. white-space: nowrap;
  373. }
  374. &:nth-child(2n) {
  375. color: #282828;
  376. padding-left: 12px;
  377. }
  378. &:nth-child(3) {
  379. padding-left: 100px;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. }
  387. // 移动端
  388. @media screen and (max-width: 768px) {
  389. .device-detail {
  390. .detail-title {
  391. display: none;
  392. }
  393. .auth-card-content {
  394. width: 100vw;
  395. height: 100vh;
  396. position: fixed;
  397. left: 0;
  398. top: 0;
  399. display: flex;
  400. justify-content: center;
  401. align-items: center;
  402. z-index: 9;
  403. .auth-card-popup {
  404. position: relative;
  405. width: 86vw;
  406. img {
  407. display: block;
  408. width: 100%;
  409. height: auto;
  410. }
  411. .el-icon-circle-close {
  412. position: absolute;
  413. top: -8vw;
  414. right: 0;
  415. font-size: 7vw;
  416. color: #fff;
  417. cursor: pointer;
  418. }
  419. }
  420. }
  421. .page-top,
  422. .page-content {
  423. margin: 0 auto;
  424. background: #fff;
  425. }
  426. .page-top {
  427. .swiper-body {
  428. position: relative;
  429. width: 100vw;
  430. height: 100vw;
  431. background: #f7f7f7;
  432. .device-image {
  433. width: 100%;
  434. height: 100%;
  435. }
  436. ::v-deep {
  437. img {
  438. width: 100vw;
  439. height: 100vw;
  440. }
  441. }
  442. .auth-seal {
  443. position: absolute;
  444. width: 13.8vw;
  445. height: 13.8vw;
  446. background: url(~assets/theme-images/ross/h5-icon-auth-seal.png)
  447. no-repeat center;
  448. background-size: 13.8vw;
  449. right: 4vw;
  450. bottom: 4vw;
  451. z-index: 2;
  452. }
  453. .auth-card {
  454. position: absolute;
  455. width: auto;
  456. height: 20.6vw;
  457. display: block;
  458. bottom: 4vw;
  459. left: 4vw;
  460. z-index: 2;
  461. }
  462. .auth-logo {
  463. position: absolute;
  464. max-width: 18vw;
  465. max-height: 18vw;
  466. top: 4vw;
  467. left: 4vw;
  468. z-index: 2;
  469. }
  470. }
  471. .device-info {
  472. position: relative;
  473. .section {
  474. word-break: break-all;
  475. padding: 4vw 4vw 0;
  476. }
  477. .logo {
  478. width: 18vw;
  479. height: 18vw;
  480. border-radius: 50%;
  481. // background: #d8d8d8;
  482. border: 0.1vw solid #d8d8d8;
  483. box-sizing: border-box;
  484. position: absolute;
  485. right: 4vw;
  486. top: 5.8vw;
  487. .logo-swiper {
  488. width: 18vw;
  489. height: 18vw;
  490. overflow: hidden;
  491. border-radius: 50%;
  492. }
  493. ::v-deep {
  494. img {
  495. width: 18vw;
  496. height: 18vw;
  497. border-radius: 50%;
  498. }
  499. }
  500. &::after {
  501. content: '';
  502. position: absolute;
  503. z-index: 1;
  504. right: 0.7vw;
  505. bottom: 0;
  506. display: block;
  507. width: 3.6vw;
  508. height: 3.6vw;
  509. background: url(~assets/theme-images/ross/h5-icon-auth-ren.png)
  510. no-repeat center;
  511. background-size: 3.6vw;
  512. }
  513. img {
  514. display: block;
  515. width: 100%;
  516. height: 100%;
  517. // background: pink;
  518. border-radius: 50%;
  519. }
  520. }
  521. .name {
  522. font-size: 5.4vw;
  523. color: #282828;
  524. line-height: 7.4vw;
  525. margin-bottom: 2.4vw;
  526. font-weight: bold;
  527. }
  528. .sncode.pc {
  529. display: none;
  530. }
  531. .sncode.mobile {
  532. margin: 2.4vw 0 5.6vw;
  533. color: #282828;
  534. font-size: 4vw;
  535. }
  536. .row {
  537. line-height: 4.7vw;
  538. i {
  539. position: relative;
  540. margin: 0 4vw;
  541. &::after {
  542. content: '';
  543. display: block;
  544. width: 0.2vw;
  545. height: 3vw;
  546. background: #282828;
  547. position: absolute;
  548. top: 1vw;
  549. left: 0;
  550. }
  551. }
  552. span {
  553. font-size: 3.6vw;
  554. color: #282828;
  555. }
  556. }
  557. .row,
  558. .maker {
  559. margin-bottom: 1.2vw;
  560. }
  561. .supplier,
  562. .maker {
  563. font-size: 3.6vw;
  564. color: #282828;
  565. }
  566. .auth {
  567. // width: 100%;
  568. margin: 0 4vw;
  569. min-height: 20vw;
  570. @include themify($themes) {
  571. background: themed('color') !important;
  572. }
  573. margin-top: 4vw;
  574. box-sizing: border-box;
  575. padding: 5.2vw 4vw;
  576. border-radius: 1.2vw;
  577. .auth-icon {
  578. height: 4.9vw;
  579. background: url(~assets/theme-images/ross/h5-icon-auth.png)
  580. no-repeat left center;
  581. background-size: auto 4.9vw;
  582. margin-bottom: 1vw;
  583. }
  584. .auth-info {
  585. font-size: 0;
  586. span {
  587. font-size: 3.6vw;
  588. line-height: 6.4vw;
  589. color: #fff;
  590. font-weight: bold;
  591. }
  592. }
  593. }
  594. }
  595. }
  596. .page-content {
  597. .device-params {
  598. padding: 8vw 4vw;
  599. box-sizing: border-box;
  600. .title {
  601. font-size: 4.6vw;
  602. color: #282828;
  603. font-weight: bold;
  604. }
  605. .line {
  606. // height: 0.2vw;
  607. // background: #ececec;
  608. position: relative;
  609. margin-top: 4.7vw;
  610. margin-bottom: 1.2vw;
  611. }
  612. .params {
  613. width: 100%;
  614. word-break: break-all;
  615. text-align: justify;
  616. .row {
  617. display: table-row;
  618. width: 100%;
  619. &:first-child {
  620. .col {
  621. padding-top: 0;
  622. }
  623. }
  624. &:last-child {
  625. .col {
  626. padding-bottom: 0;
  627. }
  628. }
  629. }
  630. .col {
  631. display: table-cell;
  632. font-size: 3.6vw;
  633. padding: 1.6vw 0;
  634. &:nth-child(2n-1) {
  635. color: #282828;
  636. padding-right: 3.2vw;
  637. font-weight: bold;
  638. white-space: nowrap;
  639. border-right: 0.2vw solid #d8d8d8;
  640. }
  641. &:nth-child(2n) {
  642. color: #4e4e4e;
  643. padding-left: 3.2vw;
  644. }
  645. }
  646. }
  647. }
  648. }
  649. }
  650. }
  651. </style>