diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js
index bdb4301a..af5fee54 100644
--- a/src/pages/exchangepage/edittemplate/main.js
+++ b/src/pages/exchangepage/edittemplate/main.js
@@ -86,8 +86,11 @@ getLandingdata(val){
componentWillMount(e){
let href=window.location.href;
- let strindex = href.lastIndexOf("\=");
- let typePage = href.substr(strindex + 1, href.length);
+ let strindex = href.lastIndexOf("\=");
+ let typePage =null;
+ if(strindex>-1){
+ typePage = href.substr(strindex + 1, href.length);
+ }
sessionStorage.removeItem('editorConfig');
let myInfoData = JSON.parse(sessionStorage.getItem("pageInfo"))
let mouldType=sessionStorage.getItem('mouldType');
@@ -95,10 +98,11 @@ getLandingdata(val){
let pageChange=sessionStorage.getItem('pageChange');
if(myInfoData)
{
- this.setState({showType:myInfoData.page});
let newEditor=_.clone(myInfoData);
if(typePage){
this.setState({showType:Number(typePage)});
+ }else{
+ this.setState({showType:Number(myInfoData.page)});
}
let exchangeList=newEditor.exchange;
exchangeList['land'].title=newEditor.title;
@@ -109,7 +113,11 @@ getLandingdata(val){
newEditor.exchangeList=exchangeList;
newEditor.whiteList=whiteList;
if(mouldType==0){
- this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail});
+ if(this.state.showType==1){
+ this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail});
+ }else{
+ this.setState({model:newEditor.exchangeList.land,product_list:newEditor.exchangeList.product_list,product_detail:newEditor.exchangeList.product_detail});
+ }
}else{
if(this.state.showType==1){
this.setState({model:newEditor.whiteList.land,product_list:newEditor.whiteList.product_list,product_detail:newEditor.whiteList.product_detail});
diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js
index b194b373..118104b0 100644
--- a/src/pages/exchangepage/template/main.js
+++ b/src/pages/exchangepage/template/main.js
@@ -292,7 +292,12 @@ export default class mytemplate extends React.Component{
// let link = window.location.href.replace(window.location.hash,"#/home/edittemplate");
// window.open(link, "_blank")
sessionStorage.setItem('mouldType',1);
- window.location.href='/#/edittemplate';
+ // window.location.href='/#/edittemplate';
+ if(type){
+ window.location.href= "/#/edittemplate?type="+type;
+ }else{
+ window.location.href= "/#/edittemplate?type="+row.page;
+ }
sessionStorage.setItem('pageChange',1);
}
@@ -479,8 +484,8 @@ export default class mytemplate extends React.Component{
落地页类型: