修改bug

This commit is contained in:
2025-09-12 12:04:22 +08:00
parent 77cf4aa7b7
commit 44059dd320
2 changed files with 14 additions and 6 deletions

View File

@@ -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),

View File

@@ -5,7 +5,7 @@
<view class="avatar-section">
<view class="avatar-container">
<image class="avatar-img" :src="userInfo.img" mode="aspectFill" @click="chooseImage"/>
<image class="avatar-img" :src="imgUrl" mode="aspectFill" @click="chooseImage"/>
</view>
</view>
@@ -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({