detail.vue 17 KB

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