1
PC-20250623MANY\Administrator
2025-07-22 9ec3bd6e8d7357927533d8966f882cb5d28b3e0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
    <div class="rechargeWithdrawRecord">
        <assets-head :title="$t('历史记录')" :goAssetsCenter="goAssetsCenter" />
        <div>
            <div class="flex justify-around mb-33 border-b-color mt-50 font-35">
                <div class="width-170 text-grey flex flex-col items-center" @click="tabClick('1')"
                    :class="type == '1' ? 'active-line' : ''">{{ $t('充值') }}</div>
                <div class="ml-100 text-grey width-170 flex flex-col items-center" @click="tabClick('2')"
                    :class="type == '2' ? 'active-line' : ''">{{ $t('提现') }}</div>
            </div>
            <recharge-history v-if="type == 1"></recharge-history>
            <withdraw-history v-if="type == 2"></withdraw-history>
        </div>
    </div>
</template>
 
<script>
import RechargeHistory from './components/rechargeHistory.vue';
import WithdrawHistory from './components/withdrawHistory.vue';
import assetsHead from "@/components/assets-head";
export default {
    name: "rechargeWithdrawRecord",
    components: {
        assetsHead,
        RechargeHistory,
        WithdrawHistory,
    },
    data() {
        return {
            type: "1",
            goAssetsCenter: true,
        }
    },
    created() {
        console.log('this.$route', this.$route)
        if (this.$route.query.type) {
            this.type = this.$route.query.type;
        }
        if (this.$route.query.back) { // 回到上一页
            this.goAssetsCenter = false;
        }
    },
    methods: {
        tabClick(type) {
            this.type = type;
        },
    }
}
</script>
<style lang="scss" scoped>
.rechargeWithdrawRecord {
    width: 100%;
    box-sizing: border-box;
}
 
.active-line {
    position: relative;
    padding-bottom: 30px;
 
    @include themify() {
        color: themed("text_color");
    }
}
 
.active-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    right: 0;
    width: 140px;
    height: 8px;
 
    @include themify() {
        background-color: themed("color_main");
    }
}
</style>