This commit is contained in:
曹辉 2023-04-13 16:07:39 +08:00
parent 9532a4a2b5
commit d074f65faa

View File

@ -206,33 +206,35 @@
//上传证书 //上传证书
uploadcertificateimgs() { uploadcertificateimgs() {
let that = this let that = this
if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) { if (!that.timer) {
this.uploadcertificateimg.forEach(e => { if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) {
uni.uploadFile({ this.uploadcertificateimg.forEach(e => {
url: baseurl + uni.uploadFile({
'/nurseApplet/personCenter/uploadNurseStationPersonCertificateUrl', url: baseurl +
filePath: e, //file: 二进制(filePath) '/nurseApplet/personCenter/uploadNurseStationPersonCertificateUrl',
name: 'file', filePath: e, //file: 二进制(filePath)
formData: { //多余值 name: 'file',
'nursePersonId': that.nursePersonId, formData: { //多余值
}, 'nursePersonId': that.nursePersonId,
timeout: 10000, },
success(res) { timeout: 10000,
var img = { success(res) {
certificateUrl: JSON.parse(res.data).imgUrl var img = {
certificateUrl: JSON.parse(res.data).imgUrl
}
that.appPersonallist.nurseStationPersonCheckList.push(img)
if (that.appPersonallist.nurseStationPersonCheckList.length == that
.uploadcertificateimg.length) {
that.gofinish();
that.appPersonallist.nurseStationPersonCheckList = []
that.uploadcertificateimg = []
}
} }
that.appPersonallist.nurseStationPersonCheckList.push(img) })
if (that.appPersonallist.nurseStationPersonCheckList.length == that
.uploadcertificateimg.length) {
that.gofinish();
that.appPersonallist.nurseStationPersonCheckList = []
that.uploadcertificateimg = []
}
}
}) })
}) } else {
} else { that.gofinish();
that.gofinish(); }
} }
}, },
//修改 //修改