...
|
...
|
@@ -75,16 +75,18 @@ |
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
console.log(option.val);
|
|
|
console.log(option);
|
|
|
this.flag = option.val
|
|
|
if (option.info) {
|
|
|
this.info = JSON.parse(option.info)
|
|
|
this.fileList = JSON.parse(this.info.images_json)
|
|
|
console.log(this.fileList);
|
|
|
if(this.info.images_json){
|
|
|
this.fileList = JSON.parse(this.info.images_json)
|
|
|
}
|
|
|
console.log(this.info);
|
|
|
}
|
|
|
uni.$u.http.get('/api/equip/equip_image').then(res => {
|
|
|
console.log(res);
|
|
|
})
|
|
|
// uni.$u.http.get('/api/equip/equip_image').then(res => {
|
|
|
// console.log(res);
|
|
|
// })
|
|
|
// this.fileList = JSON.parse(this.info.images_json)
|
|
|
// console.log(this.fileList);
|
|
|
// let arr
|
...
|
...
|
@@ -103,18 +105,16 @@ |
|
|
delete p.name
|
|
|
delete p.brand_name
|
|
|
delete p.xh_name
|
|
|
console.log(this.info);
|
|
|
console.log(this.fileList);
|
|
|
// let images_json = this.fileList.map(item => {
|
|
|
// return{
|
|
|
// [item.title]: item.url && item.url[0] && item.url[0].thumb || ''
|
|
|
// }
|
|
|
// });
|
|
|
p.province = p.region.slice(0, 3)
|
|
|
p.city = p.region.slice(3, 6)
|
|
|
p.region = p.region.slice(6, 9)
|
|
|
p.address = p.region
|
|
|
console.log('sdadasds', this.flag);
|
|
|
let ads = JSON.parse(JSON.stringify(p))
|
|
|
p.address = ads.region
|
|
|
p.province = ads.region.slice(0, 3)
|
|
|
p.city = ads.region.slice(3, 6)
|
|
|
p.region = ads.region.slice(6, 9)
|
|
|
uni.$u.http.post(this.flag === "sale" ? '/api/equip/add_equip_sale' : '/api/equip/add_equip_hire', {
|
|
|
...p,
|
|
|
images_json: JSON.stringify(this.fileList)
|
...
|
...
|
|