商品详情字段补全
This commit is contained in:
parent
074ef8f1cf
commit
e6b888225e
|
@ -438,6 +438,7 @@ export default class acclist extends React.Component{
|
||||||
obj.quantity = item.quantity;
|
obj.quantity = item.quantity;
|
||||||
obj.show_url = item.show_url;
|
obj.show_url = item.show_url;
|
||||||
obj.describe_url = item.describe_url;
|
obj.describe_url = item.describe_url;
|
||||||
|
obj.detail_url = item.detail_url;
|
||||||
obj.map_product_name = item.map_product_name;
|
obj.map_product_name = item.map_product_name;
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
|
|
|
@ -116,13 +116,13 @@ componentDidMount() {
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
if(req.describe_url!="")
|
if(req.describe_url!="")
|
||||||
{
|
{
|
||||||
pics = req.describe_url.split(',')
|
pics = req.describe_url.split(',')
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
pics = []
|
pics = []
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default class exchangedit extends React.Component{
|
||||||
product_name:"",
|
product_name:"",
|
||||||
show_url:"",
|
show_url:"",
|
||||||
describe_url:"",
|
describe_url:"",
|
||||||
|
detail_url:""
|
||||||
},
|
},
|
||||||
codeInfo:{ //数据模型不可少
|
codeInfo:{ //数据模型不可少
|
||||||
code_name:"",
|
code_name:"",
|
||||||
|
|
|
@ -27,6 +27,7 @@ export default class adduserinfo extends React.Component{
|
||||||
product_name:"",
|
product_name:"",
|
||||||
show_url:"",
|
show_url:"",
|
||||||
describe_url:[],
|
describe_url:[],
|
||||||
|
detail_url:"",
|
||||||
stock:"",
|
stock:"",
|
||||||
usage:"",
|
usage:"",
|
||||||
detail_url:"",
|
detail_url:"",
|
||||||
|
@ -278,11 +279,7 @@ export default class adduserinfo extends React.Component{
|
||||||
console.log(files)
|
console.log(files)
|
||||||
if(files.length > 0 )
|
if(files.length > 0 )
|
||||||
{
|
{
|
||||||
if(files[0].file.size > 20000)
|
|
||||||
{
|
|
||||||
Notify.error(`图片大小不能超过 20KB`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let formdata= new FormData();
|
let formdata= new FormData();
|
||||||
formdata.append("file",files[0].file)
|
formdata.append("file",files[0].file)
|
||||||
formdata.append("path","common_image")
|
formdata.append("path","common_image")
|
||||||
|
|
|
@ -447,6 +447,7 @@ export default class acclist extends React.Component{
|
||||||
obj.quantity = item.quantity;
|
obj.quantity = item.quantity;
|
||||||
obj.show_url = item.show_url;
|
obj.show_url = item.show_url;
|
||||||
obj.describe_url = item.describe_url;
|
obj.describe_url = item.describe_url;
|
||||||
|
obj.detail_url = item.detail_url
|
||||||
obj.map_product_name = item.map_product_name
|
obj.map_product_name = item.map_product_name
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,6 +24,7 @@ export default class adduserinfo extends React.Component{
|
||||||
product_name:"",
|
product_name:"",
|
||||||
show_url:"",
|
show_url:"",
|
||||||
describe_url:"",
|
describe_url:"",
|
||||||
|
detail_url:"",
|
||||||
map_product_name:''
|
map_product_name:''
|
||||||
},
|
},
|
||||||
cur_product:null,
|
cur_product:null,
|
||||||
|
@ -122,6 +123,7 @@ export default class adduserinfo extends React.Component{
|
||||||
map_product_name:cur_product.title,
|
map_product_name:cur_product.title,
|
||||||
show_url:this.state.show_url ? this.state.show_url : "",
|
show_url:this.state.show_url ? this.state.show_url : "",
|
||||||
describe_url:this.state.describe_url ? this.state.describe_url : "",
|
describe_url:this.state.describe_url ? this.state.describe_url : "",
|
||||||
|
detail_url:""
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({model:model2})
|
this.setState({model:model2})
|
||||||
|
|
|
@ -294,11 +294,7 @@ export default class adduserinfo extends React.Component{
|
||||||
console.log(files)
|
console.log(files)
|
||||||
if(files.length > 0 )
|
if(files.length > 0 )
|
||||||
{
|
{
|
||||||
if(files[0].file.size > 20000)
|
|
||||||
{
|
|
||||||
Notify.error(`图片大小不能超过 20KB`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let formdata= new FormData();
|
let formdata= new FormData();
|
||||||
formdata.append("file",files[0].file)
|
formdata.append("file",files[0].file)
|
||||||
formdata.append("path","common_image")
|
formdata.append("path","common_image")
|
||||||
|
@ -323,11 +319,6 @@ export default class adduserinfo extends React.Component{
|
||||||
|
|
||||||
if(files.length > 0 )
|
if(files.length > 0 )
|
||||||
{
|
{
|
||||||
if(files[0].file.size > 20000)
|
|
||||||
{
|
|
||||||
Notify.error(`图片大小不能超过 20KB`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let formdata= new FormData();
|
let formdata= new FormData();
|
||||||
formdata.append("file",files[0].file)
|
formdata.append("file",files[0].file)
|
||||||
formdata.append("path","common_image")
|
formdata.append("path","common_image")
|
||||||
|
@ -581,7 +572,7 @@ export default class adduserinfo extends React.Component{
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
className="zent-image-upload-demo"
|
className="zent-image-upload-demo"
|
||||||
maxSize={5 * 1024 * 1024}
|
maxSize={5 * 1024 * 1024}
|
||||||
tips="建议尺寸 30*30,图片不超过 20KB"
|
tips="图片不超过 2M"
|
||||||
maxAmount={1}
|
maxAmount={1}
|
||||||
onError={this.onUploadError}
|
onError={this.onUploadError}
|
||||||
onChange={(e)=>{this.onUploadChange(e)}}
|
onChange={(e)=>{this.onUploadChange(e)}}
|
||||||
|
@ -590,9 +581,6 @@ export default class adduserinfo extends React.Component{
|
||||||
value={this.state.model.show_url}
|
value={this.state.model.show_url}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<FormItem prop="describe_url" labelname="商品图" id="describe_url" >
|
<FormItem prop="describe_url" labelname="商品图" id="describe_url" >
|
||||||
|
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
|
|
Loading…
Reference in New Issue