flx:调整承包商入场
This commit is contained in:
parent
7ce5a6a4a9
commit
7b4efba994
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user