From 7497c203f119981b32ca106a19a458b87309ab30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 24 Jan 2022 17:48:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=B0=E5=A2=9Ekey?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=99=BD=E5=90=8D=E5=8D=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/add/add.js | 2 +- src/pages/exchangecode/commodity/commodity.js | 2 +- src/pages/exchangecode/commodity/goodedit.js | 27 ++++++++++++------- src/pages/exchangecode/edit/edit.js | 2 +- src/pages/exchangecode/product/add.js | 12 ++++----- src/pages/plan/add/step2.js | 2 +- src/pages/plan/key/product/add.js | 10 +++---- src/pages/plan/product/add.js | 10 +++---- 8 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 391efc91..97397cfe 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -1381,7 +1381,7 @@ export default class acclist extends React.Component{ diff --git a/src/pages/exchangecode/commodity/commodity.js b/src/pages/exchangecode/commodity/commodity.js index 62aa895a..646110cb 100644 --- a/src/pages/exchangecode/commodity/commodity.js +++ b/src/pages/exchangecode/commodity/commodity.js @@ -303,7 +303,7 @@ export default class commoditylist extends React.Component{ { @@ -253,8 +253,6 @@ componentDidMount() { this.setState({cur_product:e}) let cur_product = this.state.products.find((item)=>{return item.id == e.key}) let picItem = window.goods.find((item)=>{return item.id == cur_product.product_category_id}) - console.log(cur_product) - console.log(picItem) let model2 = { id:cur_product.id, type:cur_product.type, @@ -429,6 +427,14 @@ componentDidMount() { { let path = "" let formdata= new FormData(); + + if(files[i].file.size > 1024 * 1024 * 2) + { + Notify.error(`图片大小不能超过2M`); + console.log(77777) + return; + } + formdata.append("file",files[i].file) formdata.append("path","common_image") @@ -626,9 +632,10 @@ componentDidMount() { this.state.loadshow? {this.onUploadChange(e)}} onUpload={this.onUpload} fileList={this.state.model.show_url ? [{'src':this.state.model.show_url}] : null} @@ -638,11 +645,11 @@ componentDidMount() { { - this.state.loadshow? + this.state.loadshow? {this.onUploadChange2(e)}} diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index ea46aabd..22afafd2 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -987,7 +987,7 @@ export default class exchangedit extends React.Component{ diff --git a/src/pages/exchangecode/product/add.js b/src/pages/exchangecode/product/add.js index b1543818..ec832bae 100644 --- a/src/pages/exchangecode/product/add.js +++ b/src/pages/exchangecode/product/add.js @@ -527,19 +527,19 @@ export default class adduserinfo extends React.Component{ {this.onUploadChange(e)}} fileList={this.state.model.show_url ? [{'src':this.state.model.show_url}] : null} value={this.state.model.show_url} /> - + diff --git a/src/pages/plan/key/product/add.js b/src/pages/plan/key/product/add.js index f0c978be..501a6760 100644 --- a/src/pages/plan/key/product/add.js +++ b/src/pages/plan/key/product/add.js @@ -306,19 +306,19 @@ export default class adduserinfo extends React.Component{ {this.onUploadChange(e)}} onUpload={this.onUpload} value={this.state.model.show_url} /> - + {this.onUploadChange1(e)}} onUpload={this.onUpload} diff --git a/src/pages/plan/product/add.js b/src/pages/plan/product/add.js index 8935f44b..147ee6ea 100644 --- a/src/pages/plan/product/add.js +++ b/src/pages/plan/product/add.js @@ -592,12 +592,12 @@ export default class adduserinfo extends React.Component{ - + {this.onUploadChange3(e)}} sortable @@ -611,8 +611,8 @@ export default class adduserinfo extends React.Component{