detail.vue 15 KB

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