描述:展厅图片

This commit is contained in:
SelfRidicule 2024-04-08 16:46:10 +08:00
parent eaeeb49e98
commit 6e0596c47f
2 changed files with 22 additions and 4 deletions

View File

@ -32,9 +32,18 @@ Page({
})
showroomDetailRq(_this.data.id).then(res => {
console.log('showroomDetailRq', res);
let detail = res.data;
let bannerList = []
if (detail.indoorPicUrl) {
try {
bannerList = JSON.parse(detail.indoorPicUrl).map(item=>item.url)
} catch (error) {
console.log(`JSON error : ${error}`);
}
}
_this.setData({
detail: res.data,
bannerList: [res.data.indoorPicUrl]
detail,
bannerList
})
})
// 获取地址信息

View File

@ -100,9 +100,18 @@ Page({
getDetail() {
let _this = this;
showroomDetailRq(this.data.id).then(res => {
let detail = res.data;
let bannerList = []
if (detail.indoorPicUrl) {
try {
bannerList = JSON.parse(detail.indoorPicUrl).map(item=>item.url)
} catch (error) {
console.log(`JSON error : ${error}`);
}
}
_this.setData({
detail: res.data,
bannerList: [res.data.indoorPicUrl]
detail,
bannerList
})
})
},