This commit is contained in:
姜棚 2022-01-22 17:34:29 +08:00
parent 77f9accc64
commit 82d1a32435
2 changed files with 9 additions and 1 deletions

View File

@ -193,9 +193,13 @@ export default class adduserinfo extends React.Component{
let urls = _.map(this.state.productpic,(o)=>{ let urls = _.map(this.state.productpic,(o)=>{
return o.url return o.url
}) })
console.log("存储的链接",8888)
temp[index].describe_url = urls temp[index].describe_url = urls
temp[index].map_product_name = this.state.model.map_product_name temp[index].map_product_name = this.state.model.map_product_name
temp[index].account_type = this.state.model.account_type temp[index].account_type = this.state.model.account_type
console.log("保存,",temp)
sessionStorage.setItem('productData', JSON.stringify(temp)); sessionStorage.setItem('productData', JSON.stringify(temp));
} }
} }
@ -217,6 +221,7 @@ export default class adduserinfo extends React.Component{
Notify.error(`请上传商品Logo`); Notify.error(`请上传商品Logo`);
return return
} }
console.log(66666)
let temp = [] let temp = []
if(sessionStorage.getItem("productData")) if(sessionStorage.getItem("productData"))
{ {
@ -224,6 +229,9 @@ export default class adduserinfo extends React.Component{
} }
let data = temp ? temp : []; let data = temp ? temp : [];
data.push(this.state.model) data.push(this.state.model)
console.log(7777)
sessionStorage.setItem('productData', JSON.stringify(data)); sessionStorage.setItem('productData', JSON.stringify(data));
} }
return true; return true;

View File

@ -83,7 +83,7 @@ export default class adduserinfo extends React.Component{
pics = model_temp.describe_url pics = model_temp.describe_url
} }
else{ else{
if(model_temp.describe_url !="") if(model_temp.describe_url !=""&& model_temp.describe_url != undefined)
{ {
pics = model_temp.describe_url.split(',') pics = model_temp.describe_url.split(',')
} }