detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <template>
  2. <div class="page">
  3. <div class="page-top">
  4. <div class="swiper">
  5. <SimpleSwiper :imageList="clubInfo.bannerList"></SimpleSwiper>
  6. </div>
  7. <div class="club-info">
  8. <img class="logo" :src="clubInfo.logo" />
  9. <div class="name" v-text="clubInfo.authParty"></div>
  10. <div class="remark" v-if="clubInfo.remarks">
  11. 认证设备:{{ clubInfo.remarks }}
  12. </div>
  13. </div>
  14. </div>
  15. <div class="page-content">
  16. <div class="club-info">
  17. <div class="address" v-text="address"></div>
  18. <div class="mobile">{{ clubInfo.mobile | formatEmpty }}</div>
  19. <div class="navigation" @click="onMapNav">导航过去</div>
  20. </div>
  21. <!-- 列表标题 -->
  22. <div class="title">明星操作师</div>
  23. <!-- 列表 -->
  24. <div class="list">
  25. <div
  26. class="section flex items-center"
  27. v-for="(item, index) in clubInfo.doctorList"
  28. :key="index"
  29. >
  30. <img :src="item.doctorImage" class="cover" />
  31. <div class="info">
  32. <div class="name" v-text="item.doctorName"></div>
  33. <div class="tag" v-text="item.tagList.join(' | ')"></div>
  34. <div class="more" @click="toDetail(item)">点击查看</div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <SimpleMapNav ref="mapNav" color="black" @click="navigation"></SimpleMapNav>
  40. </div>
  41. </template>
  42. <script>
  43. import { drawLogo } from '@/utils'
  44. import { mapNavigate } from '@/utils/map-utils'
  45. import { mapGetters } from 'vuex'
  46. export default {
  47. layout: 'app-ldm',
  48. filters: {
  49. formatEmpty(val) {
  50. return val || '未知'
  51. },
  52. },
  53. data() {
  54. return {
  55. authId: '',
  56. clubInfo: {},
  57. }
  58. },
  59. computed: {
  60. ...mapGetters(['routePrefix']),
  61. address() {
  62. return this.clubInfo.area + this.clubInfo.address || '未知'
  63. },
  64. isEmpty() {
  65. return this.clubInfo.productList
  66. ? this.clubInfo.productList.length === 0
  67. : true
  68. },
  69. },
  70. mounted() {
  71. this.initData()
  72. },
  73. beforeDestroy() {
  74. this.$removeStorage(this.routePrefix, 'clubInfo')
  75. },
  76. methods: {
  77. toDetail(row) {
  78. const url = `${this.routePrefix}/approve/personnel/operate/detail?id=${row.doctorId}`
  79. this.$router.push(url)
  80. },
  81. // 初始化
  82. initData() {
  83. this.authId = parseInt(this.$route.query.id)
  84. const clubInfo = this.$getStorage(this.routePrefix, 'clubInfo')
  85. if (clubInfo) {
  86. this.clubInfo = clubInfo
  87. }
  88. this.fetchDetail()
  89. },
  90. // 获取机构详细信息
  91. async fetchDetail() {
  92. try {
  93. const res = await this.$http.api.getAuthClubDetail({
  94. authId: this.authId,
  95. })
  96. this.clubInfo = { ...this.clubInfo, ...res.data } // 合并
  97. } catch (error) {
  98. console.log(error)
  99. }
  100. if (this.clubInfo.bannerList.length <= 0) {
  101. this.clubInfo.bannerList.push('/placeholder.png')
  102. }
  103. if (!this.clubInfo.logo) {
  104. this.clubInfo.logo = drawLogo(this.clubInfo.authParty)
  105. }
  106. },
  107. // 地图导航
  108. onMapNav() {
  109. this.$refs.mapNav.open()
  110. },
  111. // 导航
  112. navigation(type) {
  113. const point = this.clubInfo.lngAndLat.split(',')
  114. const lng = point[0]
  115. const lat = point[1]
  116. mapNavigate(
  117. { lat, lng, title: this.clubInfo.authParty, address: this.address },
  118. type
  119. )
  120. this.$refs.mapNav.close()
  121. },
  122. },
  123. }
  124. </script>
  125. <style scoped lang="scss">
  126. @media screen and (min-width: 768px) {
  127. .page {
  128. display: flex;
  129. justify-content: space-between;
  130. width: 1035px;
  131. margin: 0 auto;
  132. position: relative;
  133. padding-top: 500px;
  134. padding-bottom: 60px;
  135. }
  136. .page-top {
  137. .swiper {
  138. width: 452px;
  139. height: 452px;
  140. background: #f7f7f7;
  141. ::v-deep {
  142. img {
  143. width: 452px;
  144. height: 452px;
  145. }
  146. }
  147. }
  148. .club-info {
  149. width: 100%;
  150. position: absolute;
  151. top: 80px;
  152. text-align: center;
  153. .logo {
  154. display: block;
  155. width: 158px;
  156. height: 158px;
  157. margin: 0 auto;
  158. border-radius: 50%;
  159. box-shadow: 0 4px 24px rgb(200, 200, 200, 0.4);
  160. }
  161. .name {
  162. font-size: 50px;
  163. font-weight: bold;
  164. color: #000000;
  165. margin: 39px 0 26px;
  166. }
  167. .remark {
  168. font-size: 25px;
  169. font-weight: bold;
  170. color: #000000;
  171. }
  172. }
  173. }
  174. .page-content {
  175. width: 507px;
  176. // height: 452px;
  177. // overflow-y: auto;
  178. .club-info {
  179. position: relative;
  180. font-size: 19px;
  181. color: #000000;
  182. border-top: 1px solid rgba(0, 0, 0, 0.169);
  183. border-bottom: 1px solid rgba(0, 0, 0, 0.169);
  184. padding-top: 36px;
  185. padding-bottom: 36px;
  186. .address,
  187. .mobile {
  188. position: relative;
  189. padding-left: 26px;
  190. &::after {
  191. content: '';
  192. display: block;
  193. width: 20px;
  194. height: 20px;
  195. position: absolute;
  196. left: 0;
  197. top: 0;
  198. background-size: auto 20px;
  199. background-repeat: no-repeat;
  200. }
  201. }
  202. .mobile {
  203. margin-top: 34px;
  204. &::after {
  205. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact.png);
  206. }
  207. }
  208. .address {
  209. &::after {
  210. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
  211. }
  212. }
  213. .navigation {
  214. position: absolute;
  215. bottom: 36px;
  216. right: 0;
  217. font-size: 19px;
  218. color: #0080ed;
  219. cursor: pointer;
  220. &::after {
  221. content: '>';
  222. margin-left: 8px;
  223. }
  224. }
  225. }
  226. }
  227. .title {
  228. font-size: 21px;
  229. color: #000;
  230. font-weight: bold;
  231. padding: 40px 0;
  232. &::before {
  233. content: '';
  234. display: inline-block;
  235. width: 24px;
  236. height: 28px;
  237. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge-black.png)
  238. no-repeat center;
  239. background-size: 24px;
  240. vertical-align: -7px;
  241. margin-right: 8px;
  242. }
  243. }
  244. .list {
  245. display: flex;
  246. flex-direction: column;
  247. align-items: center;
  248. border-bottom: 1px solid rgba(0, 0, 0, 0.169);
  249. .section {
  250. width: 100%;
  251. margin-bottom: 32px;
  252. .cover {
  253. display: block;
  254. width: 140px;
  255. height: 140px;
  256. border-radius: 1.7vw;
  257. }
  258. .info {
  259. position: relative;
  260. flex: 1;
  261. margin-left: 18px;
  262. .name {
  263. font-size: 26px;
  264. color: #000;
  265. font-weight: bold;
  266. text-overflow: ellipsis;
  267. overflow: hidden;
  268. white-space: nowrap;
  269. }
  270. .tag {
  271. width: 206px;
  272. font-size: 14px;
  273. color: #000;
  274. text-overflow: ellipsis;
  275. overflow: hidden;
  276. white-space: nowrap;
  277. margin-top: 15px;
  278. }
  279. .more {
  280. position: absolute;
  281. bottom: 0;
  282. right: 0;
  283. font-size: 19px;
  284. color: #0080ed;
  285. cursor: pointer;
  286. &::after {
  287. content: '>';
  288. margin-left: 8px;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. }
  295. @media screen and (max-width: 768px) {
  296. .page-top {
  297. position: relative;
  298. height: 137vw;
  299. .swiper {
  300. height: 100vw;
  301. background: #f7f7f7;
  302. ::v-deep {
  303. img {
  304. height: 100vw;
  305. }
  306. }
  307. }
  308. .club-info {
  309. width: 100%;
  310. position: absolute;
  311. bottom: 0;
  312. z-index: 9;
  313. text-align: center;
  314. .logo {
  315. display: block;
  316. width: 29.5vw;
  317. height: 29.5vw;
  318. margin: 0 auto;
  319. border-radius: 50%;
  320. box-shadow: 0 0.4vw 0.9vw rgba(200, 200, 200, 0.4);
  321. }
  322. .name {
  323. font-size: 5vw;
  324. font-weight: bold;
  325. color: #000000;
  326. margin: 6vw 0;
  327. }
  328. .remark {
  329. font-size: 2.5vw;
  330. font-weight: bold;
  331. color: #000000;
  332. }
  333. }
  334. }
  335. .page-content {
  336. .club-info {
  337. position: relative;
  338. font-size: 3vw;
  339. color: #000000;
  340. padding: 6vw 3vw;
  341. .address,
  342. .mobile {
  343. position: relative;
  344. padding: 4vw 0;
  345. border-top: 0.1vw solid rgba(0, 0, 0, 0.169);
  346. padding-left: 8.6vw;
  347. &::after {
  348. content: '';
  349. display: block;
  350. width: 4vw;
  351. height: 4vw;
  352. position: absolute;
  353. left: 4.3vw;
  354. top: 4vw;
  355. background-size: auto 3.6vw;
  356. background-repeat: no-repeat;
  357. }
  358. }
  359. .mobile {
  360. border-bottom: 0.1vw solid rgba(0, 0, 0, 0.169);
  361. &::after {
  362. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact.png);
  363. }
  364. }
  365. .address {
  366. &::after {
  367. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
  368. }
  369. }
  370. .navigation {
  371. position: absolute;
  372. bottom: 10vw;
  373. right: 5vw;
  374. font-size: 3vw;
  375. color: #0080ed;
  376. &::after {
  377. content: '>';
  378. margin-left: 1vw;
  379. }
  380. }
  381. }
  382. }
  383. .title {
  384. font-size: 3.4vw;
  385. color: #000;
  386. font-weight: bold;
  387. text-align: center;
  388. &::before {
  389. content: '';
  390. display: inline-block;
  391. width: 3.7vw;
  392. height: 4.4vw;
  393. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge-black.png)
  394. no-repeat center;
  395. background-size: 3.7vw;
  396. vertical-align: -0.8vw;
  397. margin-right: 1vw;
  398. }
  399. }
  400. .list {
  401. display: flex;
  402. flex-direction: column;
  403. align-items: center;
  404. margin-top: 6vw;
  405. .section {
  406. width: 95vw;
  407. padding: 5vw;
  408. background: #f1f1f1;
  409. border-radius: 2.4vw;
  410. box-sizing: border-box;
  411. margin-bottom: 2.4vw;
  412. .cover {
  413. display: block;
  414. width: 21.8vw;
  415. height: 21.8vw;
  416. border-radius: 1.7vw;
  417. }
  418. .info {
  419. position: relative;
  420. flex: 1;
  421. margin-left: 2.7vw;
  422. .name {
  423. font-size: 4.2vw;
  424. color: #000;
  425. font-weight: bold;
  426. text-overflow: ellipsis;
  427. overflow: hidden;
  428. white-space: nowrap;
  429. }
  430. .tag {
  431. width: 30vw;
  432. font-size: 2.2vw;
  433. color: #000;
  434. text-overflow: ellipsis;
  435. overflow: hidden;
  436. white-space: nowrap;
  437. margin-top: 2.5vw;
  438. }
  439. .more {
  440. position: absolute;
  441. bottom: 0;
  442. right: 0;
  443. font-size: 3vw;
  444. color: #0080ed;
  445. &::after {
  446. content: '>';
  447. margin-left: 1vw;
  448. }
  449. }
  450. }
  451. }
  452. }
  453. }
  454. </style>