From e6b888225ead11170da2a58d7337a64f7db7fb81 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 19:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/add/add.js | 1 + src/pages/exchangecode/commodity/goodedit.js | 16 ++++++++-------- src/pages/exchangecode/edit/edit.js | 1 + src/pages/exchangecode/product/add.js | 7 ++----- src/pages/plan/key/edit.js | 1 + src/pages/plan/key/product/add.js | 2 ++ src/pages/plan/product/add.js | 16 ++-------------- 7 files changed, 17 insertions(+), 27 deletions(-) diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 0c38dc73..3d7ac72d 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -438,6 +438,7 @@ export default class acclist extends React.Component{ obj.quantity = item.quantity; obj.show_url = item.show_url; obj.describe_url = item.describe_url; + obj.detail_url = item.detail_url; obj.map_product_name = item.map_product_name; return obj }) diff --git a/src/pages/exchangecode/commodity/goodedit.js b/src/pages/exchangecode/commodity/goodedit.js index aa3cd179..bc055889 100644 --- a/src/pages/exchangecode/commodity/goodedit.js +++ b/src/pages/exchangecode/commodity/goodedit.js @@ -116,14 +116,14 @@ componentDidMount() { } else{ - if(req.describe_url!="") - { - pics = req.describe_url.split(',') - } - else{ - pics = [] - } - + if(req.describe_url!="") + { + pics = req.describe_url.split(',') + } + else{ + pics = [] + } + } diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index 22afafd2..2d34454f 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -32,6 +32,7 @@ export default class exchangedit extends React.Component{ product_name:"", show_url:"", describe_url:"", + detail_url:"" }, codeInfo:{ //数据模型不可少 code_name:"", diff --git a/src/pages/exchangecode/product/add.js b/src/pages/exchangecode/product/add.js index 41001fe1..e4b287fa 100644 --- a/src/pages/exchangecode/product/add.js +++ b/src/pages/exchangecode/product/add.js @@ -27,6 +27,7 @@ export default class adduserinfo extends React.Component{ product_name:"", show_url:"", describe_url:[], + detail_url:"", stock:"", usage:"", detail_url:"", @@ -278,11 +279,7 @@ export default class adduserinfo extends React.Component{ console.log(files) if(files.length > 0 ) { - if(files[0].file.size > 20000) - { - Notify.error(`图片大小不能超过 20KB`); - return; - } + let formdata= new FormData(); formdata.append("file",files[0].file) formdata.append("path","common_image") diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 0424557a..513b29ee 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -447,6 +447,7 @@ export default class acclist extends React.Component{ obj.quantity = item.quantity; obj.show_url = item.show_url; obj.describe_url = item.describe_url; + obj.detail_url = item.detail_url obj.map_product_name = item.map_product_name return obj }) diff --git a/src/pages/plan/key/product/add.js b/src/pages/plan/key/product/add.js index ee20df6d..1170f468 100644 --- a/src/pages/plan/key/product/add.js +++ b/src/pages/plan/key/product/add.js @@ -24,6 +24,7 @@ export default class adduserinfo extends React.Component{ product_name:"", show_url:"", describe_url:"", + detail_url:"", map_product_name:'' }, cur_product:null, @@ -122,6 +123,7 @@ export default class adduserinfo extends React.Component{ map_product_name:cur_product.title, show_url:this.state.show_url ? this.state.show_url : "", describe_url:this.state.describe_url ? this.state.describe_url : "", + detail_url:"" } this.setState({model:model2}) diff --git a/src/pages/plan/product/add.js b/src/pages/plan/product/add.js index 3149cd38..cc1261de 100644 --- a/src/pages/plan/product/add.js +++ b/src/pages/plan/product/add.js @@ -294,11 +294,7 @@ export default class adduserinfo extends React.Component{ console.log(files) if(files.length > 0 ) { - if(files[0].file.size > 20000) - { - Notify.error(`图片大小不能超过 20KB`); - return; - } + let formdata= new FormData(); formdata.append("file",files[0].file) formdata.append("path","common_image") @@ -323,11 +319,6 @@ export default class adduserinfo extends React.Component{ if(files.length > 0 ) { - if(files[0].file.size > 20000) - { - Notify.error(`图片大小不能超过 20KB`); - return; - } let formdata= new FormData(); formdata.append("file",files[0].file) formdata.append("path","common_image") @@ -581,7 +572,7 @@ export default class adduserinfo extends React.Component{ {this.onUploadChange(e)}} @@ -590,9 +581,6 @@ export default class adduserinfo extends React.Component{ value={this.state.model.show_url} /> - - -