detail.vue 14 KB

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