detail.vue 17 KB

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