落地页编辑禁止更改落地页类型,模板中心显示数据完整

This commit is contained in:
red-deng-deng 2022-01-21 10:44:55 +08:00
parent 8ffa43da88
commit 3c46a30412
3 changed files with 34 additions and 26 deletions

View File

@ -227,6 +227,7 @@ export default class acclist extends React.Component {
editFn(e,row)
{
sessionStorage.setItem("mouldType",2)
sessionStorage.setItem("pageChange",1)
sessionStorage.setItem("pageInfo",JSON.stringify(row))
// let link = window.location.href.replace(window.location.hash, "#/edittemplate");
// window.open(link, "_blank")
@ -288,19 +289,19 @@ export default class acclist extends React.Component {
}
onPreview(e,row){
let rowdata={};
let model={}
model.title=row.title;
model.top_image=row.top_image;
model.middle_image=row.middle_image;
model.describe=row.describe;
model.bg_color=row.bg_color;
model.thumb=row.thumb;
rowdata.model=model;
rowdata.product_list=row.product_list;
rowdata.product_detail=row.product_detail;
this.setState({preview_url:row.href})
if(row.page==1){//白名单
rowdata.model=row.access_conf.land;
rowdata.product_list=row.access_conf.product_list;
rowdata.product_detail=row.access_conf.product_detail;
}else if(row.page==3){
rowdata.model=row.exchange.land;
rowdata.product_list=row.exchange.product_list;
rowdata.product_detail=row.exchange.product_detail;
}
this.setState({preview_visible:true})
this.setState({previewData:rowdata})
this.setState({preview_url:row.href})
}
closePhone(e){

View File

@ -45,7 +45,11 @@ export default class mytemplate extends React.Component{
}
componentDidMount(e){
//监听滚动条滚动事件
let component=document.querySelector('.mytemplate');
let self=this;
getThemeType().then(res=>{
handelResponse(res,(req,msg)=>{
let typeListSource=res.data.map(it=>{
@ -58,7 +62,8 @@ export default class mytemplate extends React.Component{
})
}).catch(err=>{
});
getSystemTemplate().then(res=>{
let data={page:1,limit:10000}
getSystemTemplate(data).then(res=>{
handelResponse(res,(req,msg)=>{
this.setState({system_template:req.data})
@ -70,8 +75,13 @@ export default class mytemplate extends React.Component{
}
bindHandleScroll = (event) => {
console.log('滚动事件');
console.log('滚动事件',event);
}
componentWillUnmount() {
window.removeEventListener('scroll', this.bindHandleScroll);
}
createBox(){
// let link = window.location.href.replace(window.location.hash,"#/edittemplate");
sessionStorage.removeItem('pageInfo');
@ -83,7 +93,8 @@ export default class mytemplate extends React.Component{
this.setState({typeIndex:e})
if(e == -1)//全部
{
getSystemTemplate().then(res=>{
let data={page:1,limit:10000}
getSystemTemplate(data).then(res=>{
handelResponse(res,(req,msg)=>{
console.log(req)
this.setState({system_template:req.data})
@ -93,7 +104,7 @@ export default class mytemplate extends React.Component{
}).catch(err=>{
});
}else{
let data={type_id:e}
let data={type_id:e,page:1,limit:10000}
getSystemTemplate(data).then(res=>{
handelResponse(res,(req,msg)=>{
this.setState({system_template:req.data})
@ -111,7 +122,8 @@ export default class mytemplate extends React.Component{
if(e == 0)
{
getSystemTemplate().then(res=>{
let data={page:1,limit:10000}
getSystemTemplate(data).then(res=>{
handelResponse(res,(req,msg)=>{
console.log(req)
this.setState({system_template:req.data})
@ -123,8 +135,8 @@ export default class mytemplate extends React.Component{
});
}
else{
getTheme().then(res=>{
let data={page:1,limit:10000}
getTheme(data).then(res=>{
handelResponse(res,(req,msg)=>{
this.setState({system_template:req.data})
@ -202,6 +214,7 @@ export default class mytemplate extends React.Component{
this.setState({preview_visible:false})
}
render(){
return(
<div className="mytemplate">

View File

@ -1,10 +1,4 @@
.xj-root {
min-width: 1280px
}