<template>
  <view class="page  flex-col" :style="{'height':height}">
    <scroll-view scroll-y="true" class="scroll-y ">
      <view class="content-box flex-col">
        <!--				<web-view  src="http://www.gzqcdj.cn/doc/2.html"></web-view>-->
        <rich-text v-html="name">
        </rich-text>

      </view>
    </scroll-view>
  </view>
</template>

<script>
export default {

  data() {
    return {
      name: '1231231',
      height: '',
      type:''

    };
  },
  mounted() {
  },
  onLoad(option) {
    let sysInfo = uni.getSystemInfoSync();
    this.height = sysInfo.windowHeight + 'px';
    console.log("获取到的高度", this.height)
    uni.setNavigationBarTitle({
      title: option.name

    })
    // this.getTermOfServiceByType(option.type);
    this.type = option.type
    this.AboutByType(this.type)
  },

  methods: {
    // 获取服务条款信息
    getTermOfServiceByType(type) {
      // 获取数据
      this.$api.getTermOfServiceByType({type: type}).then((res) => {
        if (res.aboutContent) {
          this.termOfService.aboutContent = res.aboutContent
        } else {
          this.termOfService.aboutContent = "暂无信息！！！"
        }
      }).catch(() => {
        uni.showToast({
          title: "操作失败"
        })
      });
    },
    AboutByType(type) {
      this.$api.AboutByType({type:type}).then(res => {
        this.name = res.data.data.aboutContent
        console.log(res,'333333333333')
      })
    }
  }
};
</script>

<style lang="scss">
@import '/common/css/common.css';
@import './index.rpx.css';
</style>
