From d074f65faa1ae39b4da82eca6ef456ea5ec9daff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 13 Apr 2023 16:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Modifyinformation/Modifyinformation.vue | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/pages/Modifyinformation/Modifyinformation.vue b/pages/Modifyinformation/Modifyinformation.vue index 87172c8..f089fa9 100644 --- a/pages/Modifyinformation/Modifyinformation.vue +++ b/pages/Modifyinformation/Modifyinformation.vue @@ -206,33 +206,35 @@ //上传证书 uploadcertificateimgs() { let that = this - if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) { - this.uploadcertificateimg.forEach(e => { - uni.uploadFile({ - url: baseurl + - '/nurseApplet/personCenter/uploadNurseStationPersonCertificateUrl', - filePath: e, //file: 二进制(filePath) - name: 'file', - formData: { //多余值 - 'nursePersonId': that.nursePersonId, - }, - timeout: 10000, - success(res) { - var img = { - certificateUrl: JSON.parse(res.data).imgUrl + if (!that.timer) { + if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) { + this.uploadcertificateimg.forEach(e => { + uni.uploadFile({ + url: baseurl + + '/nurseApplet/personCenter/uploadNurseStationPersonCertificateUrl', + filePath: e, //file: 二进制(filePath) + name: 'file', + formData: { //多余值 + 'nursePersonId': that.nursePersonId, + }, + timeout: 10000, + success(res) { + 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 { - that.gofinish(); + } else { + that.gofinish(); + } } }, //修改