From 49a01150b533062be8d7c21640590c1a873c6482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Tue, 30 Nov 2021 09:43:13 +0800 Subject: [PATCH] Update main.js --- src/pages/exchangepage/edittemplate/main.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 8a995c38..3aa75715 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -29,7 +29,8 @@ export default class edittemplate extends React.Component{ }, preview_visible:false, previewData:null, - pageInfo:null + pageInfo:null, + isExchangePage:false, } } @@ -76,14 +77,17 @@ export default class edittemplate extends React.Component{ title:myInfo.title, thumb:myInfo.thumb } - if(myInfo.href != "") + if(myInfo.href) { - this.setState({pageInfo:true}) + model.list = parseInt(myInfo.list) model.use = myInfo.use model.link = myInfo.link model.edit= myInfo.edit model.href= myInfo.href + + this.setState({isExchangePage:true}) + } this.setState({model:model}) @@ -664,7 +668,7 @@ export default class edittemplate extends React.Component{ { - this.state.pageInfo ? ( + this.state.isExchangePage ? (
@@ -673,7 +677,7 @@ export default class edittemplate extends React.Component{ ) : null } { - this.state.pageInfo ? ( + this.state.isExchangePage ? ( {this.onListChange(e)} } value={this.state.model.list}> 列表