修改兑换码管理

This commit is contained in:
wangsongsole 2022-06-24 15:46:10 +08:00
parent 81236ab66b
commit ab0c153fc6
1 changed files with 36 additions and 5 deletions

View File

@ -253,16 +253,29 @@ export default class adduserinfo extends React.Component {
model2.product_name = cur_product.title
model2.account_type = cur_product.account_type
model2.show_url = picItem ? picItem.pic : ''
const flir = picItem?.describe_url.map((item) => {
return { src: item, name: 'xx' }
const obj1 = []
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.detail_url = ''
this.setState({ model: model2 })
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) {
@ -371,12 +384,20 @@ export default class adduserinfo extends React.Component {
(req, msg) => {
path = req.path
let obj = {
id: files[i].id,
name: files[i].name,
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
arr.push(obj)
this.setState({ arr })
this.setState({ productpic: arr, model })
},
(err) => {}
)
@ -409,7 +430,17 @@ export default class adduserinfo extends React.Component {
temp_arr[i] = temp
}
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)
// {
// // this.refs.swiperwrapper