detail.vue 9.1 KB

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