Merge branch 'addMenu' of https://codeup.aliyun.com/5f9118049cffa29cfdd3be1c/marketing/frontend into addMenu
This commit is contained in:
commit
bea8c996ff
|
@ -253,16 +253,29 @@ export default class adduserinfo extends React.Component {
|
||||||
model2.product_name = cur_product.title
|
model2.product_name = cur_product.title
|
||||||
model2.account_type = cur_product.account_type
|
model2.account_type = cur_product.account_type
|
||||||
model2.show_url = picItem ? picItem.pic : ''
|
model2.show_url = picItem ? picItem.pic : ''
|
||||||
const flir = picItem?.describe_url.map((item) => {
|
const obj1 = []
|
||||||
return { src: item, name: 'xx' }
|
const obj2 = []
|
||||||
|
|
||||||
|
picItem?.describe_url.map((item) => {
|
||||||
|
obj1.push({
|
||||||
|
src: item,
|
||||||
|
name: 'xxx.png',
|
||||||
|
id: new Date().getTime()
|
||||||
|
})
|
||||||
|
obj2.push({
|
||||||
|
url: item,
|
||||||
|
name: 'xxx.png',
|
||||||
|
id: new Date().getTime()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
model2.describe_url = flir
|
model2.describe_url = obj1
|
||||||
model2.map_product_name = cur_product.title
|
model2.map_product_name = cur_product.title
|
||||||
model2.detail_url = ''
|
model2.detail_url = ''
|
||||||
|
|
||||||
this.setState({ model: model2 })
|
this.setState({ model: model2 })
|
||||||
this.setState({
|
this.setState({
|
||||||
show_url: picItem ? [{ src: picItem.pic, id: new Date().getTime() }] : []
|
show_url: picItem ? [{ src: picItem.pic, id: new Date().getTime() }] : [],
|
||||||
|
productpic: obj2
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onTypeChange(e) {
|
onTypeChange(e) {
|
||||||
|
@ -371,12 +384,20 @@ export default class adduserinfo extends React.Component {
|
||||||
(req, msg) => {
|
(req, msg) => {
|
||||||
path = req.path
|
path = req.path
|
||||||
let obj = {
|
let obj = {
|
||||||
|
id: files[i].id,
|
||||||
name: files[i].name,
|
name: files[i].name,
|
||||||
url: path
|
url: path
|
||||||
}
|
}
|
||||||
|
let obj1 = {
|
||||||
|
name: files[i].name,
|
||||||
|
src: path,
|
||||||
|
id: files[i].id
|
||||||
|
}
|
||||||
|
const model = this.state.model
|
||||||
|
model.describe_url.push(obj1)
|
||||||
let arr = this.state.productpic
|
let arr = this.state.productpic
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
this.setState({ arr })
|
this.setState({ productpic: arr, model })
|
||||||
},
|
},
|
||||||
(err) => {}
|
(err) => {}
|
||||||
)
|
)
|
||||||
|
@ -409,7 +430,17 @@ export default class adduserinfo extends React.Component {
|
||||||
temp_arr[i] = temp
|
temp_arr[i] = temp
|
||||||
}
|
}
|
||||||
this.setState({ productpic: temp_arr })
|
this.setState({ productpic: temp_arr })
|
||||||
|
let left_temp_arr = temp_arr.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
src: item.url
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let models = this.state.model
|
||||||
|
models.describe_url = left_temp_arr
|
||||||
|
this.setState({ model: models })
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(this.mySwiper)
|
// if(this.mySwiper)
|
||||||
// {
|
// {
|
||||||
// // this.refs.swiperwrapper
|
// // this.refs.swiperwrapper
|
||||||
|
@ -628,7 +659,7 @@ export default class adduserinfo extends React.Component {
|
||||||
this.onUploadChange3(e)
|
this.onUploadChange3(e)
|
||||||
}}
|
}}
|
||||||
sortable
|
sortable
|
||||||
defaultFileList={this.state.model.describe_url}
|
fileList={this.state.model.describe_url}
|
||||||
multiple
|
multiple
|
||||||
ref='product_describe'
|
ref='product_describe'
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue