From b6256fd0c723eddbe2fedf6a787e073f1c91a591 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 24 Jun 2022 16:09:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 79 ++++++++++++++------------- src/pages/exchangecode/product/add.js | 37 +++++++------ 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/public/index.html b/public/index.html index dc481c0b..b2fb6a59 100644 --- a/public/index.html +++ b/public/index.html @@ -1,24 +1,22 @@ - - - - - - - - - - - - 营销管理系统 - - - - - -
- - - + + + \ No newline at end of file diff --git a/src/pages/exchangecode/product/add.js b/src/pages/exchangecode/product/add.js index 0082cb97..6e8829db 100644 --- a/src/pages/exchangecode/product/add.js +++ b/src/pages/exchangecode/product/add.js @@ -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() @@ -260,11 +260,11 @@ export default class adduserinfo extends React.Component { const obj2 = [] picItem?.describe_url.map((item) => { - obj1.push({ src: item, id: '2561a423dsd1231z8r5', type:"add" }) - obj2.push({ url: item, id: '2561a423dsd1231z8r5', type:"add" }) + obj1.push({ src: item, id: '2561a423dsd1231z8r5', type: 'add' }) + obj2.push({ url: item, id: '2561a423dsd1231z8r5', type: 'add' }) }) - console.log(" picItem =>", picItem); + console.log(' picItem =>', picItem) let quantity = this.state.model.quantity let model2 = { @@ -284,7 +284,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) { @@ -321,7 +321,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.name }) @@ -355,16 +355,16 @@ export default class adduserinfo extends React.Component { (req, msg) => { path = req.path let obj = { - id:files[i].id, + id: files[i].id, name: files[i].name, url: path, - type:"add" + type: 'add' } let obj1 = { - id:files[i].id, + id: files[i].id, name: files[i].name, src: path, - type:"add" + type: 'add' } const model = this.state.model model.describe_url.push(obj1) @@ -404,17 +404,17 @@ 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 + src: item.url } }) - let models = this.state.model; - models.describe_url = left_temp_arr; - this.setState({model:models}) + let models = this.state.model + models.describe_url = left_temp_arr + this.setState({ model: models }) } }, 500) } @@ -628,7 +628,10 @@ export default class adduserinfo extends React.Component { value={this.state.model.show_url} /> - +