This commit is contained in:
曹辉 2023-04-10 17:19:54 +08:00
parent 49c2212a71
commit c6cc0e8d0a
2 changed files with 8 additions and 3 deletions

View File

@ -2,5 +2,5 @@
var baseurl = "http://192.168.16.30:8080"; var baseurl = "http://192.168.16.49:8080";
export default baseurl export default baseurl

View File

@ -128,6 +128,7 @@
image: false, // image: false, //
certificateimg: [], //img certificateimg: [], //img
myimg: null, //img myimg: null, //img
uploadcertificateimg: [], //img
} }
}, },
computed: { computed: {
@ -158,6 +159,7 @@
count: 9, count: 9,
success(res) { success(res) {
res.tempFilePaths.forEach(e => { res.tempFilePaths.forEach(e => {
that.uploadcertificateimg.push(e)
that.certificateimg.push(e) that.certificateimg.push(e)
}) })
} }
@ -178,6 +180,7 @@
}, },
// //
myInfo() { myInfo() {
this.certificateimg = []
nurseAppletPersonCenter(this.nursePersonId).then(res => { nurseAppletPersonCenter(this.nursePersonId).then(res => {
res.data.sex == 'MALE' ? res.data.sex = '男' : '' res.data.sex == 'MALE' ? res.data.sex = '男' : ''
res.data.sex == 'FEMALE' ? res.data.sex = '女' : '' res.data.sex == 'FEMALE' ? res.data.sex = '女' : ''
@ -201,7 +204,7 @@
// //
uploadcertificateimgs() { uploadcertificateimgs() {
let that = this let that = this
if (this.certificateimg.length > 0) { if (this.uploadcertificateimg && this.uploadcertificateimg.length > 0) {
this.certificateimg.forEach(e => { this.certificateimg.forEach(e => {
uni.uploadFile({ uni.uploadFile({
url: baseurl + url: baseurl +
@ -232,6 +235,7 @@
gofinish() { gofinish() {
var that = this var that = this
if (this.image) { if (this.image) {
console.log(3)
uni.uploadFile({ uni.uploadFile({
url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead', url: baseurl + '/nurseApp/personLogin/updateHeadAvatarHead',
filePath: that.myimg, //file: (filePath) filePath: that.myimg, //file: (filePath)
@ -242,10 +246,11 @@
timeout: 5000, timeout: 5000,
success(res) { success(res) {
that.appPersonallist.avatar = JSON.parse(res.data).imgUrl that.appPersonallist.avatar = JSON.parse(res.data).imgUrl
that.updateNursePerson(); // that.updateNursePerson();
} }
}) })
} else { } else {
console.log(2)
that.updateNursePerson(); that.updateNursePerson();
} }
}, },