detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  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 class="brand">品牌:{{ productInfo.brandName }}</span>
  27. <span class="place">产地:{{ 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-hyt',
  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: #4093b5 !important;
  91. }
  92. .simple-swiper {
  93. .swiper-pagination-bullet-active {
  94. background: #4093b5;
  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/hyt/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/hyt/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. .brand,
  258. .place {
  259. display: block;
  260. }
  261. .brand {
  262. margin-bottom: 8px;
  263. }
  264. .row {
  265. line-height: 24px;
  266. i {
  267. position: relative;
  268. margin: 0 16px;
  269. &::after {
  270. content: '';
  271. display: block;
  272. width: 1px;
  273. height: 16px;
  274. background: #999999;
  275. position: absolute;
  276. top: 0;
  277. left: 0;
  278. }
  279. }
  280. span {
  281. font-size: 18px;
  282. color: #999999;
  283. }
  284. }
  285. .sncode.mobile {
  286. display: none;
  287. }
  288. .sncode.pc {
  289. font-size: 18px;
  290. color: #282828;
  291. }
  292. .supplier,
  293. .maker {
  294. font-size: 20px;
  295. color: #282828;
  296. }
  297. .auth {
  298. width: 100%;
  299. min-height: 114px;
  300. background: #4093b5;
  301. margin-top: 56px;
  302. box-sizing: border-box;
  303. padding: 24px;
  304. .auth-icon {
  305. height: 28px;
  306. background: url(~assets/theme-images/hyt/pc/icon-auth2.png) no-repeat left center;
  307. background-size: auto 28px;
  308. margin-bottom: 10px;
  309. }
  310. .auth-info {
  311. font-size: 0;
  312. span {
  313. font-size: 20px;
  314. color: #fff;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. .page-content {
  321. margin-top: 16px;
  322. box-sizing: border-box;
  323. padding: 24px;
  324. .device-params {
  325. .title {
  326. font-size: 28px;
  327. color: #282828;
  328. font-weight: bold;
  329. }
  330. .line {
  331. height: 1px;
  332. background: #ececec;
  333. position: relative;
  334. margin-top: 10px;
  335. margin-bottom: 20px;
  336. &::after {
  337. content: '';
  338. position: absolute;
  339. width: 73px;
  340. height: 2px;
  341. background: #4093b5;
  342. left: 0;
  343. bottom: 0;
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. // 移动端
  351. @media screen and (max-width: 768px) {
  352. .device-detail {
  353. .detail-title {
  354. display: none;
  355. }
  356. .auth-card-content {
  357. width: 100vw;
  358. height: 100vh;
  359. position: fixed;
  360. left: 0;
  361. top: 0;
  362. display: flex;
  363. justify-content: center;
  364. align-items: center;
  365. z-index: 9;
  366. .auth-card-popup {
  367. position: relative;
  368. width: 86vw;
  369. img {
  370. display: block;
  371. width: 100%;
  372. height: auto;
  373. }
  374. .el-icon-circle-close {
  375. position: absolute;
  376. top: -8vw;
  377. right: 0;
  378. font-size: 7vw;
  379. color: #fff;
  380. cursor: pointer;
  381. }
  382. }
  383. }
  384. .page-top,
  385. .page-content {
  386. margin: 0 auto;
  387. background: #fff;
  388. }
  389. .page-top {
  390. .swiper-body {
  391. position: relative;
  392. width: 100vw;
  393. height: 100vw;
  394. background: #f7f7f7;
  395. .device-image {
  396. width: 100%;
  397. height: 100%;
  398. }
  399. ::v-deep {
  400. img {
  401. width: 100vw;
  402. height: 100vw;
  403. }
  404. }
  405. .auth-seal {
  406. position: absolute;
  407. width: 13.8vw;
  408. height: 13.8vw;
  409. background: url(~assets/theme-images/hyt/h5/icon-auth-seal.png) no-repeat center;
  410. background-size: 13.8vw;
  411. right: 4vw;
  412. bottom: 4vw;
  413. z-index: 2;
  414. }
  415. .auth-card {
  416. position: absolute;
  417. width: auto;
  418. height: 20.6vw;
  419. display: block;
  420. bottom: 4vw;
  421. left: 4vw;
  422. z-index: 2;
  423. }
  424. .auth-logo {
  425. position: absolute;
  426. max-width: 18vw;
  427. max-height: 18vw;
  428. top: 4vw;
  429. left: 4vw;
  430. z-index: 2;
  431. }
  432. }
  433. .device-info {
  434. position: relative;
  435. .section {
  436. word-break: break-all;
  437. padding: 4vw 4vw 0;
  438. }
  439. .logo {
  440. width: 18vw;
  441. height: 18vw;
  442. border-radius: 50%;
  443. // background: #d8d8d8;
  444. border: 0.1vw solid #d8d8d8;
  445. box-sizing: border-box;
  446. position: absolute;
  447. right: 4vw;
  448. top: 5.8vw;
  449. .logo-swiper {
  450. width: 18vw;
  451. height: 18vw;
  452. overflow: hidden;
  453. border-radius: 50%;
  454. }
  455. ::v-deep {
  456. img {
  457. width: 18vw;
  458. height: 18vw;
  459. border-radius: 50%;
  460. }
  461. }
  462. &::after {
  463. content: '';
  464. position: absolute;
  465. z-index: 1;
  466. right: 0.7vw;
  467. bottom: 0;
  468. display: block;
  469. width: 3.6vw;
  470. height: 3.6vw;
  471. background: url(~assets/theme-images/hyt/h5/icon-auth-ren.png) no-repeat center;
  472. background-size: 3.6vw;
  473. }
  474. img {
  475. display: block;
  476. width: 100%;
  477. height: 100%;
  478. // background: pink;
  479. border-radius: 50%;
  480. }
  481. }
  482. .name {
  483. font-size: 5.4vw;
  484. color: #282828;
  485. line-height: 7.4vw;
  486. margin-bottom: 2.4vw;
  487. font-weight: bold;
  488. max-width: 70vw;
  489. }
  490. .sncode.pc {
  491. display: none;
  492. }
  493. .sncode.mobile {
  494. margin: 2.4vw 0 5.6vw;
  495. color: #282828;
  496. font-size: 4vw;
  497. }
  498. .row {
  499. line-height: 4.7vw;
  500. i {
  501. position: relative;
  502. margin: 0 4vw;
  503. &::after {
  504. content: '';
  505. display: block;
  506. width: 0.2vw;
  507. height: 3vw;
  508. background: #282828;
  509. position: absolute;
  510. top: 1vw;
  511. left: 0;
  512. }
  513. }
  514. span {
  515. font-size: 3.6vw;
  516. color: #282828;
  517. }
  518. }
  519. .row,
  520. .maker {
  521. margin-bottom: 1.2vw;
  522. }
  523. .brand,
  524. .place {
  525. display: block;
  526. }
  527. .brand {
  528. margin-bottom: 1.2vw;
  529. }
  530. .supplier,
  531. .maker {
  532. font-size: 3.6vw;
  533. color: #282828;
  534. }
  535. .auth {
  536. // width: 100%;
  537. margin: 0 4vw;
  538. min-height: 20vw;
  539. background: #4093b5;
  540. margin-top: 4vw;
  541. box-sizing: border-box;
  542. padding: 5.2vw 4vw;
  543. border-radius: 1.2vw;
  544. .auth-icon {
  545. height: 4.9vw;
  546. background: url(~assets/theme-images/hyt/h5/icon-auth2.png) no-repeat left center;
  547. background-size: auto 4.9vw;
  548. margin-bottom: 1vw;
  549. }
  550. .auth-info {
  551. font-size: 0;
  552. span {
  553. font-size: 3.6vw;
  554. line-height: 6.4vw;
  555. color: #fff;
  556. font-weight: bold;
  557. }
  558. }
  559. }
  560. }
  561. }
  562. .page-content {
  563. .device-params {
  564. padding: 8vw 4vw;
  565. box-sizing: border-box;
  566. .title {
  567. font-size: 4.6vw;
  568. color: #282828;
  569. font-weight: bold;
  570. }
  571. .line {
  572. position: relative;
  573. margin-top: 4.7vw;
  574. margin-bottom: 1.2vw;
  575. }
  576. }
  577. }
  578. }
  579. }
  580. </style>