noticeDetails.vue 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view>
  3. <view class="title">{{notice.title}}</view>
  4. <view class="content">
  5. <u-parse :content="notice.details"></u-parse>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. var _this;
  11. export default {
  12. data() {
  13. return {
  14. noticeid: 0,
  15. notice: {}
  16. }
  17. },
  18. onLoad(option) {
  19. _this = this;
  20. _this.noticeid = option.noticeid || 0;
  21. _this.getDetails()
  22. },
  23. methods: {
  24. getDetails() {
  25. _this = this;
  26. _this.$req.ajax({
  27. path: "notice/brokerNoticeDetail",
  28. data: {
  29. noticeid: _this.noticeid,
  30. }
  31. }).then((data) => {
  32. console.log("公告",data.notice)
  33. _this.notice = data.notice
  34. }).catch((err) => {
  35. uni.showModal({
  36. title: '信息提示',
  37. content: err,
  38. showCancel: false
  39. });
  40. });
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. .title {
  47. font-size: 35rpx;
  48. font-weight: bold;
  49. text-align: center;
  50. }
  51. .content {
  52. margin-top: 30rpx;
  53. padding: 0 20rpx;
  54. }
  55. </style>