detail.vue 1023 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="main">
  3. <view class="content">
  4. <view class="title">{{ item.title }}</view>
  5. <view class="desc">
  6. <text>发布于:{{ item.createTime }}</text>
  7. </view>
  8. <view class="con">
  9. <u-divider :dot="true"></u-divider>
  10. <u-parse :content="item.contents"></u-parse>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. item: {}
  20. };
  21. },
  22. onLoad(e) {
  23. this.http.request({
  24. url: '/app/notice/detail/' + e.id,
  25. success: (res) => {
  26. this.item = res.data.data;
  27. this.item.contents = res.data.data.contents.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
  28. }
  29. });
  30. },
  31. methods: {}
  32. };
  33. </script>
  34. <style lang="scss">
  35. .main {
  36. padding: 0px 10px 10px 10px;
  37. }
  38. .content {
  39. padding: 15px;
  40. background-color: white;
  41. border-radius: 8px;
  42. .title {
  43. font-size: 18px;
  44. }
  45. .desc {
  46. padding-top: 15px;
  47. font-size: 13px;
  48. color: #7c8388;
  49. text {
  50. padding-right: 25px;
  51. }
  52. }
  53. .con {
  54. font-size: 14px;
  55. }
  56. }
  57. </style>