export default {
    data() {
        return {
            max: 1,
            max1: 2,
            fraction: 3,
            fraction1: 3,
            max2: 3,
            fraction2: 3,
            bthDisabled: "",
            accountLevelList: [
                // {
                //   id:"registered",
                //   label:"注册用户",
                //   charges:"$0",          
                // },
                {//月度付费用户
                    id: "advance",
                    label: "login.monthlyPlay",
                    charges: "10(USDT、USDC、BUSD)",
                    amount: "10",
                    value: 0,
                    level: "L3",
                    disabledValue: 1,
                },
                {//年度付费用户
                    id: "advance",
                    label: "login.yearsPlay",
                    charges: "100(USDT、USDC、BUSD)",
                    amount: "100",
                    value: 1,
                    level: "L3",
                    disabledValue: 1,
                },
                {//vip年度付费用户
                    id: "vip",
                    label: "login.vipYearsPlay",
                    charges: "500(USDT、USDC、BUSD)",
                    amount: "500",
                    value: 2,
                    level: "L4",
                    disabledValue: 2,
                },

            ],
        }
    },
    mounted() {

    },
    methods: {
        //请求个人资料
        async fetchPersonal() {
            this.personalLoading = true
            const { data } = await this.$API.getpersonal()
            this.personalList = data.data

            this.roleName = data.data.role.roleName
            this.level = data.data.role.level
            //判断等级 禁用相应按钮

            if (data.data.role.roleName == "月度付费用户") {
                this.bthDisabled = 0
            } else if (data.data.role.roleName == "年度付费用户") {
                this.bthDisabled = 1
            } else if (this.level == "L4") {
                this.bthDisabled = 2
            } else if (this.level == "L2" || this.level == "L1") {
                this.bthDisabled = -1
            } else {
                this.bthDisabled = 10
            }

            this.personalLoading = false


        },
        //点击账户升级
        handelUpgrade(data) {
            this.$router.push({
                path: "/AccountUpgrade",
                name: "AccountUpgrade",
                params: {
                    amount: data,
                }
            })
        },
    }

}