detail.vue 14 KB

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