Browse Source

认证合二为一

master
liaoxinyu 1 year ago
parent
commit
59c95922d0
  1. 11
      src/api/profile.js
  2. 6
      src/components/CommonHeader.vue
  3. 13
      src/components/SecondaryNav.vue
  4. 8
      src/i18n/tw.json
  5. 6
      src/router/profile.js
  6. 315
      src/views/profile/mergecertification.vue
  7. 12
      src/views/wallet/exchange-assets.vue

11
src/api/profile.js

@ -33,9 +33,16 @@ class Profile {
* @param {string} data.back_img //证件照反面
* @param {string} data.hand_img //手持证件照
*/
static topAuth(data) {
return server.post(`/user/topAuth`, data);
static newAuth(data) {
return server.post(`/user/newAuth`, data);
}
/**
* 合并认证
**/
static topAuth(data) {
return server.post(`/user/topAuth`, data);
}
/**
* 登录记录

6
src/components/CommonHeader.vue

@ -181,8 +181,10 @@
</a>
<div class="info text-center">
<p class="name font-weight-bold mb-0">
{{ userInfo.user_auth_level_text || signed.user_auth_level_text }}
<a href="#/profile/certification"
{{ userInfo.user_auth_level!=2?$t('common.notCertified'):userInfo.user_auth_level_text }}
<!-- {{ userInfo.user_auth_level_text || signed.user_auth_level_text }} -->
<!-- <a href="#/profile/certification" -->
<a href="#/profile/mergecertification"
v-if="userInfo.user_auth_level!=2">{{ $t('common.goTo') }}</a>
</p>
<div class="email text-muted mb-3">

13
src/components/SecondaryNav.vue

@ -62,10 +62,15 @@ export default {
this.itemList = [{
url: `/profile/index`,
label: this.$t('common.accountInformation'),
}, {
url: `/profile/certification`,
label: this.$t('common.auth')
},
},
// {
// url: `/profile/certification`,
// label: this.$t('common.auth')
// },
{
url: `/profile/mergecertification`,
label: this.$t('common.auth')
},
// {
// url: `/profile/invite`,
// label: this.$t('common.invitationReward')

8
src/i18n/tw.json

@ -786,7 +786,13 @@
"clickToVerify1": "已完成",
"tips1": "初級認證:要選取現金,您需要完成高級認證。",
"tips2": "高級認證:最高5000USDT 24小時提款限額。 如需更多取款金額,請聯系客服",
"tips3":"恭喜您,高級認證已通過!"
"tips3": "恭喜您,高級認證已通過!",
"certificationapplication": "認證申請",
"submitcertification": "提交認證",
"submittedforcertification": "已提交認證",
"certificationpassed": "恭喜您,認證已通過!",
"withdrawal1": "提幣需要通過實名認證",
"withdrawal2": "提幣達到了平台的風控限制,需要實名認證"
},
"setting": {
"smsVer": "簡訊驗證",

6
src/router/profile.js

@ -2,6 +2,7 @@
import Profile from '@/views/profile';
import ResetPwd from '@/views/profile/reset-pwd';
import Certification from '@/views/profile/certification';
import Mergecertification from '@/views/profile/mergecertification';
import Invite from '@/views/profile/invite';
import LoginHistory from '@/views/profile/login-history';
@ -19,6 +20,11 @@ export default [
name: "certification",
path: "/profile/certification", // 实名认证
component: Certification
},
{
name: "mergecertification",
path: "/profile/mergecertification", // 合并实名认证
component: Mergecertification
},
{
name: "invite",

315
src/views/profile/mergecertification.vue

@ -0,0 +1,315 @@
<template>
<div class="profile-page">
<secondary-nav></secondary-nav>
<div class="container">
<div class="w-100 d-flex justify-content-center mb-3 mt-4">
<div class="h3">{{$t('profile.realName')}}</div>
</div>
<div class="row">
<div class="col-12 mt-4">
<el-steps :active="setp+1" align-center>
<el-step :title="$t('profile.certificationapplication')"></el-step>
<el-step :title="$t('profile.toExamine')"></el-step>
</el-steps>
</div>
</div>
<div class="row">
<div class="mx-auto mt-4 panel-box shadow-sm bg-panel" id="auth" style="flex: 0 0 75%;">
<!-- 第一步 -->
<div class="tab-content" v-if="setp==0">
<div class="form-row">
<div class="form-group col-md-6">
<label>{{$t('profile.fullName')}}{{$t('profile.legal')}}*</label>
<input type="text" required v-model="form.realname" class="form-control"
:placeholder="$t('profile.pleaseEnterName')" />
</div>
<div class="form-group col-md-6">
<label>{{$t('profile.dateOfBirth')}}YYYY-MM-DD*</label>
<el-date-picker required v-model="form.birthday" type="date"
:placeholder="$t('profile.selectDate')"
:picker-options="pickerOptions"></el-date-picker>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<label>{{$t('profile.documentType')}}*</label>
<el-select v-model="form.type" :placeholder="$t('profile.pelaseSelect')">
<el-option v-for="item in cardType" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<div class="form-group col-md-9">
<label>{{$t('profile.certificateNumber')}}*</label>
<input type="text" required v-model="form.id_card" class="form-control"
:placeholder="$t('profile.endterIDNumber')" />
</div>
</div>
<div class="label my-2">{{$t('profile.addressInfo')}}</div>
<div class="form-group">
<label class="text9">{{$t('profile.residentialAddress')}}*</label>
<input type="text" required v-model="form.address" class="form-control"
:placeholder="$t('profile.residentialAddress1')" />
</div>
<div class="label my-2">{{$t('profile.contactInformation')}}</div>
<div class="form-row">
<div class="form-group col-md-3">
<label class="text9">{{$t('profile.SelectAreaCode')}}*</label>
<el-select v-model="form.country_id" filterable
:placeholder="$t('profile.pelaseSelect')">
<el-option v-for="item in countryList" :key="item.id"
:label="'+'+item.country_code +'('+item.name+')'" :value="item.id">
</el-option>
</el-select>
</div>
<div class="form-group col-md-9">
<label class="text9">{{$t('profile.phoneNumber')}}*</label>
<input type="text" required v-model="form.phone" class="form-control"
:placeholder="$t('profile.enterPhoneNumber')" />
</div>
</div>
<!-- 第二步 -->
<div class="tab-content">
<p>{{$t('profile.clickUpload1')}}</p>
<p>
{{$t('profile.pelaseDownload')}}
<span class="red" v-if="detail.type==3">{{$t('profile.passport')}}</span>
<span class="red" v-if="detail.type==2">{{$t('profile.drivingLicense')}}</span>
<span class="red" v-if="detail.type==1">{{$t('profile.iD')}}</span>
{{$t('profile.upload')}}
</p>
<p>{{$t('profile.explain')}}</p>
<ul class="mb-2">
<li class="mb-2">1. {{$t('profile.unexpired')}}{{lang=='zh-TW'||lang=='jp'?'。':'.'}}
</li>
<li class="mb-2">2.{{$t('profile.pleaseConfirm')}}{{lang=='zh-TW'||lang=='jp'?'。':'.'}}
</li>
<li class="mb-2">3. {{$t('profile.fileFormat')}}pdf./ gif./ jpeg./jpg./png.</li>
<li class="mb-2">4. {{$t('profile.maximumFileSize')}}5 MB</li>
</ul>
<div style="display: flex;">
<upload-img class="mb-3" v-model="form.front_img" required
:placeholder="$t('profile.uploadPhoto')" style="margin-right: 30px;">
<template #text>
<div class="el-upload__text">
{{$t('profile.positive')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
</div>
</template>
</upload-img>
<upload-img class="mb-3" v-model="form.back_img" required
:placeholder="$t('profile.reversePhoto')">
<template #text>
<div class="el-upload__text">
{{$t('profile.theOtherSide')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
</div>
</template>
</upload-img>
</div>
</div>
<div class="text-center" style="margin-top: 50px;margin-bottom: 50px;">
<button type="button" class="btn w-25 btn-primary rounded-pill"
@click="primaryAuth">{{$t('profile.submitcertification')}}</button>
</div>
</div>
<!-- 第三步 -->
<div class="tab-ceontent p-5 text-center" v-if="setp==1">
<!-- 待审核 -->
<div v-if="detail.status==1">
<p class="mt-3 mb-4">{{$t('profile.inSubmit')}}</p>
<i class="el-icon-s-order my-4 text-warning" style="font-size:70px"></i>
<div class="text-center">
<button type="button" class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)">{{$t('profile.gotIt')}}</button>
</div>
</div>
<div v-else-if="detail.status==2">
<p class="mt-3 mb-4" style="font-size:18px">{{$t('profile.certificationpassed')}}</p>
<i class="el-icon-circle-check my-4 increace" style="font-size:60px"></i>
<div class="text-center">
<button type="button" class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)">{{$t('profile.back')}}</button>
</div>
</div>
<div v-else-if="detail.status==3">
<p class="mt-3 mb-4">{{detail.status_text_lang}}{{$t('profile.resetApply')}}</p>
<i class="el-icon-s-release my-4 decreace" style="font-size:60px"></i>
<div class="text-center">
<button type="button" class="btn w-25 btn-outline-danger"
@click="setp=0">{{$t('profile.recertification')}}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Profile from "@/api/profile";
import Member from "@/api/member";
import server from "@/api/server";
export default {
data() {
return {
setp: 0,
detail: {},
imgURL: server.defaults.baseURL,
countryList: [],
form: {
country_code: "",
country_id: "",
realname: "",
id_card: "",
type: 1,
birthday: "",
address: "",
city: "",
postal_code: "",
phone: "",
extra: "",
front_img: "",
back_img: ""
},
//
topForm: {
front_img: "",
back_img: "",
hand_img: ""
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
lang: localStorage.getItem('lang')
};
},
computed: {
country() {
return (
this.countryList.find(item => item.id == this.form.country_id) || {}
);
},
cardType() {
return [{
label: this.$t("profile.driverLicense"),
value: 1,
},
{
label: this.$t("profile.passport"),
value: 2,
},
{
label: this.$t("profile.iD"),
value: 3,
},
];
}
},
methods: {
//
getAuthInfo() {
Profile.getAuthInfo()
.then(res => {
this.detail = res;
//
// if (res.primary_status == 0) {
// this.setp = 0;
// return;
// } else if (res.status == 0) {
// this.setp = 1;
// } else {
// this.setp = 2;
// }
if (res.status == 0) {
this.setp = 0;
} else {
this.setp = 1;
}
})
.catch(res => {});
},
//
getCountryCode() {
Member.getCountryCode().then(res => {
this.countryList = res;
for (let i = 0; i < this.countryList.length; i++) {
let item = this.countryList[i];
if (item.id == 195) {
this.form.country_id = item.id;
break;
}
}
}).catch(res => {});
},
//
primaryAuth() {
let data = this.form;
data.country_code = this.country.country_code;
if (utils.validate("#auth")) {
if (!data.birthday) {
this.$message.error(this.$t("profile.dateofbirth"));
return;
}
Profile.newAuth(data).then(res => {
this.$message.success(this.$t("profile.submittedforcertification"));
this.getAuthInfo();
// this.setp++;
// this.$router.push("/wallet/assets/exchange")
}).catch(err => {});
}
}
},
created() {
this.getCountryCode();
this.getAuthInfo();
}
};
</script>
<style scoped lang="scss">
.profile-page {
padding-bottom: 50px;
}
.profile-page .btn-primary {
color: #101010;
background-color: #fff;
background-image: none;
}
.text9 {
color: #999;
}
.upload-demo {
::v-deep .el-upload-dragger {
width: 300px;
height: 150px;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
::v-deep {
.el-step__title.is-process {
color: white;
}
.el-upload-dragger {
background-color: #1e2834;
}
}
</style>

12
src/views/wallet/exchange-assets.vue

@ -16,7 +16,7 @@
</div>
<div class="d-flex px-5 fn-16">
<!-- <div class="w-6/24">{{ phoneNumbe }}</div> -->
<div class="w-5/24">{{ userInfo.email }}</div>
<div class="w-5/24" style="word-wrap: break-word;">{{ userInfo.email }}</div>
<div class="w-6/24">{{ userInfo.user_auth_level_text }}</div>
<!-- <div class="w-6/24">{{ userInfo.country_code }}</div> -->
</div>
@ -656,17 +656,17 @@ export default {
//
enterDeposite(item) {
if(this.userInfo.user_auth_level!=0){
// if(this.userInfo.user_auth_level!=0){
this.depositeCoin = item.coin_name;
this.deposite.coin_id = item.coin_id;
//
this.getDepositeAdress();
this.bool = true;
$("#deposite").modal("show");
}else{
// this.$message.error(this.$t("wallet.auth"))
this.$router.push("/profile/certification")
}
// }else{
// // this.$message.error(this.$t("wallet.auth"))
// this.$router.push("/profile/certification")
// }
},
//
getRechargeAdd(){

Loading…
Cancel
Save