detail.vue 9.2 KB

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