noticeDetail.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view class="content">
  3. <view class="title">{{pageData.title}}</view>
  4. <view class="container">
  5. <u-parse :content="pageData.summary"></u-parse>
  6. </view>
  7. <view class="container">
  8. <u-parse :content="pageData.content"></u-parse>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. var that = ""
  14. import $api from '@/static/js/api.js'
  15. export default {
  16. data() {
  17. return{
  18. pageData: {
  19. },
  20. id: '',
  21. }
  22. },
  23. onLoad(options) {
  24. that = this
  25. that.id = options.id
  26. that.getData()
  27. },
  28. methods: {
  29. getData() {
  30. $api.req({
  31. url: '/data/api.Notice/show',
  32. data: {
  33. id: that.id
  34. }
  35. }, function(res) {
  36. if(res.code == 1) {
  37. that.pageData = res.data
  38. }
  39. })
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .content {
  46. background-color: #fff;
  47. padding: 0 30rpx;
  48. .title {
  49. width: 100%;
  50. margin: 40rpx 0 24rpx;
  51. font-size: 40rpx;
  52. line-height: 56rpx;
  53. color: #222;
  54. font-weight: 600;
  55. }
  56. .container {
  57. font-size: 36rpx;
  58. color: #444;
  59. line-height: 50rpx;
  60. padding-top: 20rpx;
  61. }
  62. }
  63. </style>