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