lecturerDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <template>
  2. <view class="container">
  3. <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
  4. <view class="top">
  5. <image class="return" @click="goBack" src="/static/image/back_white.png"></image>
  6. <text>讲者信息</text>
  7. <view class="top-right">
  8. <image class="icon" src="/static/image/icon_more.png"></image>
  9. <image class="icon" src="/static/image/icon_scan.png"></image>
  10. </view>
  11. </view>
  12. <scroll-view class="content" scroll-y>
  13. <!-- 个人基本信息卡片 -->
  14. <view class="profile-card">
  15. <view class="profile-info">
  16. <view class="profile-main">
  17. <view class="name-section">
  18. <text class="name">{{ lecturerInfo.name }}</text>
  19. <text class="identity">{{ lecturerInfo.identity }}</text>
  20. </view>
  21. <text class="phone">{{ lecturerInfo.phone }}</text>
  22. </view>
  23. <image class="avatar" :src="lecturerInfo.avatar"></image>
  24. </view>
  25. </view>
  26. <!-- 基础信息 -->
  27. <view class="info-section">
  28. <view class="section-header">
  29. <view class="section-indicator"></view>
  30. <text class="section-title">基础信息</text>
  31. </view>
  32. <view class="info-list">
  33. <view class="info-item">
  34. <text class="info-label">身份证号:</text>
  35. <text class="info-value">{{ lecturerInfo.idCard }}</text>
  36. </view>
  37. <view class="info-item">
  38. <text class="info-label">公司:</text>
  39. <text class="info-value">{{ lecturerInfo.company }}</text>
  40. </view>
  41. <view class="info-item">
  42. <text class="info-label">机构名称:</text>
  43. <text class="info-value">{{ lecturerInfo.institution }}</text>
  44. </view>
  45. <view class="info-item">
  46. <text class="info-label">注册时间:</text>
  47. <text class="info-value">{{ lecturerInfo.registerTime }}</text>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 执业信息 -->
  52. <view class="info-section">
  53. <view class="section-header">
  54. <view class="section-indicator"></view>
  55. <text class="section-title">执业信息</text>
  56. </view>
  57. <view class="info-list">
  58. <view class="info-item">
  59. <text class="info-label">地址:</text>
  60. <text class="info-value">{{ lecturerInfo.address }}</text>
  61. </view>
  62. <view class="info-item">
  63. <text class="info-label">科室:</text>
  64. <text class="info-value">{{ lecturerInfo.department }}</text>
  65. </view>
  66. <view class="info-item">
  67. <text class="info-label">职称:</text>
  68. <text class="info-value">{{ lecturerInfo.title }}</text>
  69. </view>
  70. <view class="info-item">
  71. <text class="info-label">第三方业务编码:</text>
  72. <text class="info-value">{{ lecturerInfo.thirdPartyCode }}</text>
  73. </view>
  74. <view class="info-item">
  75. <text class="info-label">研究者编码:</text>
  76. <text class="info-value">{{ lecturerInfo.researcherCode }}</text>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 资质信息 -->
  81. <view class="info-section">
  82. <view class="section-header">
  83. <view class="section-indicator"></view>
  84. <text class="section-title">资质信息</text>
  85. </view>
  86. <view class="qualification-list">
  87. <view class="qualification-item">
  88. <text class="qualification-label">医师执业证</text>
  89. <view class="image-grid">
  90. <image class="qualification-image" v-for="(img, index) in lecturerInfo.qualifications.medicalLicense" :key="index" :src="img"></image>
  91. </view>
  92. </view>
  93. <view class="qualification-item">
  94. <text class="qualification-label">医师职称证/工牌</text>
  95. <view class="image-grid">
  96. <image class="qualification-image" v-for="(img, index) in lecturerInfo.qualifications.titleLicense" :key="index" :src="img"></image>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 签约与结算 -->
  102. <view class="info-section">
  103. <view class="section-header">
  104. <view class="section-indicator"></view>
  105. <text class="section-title">签约与结算</text>
  106. </view>
  107. <view class="info-list">
  108. <view class="info-item">
  109. <text class="info-label">签约协议状态:</text>
  110. <text class="info-value">{{ lecturerInfo.contractStatus }}</text>
  111. </view>
  112. <view class="info-item">
  113. <text class="info-label">银行卡号:</text>
  114. <text class="info-value">{{ lecturerInfo.bankCard }}</text>
  115. </view>
  116. <view class="info-item">
  117. <text class="info-label">开户银行:</text>
  118. <text class="info-value">{{ lecturerInfo.bankName }}</text>
  119. </view>
  120. <view class="info-item">
  121. <text class="info-label">支行信息:</text>
  122. <text class="info-value">{{ lecturerInfo.branchBank }}</text>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 安全信息 -->
  127. <view class="info-section">
  128. <view class="section-header">
  129. <view class="section-indicator"></view>
  130. <text class="section-title">安全信息</text>
  131. </view>
  132. <view class="info-list">
  133. <view class="info-item">
  134. <text class="info-label">密码:</text>
  135. <text class="info-value password">{{ maskedPassword }}</text>
  136. </view>
  137. </view>
  138. </view>
  139. </scroll-view>
  140. </view>
  141. </template>
  142. <script>
  143. import { getStoreActivityDetails } from '@/api/speaker'
  144. export default {
  145. data() {
  146. return {
  147. // 仅获取微信小程序状态栏高度,无多余逻辑
  148. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  149. id: '',
  150. // 讲者信息
  151. lecturerInfo: {
  152. name: '',
  153. identity: '',
  154. phone: '',
  155. avatar: '/static/image/doctor_avatar.png',
  156. idCard: '',
  157. company: '',
  158. institution: '',
  159. registerTime: '',
  160. address: '',
  161. department: '',
  162. title: '',
  163. thirdPartyCode: '',
  164. researcherCode: '',
  165. contractStatus: '',
  166. bankCard: '',
  167. bankName: '',
  168. branchBank: '',
  169. password: '******',
  170. qualifications: {
  171. medicalLicense: [],
  172. titleLicense: []
  173. }
  174. }
  175. }
  176. },
  177. onLoad(options) {
  178. if (options.id) {
  179. this.id = options.id
  180. this.loadData()
  181. }
  182. },
  183. methods: {
  184. goBack() {
  185. uni.navigateBack()
  186. },
  187. async loadData() {
  188. try {
  189. uni.showLoading({
  190. title: '加载中...'
  191. })
  192. // 调用getStoreActivityDetails接口,传递id参数
  193. const res = await getStoreActivityDetails(this.id)
  194. uni.hideLoading()
  195. if (res.code === 200 && res.data) {
  196. // 这里可以根据接口返回的数据结构更新lecturerInfo
  197. this.lecturerInfo = res.data
  198. console.log('获取讲师信息成功', res.data)
  199. } else {
  200. uni.showToast({
  201. icon: 'none',
  202. title: '获取讲师信息失败'
  203. })
  204. }
  205. } catch (e) {
  206. uni.hideLoading()
  207. console.error('加载数据失败', e)
  208. uni.showToast({
  209. icon: 'none',
  210. title: '加载数据失败'
  211. })
  212. }
  213. }
  214. },
  215. computed: {
  216. maskedPassword() {
  217. if (!this.lecturerInfo.password) return '';
  218. return '*'.repeat(this.lecturerInfo.password.length);
  219. }
  220. }
  221. }
  222. </script>
  223. <style lang="scss" scoped>
  224. .container {
  225. min-height: 100vh;
  226. background: #f5f5f5;
  227. display: flex;
  228. flex-direction: column;
  229. height: auto;
  230. &::before {
  231. content: '';
  232. position: absolute;
  233. top: 0;
  234. left: 0;
  235. right: 0;
  236. width: 100%;
  237. height: 300rpx;
  238. background: linear-gradient(180deg, rgba(56, 139, 255, 0.79) 0%, rgba(56, 139, 255, 0) 100%);
  239. }
  240. }
  241. .top {
  242. display: flex;
  243. justify-content: center;
  244. align-items: center;
  245. height: 88rpx;
  246. position: relative;
  247. font-weight: 600;
  248. font-size: 36rpx;
  249. color: #FFFFFF;
  250. .return {
  251. position: absolute;
  252. left: 32rpx;
  253. width: 40rpx;
  254. height: 40rpx;
  255. }
  256. .top-right {
  257. position: absolute;
  258. right: 32rpx;
  259. display: flex;
  260. align-items: center;
  261. .icon {
  262. width: 40rpx;
  263. height: 40rpx;
  264. margin-left: 32rpx;
  265. }
  266. }
  267. }
  268. .content {
  269. flex: 1;
  270. padding: 24rpx;
  271. box-sizing: border-box;
  272. padding-bottom: 100rpx;
  273. }
  274. /* 个人基本信息卡片 */
  275. .profile-card {
  276. background: #fff;
  277. border-radius: 16rpx;
  278. padding: 32rpx;
  279. margin-bottom: 24rpx;
  280. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
  281. .profile-info {
  282. display: flex;
  283. justify-content: space-between;
  284. align-items: center;
  285. .profile-main {
  286. flex: 1;
  287. .name-section {
  288. display: flex;
  289. align-items: center;
  290. margin-bottom: 16rpx;
  291. .name {
  292. font-size: 36rpx;
  293. font-weight: 600;
  294. color: #333333;
  295. margin-right: 24rpx;
  296. }
  297. .identity {
  298. font-size: 24rpx;
  299. color: #666666;
  300. padding: 4rpx 12rpx;
  301. background: #F7F8FA;
  302. border-radius: 8rpx;
  303. }
  304. }
  305. .phone {
  306. font-size: 28rpx;
  307. color: #666666;
  308. }
  309. }
  310. .avatar {
  311. width: 96rpx;
  312. height: 96rpx;
  313. border-radius: 50%;
  314. }
  315. }
  316. }
  317. /* 通用信息区块样式 */
  318. .info-section {
  319. background: #fff;
  320. border-radius: 16rpx;
  321. padding: 24rpx;
  322. margin-bottom: 24rpx;
  323. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
  324. .section-header {
  325. display: flex;
  326. align-items: center;
  327. margin-bottom: 24rpx;
  328. .section-indicator {
  329. width: 6rpx;
  330. height: 32rpx;
  331. background: #388BFF;
  332. border-radius: 3rpx;
  333. margin-right: 16rpx;
  334. }
  335. .section-title {
  336. font-weight: 600;
  337. font-size: 32rpx;
  338. color: #333333;
  339. }
  340. }
  341. .info-list {
  342. .info-item {
  343. display: flex;
  344. margin-bottom: 24rpx;
  345. &:last-child {
  346. margin-bottom: 0;
  347. }
  348. .info-label {
  349. width: 30%;
  350. font-size: 28rpx;
  351. color: #666;
  352. flex-shrink: 0;
  353. }
  354. .info-value {
  355. flex: 1;
  356. text-align: end;
  357. font-size: 28rpx;
  358. color: #333;
  359. &.password {
  360. font-family: monospace;
  361. }
  362. }
  363. }
  364. }
  365. /* 资质信息样式 */
  366. .qualification-list {
  367. .qualification-item {
  368. margin-bottom: 32rpx;
  369. &:last-child {
  370. margin-bottom: 0;
  371. }
  372. .qualification-label {
  373. display: block;
  374. font-size: 28rpx;
  375. color: #666666;
  376. margin-bottom: 16rpx;
  377. }
  378. .image-grid {
  379. display: flex;
  380. flex-wrap: wrap;
  381. gap: 16rpx;
  382. .qualification-image {
  383. width: calc((100% - 32rpx) / 2);
  384. height: 240rpx;
  385. border-radius: 8rpx;
  386. object-fit: cover;
  387. }
  388. }
  389. }
  390. }
  391. }
  392. /* 响应式调整 */
  393. @media (max-width: 750rpx) {
  394. .profile-card {
  395. padding: 24rpx;
  396. }
  397. .info-section {
  398. padding: 20rpx;
  399. }
  400. .qualification-image {
  401. height: 200rpx !important;
  402. }
  403. }
  404. </style>