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

View File

@ -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();
}
},