detail.vue 14 KB

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