1
0

detail.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="main">
  3. <view class="content">
  4. <view class="top">
  5. <image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
  6. <view class="title">{{ item.name }}</view>
  7. </view>
  8. <view class="con">
  9. <u-divider text="人物介绍"></u-divider>
  10. <u-parse :content="item.introduce"></u-parse>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. ip: this.http.ip,
  20. item: {}
  21. };
  22. },
  23. onLoad(e) {
  24. this.http.request({
  25. url: '/app/doctor/detail/' + e.id,
  26. success: (res) => {
  27. this.item = res.data.data;
  28. this.item.introduce = res.data.data.introduce.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
  29. }
  30. });
  31. },
  32. methods: {}
  33. };
  34. </script>
  35. <style lang="scss">
  36. .main {
  37. padding: 0px 10px 10px 10px;
  38. }
  39. .content {
  40. padding: 15px;
  41. background-color: white;
  42. border-radius: 8px;
  43. .top {
  44. text-align: center;
  45. .avatar {
  46. width: 55%;
  47. border-radius: 5px;
  48. }
  49. .title {
  50. font-size: 18px;
  51. padding-top: 3px;
  52. }
  53. }
  54. .con {
  55. font-size: 14px;
  56. line-height: 23px;
  57. image {
  58. border-radius: 5px !important;
  59. }
  60. }
  61. }
  62. </style>