flx:调整承包商入场

This commit is contained in:
X_Rian 2024-07-19 19:39:33 +08:00
parent 7ce5a6a4a9
commit 7b4efba994

View File

@ -133,6 +133,15 @@
this.scrollHeight = screenHeight - this.barBoxHeight;
console.log('this.scrollHeight', this.scrollHeight);
},
isJSON(str) {
try {
JSON.parse(str);
} catch (e) {
//
return false;
}
return true;
},
getListData(){
this.searchForm.enterpriseId = this.id
// let data = {
@ -145,7 +154,8 @@
success: res => {
console.log("enterpriseQualification", res);
this.listData = res.result.map(item => {
item.logoUrl = this.url_config+'image/'+ JSON.parse(item.fileUrl)[0].url
const fileUrl = this.isJSON(item.fileUrl) && JSON.parse(item.fileUrl) instanceof Array ? JSON.parse(item.fileUrl)[0].url : item.fileUrl;
item.logoUrl = this.url_config+'image/'+ fileUrl
return item
})
}
@ -157,7 +167,8 @@
// uni.previewImage({
// urls: [url]
// })
let url = this.url_config + 'image/' + JSON.parse(item.fileUrl)[0].url
const fileUrl = this.isJSON(item.fileUrl) ? JSON.parse(item.fileUrl)[0].url: item.fileUrl;
let url = this.url_config + 'image/' + fileUrl
console.log(url)
uni.downloadFile({
url: url,