From c6cc0e8d0a05e211dc34223730a5f975f07446f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 10 Apr 2023 17:19:54 +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 --- api/baseurl.js | 2 +- pages/Modifyinformation/Modifyinformation.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/baseurl.js b/api/baseurl.js index 69554fd..87ed2bd 100644 --- a/api/baseurl.js +++ b/api/baseurl.js @@ -2,5 +2,5 @@ -var baseurl = "http://192.168.16.30:8080"; +var baseurl = "http://192.168.16.49:8080"; export default baseurl diff --git a/pages/Modifyinformation/Modifyinformation.vue b/pages/Modifyinformation/Modifyinformation.vue index 85275bf..bdaf77f 100644 --- a/pages/Modifyinformation/Modifyinformation.vue +++ b/pages/Modifyinformation/Modifyinformation.vue @@ -128,6 +128,7 @@ image: false, //判断是否上传头像 certificateimg: [], //证书img myimg: null, //头像img + uploadcertificateimg: [], //上传的证书img } }, computed: { @@ -158,6 +159,7 @@ count: 9, success(res) { res.tempFilePaths.forEach(e => { + that.uploadcertificateimg.push(e) that.certificateimg.push(e) }) } @@ -178,6 +180,7 @@ }, //个人信息 myInfo() { + this.certificateimg = [] nurseAppletPersonCenter(this.nursePersonId).then(res => { res.data.sex == 'MALE' ? res.data.sex = '男' : '' res.data.sex == 'FEMALE' ? res.data.sex = '女' : '' @@ -201,7 +204,7 @@ //上传证书 uploadcertificateimgs() { let that = this - if (this.certificateimg.length > 0) { + if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) { this.certificateimg.forEach(e => { uni.uploadFile({ url: baseurl + @@ -232,6 +235,7 @@ gofinish() { var that = this if (this.image) { + console.log(3) uni.uploadFile({ url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead', filePath: that.myimg, //file: 二进制(filePath) @@ -242,10 +246,11 @@ timeout: 5000, success(res) { that.appPersonallist.avatar = JSON.parse(res.data).imgUrl - that.updateNursePerson(); + // that.updateNursePerson(); } }) } else { + console.log(2) that.updateNursePerson(); } },