<template>
    <div class="myWallet">
        <div class="acc_info">
            <view class="flex_r flex_jb acc_row">
                <!-- <div class="i_num" @click="goto('/pagesB/accountDetails/ConsumptionCharge')">
                    <p class="flex_r flex_ac flex_jc">
                        <image src="@/static/wallet/3.png" class="ico" /><span>消费券</span></p>
                    <p class="dinB">{{localInfo.integral}}</p>
                </div>
                <div class="i_num" @click="goto('/pagesB/my/shuZhiWallet')">
                    <p class="flex_r flex_ac flex_jc">
                        <image src="@/static/wallet/4.png" class="ico" /><span>我的消费金</span></p>
                    <p class="dinB">{{localInfo.property}}</p>
                </div> -->
                <div class="i_num" @click="goto('/pages/accountDetails/teaBaby')">
                    <p class="flex_r flex_ac flex_jc">
                        <image src="https://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/icon/13.png" class="ico" /><span>贡献值</span></p>
                    <p class="dinB">{{userinfo.cha_bao}}</p>
                </div>
                <!-- <div class="i_num" @click="goto('/pagesB/accountDetails/TeaC')">
                    <p class="flex_r flex_ac flex_jc">
                        <image src="/static/wallet/8.png" class="ico" /><span>TeaC {{ teacCountCny }}</span></p>
                    <p class="dinB">{{userinfo.teac}}</p>
                </div> -->
                <div class="i_num" @click="goto('/pagesB/accountDetails/OriginalShares')">
                    <p class="flex_r flex_ac flex_jc">
                        <image src="/static/wallet/5.png" class="ico" /><span>OE {{ equityCountCny }}</span></p>
                    <p class="dinB">{{localInfo.original_equity || 0}}</p>
                </div>
            </view>
            <view class="flex_r flex_jb">

            </view>
        </div>
    </div>
</template>
<script>
import { post } from "@/request/api.js";
export default {
    name: "myWallet",
    props: {},
    components: {},
    data() {
        return {
            userinfo:  uni.getStorageSync("userinfo"), // 获取用户信息
            localInfo: uni.getStorageSync("localInfo"),
            teacCountCny: '0.00',
            equityCountCny: '0.0'
        };
    },
    methods: {
        // 获取teaC和OE的CNY价值
        getConvertCny(){
            post("v1/getConvertCny").then((res) => {
                if (res.code === 0) {
                    this.teacCountCny = res.data.data.teac || '0.00'
                    this.equityCountCny = res.data.data.equity  || '0.0'
                }
            });
        },
    },
    onLoad(da) {},
    onShow() {
        this.getConvertCny() // 获取teaC和OE的CNY价值
    },
    mounted() {},
};
</script>
<style scoped lang='scss'>
.myWallet{
    padding: 30rpx 32rpx;
}
// 账户信息
.acc_info {
    width: 100%;
    overflow: hidden;
    background: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/7748b9c0380c76907a8a5ba82514f496f9ce55e5png");
    background-size: 100% 100%;
    border-radius: 16rpx;
    padding: 36rpx;
    box-sizing: border-box;

    .i_num {
        font-size: 30rpx;
        text-align: center;
        width: 50%;
        
        p {
            color: #BE7329;
        }

        .ico {
            width: 40rpx;
            height: 40rpx;
            margin-right: 12rpx;
        }

        .dinB {
            margin-top: 10rpx;
            font-size: 32rpx;
        }
    }
    .acc_row{
        // margin-bottom: 38rpx;
    }
}
</style>