|
|
@ -135,10 +135,10 @@ Page({ |
|
|
* 提交认证 |
|
|
* 提交认证 |
|
|
*/ |
|
|
*/ |
|
|
async submitAuth() { |
|
|
async submitAuth() { |
|
|
// 验证是否上传了身份证
|
|
|
// 验证是否上传了身份证和营业执照
|
|
|
if (!this.data.idCardFront || !this.data.idCardBack) { |
|
|
if (!this.data.idCardFront || !this.data.idCardBack || !this.data.businessLicense) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '请上传身份证正反面', |
|
|
title: '请上传身份证正反面和营业执照', |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
@ -163,6 +163,8 @@ Page({ |
|
|
const idcard1Url = await this.uploadFileToServer(this.data.idcard1.path, 'idCardFront'); |
|
|
const idcard1Url = await this.uploadFileToServer(this.data.idcard1.path, 'idCardFront'); |
|
|
// 上传身份证反面
|
|
|
// 上传身份证反面
|
|
|
const idcard2Url = await this.uploadFileToServer(this.data.idcard2.path, 'idCardBack'); |
|
|
const idcard2Url = await this.uploadFileToServer(this.data.idcard2.path, 'idCardBack'); |
|
|
|
|
|
// 上传营业执照
|
|
|
|
|
|
const businessLicenseUrl = await this.uploadFileToServer(this.data.businessLicenseFile.path, 'businessLicense'); |
|
|
|
|
|
|
|
|
console.log('所有文件上传完成'); |
|
|
console.log('所有文件上传完成'); |
|
|
|
|
|
|
|
|
@ -172,6 +174,7 @@ Page({ |
|
|
userId: userId, |
|
|
userId: userId, |
|
|
idcard1: idcard1Url, |
|
|
idcard1: idcard1Url, |
|
|
idcard2: idcard2Url, |
|
|
idcard2: idcard2Url, |
|
|
|
|
|
businesslicenseurl: businessLicenseUrl, |
|
|
name: this.data.name, |
|
|
name: this.data.name, |
|
|
idNumber: this.data.idNumber, |
|
|
idNumber: this.data.idNumber, |
|
|
address: this.data.address |
|
|
address: this.data.address |
|
|
|