修改bug
This commit is contained in:
@@ -62,7 +62,7 @@ const install = (Vue, vm) => {
|
|||||||
getWarnEventInfo:(params = {}, alarmId) => vm.$u.get(config.adminPath+`/sis/alarmEventProcess/query/result/${alarmId}`,params),
|
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),
|
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),
|
getInspection:(params = {})=>vm.$u.get(config.adminPath+'/property/item/list',params),
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<view class="avatar-section">
|
<view class="avatar-section">
|
||||||
<view class="avatar-container">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -79,12 +79,14 @@ export default {
|
|||||||
userName:'',
|
userName:'',
|
||||||
phone:'',
|
phone:'',
|
||||||
gender:'',
|
gender:'',
|
||||||
sexLabel:''
|
sexLabel:'',
|
||||||
|
|
||||||
},
|
},
|
||||||
genderOptions: [
|
genderOptions: [
|
||||||
{value: 1, label: '男'},
|
{value: 1, label: '男'},
|
||||||
{value: 2, label: '女'}
|
{value: 2, label: '女'}
|
||||||
]
|
],
|
||||||
|
imgUrl:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -102,6 +104,12 @@ export default {
|
|||||||
if (res.code == "200") {
|
if (res.code == "200") {
|
||||||
this.userInfo =res.data;
|
this.userInfo =res.data;
|
||||||
this.userInfo.sexLabel = this.genderOptions[this.userInfo.gender-1].label;
|
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 => {
|
this.$u.api.unit.queryUnitById(params).then(res => {
|
||||||
@@ -138,8 +146,8 @@ export default {
|
|||||||
name: 'file',
|
name: 'file',
|
||||||
vm: this
|
vm: this
|
||||||
});
|
});
|
||||||
this.userInfo.img = result[0].data.url;
|
this.userInfo.img = result[0].data.ossId;
|
||||||
console.log(this.userInfo.img);
|
this.imgUrl = result[0].data.url;
|
||||||
const allSuccess = result.every(item => item.code == 200);
|
const allSuccess = result.every(item => item.code == 200);
|
||||||
if (!allSuccess) {
|
if (!allSuccess) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
Reference in New Issue
Block a user