This commit is contained in:
zhangds 2022-06-24 16:10:36 +08:00
commit 8b19c1e484
2 changed files with 52 additions and 48 deletions

View File

@ -1,14 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
@ -29,7 +27,9 @@
-->
<title>营销管理系统</title>
<style>
html,body,#root{
html,
body,
#root {
width: 100%;
height: 100%;
padding: 0;
@ -37,11 +37,11 @@
font-size: 14px;
overflow: hidden;
}
#root{
}
#root {}
</style>
</head>
<body>
<script type="text/javascript">
window.goods = product;
@ -59,4 +59,5 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

View File

@ -126,7 +126,7 @@ export default class adduserinfo extends React.Component {
model.stock = model_temp.stock
model.usage = model_temp.usage
model.map_product_name = model_temp.map_product_name
console.log("model => 编辑", model);
console.log('model => 编辑', model)
this.setState({ model: model })
}
this.getProductInfo()
@ -286,7 +286,7 @@ export default class adduserinfo extends React.Component {
map_product_name: cur_product.title,
account_type: cur_product.account_type
}
console.log("model2 =>111", model2);
console.log('model2 =>111', model2)
this.setState({ model: model2, productpic: obj2 })
}
onTypeChange(e) {
@ -323,7 +323,7 @@ export default class adduserinfo extends React.Component {
}
}
onUploadChange1(files, e) {
console.log("编辑 ==>files", files)
console.log('编辑 ==>files', files)
let arr = _.map(files, (o) => {
return o.id
})
@ -361,13 +361,13 @@ export default class adduserinfo extends React.Component {
id: files[i].id,
name: files[i].name,
url: path,
type:"add"
type: 'add'
}
let obj1 = {
id: files[i].id,
name: files[i].name,
src: path,
type:"add"
type: 'add'
}
const model = this.state.model
model.describe_url.push(obj1)
@ -407,16 +407,16 @@ export default class adduserinfo extends React.Component {
}
this.setState({ productpic: temp_arr })
console.log(this.state.model)
console.log("temp_arr =>", temp_arr);
console.log('temp_arr =>', temp_arr)
let left_temp_arr = temp_arr.map(item =>{
let left_temp_arr = temp_arr.map((item) => {
return {
...item,
src: item.url
}
})
let models = this.state.model;
models.describe_url = left_temp_arr;
let models = this.state.model
models.describe_url = left_temp_arr
this.setState({ model: models })
}
}, 500)
@ -631,7 +631,10 @@ export default class adduserinfo extends React.Component {
value={this.state.model.show_url}
/>
</FormItem>
<FormItem prop='describe_url' labelname='商品图2222' id='describe_url'>
<FormItem
prop='describe_url'
labelname='商品图2222'
id='describe_url'>
<ImageUpload
className='good-image-upload-demo'
maxSize={2 * 1024 * 1024}