<template>
  <u-navbar
      :title="title"
      :auto-back="true"
      left-icon-size="40rpx"
      :safe-area-inset-top="true"
      :placeholder="true"
      bgColor="#fff"
      fixed
  ></u-navbar>
  <view style="padding:16rpx 26rpx;">
    <u-parse :content="content"></u-parse>
  </view>

</template>

<script>
import {webConfig} from "../../api/other";

export default {
  data() {
    return {
      content:'',
      pageParam:'',
      title:'',
    }
  },
  onLoad(option) {
    this.pageParam = option.article_path || '';
    this.getArticle();
  },
  computed: {},
  methods: {
    getArticle(){
      webConfig({type:this.pageParam}).then(response => {
        this.content = response.data[this.pageParam].title;
        this.content = response.data[this.pageParam].content;
      })
    }
  },
  onPageScroll(res) {
    if (res.scrollTop <= 20) {
      uni.$emit('isTop', true);
    } else {
      uni.$emit('isTop', false);
    }
  },
  created() {

  }
}
</script>

<style lang="scss"></style>