fix(模板中心):修复后端返回coupon为null,前端渲染报错处理

This commit is contained in:
Apple 2022-10-11 20:17:39 +08:00
parent ee94f44529
commit da538eabda
1 changed files with 15 additions and 0 deletions

View File

@ -194,6 +194,21 @@ export default class mytemplate extends React.Component {
}else{
previewInfo=row.exchange;
}
if(!previewInfo){//新增模板,没有数据,需要拼接组装
previewInfo={
land:{
describe:{}
},
product_list:{
list:'',
describe:{}
},
product_detail:{
describe:{}
}
}
}
console.log(14,previewInfo);
this.setState({ preview_visible: true,previewData:previewInfo, showType: row.page,moudleData: row, showPage: 1, pageStep: 1, activeHeight: 667, setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' } });
}