作者 “关晓峰”

fix

... ... @@ -184,6 +184,7 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag
this.$refs.uForm.validateField('userInfo.sex')
},
goUpload(val){
console.log(this.model1);
uni.navigateTo({
url:`/pages/sellAndBuy/upload?info=${JSON.stringify(this.model1.userInfo)}&val=${val}`
})
... ...
... ... @@ -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)
... ...
... ... @@ -21,7 +21,7 @@
</view>
<view class="flexBox" style="justify-content: space-between;">
<view class="flexBox">
<image src="/static/logo.png" style="width: 164rpx;height: 44rpx; margin-right: 16rpx;" mode="">
<image src="/static/logo.png" style="width: 164rpx;height: 44rpx; margin-right: 16rpx;" v-if="info.is_license == 1" mode="">
</image>
<view style="display: flex; align-items: center;">
<view style="margin:0 5rpx " v-for="item in info.tag_list">
... ...