detail.vue 926 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view class="detail">
  3. <view class="top">
  4. <image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
  5. <view class="title">{{ item.name }}</view>
  6. </view>
  7. <view class="con">
  8. <u-divider text="人物介绍"></u-divider>
  9. <u-parse :content="item.introduce" v-if="item.introduce"></u-parse>
  10. <u-empty v-else text="暂无介绍资料"></u-empty>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. ip: this.http.ip,
  19. item: {}
  20. };
  21. },
  22. onLoad(e) {
  23. this.http.request({
  24. url: '/app/doctor/detail/' + e.id,
  25. success: (res) => {
  26. this.item = res.data.data;
  27. if (res.data.data.introduce) {
  28. this.item.introduce = res.data.data.introduce.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
  29. }
  30. }
  31. });
  32. },
  33. methods: {}
  34. };
  35. </script>
  36. <style lang="scss">
  37. page {
  38. background-color: white;
  39. }
  40. </style>