detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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" style="display: none;"></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" style="display: none;">
  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="#f3920d"
  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-ross',
  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. @include useTheme() {
  113. position: relative;
  114. width: 1200px;
  115. height: 612px;
  116. margin-left: auto;
  117. margin-right: auto;
  118. margin-top: 80px;
  119. background-color: #fff;
  120. box-sizing: border-box;
  121. padding: 16px;
  122. padding-right: 0;
  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/ross/h5-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: #f3920d;
  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/ross/h5-icon-auth.png)
  214. no-repeat 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: #f3920d;
  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: fetch('pc-icon-mobile');
  267. }
  268. }
  269. .address {
  270. &::after {
  271. background-image: fetch('h5-icon-address');
  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/ross/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: #f3920d;
  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: fetch('pc-icon-navigation') no-repeat center;
  315. background-size: 16px;
  316. }
  317. }
  318. .distance {
  319. font-size: 14px;
  320. color: #fff;
  321. }
  322. }
  323. .device-list {
  324. .title {
  325. position: relative;
  326. font-size: 20px;
  327. font-weight: bold;
  328. color: #282828;
  329. line-height: 30px;
  330. padding-left: 32px;
  331. margin-top: 46px;
  332. margin-bottom: 24px;
  333. &::before {
  334. content: '';
  335. display: block;
  336. width: 30px;
  337. height: 30px;
  338. background: url(~assets/theme-images/ross/pc-icon-device-list.png)
  339. no-repeat center;
  340. position: absolute;
  341. left: 0;
  342. top: 0;
  343. }
  344. }
  345. .list {
  346. padding-right: 16px;
  347. }
  348. .device {
  349. padding: 20px 16px;
  350. box-sizing: border-box;
  351. background: #f3f5f6;
  352. margin-top: 16px;
  353. &:first-child {
  354. margin-top: 0;
  355. }
  356. .info {
  357. width: 80%;
  358. .name {
  359. font-size: 18px;
  360. color: #282828;
  361. }
  362. .code {
  363. margin-top: 12px;
  364. font-size: 14px;
  365. color: #666;
  366. }
  367. }
  368. .detail {
  369. display: flex;
  370. justify-content: center;
  371. align-items: center;
  372. width: 80px;
  373. height: 32px;
  374. border-radius: 4px;
  375. font-size: 14px;
  376. color: #ffffff;
  377. cursor: pointer;
  378. background: fetch('color');
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. // 移动 端
  387. @media screen and (max-width: 768px) {
  388. .page {
  389. @include useTheme() {
  390. .page-title {
  391. display: none;
  392. }
  393. .auth-card-content {
  394. width: 100vw;
  395. height: 100vh;
  396. position: fixed;
  397. left: 0;
  398. top: 0;
  399. display: flex;
  400. justify-content: center;
  401. align-items: center;
  402. z-index: 9;
  403. .auth-card-popup {
  404. position: relative;
  405. width: 86vw;
  406. img {
  407. display: block;
  408. width: 100%;
  409. height: auto;
  410. }
  411. .el-icon-circle-close {
  412. position: absolute;
  413. top: -8vw;
  414. right: 0;
  415. font-size: 7vw;
  416. color: #fff;
  417. cursor: pointer;
  418. }
  419. }
  420. }
  421. .page-top {
  422. .swiper {
  423. position: relative;
  424. height: 100vw;
  425. background: #f7f7f7;
  426. ::v-deep {
  427. img {
  428. height: 100vw;
  429. }
  430. }
  431. .auth-card {
  432. position: absolute;
  433. width: auto;
  434. height: 20.6vw;
  435. display: block;
  436. bottom: 4vw;
  437. left: 4vw;
  438. z-index: 2;
  439. }
  440. }
  441. }
  442. .page-content {
  443. .bg-container {
  444. background: url(~assets/theme-images/ross/h5-club-info-bg.png) center
  445. no-repeat;
  446. background-size: 100vw;
  447. box-sizing: border-box;
  448. background-position-y: 4vw;
  449. background-color: #f3920d;
  450. padding-bottom: 5vw;
  451. }
  452. .auth {
  453. width: 92vw;
  454. box-sizing: border-box;
  455. background: #fef5e8;
  456. margin: 0 auto;
  457. margin-top: 3.2vw;
  458. padding: 4vw 3.5vw;
  459. border-radius: 0.8vw;
  460. .auth-icon {
  461. height: 6.2vw;
  462. background: url(~assets/theme-images/ross/h5-icon-auth.png)
  463. no-repeat left center;
  464. background-size: auto 6.2vw;
  465. }
  466. .auth-info {
  467. font-size: 0;
  468. margin-top: 2.2vw;
  469. span {
  470. font-size: 3.6vw;
  471. line-height: 5.8vw;
  472. color: #f3920d;
  473. &.font-bold {
  474. font-weight: bold;
  475. }
  476. }
  477. }
  478. }
  479. .club-info {
  480. padding: 4vw;
  481. width: 100vw;
  482. min-height: 43.4vw;
  483. .info {
  484. width: 67vw;
  485. .name {
  486. font-size: 4.8vw;
  487. color: #fff;
  488. font-weight: bold;
  489. margin-bottom: 4vw;
  490. }
  491. .mobile,
  492. .address {
  493. position: relative;
  494. padding-left: 5vw;
  495. margin-top: 1.6vw;
  496. line-height: 5vw;
  497. font-size: 3.2vw;
  498. color: #fff;
  499. &::after {
  500. content: '';
  501. display: block;
  502. width: 4vw;
  503. height: 5vw;
  504. position: absolute;
  505. left: 0;
  506. top: 0;
  507. background-size: 4vw 4vw;
  508. background-repeat: no-repeat;
  509. background-position: center;
  510. }
  511. }
  512. .mobile {
  513. &::after {
  514. background-image: fetch('h5-icon-mobile');
  515. }
  516. }
  517. .address {
  518. &::after {
  519. background-image: fetch('h5-icon-address');
  520. }
  521. }
  522. }
  523. .logo {
  524. position: relative;
  525. width: 18vw;
  526. height: 18vw;
  527. border-radius: 9vw 9vw 0 9vw;
  528. overflow: hidden;
  529. background: #fff;
  530. display: flex;
  531. &::after {
  532. position: absolute;
  533. bottom: 0;
  534. right: 0;
  535. content: '';
  536. display: block;
  537. width: 3.6vw;
  538. height: 3.6vw;
  539. background: url(~assets/theme-images/ross/h5-icon-avatar-v.png)
  540. no-repeat center;
  541. background-size: 3.6vw;
  542. }
  543. }
  544. .navigation {
  545. display: flex;
  546. justify-content: center;
  547. align-items: center;
  548. width: 14.4vw;
  549. height: 6.4vw;
  550. border-radius: 0.4vw;
  551. font-size: 3.2vw;
  552. color: #f3920d;
  553. border: 1px solid #fff;
  554. background-color: #fff;
  555. &::after {
  556. content: '';
  557. display: block;
  558. width: 3.6vw;
  559. height: 3.6vw;
  560. margin-left: 0.4vw;
  561. background: fetch('h5-icon-navigation') no-repeat center;
  562. background-size: 3.6vw;
  563. }
  564. }
  565. .distance {
  566. font-size: 3vw;
  567. color: #fff;
  568. }
  569. }
  570. .device-list {
  571. padding: 0 4vw;
  572. .title {
  573. position: relative;
  574. padding-left: 6.8vw;
  575. margin-top: 9.6vw;
  576. margin-bottom: 4vw;
  577. font-size: 4vw;
  578. font-weight: bold;
  579. color: #101010;
  580. &::before {
  581. content: '';
  582. display: block;
  583. width: 4.4vw;
  584. height: 4.4vw;
  585. background: url(~assets/theme-images/ross/h5-icon-device-list.png)
  586. no-repeat center;
  587. position: absolute;
  588. left: 0;
  589. top: 0;
  590. }
  591. }
  592. .device {
  593. padding: 4.4vw 3.2vw;
  594. background: #f3f5f6;
  595. margin-bottom: 3.2vw;
  596. .info {
  597. width: 74%;
  598. .name {
  599. font-size: 3.6vw;
  600. color: #282828;
  601. }
  602. .code {
  603. margin-top: 3.2vw;
  604. font-size: 3vw;
  605. color: #666;
  606. }
  607. }
  608. .detail {
  609. display: flex;
  610. justify-content: center;
  611. align-items: center;
  612. width: 15.8vw;
  613. height: 6.4vw;
  614. border-radius: 0.4vw;
  615. font-size: 3vw;
  616. color: #ffffff;
  617. background: fetch('color');
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. }
  625. </style>