detail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. <template>
  2. <div class="page md:flex md:justify-between">
  3. <div class="page-title">机构认证</div>
  4. <div class="page-top">
  5. <div class="swiper">
  6. <SimpleSwiper :imageList="clubInfo.bannerList"></SimpleSwiper>
  7. <img
  8. class="auth-card"
  9. :src="authCardImage"
  10. @click="onShowAuthCard"
  11. v-if="!showAuthCard"
  12. />
  13. </div>
  14. </div>
  15. <div class="page-content">
  16. <div class="bg-container">
  17. <!-- 机构信息 -->
  18. <div class="club-info">
  19. <div class="section flex justify-between items-center">
  20. <div class="info">
  21. <div class="name" v-text="clubInfo.authParty"></div>
  22. <div class="mobile" @click="callMobile(clubInfo.mobile)">
  23. {{ clubInfo.mobile | formatEmpty }}
  24. </div>
  25. <div class="address" v-text="address"></div>
  26. </div>
  27. <div class="logo"><img :src="clubInfo.logo" /></div>
  28. </div>
  29. <div class="section flex justify-between items-center mt-6">
  30. <div class="navigation" @click="onMapNav">导航</div>
  31. <div
  32. class="distance"
  33. v-if="clubInfo.distance && clubInfo.distance < 99999"
  34. v-text="'距你' + clubInfo.distance + 'km'"
  35. ></div>
  36. </div>
  37. </div>
  38. <!-- 机构授权信息 -->
  39. <div class="auth">
  40. <div class="auth-icon"></div>
  41. <div class="auth-info">
  42. <span>该机构由</span>
  43. <span class="font-bold">{{ supplierInfo.shopName }}</span>
  44. <span class="font-bold">官方授权</span>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- 分割 -->
  49. <div class="divider"></div>
  50. <div class="device-list">
  51. <div class="title">已认证设备</div>
  52. <div class="list">
  53. <div
  54. class="device flex justify-between items-center"
  55. v-for="item in clubInfo.productList"
  56. :key="item.productId"
  57. >
  58. <div class="info">
  59. <div class="name" v-text="item.productName"></div>
  60. <div class="code">SN码:{{ item.snCode | formatSnCode }}</div>
  61. </div>
  62. <div class="detail" @click="toDetail(item)">查看认证</div>
  63. </div>
  64. </div>
  65. </div>
  66. <SimpleEmpty
  67. v-if="isEmpty"
  68. name="icon-empty-device.png"
  69. description="暂无已认证设备"
  70. ></SimpleEmpty>
  71. </div>
  72. <SimpleMapNav
  73. ref="mapNav"
  74. @click="navigation"
  75. color="#BC1724"
  76. ></SimpleMapNav>
  77. <!-- 授权牌弹窗 -->
  78. <div class="mask" v-if="showAuthCard" @click="onHideAuthCard"></div>
  79. <transition
  80. enter-active-class="animate__zoomIn"
  81. leave-active-class="animate__zoomOut"
  82. >
  83. <div class="auth-card-content animate__animated" v-if="showAuthCard">
  84. <div class="auth-card-popup">
  85. <span class="el-icon-circle-close" @click="onHideAuthCard"></span>
  86. <img :src="authCardImage" />
  87. </div>
  88. </div>
  89. </transition>
  90. </div>
  91. </template>
  92. <script>
  93. import clubDetailMixin from '@/mixins/clubDetail'
  94. export default {
  95. layout: 'app-normal',
  96. mixins: [clubDetailMixin],
  97. }
  98. </script>
  99. <style scoped lang="scss">
  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. .page {
  112. position: relative;
  113. width: 1200px;
  114. height: 612px;
  115. margin-left: auto;
  116. margin-right: auto;
  117. margin-top: 80px;
  118. background-color: #fff;
  119. box-sizing: border-box;
  120. padding: 16px;
  121. padding-right: 0;
  122. }
  123. .auth-card-content {
  124. width: 100vw;
  125. height: 100vh;
  126. position: fixed;
  127. left: 0;
  128. top: 0;
  129. display: flex;
  130. justify-content: center;
  131. align-items: center;
  132. z-index: 9;
  133. .auth-card-popup {
  134. position: relative;
  135. width: 622px;
  136. img {
  137. display: block;
  138. width: 100%;
  139. height: auto;
  140. }
  141. .el-icon-circle-close {
  142. position: absolute;
  143. top: -50px;
  144. right: 0;
  145. font-size: 32px;
  146. color: #fff;
  147. cursor: pointer;
  148. }
  149. }
  150. }
  151. .page-title {
  152. position: absolute;
  153. font-size: 24px;
  154. color: #333;
  155. top: -50px;
  156. left: 0;
  157. }
  158. .page-top {
  159. margin-right: 24px;
  160. .swiper {
  161. position: relative;
  162. width: 580px;
  163. height: 580px;
  164. background: #f7f7f7;
  165. ::v-deep {
  166. img {
  167. width: 580px;
  168. height: 580px;
  169. }
  170. }
  171. .auth-card {
  172. position: absolute;
  173. width: auto;
  174. height: 110px;
  175. display: block;
  176. bottom: 24px;
  177. left: 24px;
  178. z-index: 2;
  179. cursor: pointer;
  180. }
  181. }
  182. }
  183. .page-content {
  184. width: 580px;
  185. overflow-y: auto;
  186. &::-webkit-scrollbar {
  187. width: 8px;
  188. // background-color: #eeeeee;
  189. }
  190. &::-webkit-scrollbar-thumb {
  191. border-radius: 4px;
  192. background-color: #eeeeee;
  193. }
  194. .bg-container {
  195. background: url(~assets/theme-images/normal/pc/club-info-bg.png) center
  196. no-repeat;
  197. background-size: 100%;
  198. box-sizing: border-box;
  199. background-position-y: 20px;
  200. background-color: #e03f4c;
  201. padding-bottom: 24px;
  202. }
  203. .auth {
  204. width: 524px;
  205. box-sizing: border-box;
  206. background: #fef5e8;
  207. margin: 0 auto;
  208. margin-top: 8px;
  209. padding: 12px 16px;
  210. border-radius: 2px;
  211. .auth-icon {
  212. height: 28px;
  213. background: url(~assets/theme-images/normal/pc/icon-auth.png) no-repeat
  214. left center;
  215. background-size: auto 28px;
  216. }
  217. .auth-info {
  218. font-size: 0;
  219. margin-top: 10px;
  220. span {
  221. font-size: 20px;
  222. line-height: 1.6;
  223. color: #bc1724;
  224. &.font-bold {
  225. font-weight: bold;
  226. }
  227. }
  228. }
  229. }
  230. .club-info {
  231. padding: 32px 24px;
  232. width: 564px;
  233. min-height: 264px;
  234. .info {
  235. width: 360px;
  236. .name {
  237. font-size: 24px;
  238. color: #fff;
  239. font-weight: bold;
  240. margin-bottom: 34px;
  241. }
  242. .mobile,
  243. .address {
  244. position: relative;
  245. padding-left: 28px;
  246. margin-top: 16px;
  247. line-height: 24px;
  248. font-size: 16px;
  249. color: #fff;
  250. &::after {
  251. content: '';
  252. display: block;
  253. width: 24px;
  254. height: 24px;
  255. position: absolute;
  256. left: 0;
  257. top: 0;
  258. background-size: 20px;
  259. background-repeat: no-repeat;
  260. background-position: center;
  261. }
  262. }
  263. .mobile {
  264. cursor: pointer;
  265. &::after {
  266. background-image: url(~assets/theme-images/normal/pc/icon-mobile.png);
  267. }
  268. }
  269. .address {
  270. &::after {
  271. background-image: url(~assets/theme-images/normal/pc/icon-address.png);
  272. }
  273. }
  274. }
  275. .logo {
  276. position: relative;
  277. width: 114px;
  278. height: 114px;
  279. border-radius: 50% 50% 0 50%;
  280. overflow: hidden;
  281. background: #fff;
  282. display: flex;
  283. &::after {
  284. position: absolute;
  285. bottom: 0;
  286. right: 0;
  287. content: '';
  288. display: block;
  289. width: 23px;
  290. height: 23px;
  291. background: url(~assets/theme-images/normal/pc/icon-avatar-v.png)
  292. no-repeat center;
  293. background-size: 23px;
  294. }
  295. }
  296. .navigation {
  297. display: flex;
  298. justify-content: center;
  299. align-items: center;
  300. width: 72px;
  301. height: 32px;
  302. border-radius: 4px;
  303. font-size: 16px;
  304. color: #bc1724;
  305. border: 1px solid #fff;
  306. background-color: #fff;
  307. cursor: pointer;
  308. &::after {
  309. content: '';
  310. display: block;
  311. width: 16px;
  312. height: 16px;
  313. margin-left: 4px;
  314. background: url(~assets/theme-images/normal/pc/icon-navigation.png)
  315. no-repeat center;
  316. background-size: 16px;
  317. }
  318. }
  319. .distance {
  320. font-size: 14px;
  321. color: #fff;
  322. }
  323. }
  324. .device-list {
  325. .title {
  326. position: relative;
  327. font-size: 20px;
  328. font-weight: bold;
  329. color: #282828;
  330. line-height: 30px;
  331. padding-left: 32px;
  332. margin-top: 46px;
  333. margin-bottom: 24px;
  334. &::before {
  335. content: '';
  336. display: block;
  337. width: 30px;
  338. height: 30px;
  339. background: url(~assets/theme-images/normal/pc/icon-device-list.png)
  340. no-repeat center;
  341. position: absolute;
  342. left: 0;
  343. top: 0;
  344. }
  345. }
  346. .list {
  347. padding-right: 16px;
  348. }
  349. .device {
  350. padding: 20px 16px;
  351. box-sizing: border-box;
  352. background: #f3f5f6;
  353. margin-top: 16px;
  354. &:first-child {
  355. margin-top: 0;
  356. }
  357. .info {
  358. width: 80%;
  359. .name {
  360. font-size: 18px;
  361. color: #282828;
  362. }
  363. .code {
  364. margin-top: 12px;
  365. font-size: 14px;
  366. color: #666;
  367. }
  368. }
  369. .detail {
  370. display: flex;
  371. justify-content: center;
  372. align-items: center;
  373. width: 80px;
  374. height: 32px;
  375. border-radius: 4px;
  376. font-size: 14px;
  377. color: #ffffff;
  378. cursor: pointer;
  379. color: #bc1724;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. // 移动 端
  386. @media screen and (max-width: 768px) {
  387. .page-title {
  388. display: none;
  389. }
  390. .auth-card-content {
  391. width: 100vw;
  392. height: 100vh;
  393. position: fixed;
  394. left: 0;
  395. top: 0;
  396. display: flex;
  397. justify-content: center;
  398. align-items: center;
  399. z-index: 9;
  400. .auth-card-popup {
  401. position: relative;
  402. width: 86vw;
  403. img {
  404. display: block;
  405. width: 100%;
  406. height: auto;
  407. }
  408. .el-icon-circle-close {
  409. position: absolute;
  410. top: -8vw;
  411. right: 0;
  412. font-size: 7vw;
  413. color: #fff;
  414. cursor: pointer;
  415. }
  416. }
  417. }
  418. .page-top {
  419. .swiper {
  420. position: relative;
  421. height: 100vw;
  422. background: #f7f7f7;
  423. ::v-deep {
  424. img {
  425. height: 100vw;
  426. }
  427. }
  428. .auth-card {
  429. position: absolute;
  430. width: auto;
  431. height: 20.6vw;
  432. display: block;
  433. bottom: 4vw;
  434. left: 4vw;
  435. z-index: 2;
  436. }
  437. }
  438. }
  439. .page-content {
  440. .bg-container {
  441. background: url(~assets/theme-images/normal/h5/club-info-bg.png) center
  442. no-repeat;
  443. background-size: 100vw;
  444. box-sizing: border-box;
  445. background-position-y: 4vw;
  446. background-color: #e03f4c;
  447. padding-bottom: 5vw;
  448. }
  449. .auth {
  450. width: 92vw;
  451. box-sizing: border-box;
  452. background: #fef5e8;
  453. margin: 0 auto;
  454. margin-top: 3.2vw;
  455. padding: 4vw 3.5vw;
  456. border-radius: 0.8vw;
  457. .auth-icon {
  458. height: 6.2vw;
  459. background: url(~assets/theme-images/normal/h5/icon-auth.png) no-repeat
  460. left center;
  461. background-size: auto 6.2vw;
  462. }
  463. .auth-info {
  464. font-size: 0;
  465. margin-top: 2.2vw;
  466. span {
  467. font-size: 3.6vw;
  468. line-height: 5.8vw;
  469. color: #bc1724;
  470. &.font-bold {
  471. font-weight: bold;
  472. }
  473. }
  474. }
  475. }
  476. .club-info {
  477. padding: 4vw;
  478. width: 100vw;
  479. min-height: 43.4vw;
  480. .info {
  481. width: 67vw;
  482. .name {
  483. font-size: 4.8vw;
  484. color: #fff;
  485. font-weight: bold;
  486. margin-bottom: 4vw;
  487. }
  488. .mobile,
  489. .address {
  490. position: relative;
  491. padding-left: 5vw;
  492. margin-top: 1.6vw;
  493. line-height: 5vw;
  494. font-size: 3.2vw;
  495. color: #fff;
  496. &::after {
  497. content: '';
  498. display: block;
  499. width: 4vw;
  500. height: 5vw;
  501. position: absolute;
  502. left: 0;
  503. top: 0;
  504. background-size: 4vw 4vw;
  505. background-repeat: no-repeat;
  506. background-position: center;
  507. }
  508. }
  509. .mobile {
  510. &::after {
  511. background-image: url(~assets/theme-images/normal/pc/icon-mobile.png);
  512. }
  513. }
  514. .address {
  515. &::after {
  516. background-image: url(~assets/theme-images/normal/pc/icon-address.png);
  517. }
  518. }
  519. }
  520. .logo {
  521. position: relative;
  522. width: 18vw;
  523. height: 18vw;
  524. border-radius: 9vw 9vw 0 9vw;
  525. overflow: hidden;
  526. background: #fff;
  527. display: flex;
  528. &::after {
  529. position: absolute;
  530. bottom: 0;
  531. right: 0;
  532. content: '';
  533. display: block;
  534. width: 3.6vw;
  535. height: 3.6vw;
  536. background: url(~assets/theme-images/normal/h5/icon-avatar-v.png)
  537. no-repeat center;
  538. background-size: 3.6vw;
  539. }
  540. }
  541. .navigation {
  542. display: flex;
  543. justify-content: center;
  544. align-items: center;
  545. width: 14.4vw;
  546. height: 6.4vw;
  547. border-radius: 0.4vw;
  548. font-size: 3.2vw;
  549. color: #bc1724;
  550. border: 1px solid #fff;
  551. background-color: #fff;
  552. &::after {
  553. content: '';
  554. display: block;
  555. width: 3.6vw;
  556. height: 3.6vw;
  557. margin-left: 0.4vw;
  558. background: url(~assets/theme-images/normal/pc/icon-navigation.png)
  559. no-repeat center;
  560. background-size: 3.6vw;
  561. }
  562. }
  563. .distance {
  564. font-size: 3vw;
  565. color: #fff;
  566. }
  567. }
  568. .device-list {
  569. padding: 0 4vw;
  570. .title {
  571. position: relative;
  572. padding-left: 6.8vw;
  573. margin-top: 9.6vw;
  574. margin-bottom: 4vw;
  575. font-size: 4vw;
  576. font-weight: bold;
  577. color: #101010;
  578. &::before {
  579. content: '';
  580. display: block;
  581. width: 4.4vw;
  582. height: 4.4vw;
  583. background: url(~assets/theme-images/normal/h5/icon-device-list.png)
  584. no-repeat center;
  585. position: absolute;
  586. left: 0;
  587. top: 0;
  588. }
  589. }
  590. .device {
  591. padding: 4.4vw 3.2vw;
  592. background: #f3f5f6;
  593. margin-bottom: 3.2vw;
  594. .info {
  595. width: 74%;
  596. .name {
  597. font-size: 3.6vw;
  598. color: #282828;
  599. }
  600. .code {
  601. margin-top: 3.2vw;
  602. font-size: 3vw;
  603. color: #666;
  604. }
  605. }
  606. .detail {
  607. display: flex;
  608. justify-content: center;
  609. align-items: center;
  610. width: 15.8vw;
  611. height: 6.4vw;
  612. border-radius: 0.4vw;
  613. font-size: 3vw;
  614. color: #ffffff;
  615. background: #bc1724;
  616. }
  617. }
  618. }
  619. }
  620. }
  621. </style>