<route lang="json5">
{ "style": { "navigationBarTitleText": "规则说明", "navigationBarBackgroundColor": "#fff" } }
</route>
<script setup lang="ts">
import { phone, right } from '../../../core/libs/svgs'
import { getDistribute } from '../../../core/libs/requests'
import { handleCall } from '../../../core/utils/common'
import { onLoad } from '@dcloudio/uni-app'

const { data: distribute, run: setDistribute } = useRequest(() => getDistribute())
const handleClick = () => {
  uni.navigateTo({ url: '/pages-sub/mine/orders/detail/index' })
}
onLoad(()=>{
	setDistribute()
})

</script>
<template>
	<div class="px-[24rpx] py-[34rpx]">
		<view class="flex mb-[30rpx]">
			<icon type="info_circle" size="22" color="#000000"></icon>
			<text class="ml-[10rpx]">如何获得引荐加成奖励</text>
		</view>
		<view class="mb-[40rpx]" v-if="distribute && distribute.details">
			<rich-text :nodes="distribute.details"></rich-text>
		</view>
		<view class="rounded-[30rpx] overflow-hidden" style="border: 2rpx solid #B18A57;" v-if="distribute && distribute.distributeList.length > 0">
			<view class="flex w-full text-center py-[20rpx] bg-[#FFFCF6]">
				<view class="w-[33%] text-[28rpx] text-[#BC8647]">会员等级</view>
				<view class="w-[33%] text-[28rpx] text-[#BC8647]">一级奖励</view>
				<view class="w-[33%] text-[28rpx] text-[#BC8647]">二级奖励</view>
			</view>
			<block v-for="(it,i) in distribute.distributeList" :key="i">
				<view class="flex w-full text-center py-[20rpx] bg-[#FFFCF6]">
					<view class="w-[33%] text-[28rpx] text-[#BC8647]">{{ it.levelName }}</view>
					<view class="w-[33%] text-[28rpx] text-[#BC8647]">{{ it.oneRatio }}%</view>
					<view class="w-[33%] text-[28rpx] text-[#BC8647]">{{ it.twoRatio }}%</view>
				</view>
			</block>
		</view>
	</div>
</template>
