feat: 初始化

This commit is contained in:
George
2025-07-07 15:55:44 +08:00
commit 9b7bfcfe5a
969 changed files with 123036 additions and 0 deletions

View File

@ -0,0 +1,72 @@
.container {
padding: 0 24px 24px 16px;
.title {
margin: 14px 0 15px;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
row-gap: 10px;
margin-top: 77px;
.successTitle {
margin-top: 11px;
font-size: 24px;
font-weight: 700;
color: #333333;
text-align: center;
}
.successDesc {
margin-top: 34px;
padding: 0 24px;
font-size: 14px;
color: #333333;
text-align: center;
}
}
.btns {
display: flex;
flex-direction: column;
row-gap: 12px;
margin-top: 76px;
.btn {
width: 100%;
&.disable {
background-color: #dbdbdb;
}
}
.resendSection {
display: flex;
justify-content: center;
align-items: center;
column-gap: 44px;
font-size: 18px;
.countdown {
display: flex;
column-gap: 4px;
color: #29bbe4;
}
.resend {
display: flex;
align-items: center;
column-gap: 7px;
color: #29bbe4;
&Icon {
width: 21px;
height: 21px;
&.sending {
animation: rotate 2s infinite;
}
}
}
}
}
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@ -0,0 +1,109 @@
<template>
<view>
<NavBar />
<view class="container">
<view class="title">
<PageTitle :title="$t('home.goldout')" />
</view>
<view class="content">
<image src="/static/capital/wallet.png" mode="aspectFit" style="width: 60px; height: 49px"></image>
<text class="successTitle">{{ $t('capital.verifyWallet') }}</text>
<text class="successDesc">{{ $t('capital.verifyWalletDesc') }}</text>
</view>
<view class="btns">
<button :disabled="sendBtnDisabled || sending" :class="['btn', 'primaryButton', sendBtnDisabled ? 'disable' : '']" type="button" @click="sendCode">
<image v-show="sending" src="/static/loadingCircle.svg" mode="aspectFit" style="width: 16px; height: 16px"></image>
{{ $t('capital.sendEmail') }}
</button>
<view class="resendSection">
<view class="countdown" v-if="sendBtnWaiting">
{{ sendBtnWaiting }}s
<text style="color: #333">{{ $t('capital.secondAfter') }}</text>
</view>
<view class="resend" @click="sendCode">
<image src="/static/capital/resend.png" mode="aspectFit" :class="['resendIcon', sending ? 'sending' : '']"></image>
<text>{{ $t('capital.resend') }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { useUserStore } from '@/stores/user';
import { sendCodePersonal, verifyEmail } from '@/services/user/completeInfo.ts';
import { sendBankMail } from '@/services/capital/withDraw.ts';
import { UserLanguage } from '@/utils/const.ts';
export default {
name: '',
data() {
return {
sending: false,
second: 60,
sendBtnWaiting: '',
sendBtnDisabled: false
};
},
methods: {
async sendCode() {
if (this.sendBtnDisabled) return;
this.sendBtnDisabled = true;
const userStore = useUserStore();
this.sending = true;
const res = await sendBankMail({
id: this.id,
qcc_language: UserLanguage
});
this.sending = false;
this.sendBtnWaiting = 60;
let timer = setInterval(() => {
if (this.sendBtnWaiting > 0) {
this.sendBtnWaiting -= 1;
} else {
this.sendBtnDisabled = false;
clearInterval(timer);
}
}, 1000);
let success = false;
if (res && res.code === 0) {
this.$cusModal.showModal({
type: 'message',
status: 'success',
contentText: this.$t('form.verificationCode.sendSuccess')
});
success = true;
} else {
this.$cusModal.showModal({
type: 'message',
status: 'warning',
contentText: res.msg ?? this.$t('common.error.sysError')
});
}
return success;
},
handleContinueDeposit() {
uni.redirectTo({
url: '/pages/capital/deposit/index'
});
},
handleTradeRecord() {
uni.redirectTo({
url: '/pages/capital/tradeRecord/index'
});
}
},
created() {},
onLoad(params) {
if (params.id) {
this.id = params.id;
this.sendCode();
}
}
};
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>