<template>
  <view class="contract-page">
    <view class="content">
      <view class="title">隐私政策</view>
      <view class="article">
        <rich-text :nodes="content"></rich-text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      content: ''
    }
  },
  
  onLoad() {
    this.loadContent();
  },
  
  methods: {
    async loadContent() {
      try {
        const res = await this.$http.get('/api/setting/agreement', {
          type: 'privacy'
        });
        
        if (res.code === 0) {
          this.content = res.data.content;
        }
      } catch (error) {
        console.error('加载隐私政策失败:', error);
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.contract-page {
  min-height: 100vh;
  background-color: #fff;
  padding: 30rpx;
}

.content {
  .title {
    font-size: 36rpx;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 40rpx;
  }
  
  .article {
    font-size: 28rpx;
    color: #666;
    line-height: 1.8;
  }
}
</style>

