feat: 初始化
This commit is contained in:
76
pages/user/personalInformation/email/success/index.vue
Normal file
76
pages/user/personalInformation/email/success/index.vue
Normal file
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<NavBar />
|
||||
<view class="container">
|
||||
<view class="title">
|
||||
<PageTitle :title="$t('verifyEmail.pageTitle')" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<image src="/static/success.png" mode="aspectFit" style="width: 56px; height: 56px"></image>
|
||||
<text class="successTitle">{{ $t('verifyEmail.mailSuccess') }}</text>
|
||||
|
||||
<text class="successTitle2" style="padding: 40px 0px;">{{ $t('verifyEmail.successText') }}</text>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button class="btn primaryButton" type="button" @click="start2">
|
||||
{{ $t('verifyEmail.start2') }}
|
||||
</button>
|
||||
</view>
|
||||
<view class="stepsWrapper">
|
||||
<view class="steps">
|
||||
<view :class="['stepItem', currentStep >= 1 ? 'active' : '']"></view>
|
||||
<view :class="['stepItem', currentStep >= 2 ? 'active' : '']"></view>
|
||||
<view :class="['stepItem', currentStep >= 3 ? 'active' : '']"></view>
|
||||
</view>
|
||||
<text>{{ $t('form.personalData.personalInformation.progress') + `${completePercent}` }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPersonalAuthStatus } from '@/services/user.ts';
|
||||
export default {
|
||||
name: '',
|
||||
data() {
|
||||
return {
|
||||
authStatus: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
start2() {
|
||||
uni.redirectTo({
|
||||
url: `/pages/user/personalInformation/userInfo/index?proven=${this.getProven()}&authStatus=${JSON.stringify(this.authStatus)}`
|
||||
});
|
||||
},
|
||||
async getAuthStatus() {
|
||||
const res = await getPersonalAuthStatus();
|
||||
if (res && res.code === 0) {
|
||||
this.authStatus = res.data;
|
||||
}
|
||||
},
|
||||
getProven() {
|
||||
if (this.authStatus.identity === 1){
|
||||
return true;
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getAuthStatus();
|
||||
},
|
||||
computed: {
|
||||
currentStep() {
|
||||
const keys = Object.keys(this.authStatus);
|
||||
return keys.filter((key) => this.authStatus[key] === 1).length;
|
||||
},
|
||||
completePercent() {
|
||||
const keys = Object.keys(this.authStatus);
|
||||
return `${keys.filter((key) => this.authStatus[key] === 1).length} / ${keys.length}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
</style>
|
Reference in New Issue
Block a user