<template>
    <view class="rule-container">
        <!-- 标题 -->
        <view class="rule-title">{{ ruleData.title }}</view>
        
        <!-- 核心提示语 -->
        <view class="rule-tip">{{ ruleData.tip }}</view>
        
        <!-- 详情列表 -->
        <view class="rule-details">
            <view v-for="(item, index) in ruleData.detail" :key="index" class="rule-item">
                <view class="rule-item-title">{{ index + 1 }}.{{ item.sub_title }}</view>
                <view class="rule-item-content">{{ item.sub_detail }}</view>
            </view>
        </view>
    </view>
</template>

<script>
import { request, picUrl, NavgateTo } from "../../../utils";
import { apiArr } from "../../../api/pointShop";

export default {
    data() {
        return {
            ruleData: {
                title: '',
                tip: '',
                detail: []
            }
        }
    },
    onLoad() {
        this.getContent()
    },
    methods: {
        getContent() {
            request(apiArr.platformPointsRule, 'POST', {}, { silent: false }, false).then(res => {
                this.ruleData = res;
            });
        }
    }
}
</script>
<style>
@import url('./index.css');
</style>