detail.vue 734 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view class="detail">
  3. <view class="con">
  4. <u-parse :content="item.brief" v-if="item.brief"></u-parse>
  5. <u-empty v-else text="整理资料中..."></u-empty>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. item: {}
  14. };
  15. },
  16. onLoad(e) {
  17. this.http.request({
  18. url: '/app/department/detail/' + e.id,
  19. success: (res) => {
  20. this.item = res.data.data;
  21. uni.setNavigationBarTitle({ title: this.item.deptName });
  22. if (res.data.data.brief) {
  23. this.item.brief = res.data.data.brief.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
  24. }
  25. }
  26. });
  27. },
  28. methods: {}
  29. };
  30. </script>
  31. <style lang="scss">
  32. page {
  33. background-color: white;
  34. }
  35. </style>