detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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('/ldm-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. background: #fff;
  161. }
  162. .name {
  163. font-size: 50px;
  164. font-weight: bold;
  165. color: #000000;
  166. margin: 39px 0 26px;
  167. }
  168. .remark {
  169. font-size: 25px;
  170. font-weight: bold;
  171. color: #000000;
  172. }
  173. }
  174. }
  175. .page-content {
  176. width: 507px;
  177. // height: 452px;
  178. // overflow-y: auto;
  179. .club-info {
  180. position: relative;
  181. font-size: 19px;
  182. color: #000000;
  183. border-top: 1px solid rgba(0, 0, 0, 0.169);
  184. border-bottom: 1px solid rgba(0, 0, 0, 0.169);
  185. padding-top: 36px;
  186. padding-bottom: 36px;
  187. .address,
  188. .mobile {
  189. position: relative;
  190. padding-left: 26px;
  191. &::after {
  192. content: '';
  193. display: block;
  194. width: 20px;
  195. height: 20px;
  196. position: absolute;
  197. left: 0;
  198. top: 0;
  199. background-size: auto 20px;
  200. background-repeat: no-repeat;
  201. }
  202. }
  203. .mobile {
  204. margin-top: 34px;
  205. &::after {
  206. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact.png);
  207. }
  208. }
  209. .address {
  210. &::after {
  211. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
  212. }
  213. }
  214. .navigation {
  215. position: absolute;
  216. bottom: 36px;
  217. right: 0;
  218. font-size: 19px;
  219. color: #0080ed;
  220. cursor: pointer;
  221. &::after {
  222. content: '>';
  223. margin-left: 8px;
  224. }
  225. }
  226. }
  227. }
  228. .title {
  229. font-size: 21px;
  230. color: #000;
  231. font-weight: bold;
  232. padding: 40px 0;
  233. &::before {
  234. content: '';
  235. display: inline-block;
  236. width: 24px;
  237. height: 28px;
  238. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge-black.png)
  239. no-repeat center;
  240. background-size: 24px;
  241. vertical-align: -7px;
  242. margin-right: 8px;
  243. }
  244. }
  245. .list {
  246. display: flex;
  247. flex-direction: column;
  248. align-items: center;
  249. border-bottom: 1px solid rgba(0, 0, 0, 0.169);
  250. .section {
  251. width: 100%;
  252. margin-bottom: 32px;
  253. .cover {
  254. display: block;
  255. width: 140px;
  256. height: 140px;
  257. border-radius: 1.7vw;
  258. }
  259. .info {
  260. position: relative;
  261. flex: 1;
  262. margin-left: 18px;
  263. .name {
  264. font-size: 26px;
  265. color: #000;
  266. font-weight: bold;
  267. text-overflow: ellipsis;
  268. overflow: hidden;
  269. white-space: nowrap;
  270. }
  271. .tag {
  272. width: 206px;
  273. font-size: 14px;
  274. color: #000;
  275. text-overflow: ellipsis;
  276. overflow: hidden;
  277. white-space: nowrap;
  278. margin-top: 15px;
  279. }
  280. .more {
  281. position: absolute;
  282. bottom: 0;
  283. right: 0;
  284. font-size: 19px;
  285. color: #0080ed;
  286. cursor: pointer;
  287. &::after {
  288. content: '>';
  289. margin-left: 8px;
  290. }
  291. }
  292. }
  293. }
  294. }
  295. }
  296. @media screen and (max-width: 768px) {
  297. .page-top {
  298. position: relative;
  299. height: 137vw;
  300. .swiper {
  301. height: 100vw;
  302. background: #f7f7f7;
  303. ::v-deep {
  304. img {
  305. height: 100vw;
  306. }
  307. }
  308. }
  309. .club-info {
  310. width: 100%;
  311. position: absolute;
  312. bottom: 0;
  313. z-index: 9;
  314. text-align: center;
  315. .logo {
  316. display: block;
  317. width: 29.5vw;
  318. height: 29.5vw;
  319. margin: 0 auto;
  320. border-radius: 50%;
  321. box-shadow: 0 0.4vw 0.9vw rgba(200, 200, 200, 0.4);
  322. background: #fff;
  323. }
  324. .name {
  325. font-size: 5vw;
  326. font-weight: bold;
  327. color: #000000;
  328. margin: 6vw 0;
  329. }
  330. .remark {
  331. font-size: 2.5vw;
  332. font-weight: bold;
  333. color: #000000;
  334. }
  335. }
  336. }
  337. .page-content {
  338. .club-info {
  339. position: relative;
  340. font-size: 3vw;
  341. color: #000000;
  342. padding: 6vw 3vw;
  343. .address,
  344. .mobile {
  345. position: relative;
  346. padding: 4vw 0;
  347. border-top: 0.1vw solid rgba(0, 0, 0, 0.169);
  348. padding-left: 8.6vw;
  349. &::after {
  350. content: '';
  351. display: block;
  352. width: 4vw;
  353. height: 4vw;
  354. position: absolute;
  355. left: 4.3vw;
  356. top: 4vw;
  357. background-size: auto 3.6vw;
  358. background-repeat: no-repeat;
  359. }
  360. }
  361. .mobile {
  362. border-bottom: 0.1vw solid rgba(0, 0, 0, 0.169);
  363. &::after {
  364. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact.png);
  365. }
  366. }
  367. .address {
  368. &::after {
  369. background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
  370. }
  371. }
  372. .navigation {
  373. position: absolute;
  374. bottom: 10vw;
  375. right: 5vw;
  376. font-size: 3vw;
  377. color: #0080ed;
  378. &::after {
  379. content: '>';
  380. margin-left: 1vw;
  381. }
  382. }
  383. }
  384. }
  385. .title {
  386. font-size: 3.4vw;
  387. color: #000;
  388. font-weight: bold;
  389. text-align: center;
  390. &::before {
  391. content: '';
  392. display: inline-block;
  393. width: 3.7vw;
  394. height: 4.4vw;
  395. background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-badge-black.png)
  396. no-repeat center;
  397. background-size: 3.7vw;
  398. vertical-align: -0.8vw;
  399. margin-right: 1vw;
  400. }
  401. }
  402. .list {
  403. display: flex;
  404. flex-direction: column;
  405. align-items: center;
  406. margin-top: 6vw;
  407. .section {
  408. width: 95vw;
  409. padding: 5vw;
  410. background: #f1f1f1;
  411. border-radius: 2.4vw;
  412. box-sizing: border-box;
  413. margin-bottom: 2.4vw;
  414. .cover {
  415. display: block;
  416. width: 21.8vw;
  417. height: 21.8vw;
  418. border-radius: 1.7vw;
  419. }
  420. .info {
  421. position: relative;
  422. flex: 1;
  423. margin-left: 2.7vw;
  424. .name {
  425. font-size: 4.2vw;
  426. color: #000;
  427. font-weight: bold;
  428. text-overflow: ellipsis;
  429. overflow: hidden;
  430. white-space: nowrap;
  431. }
  432. .tag {
  433. width: 30vw;
  434. font-size: 2.2vw;
  435. color: #000;
  436. text-overflow: ellipsis;
  437. overflow: hidden;
  438. white-space: nowrap;
  439. margin-top: 2.5vw;
  440. }
  441. .more {
  442. position: absolute;
  443. bottom: 0;
  444. right: 0;
  445. font-size: 3vw;
  446. color: #0080ed;
  447. &::after {
  448. content: '>';
  449. margin-left: 1vw;
  450. }
  451. }
  452. }
  453. }
  454. }
  455. }
  456. </style>