my_balance.html 5.8 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <script src="../../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../../assets/css/api.css"/>
    <link rel="stylesheet" href="../../assets/css/style.css">
    <link rel="stylesheet" href="../../assets/css/index.css">
    <link rel="stylesheet" href="../../assets/css/doc.css">
    <link rel="stylesheet" href="../../assets/css/pay.css">
    <link rel="stylesheet" href="../../assets/css/my_news.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <title>我的账户</title>
    <style>
        body {
            background-color: #f4f4f4;
        }

        .balance_top {
            padding: 0.2rem 0 0.2rem 0.5rem;
            background-color: #dbb25f;
        }

        .balance_title {
            font-size: 15px;
            color: #fff;
        }

        .balance_num {
            font-size: 36px;
            color: #fff;
        }

        .cash {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 15px;
            color: #424242;
            padding: 0.27rem 0.5rem;
            background-color: #fff;
            margin-bottom: 0.09rem;
            border-bottom: 1px solid #f2f2f2;
        }

        .cash .icon-tixian {
            color: #7CC6FF;
            font-size: 30px;
            margin-right: 0.1rem;
        }

        .cash .icon-xiangyou {
            color: #C0C0C0;
        }

        .count_box {
            background-color: #fff;
        }

        .count {
            margin: 0 0.55rem 0 0.37rem;
            border-bottom: 1px solid #F7f7f7;
            padding: 0.27rem 0;
        }

        .count_all_box {
            display: flex;
            align-items: center;
            justify-content: space-around;
        }

        .count_all_item {
            display: flex;
            align-items: center;
            flex-direction: column;
            text-align: center;
            font-size: 12px;
            color: #424242;
        }

        .count_all_item span {
            padding: 0.05rem 0;
        }

        .count_all_item_active {
            color: #DDBB73;
        }

        .count_title_active {
            border-bottom: 1px solid #DDBB73;
        }

        .count90 {
            transform: rotate(90deg);
        }

        .cashes {
            display: flex;
            align-items: center;
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app">
    <div class="balance_top">
        <div class="balance_title">当前余额(元)</div>
        <div class="balance_num">{{user_type.balance}}</div>
    </div>
    <div class="cash" @click="my_count">
        <div class="cashes"><span class="iconfont icon-tixian"></span><span>提现</span></div>
        <div class="iconfont icon-xiangyou"></div>
    </div>
    <!--<div class="count_box">-->
    <!--<div class="cash count" @click="show=!show">-->
    <!--<span>账户明细</span>-->
    <!--<span :class="['iconfont','icon-xiangyou',show?'count90':'']"></span>-->
    <!--</div>-->
    <!--<div class="count_all_box" v-show="show">-->
    <!--<div class="count_all_item count_all_item_active">-->
    <!--<span class="count_title_active">全部</span>-->
    <!--<span>{{all_money}}</span>-->
    <!--</div>-->
    <!--<div class="count_all_item ">-->
    <!--<span class="">分红收益</span>-->
    <!--<span>1000.00</span>-->
    <!--</div>-->
    <!--<div class="count_all_item ">-->
    <!--<span class="">服务收入</span>-->
    <!--<span>10000.00</span>-->
    <!--</div>-->
    <!--<div class="count_all_item ">-->
    <!--<span class="">其它收入</span>-->
    <!--<span>10000.00</span>-->
    <!--</div>-->
    <!--</div>-->
    <!--</div>-->
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            // show: false,
            all_money: toWan('99999999'),
            user_type: []
        },
        created: function () {
            this.getUserIndexInfo();
        },
        methods: {
            my_count: function () {
                var app = this;
                // alert(app.user_type.balance);
                if (parseFloat(app.user_type.balance) <= 0) {
                    toastMsg('余额不足')
                } else {
                    openView('my_cash', '../my/my_cash', '提现确认', 'my_cash', false, {balance: app.user_type.balance})
                }
            },
            getUserIndexInfo: function () {
                var app = this;
                var header = {
                    "XX-Device-Type": getDevice(),
                    'XX-Token': getToken()
                };
                getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
                    if (res.data.code == 1) {
                        app.user_type = res.data.data;
                    } else {
                    }
                    loadEnd();
                })
            }
        }
    })
</script>