detail.vue 11 KB

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