暂存code

This commit is contained in:
hejiangming
2025-05-07 09:54:33 +08:00
parent 78270eeda0
commit 007b002b81
403 changed files with 14507 additions and 6320 deletions
+102 -53
View File
@@ -1,9 +1,10 @@
<template>
<view class="authentication_warp">
<Header :leftTitle="$t('authentication.title')" left-path-type="switchTab" left-path="/pages/mine/mine"></Header>
<view class="data_common_warp">
<view class="data_msg">请填写商户本人的相关信息</view>
<view class="data_msg">请填写用户本人得相关信息</view>
<view
:class="item.id < formList.length ?'add_form_item add_form_item_but':'add_form_item'"
class="'add_form_item add_form_item_but'"
v-for="item in formList"
:key="item.id"
>
@@ -13,43 +14,50 @@
border="surround"
v-model="form[item.formName]"
:customStyle="inputCss"
:type="item.type"
></up-input>
</view>
</view>
<view class="data_common_warp">
<view class="ID_card_title">上传证件照</view>
<view class="ID_card_msg">(请务必上传本人证件照,生活照、艺术照将会被驳回)</view>
<view class="ID_card_upload">
<view class="upload_item">
<up-image src="/static/common/ID_rx.png" width="100%" height="90" bgColor="#f1f6ff00"></up-image>
<view class="upload_msg">点击上传身份证人像面</view>
</view>
<view class="upload_item">
<up-image src="/static/common/ID_gq.png" width="100%" height="90" bgColor="#f1f6ff00"></up-image>
<view class="upload_msg">点击上传身份国旗面</view>
</view>
</view>
<view class="ID_card_upload_templ">
<view class="templ_title">上传标准</view>
<view class="templ_img_list">
<view class="templ_img_item" v-for="item in uploadTemplList" :key="item.id">
<up-image :src="item.url" width="100%" height="50" bgColor="#f1f6ff00"></up-image>
<view class="templ_img_item_msg">
<up-image :src="item.isOk ? '/static/common/ID_ok_1.png' :'/static/common/ID_error.png'" width="10" height="10" bgColor="#f1f6ff00"></up-image>
<view class="templ_img_item_msg_title">{{item.title}}</view>
</view>
</view>
<view
class="add_form_item"
>
<view class="add_form_title">证件类型</view>
<view class="cert_" @click="certShowCheck(true)">
<view class="cert_title">{{form.certName || '请选择'}}</view>
<up-image src="/static/common/right.png" width="16" height="16" bgColor="#f1f6ff00"></up-image>
</view>
</view>
</view>
<!-- 证件照 -->
<CommonCard @valueFunc="getValue"/>
<view class="add_but" @click="addAuthentication">
提交
</view>
<up-picker
:show="certShow"
:columns="[CERT_OPTION]"
keyName="value"
itemHeight="34"
@confirm="certConfirm"
@cancel="certShow=false"
@close="certShow=false"
></up-picker>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
import CommonCard from '@/components/common_card.vue';
import Header from '@/components/header.vue';
import { realNameAuthentication } from '@/api/auth.js';
import { CERT_OPTION } from '@/utils/enumUtils.js';
export default {
computed: {
CERT_OPTION() {
return CERT_OPTION;
},
},
components:{CommonCard,Header},
data() {
return {
inputCss:{
@@ -59,8 +67,11 @@
},
form:{
name:null,
mobile:null,
number:null,// 银行名称
certType:null,// 证状证件类型:1-居民身份证,2-护照
certName:null,
certNo:null,// 证件号码
certFimg:null,// 证件正面照片
certBimg:null,// 证件背面照片
},
formList:[
{
@@ -68,16 +79,13 @@
title:"真实姓名",
formName:"name",
placeholder:"请输入您的真实姓名",
},{
id:2,
title:"手机号",
formName:"mobile",
placeholder:"请输入手机号",
type:"text",
},{
id:3,
title:"证件号码",
formName:"number",
formName:"certNo",
placeholder:"请输入证件号码",
type:"text",
}
],
uploadTemplList:[
@@ -102,11 +110,14 @@
isOk:false,
url:"/static/common/ID_error_3.png",
}
]
],
certShow:false,
certOption:[],
}
},
methods: {
addAuthentication(){
async addAuthentication(){
const params={
...this.form
}
@@ -117,24 +128,65 @@
});
return;
}
if(!params.mobile){
if(!params.certType){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号",
message: "请选择证件类型",
});
return;
}
if(!params.number){
if(!params.certNo){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入证件号码",
});
return;
}
if(params.certFimg.length === 0){
this.$refs.uToastRef.show({
type: 'error',
message: "请上传证件正面照片",
});
return;
}
if(params.certBimg.length === 0){
this.$refs.uToastRef.show({
type: 'error',
message: "请上传证件背面照片",
});
return;
}
console.log("params",params);
uni.navigateTo({
url:'/pages/mine_authentication_ok/mine_authentication_ok',
})
const resp = await realNameAuthentication(params);
if(resp && resp.bizcode === 100){
uni.navigateTo({
url:'/pages/mine_authentication_ok/mine_authentication_ok',
})
}
},
// 提交地址
certConfirm(e){
const {
columnIndex,
value,
values,
index,
} = e;
const data = value[0];
this.form.certType = data.key;
this.form.certName = data.value;
this.certShowCheck(false);
},
// 选择银行的弹框
async certShowCheck(status){
this.certShow = status;
},
getValue(type,value){
if (type === "Z") {
this.form.certFimg = value;
} else if (type === "F") {
this.form.certBimg = value;
}
}
}
}
@@ -145,17 +197,14 @@
height: calc(100vh - 58rpx);
background-color: $app-bj;
padding: 30rpx;
.data_common_warp{
background: #FFFFFF;
border-radius: 30rpx;
padding: 30rpx;
margin-bottom: 30rpx;
}
.data_msg{
font-weight: 500;
font-size: 26rpx;
color: #F34343;
margin-bottom: 20rpx;
}
.cert_{
display: flex;
justify-content: space-between;
width: calc(100% - 170rpx);
.cert_title{
margin-left: 30rpx;
color:#9e9e9ec7
}
}
</style>