<template>
    <app-layout>
        <view class="page">
    	    <view class='nav dir-left-nowrap'>
    	        <image class='nav-img' src='./../image/right.png'></image>
    	        <view>规则说明</view>
    	    </view>
            <view class="padding">
                <app-rich-text class='text' :content="rules"></app-rich-text>
            </view>
        </view>
    </app-layout>
</template>

<script>
    import { mapState } from "vuex";
    import appRichText from "../../../components/basic-component/app-rich/parse.vue";

    export default {
        data() {
            return {
        		rules: ' ',
            }
        },
        name: "rules",
        components: {
            "app-rich-text": appRichText,
        },
        computed: {
            ...mapState({
                theme: state => state.mallConfig.theme,
            })
        },
        methods: {
            getList(id) {
                let that = this;
                that.$showLoading({
                    text: '加载中...'
                });
                that.$request({
                    url: that.$api.member.index,
                }).then(response=>{
                    that.$hideLoading();
                    if(response.code === 0) {
            			that.loading = false;
                        that.rules = response.data.mall_member.rules;
                    }
                }).catch(e => {
                    that.$hideLoading();
                });
            },
        },
        onLoad() {
        	this.getList();
        }
    }
</script>

<style scoped lang="scss">
    .page {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
    }

    .nav {
        font-size: #{32rpx};
        color: #353535;
        height: #{92rpx};
        padding: #{40rpx} #{24rpx} #{4rpx};
        background-color: #fff;
    }

    .nav-img {
        height: #{48rpx};
        width: #{48rpx};
        float: left;
        display: block;
        margin-right: #{24rpx};
    }

    .padding {
        padding: #{24rpx};
        background-color: #fff;
    }
</style>