|
|
@ -28,7 +28,7 @@ Page({ |
|
|
// 上传资料
|
|
|
// 上传资料
|
|
|
businesslicenseurl: null, // 营业执照URL (原businessLicenseFile)
|
|
|
businesslicenseurl: null, // 营业执照URL (原businessLicenseFile)
|
|
|
proofurl: null, // 动物检疫证明URL (原animalQuarantineFile)
|
|
|
proofurl: null, // 动物检疫证明URL (原animalQuarantineFile)
|
|
|
idCardFile: null, // 身份证文件 (保持不变)
|
|
|
// idCardFile: null, // 已移除,法人身份证现在使用proofurl字段
|
|
|
brandurl: null, // 品牌授权链URL (原brandAuthFile)
|
|
|
brandurl: null, // 品牌授权链URL (原brandAuthFile)
|
|
|
|
|
|
|
|
|
// 审核状态
|
|
|
// 审核状态
|
|
|
@ -122,7 +122,7 @@ Page({ |
|
|
cooperation: settlementData.cooperation || settlementData.selectedCooperation, |
|
|
cooperation: settlementData.cooperation || settlementData.selectedCooperation, |
|
|
businesslicenseurl: settlementData.businesslicenseurl || settlementData.businessLicenseFile, |
|
|
businesslicenseurl: settlementData.businesslicenseurl || settlementData.businessLicenseFile, |
|
|
proofurl: settlementData.proofurl || settlementData.animalQuarantineFile, |
|
|
proofurl: settlementData.proofurl || settlementData.animalQuarantineFile, |
|
|
idCardFile: settlementData.idCardFile, |
|
|
// idCardFile: settlementData.idCardFile, // 已移除,法人身份证现在使用proofurl字段
|
|
|
brandurl: settlementData.brandurl || settlementData.brandAuthFile, |
|
|
brandurl: settlementData.brandurl || settlementData.brandAuthFile, |
|
|
agreementChecked: settlementData.agreementChecked, |
|
|
agreementChecked: settlementData.agreementChecked, |
|
|
partnerstatus: settlementData.partnerstatus || settlementData.auditStatus |
|
|
partnerstatus: settlementData.partnerstatus || settlementData.auditStatus |
|
|
@ -145,8 +145,7 @@ Page({ |
|
|
detailedaddress: this.data.detailedaddress, // 详细地址 (原detailAddress)
|
|
|
detailedaddress: this.data.detailedaddress, // 详细地址 (原detailAddress)
|
|
|
cooperation: this.data.cooperation, // 合作模式 (原selectedCooperation)
|
|
|
cooperation: this.data.cooperation, // 合作模式 (原selectedCooperation)
|
|
|
businesslicenseurl: this.data.businesslicenseurl, // 营业执照URL (原businessLicenseFile)
|
|
|
businesslicenseurl: this.data.businesslicenseurl, // 营业执照URL (原businessLicenseFile)
|
|
|
proofurl: this.data.proofurl, // 动物检疫证明URL (原animalQuarantineFile)
|
|
|
proofurl: this.data.proofurl, // 动物检疫证明或法人身份证URL (原animalQuarantineFile)
|
|
|
idCardFile: this.data.idCardFile, |
|
|
|
|
|
brandurl: this.data.brandurl, // 品牌授权链URL (原brandAuthFile)
|
|
|
brandurl: this.data.brandurl, // 品牌授权链URL (原brandAuthFile)
|
|
|
agreementChecked: this.data.agreementChecked, |
|
|
agreementChecked: this.data.agreementChecked, |
|
|
partnerstatus: this.data.partnerstatus // 合作商状态 (原auditStatus)
|
|
|
partnerstatus: this.data.partnerstatus // 合作商状态 (原auditStatus)
|
|
|
@ -416,7 +415,7 @@ Page({ |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
const tempFilePaths = res.tempFilePaths; |
|
|
const tempFilePaths = res.tempFilePaths; |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
idCardFile: { |
|
|
proofurl: { // 使用与动物检疫合格证明相同的字段名
|
|
|
path: tempFilePaths[0], |
|
|
path: tempFilePaths[0], |
|
|
name: `法人身份证_${new Date().getTime()}.jpg` |
|
|
name: `法人身份证_${new Date().getTime()}.jpg` |
|
|
} |
|
|
} |
|
|
@ -427,7 +426,7 @@ Page({ |
|
|
|
|
|
|
|
|
// 删除法人身份证
|
|
|
// 删除法人身份证
|
|
|
deleteIdCard() { |
|
|
deleteIdCard() { |
|
|
this.setData({ idCardFile: null }); |
|
|
this.setData({ proofurl: null }); // 使用与动物检疫合格证明相同的字段名
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 上传品牌授权链文件
|
|
|
// 上传品牌授权链文件
|
|
|
@ -528,14 +527,14 @@ Page({ |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 上传动物检疫合格证明
|
|
|
// 上传动物检疫合格证明或法人身份证(两者共用一个字段)
|
|
|
if (this.data.proofurl) { // 使用数据库字段名
|
|
|
if (this.data.proofurl) { // 使用数据库字段名
|
|
|
uploadedFiles.animalQuarantineFile = await this.uploadFileToServer( |
|
|
uploadedFiles.animalQuarantineFile = await this.uploadFileToServer( |
|
|
this.data.proofurl.path, |
|
|
this.data.proofurl.path, |
|
|
'animalQuarantine' |
|
|
'animalQuarantine' // 保持原有的文件类型,或者可以根据实际情况调整
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 上传品牌授权链文件
|
|
|
// 上传品牌授权链文件
|
|
|
if (this.data.brandurl) { // 使用数据库字段名
|
|
|
if (this.data.brandurl) { // 使用数据库字段名
|
|
|
uploadedFiles.brandAuthFile = await this.uploadFileToServer( |
|
|
uploadedFiles.brandAuthFile = await this.uploadFileToServer( |
|
|
@ -588,7 +587,7 @@ Page({ |
|
|
cooperation: this.data.cooperation === '货源委托' ? 'wholesale' : this.data.cooperation, // 合作模式映射为后端期望的值
|
|
|
cooperation: this.data.cooperation === '货源委托' ? 'wholesale' : this.data.cooperation, // 合作模式映射为后端期望的值
|
|
|
phoneNumber: contactPhone, // 后端期望的字段名是phoneNumber
|
|
|
phoneNumber: contactPhone, // 后端期望的字段名是phoneNumber
|
|
|
businesslicenseurl: uploadedFiles.businessLicenseFile || '', // 营业执照URL
|
|
|
businesslicenseurl: uploadedFiles.businessLicenseFile || '', // 营业执照URL
|
|
|
proofurl: uploadedFiles.animalQuarantineFile || '', // 动物检疫证明URL
|
|
|
proofurl: uploadedFiles.animalQuarantineFile || '', // 动物检疫证明或法人身份证URL(两者共用一个字段)
|
|
|
brandurl: uploadedFiles.brandAuthFile || '', // 品牌授权链URL
|
|
|
brandurl: uploadedFiles.brandAuthFile || '', // 品牌授权链URL
|
|
|
userId: userId |
|
|
userId: userId |
|
|
}; |
|
|
}; |
|
|
@ -1147,7 +1146,7 @@ Page({ |
|
|
showCooperationError: false, |
|
|
showCooperationError: false, |
|
|
businesslicenseurl: null, // 使用数据库字段名 (原businessLicenseFile)
|
|
|
businesslicenseurl: null, // 使用数据库字段名 (原businessLicenseFile)
|
|
|
proofurl: null, // 使用数据库字段名 (原animalQuarantineFile)
|
|
|
proofurl: null, // 使用数据库字段名 (原animalQuarantineFile)
|
|
|
idCardFile: null, |
|
|
// idCardFile: null, // 已移除,法人身份证现在使用proofurl字段
|
|
|
brandurl: null, // 使用数据库字段名 (原brandAuthFile)
|
|
|
brandurl: null, // 使用数据库字段名 (原brandAuthFile)
|
|
|
partnerstatus: 'underreview', // 使用数据库字段名 (原auditStatus)
|
|
|
partnerstatus: 'underreview', // 使用数据库字段名 (原auditStatus)
|
|
|
showAuthModal: false, |
|
|
showAuthModal: false, |
|
|
|