|
|
- <template>
- <view class="content_box">
- <!-- 公告页面 -->
- <view class="title">
- <text>{{title}}</text>
- </view>
- <!-- 富文本 -->
- <view class="parse_box">
- <u-parse :content="content"></u-parse>
- </view>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- state: '',
- content: "",
- title: "",
- }
- },
- onLoad(options) {
- console.log(options)
- this.state = options.state;
- this.getNoticeInfo(options.state);
- },
- methods: {
- getNoticeInfo(state) {
- this.$api.getNiceInfo({state}).then( res => {
- this.title = res.result[0].title;
- this.content = res.result[0].content;
- }).catch(err => {
- console.log(err)
- })
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .content_box{
- background-color: rgba(255, 0, 0, .5) ;
- min-height: 100vh;
- .title{
- display: flex;
- justify-content: center;
- align-items: center;
- height: 80rpx;
- font-size: 46rpx;
- font-weight: 700;
- }
- .parse_box{
- margin: 0 30rpx;
- }
- }
-
- </style>
|