1
jhzh
2025-05-16 6825a149eb6164038df51c3d543fd244aa2a06bf
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<template>
    <div id="withdraw_verify" class="withdraw_verify">
        <assets-head />
        <div class="content">
            <div class="title textColor">{{ $t('安全验证') }}</div>
            <p>{{ $t('请输入资金密码') }}</p>
            <div class="iptbox inputBackground">
                <input class="inputBackground textColor" type="password" :placeholder="$t('请输入密码')" v-model="password">
            </div>
            <div class="mt-40" v-if="this.isGoogleInput">
                <p>{{ $t('请输入谷歌验证码') }}</p>
                <div class="iptbox inputBackground">
                    <input class="inputBackground textColor" type="password" :placeholder="$t('请输入谷歌验证码')"
                        v-model="googleCode">
                </div>
            </div>
            <div class="btn btnMain" @click="confirm">{{ $t('提交') }}</div>
            <div class="mt-42" style="color:#1D91FF;"><span
                    @click="$router.push('/resetVerify?type=0')">{{ $t('资金密码不可用?') }}</span>
            </div>
        </div>
    </div>
</template>
 
<script>
    import assetsHead from "@/components/assets-head";
    import {
        Form,
        Field,
        CellGroup
    } from 'vant';
    import {
        walletGrther,
        walletGrthertransfer,
        getwalletGrther
    } from "@/API/fund.api";
    import AxiosWithdraw from "@/API/withdraw.js"
    import otcApi from "@/API/otc";
    import AxiosUser from "@/API/userCenter";
 
    export default {
        name: "withdrawalSecurityVerification",
        props: ['type'],
        components: {
            assetsHead,
            [Form.name]: Form,
            [Field.name]: Field,
            [CellGroup.name]: CellGroup,
        },
        data() {
            return {
                password: '',
                data: null,
                sessionToken: '',
                googleCode: '',
                isGoogleInput: false
            }
        },
        created() {
            AxiosUser._getIsGoogleAuth({
                code: 'google_auth_secret_open'
            }).then(res => {
                this.isGoogleInput = res.data.google_auth_secret_open === '1'
            })
            this.data = this.$route.query
            this.getToken()
        },
        methods: {
            getToken() {
                AxiosWithdraw.GetSessionToken().then((res) => {
                    this.sessionToken = res.data.session_token;
                });
            },
            onSubmit(values) {
                console.log('submit', values);
            },
            async confirm(data) {
                if (!this.password) {
                    this.$toast(this.$t('请输入资金密码'));
                    return
                }
                var data = {
                    currency: this.$route.query.currency,
                      fromTo: this.$route.query.fromTo,
                      amount: this.$route.query.amount,
                      safeword:this.password
                }
                await walletGrthertransfer(data).then((res) => {
                    console.log(res);
                    this.$toast(this.$t('操作成功'));
                    // this.$router.push({
                    //   path: "/transfer",
                    // });
                    this.$router.go(-1);
                });
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .withdraw_verify {
        width: 100%;
        box-sizing: border-box;
    }
 
    .cl {
        color: dodgerblue;
    }
 
    .title {
        font-weight: 700;
        font-size: 52px;
        margin-top: 54px;
        margin-bottom: 56px;
    }
 
    .content {
        padding: 0 32px;
 
        p {
            color: #868D9A;
            font-size: 30px;
            margin-bottom: 18px;
        }
 
        .iptbox {
            height: 88px;
            margin-top: 16px;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 8px;
 
            input {
                flex: 1;
                height: 100%;
                border: none;
            }
 
            span {
                color: #1D91FF;
            }
        }
    }
 
    .btn {
        color: #fff;
        height: 88px;
        line-height: 88px;
        text-align: center;
        font-size: 32px;
        margin-top: 178px;
        border-radius: 10px;
    }
</style>