lecturerDetail.vue 11 KB

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