<template>
  <view class="container">

    <view class="h-content">
      <view class="" v-html="termOfService.aboutContent"></view>
    </view>

  </view>
</template>

<script>
// import {getTermOfServiceByType} from '/src/api/me/me.js';
export default {
  data() {
    return {
      reqParm: {
        auth: true,
        type: 1
      },
      termOfService: {
        aboutContent: "<p>会员协议会员协议会员协议会员协议会员协议会员协议</p>",
        aboutType: "1",
        createBy: "admin",
        createTime: "2023-07-30 08:53:17",
        id: "1685574269874098178",
        status: "0",
        updateBy: "admin",
        updateTime: "2023-07-30 21:04:51"
      }
    };
  },
  mounted() {
  },
  onLoad(option) {
    // 判断Openid是否为空
    if(!!option.data){
      this.reqParm.type = option.data;
    }
    this.getTermOfServiceByType();
  },
  methods: {
    // 获取服务条款信息
    getTermOfServiceByType(){
      // 获取数据
     this.$api.getTermOfServiceByType(this.reqParm).then((res)=>{
        if(res.aboutContent){
          this.termOfService.aboutContent = res.aboutContent
        }else{
          this.termOfService.aboutContent = "暂无信息！！！"
        }
      }).catch(() =>{
        uni.showToast({
          title: "操作失败"
        })
      });
    },

  }
};
</script>

<style lang="scss">
.container{
  padding: 12px;
}

</style>
