detail.vue 15 KB

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