模板中心解决全部状态无数据

This commit is contained in:
red-deng-deng 2022-01-21 18:21:01 +08:00
parent cf0e21530e
commit 547d169992
1 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ export default class mytemplate extends React.Component{
console.log(91,this.state);
let data={page:page,limit:10}
if(this.state.sourceIndex==0){//系统模板
if(this.state.typeIndex>0){
if(this.state.typeIndex!=0){
data.type_id=this.state.typeIndex;
}
let preResult=this.state.system_template;
@ -148,8 +148,8 @@ export default class mytemplate extends React.Component{
window.location.href= "/#/edittemplate"
}
typeClick(e){
this.setState({typeIndex:e,page:1})
if(e == -1)//全部
this.setState({typeIndex:e,page:1,endreq:true})
if(e ==0)//全部
{
let data={page:1,limit:10}
getSystemTemplate(data).then(res=>{