兼兼街租房小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1017 B

  1. <template>
  2. <view class="content_box">
  3. <!-- 公告页面 -->
  4. <view class="title">
  5. <text>{{title}}</text>
  6. </view>
  7. <!-- 富文本 -->
  8. <view class="parse_box">
  9. <u-parse :content="content"></u-parse>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. state: '',
  18. content: "",
  19. title: "",
  20. }
  21. },
  22. onLoad(options) {
  23. console.log(options)
  24. this.state = options.state;
  25. this.getNoticeInfo(options.state);
  26. },
  27. methods: {
  28. getNoticeInfo(state) {
  29. this.$api.getNiceInfo({state}).then( res => {
  30. this.title = res.result[0].title;
  31. this.content = res.result[0].content;
  32. }).catch(err => {
  33. console.log(err)
  34. })
  35. },
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .content_box{
  41. background-color: rgba(255, 0, 0, .5) ;
  42. min-height: 100vh;
  43. .title{
  44. display: flex;
  45. justify-content: center;
  46. align-items: center;
  47. height: 80rpx;
  48. font-size: 46rpx;
  49. font-weight: 700;
  50. }
  51. .parse_box{
  52. margin: 0 30rpx;
  53. }
  54. }
  55. </style>