diff --git a/common/http.api.js b/common/http.api.js index 7f8a468..2c26ca8 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -62,7 +62,7 @@ const install = (Vue, vm) => { getWarnEventInfo:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventProcess/query/result/${alarmId}`,params), getWarnImages:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventAttachments/query/${alarmId}`,params), - getImageUrl:(params = {}, ossIds) => vm.$u.get(config.adminPath+`/resource/oss/listByIds/${ossIds}`,params), + getImageUrl:(params = {}) => vm.$u.get(config.adminPath+'/resource/oss/listByIds/'+params.img), //巡检任务列表 getInspection:(params = {})=>vm.$u.get(config.adminPath+'/property/item/list',params), diff --git a/pages/sys/user/changeInfo/changeInfo.vue b/pages/sys/user/changeInfo/changeInfo.vue index dd36753..b73878c 100644 --- a/pages/sys/user/changeInfo/changeInfo.vue +++ b/pages/sys/user/changeInfo/changeInfo.vue @@ -5,7 +5,7 @@ - + @@ -79,12 +79,14 @@ export default { userName:'', phone:'', gender:'', - sexLabel:'' + sexLabel:'', + }, genderOptions: [ {value: 1, label: '男'}, {value: 2, label: '女'} - ] + ], + imgUrl:'' } }, onLoad() { @@ -102,6 +104,12 @@ export default { if (res.code == "200") { this.userInfo =res.data; this.userInfo.sexLabel = this.genderOptions[this.userInfo.gender-1].label; + params.img = this.userInfo.img; + this.$u.api.getImageUrl(params).then(res=>{ + if (res.code == 200) { + this.imgUrl=res.data[0].url; + } + }); } }); this.$u.api.unit.queryUnitById(params).then(res => { @@ -138,8 +146,8 @@ export default { name: 'file', vm: this }); - this.userInfo.img = result[0].data.url; - console.log(this.userInfo.img); + this.userInfo.img = result[0].data.ossId; + this.imgUrl = result[0].data.url; const allSuccess = result.every(item => item.code == 200); if (!allSuccess) { uni.showToast({