Browse Source

认证提交数据验证,认证提交后,显示不同认证选择

master
wanghongjun 2 years ago
parent
commit
be68cd18ba
  1. 8
      api/verify.js
  2. 150
      pages/user/mycertinfo/mycertinfo.vue
  3. 71
      pages/user/mycertinfo/orgverify.vue
  4. 47
      pages/user/mycertinfo/personverify.vue

8
api/verify.js

@ -4,6 +4,8 @@ import request from '@/utils/request'
// api地址
const api = {
// 扫描证书上传接口
listLibrary: 'Paymentlist/entuiprise/listLibrary',
// 扫描证书上传接口
cerscan_url: 'Paymentlist/entuiprise/v1/user/cer-scan',
// 行业类目
@ -61,6 +63,10 @@ export function verifySubmit(data){
}
// 保存协议
export function preservation(agreement) {
return request.get(api.save_user, {userId: agreement.userId, agreementIds: agreement.agreementIds})
return request.post(api.save_user, {userId: agreement.userId, agreementIds: agreement.agreementIds})
}
// 获取用户认证信息
export function listLibrary(agreementId){
return request.post(api.listLibrary + '?AuId=' + agreementId,{})
}

150
pages/user/mycertinfo/mycertinfo.vue

@ -4,25 +4,29 @@
<view class="ce-frist">
<view class="cert-title">我的认证</view>
<!-- 机构认证 -->
<view class="ce-tit">机构认证</view>
<view class="ce-fbox">
<view class="fbicon fbjg"></view>
<view class="fbtit">机构认证</view>
<view class="fbdesc">
含企业政府事业单位团体组织
</view>
<view class="fbbtn" @click="orgverify()">立即认证</view>
</view>
<view v-if="is_show_institutions">
<view class="ce-tit">机构认证</view>
<view class="ce-fbox">
<view class="fbicon fbjg"></view>
<view class="fbtit">机构认证</view>
<view class="fbdesc">
含企业政府事业单位团体组织
</view>
<view class="fbbtn" @click="orgverify()">{{institutionsStr}}</view>
</view>
</view>
<!-- 个人认证 -->
<view class="ce-tit">个人认证</view>
<view class="ce-fbox">
<view class="fbicon fbgr"></view>
<view class="fbtit">个人认证</view>
<view class="fbdesc">
适用于个人用户
</view>
<view class="fbbtn" @click="personverify()">立即认证</view>
</view>
<view v-if="is_show_people">
<view class="ce-tit">个人认证</view>
<view class="ce-fbox">
<view class="fbicon fbgr"></view>
<view class="fbtit">个人认证</view>
<view class="fbdesc">
适用于个人用户
</view>
<view class="fbbtn" @click="personverify()">{{peopleStr}}</view>
</view>
</view>
</view>
</view>
@ -30,14 +34,23 @@
<script>
import { checkLogin } from '@/core/app'
import {listLibrary} from "../../../api/verify";
import { returnAccountId } from '@/core/app'
export default {
data() {
return {
//
isLogin: false,
peopleStr: '立即认证',
institutionsStr: '立即认证',
is_show_people: true,
is_show_institutions: true,
}
},
mounted() {
this.listLibrary()
},
onShow() {
//
this.isLogin = checkLogin()
@ -50,12 +63,109 @@
methods: {
//
orgverify(){
this.$navTo("pages/user/mycertinfo/orgverify")
if (this.institutionsStr === '待缴费') {
this.$error('缴费页面还未开发');
} else {
this.$navTo("pages/user/mycertinfo/orgverify")
}
},
//
personverify(){
this.$navTo("pages/user/mycertinfo/personverify")
},
//
listLibrary() {
const app = this
let accountId = returnAccountId()
return new Promise((resolve, reject) => {
listLibrary(accountId)
.then(result => {
if (result.resultCode === "00000000") {
let state = result.data.state;
let paystatu = result.data.paystatu;
let isposttion = result.data.isposttion;
let userTypes = result.data.usertype;
let str1 = app.institutionsStr//
let str2 = app.peopleStr//
if (isposttion === 1) {
//
if (userTypes !== undefined) {
if (userTypes === "企业") {
app.is_show_people = false //
if (state == "1" || state == "3" || state == "7" || state == "0") {
str1 = "认证中"
} else if (state == "2" || state == "4" || state == "5") {
str1 = "认证失败"
} else if (state == "6") {
str1 = "认证通过"
}
}
} else if (userTypes == "服务商") {
app.is_show_people = false //
if (state == "1" || state == "3" || state == "7" || state == "0") {
str1 = '认证中'
} else if (state == "2" || state == "4" || state == "5") {
str1 = '认证失败'
} else if (state == "6") {
str1 = '认证通过'
}
}
} else {
//
if (userTypes !== undefined) {
if (userTypes === "个人") {
app.is_show_institutions = false
if (paystatu == "1") {
if (state == "1" || state == "3" || state == "7" || state == "0") {
str2 = '认证中'
} else if (state == "2" || state == "4" || state == "5") {
str2 = '认证失败'
} else if (state == "6") {
str2 = '认证通过'
}
} else if (paystatu == "2") {
str2 = '待缴费'
}
} else if (userTypes == "企业") {
app.is_show_people = false
if (paystatu == "1") {
if (state == "1" || state == "3" || state == "7" || state == "0") {
str1 = '认证中'
} else if (state == "2" || state == "4" || state == "5") {
str1 = '认证失败'
} else if (state == "6") {
str1 = '认证通过'
}
} else if (paystatu == "2") {
str1 = '待缴费'
}
} else if (userTypes == "服务商") {
app.is_show_people = false
if (paystatu == "1") {
if (state == "1" || state == "3" || state == "7" || state == "0") {
str1 = '认证中'
} else if (state == "2" || state == "4" || state == "5") {
str1 = '认证失败'
} else if (state == "6") {
str1 = '认证通过'
}
} else if (paystatu == "2") {
str1 = '待缴费'
}
}
}
}
app.institutionsStr = str1
app.peopleStr = str2
}
resolve()
})
.catch(reject)
})
},
}
}
</script>

71
pages/user/mycertinfo/orgverify.vue

@ -887,13 +887,10 @@
const app = this
if (!app.isTick) {
alert('请勾选《交易主体进场协议》和《文化数据交易委托协议》和《临时业务机构委托协议》')
app.$error('请勾选《交易主体进场协议》和《文化数据交易委托协议》和《临时业务机构委托协议》')
return false;
}
app.chkinput();
console.log(app.$data)
//
let regionStr = app.regionStr
let regionArr = regionStr.split(" ")
@ -939,9 +936,15 @@
// ID
let accountId = returnAccountId()
if (accountId == '') {
app.$error('登录已失效,请前往登录')
uni.navigateTo({
url:"/pages/login/index"
})
return false
}
let agreement = {
agreementIds: "4,5,6",
userId: accountId
}
//
@ -985,7 +988,10 @@
identity: app.sfval === 10 ? '法人' : '经办人', //:'',''
usertype: estimate === 1 ? "企业" : "服务商", // / ""'
};
let validateRes = app.submitDataValidate(institutionsdata);
if (validateRes < 1) {
return false
}
// 10 = 20 =
if (app.sfval === 20) {
//
@ -999,14 +1005,55 @@
institutionsdata.manageridnum = app.managerIdnum; //
}
console.log(institutionsdata)
VerifyApi.preservation(agreement)
let res = VerifyApi.verifySubmit(institutionsdata)
uni.navigateTo({
url:"/pages/user/index"
})
},
//
submitDataValidate(data) {
const app = this
let validateData = [
{key: 'name', title: '机构名称'},
{key: 'industrytype', title: '行业类别'},
{key: 'regionprovince', title: '注册地区'},
{key: 'address', title: '详细地址'},
{key: 'establishdate', title: '机构成立日期'},
{key: 'desc', title: '机构简介'},
{key: 'legalsname', title: '法人姓名'},
{key: 'legalstype', title: '法人证件类型'},
{key: 'legalsidnum', title: '法人身份证号'},
{key: 'uscc', title: '统一社会信用代码'},
{key: 'licensedate', title: '营业执照有效期'},
{key: 'legalscellphone', title: '法人手机号'},
{key: 'publicaccount', title: '银行账号'},
{key: 'bankaccountname', title: '开户人'},
{key: 'bankcardtype', title: '银行卡类型'},
{key: 'bankprovince', title: '开户银行所在地'},
{key: 'bankname', title: '开户银行名称'},
{key: 'banktype', title: '银行行号'},
{key: 'certidnum', title: '开户人身份证号码'},
{key: 'bankcellphone', title: '开户银行预留手机号'},
{key: 'cerscanpath', title: '营业执照/事业单位法人证书扫描件'},
{key: 'legalsscanpath1', title: '法人身份证正面扫描件'},
{key: 'legalsscanpath2', title: '法人身份证反面扫描件'},
{key: 'doorheadphoto', title: '门头照'},
{key: 'parentislicode', title: '推荐中介服务机构'},
{key: 'saleType', title: '买卖方类型'},
]
for (let i in validateData) {
let dateVal = validateData[i]
let val = data[dateVal.key]
if (val === '' || val === null || val === undefined) {
app.$error(dateVal.title + '不能为空')
return 0
}
}
let institutionsdata_json = JSON.stringify(institutionsdata)
//
var ajaxentUserDemo = new AJAX_OBJ("Paymentlist/entuiprise/mannAgeDate", onentiseSuccess, onUrlError);
ajaxentUserDemo.postRequestData(institutionsdata_json);
return 1;
}
}
}
</script>

47
pages/user/mycertinfo/personverify.vue

@ -446,9 +446,11 @@
let accountId = returnAccountId()
if (accountId === '') {
app.$error('登录已失效,请前往登录')
uni.navigateTo({
url:"/pages/login/index"
})
return false
}
let agreement = {
@ -501,9 +503,48 @@
userid: accountId,
usertype: "个人"
}
console.log(peopledata)
console.log(VerifyApi.preservation(agreement))
console.log(VerifyApi.verifySubmit(peopledata))
let validateRes = app.submitDataValidate(peopledata)
if (validateRes < 1) {
return false
}
VerifyApi.preservation(agreement)
let res = VerifyApi.verifySubmit(peopledata)
uni.navigateTo({
url:"/pages/user/index"
})
},
//
submitDataValidate(data) {
const app = this
let validateData = [
{key: 'name', title: '姓名'},
{key: 'uscc', title: '身份证号'},
{key: 'regionprovince', title: '户籍所在地'},
{key: 'address', title: '详细地址'},
{key: 'establishdate', title: '机构成立日期'},
{key: 'desc', title: '机构简介'},
{key: 'cerscanpath1', title: '个人身份证扫正面描件'},
{key: 'cerscanpath2', title: '个人身份证扫反面描件'},
{key: 'contactscellphone', title: '联系电话'},
{key: 'contactsemail', title: '邮箱地址'},
{key: 'publicaccount', title: '对公账户号'},
{key: 'bankname', title: '开户银行名称'},
{key: 'bankprovince', title: '开户银行所在地'},
{key: 'bankcellphone', title: '开户银行预留手机号'},
{key: 'parentislicode', title: '推荐中介服务机构'}
]
for (let i in validateData) {
let dateVal = validateData[i]
let val = data[dateVal.key]
if (val === '' || val === null || val === undefined) {
app.$error(dateVal.title + '不能为空')
return 0
}
}
return 1;
}
}
}

Loading…
Cancel
Save