@@ -423,16 +461,49 @@ export default class mytemplate extends React.Component{
{
this.state.preview_visible ? (
-
+
-
-
{this.onBack(e)}} >
{this.onClose(e)}} />
+
+
+
+
+
+
+
+
落地页预览:
+
this.handleSize(375,667)}>主流机型375x667
this.handleSize(375,750)}>全面屏375x750
this.handleSize(375,812)}>刘海屏375x812
this.handleSize(375,500)}>小屏手机375x500
+
落地页类型:
+
{this.onTypeChange(e)} } value={this.state.showType} >
+ 兑换码
+ 白名单
+ 立减金
+
+
+
+
+
+
页面类型:
+
{this.onpageChange(e)} } value={this.state.showPage} >
+ 落地页
+ 列表页
+ 详情页
+
+
+
+
+
+
+
+
+
-
-
-
-
) :null
diff --git a/src/pages/exchangepage/template/main.less b/src/pages/exchangepage/template/main.less
index 0c857a23..8a6e1d2d 100644
--- a/src/pages/exchangepage/template/main.less
+++ b/src/pages/exchangepage/template/main.less
@@ -2502,32 +2502,38 @@ div.previewclose {
margin-right: 22px
}
.preview-box{
- width: 375px;
- height: 600px;
+ // width: 375px;
+ width:900px;
+ height: 640px;
+ // padding:30px;
+ // box-sizing: border-box;
position: fixed;
- top: 8%;
+ top: 50%;
left: 50%;
- margin-left: -187.5px;
+ margin-left: -450px;
+ margin-top: -320px;
background-color: #FFFFFF;
z-index: 99999;
}
+
.preview-top-bar{
- width: 100%;
- height: 36px;
- line-height: 36px;
- background-color: #cacacb;
+ // width: 100%;
+ // height: 30px;
+ // line-height: 30px;
+ background-color: #fff;
display: flex;
-
- align-items: center;
+ justify-content: flex-end;
+ align-items: baseline;
.preview-top-back{
- padding-left: 10px;
+ padding-right: 20px;
color: #FFFFFF;
padding-right: 300px;
}
.preview-top-close{
font-size: 24px;
- color: #FFFFFF;
-
+ color: #333;
+ position: absolute;
+ padding-right: 30px;
}
@@ -2568,4 +2574,104 @@ div.previewclose {
}
.toTop-canvas:hover{
transform: scale(1.1);
-}
\ No newline at end of file
+}
+.main-preview{
+ width: 100%;
+ overflow: hidden;
+
+}
+.previewComponent{
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ // height: calc(100% - 200px);
+}
+.previewbody{
+ display: flex;
+ justify-content: center;
+ width: 400px;
+ height: 100%;
+ align-items: center;
+}
+.ctorSize{
+ width: 375px;
+ overflow: hidden;
+ border: 1px solid #ccc;
+}
+.preview-show{
+ height: 100%;
+}
+.left-choice{
+ flex: 1;
+ margin-left: 30px;
+ // height: 300px;
+ height: 100%;
+ padding-top: 50px;
+
+ box-sizing: border-box;
+}
+.exchange-page{
+ margin-bottom: 20px;
+ p{
+ padding: 15px 0;
+ font-weight: bold;
+ font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", STHeiti, SimSun, sans-serif;
+ }
+}
+
+.screen-size-selector {
+ -webkit-box-pack: justify;
+ -ms-flex-pack: justify;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ justify-content: space-between;
+ margin-bottom:10px;
+ margin-top: 20px;
+ font-family:-apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", STHeiti, SimSun, sans-serif ;
+}
+.screen-size-selector{
+ width: 408px;
+}
+.screen-size-selector .size.active {
+ background: rgba(41,107,239,.08);
+ border: 1px solid #2096f5;
+ color: #296bef;
+ font-weight: bold;
+}
+.screen-size-selector .size {
+ border: 1px solid #dcdee3;
+ border-radius: 4px;
+ color: #333;
+ cursor: pointer;
+ height: 48px;
+ line-height: 20px;
+ padding-top: 6px;
+ text-align: center;
+ width: 96px;
+}
+.screen-size-selector .size span {
+ display: block;
+ font-size: 12px;
+ line-height: 26px;
+ opacity: .5;
+ font-weight: bold;
+}
+.touse{
+ margin-top: 100px;
+ display: flex;
+ justify-content: flex-start;
+ .zent-btn[data-zv="9.11.0"] {
+ width: 80px;
+ height: 32px;
+ }
+}
+
+.left-choice .zent-radio-button--checked[data-zv="9.11.0"]{
+background: rgba(41, 107, 239, 0.08)!important;
+border: 1px solid #2096f5;
+color: #296bef;
+}
diff --git a/src/pages/exchangepage/template/preview.js b/src/pages/exchangepage/template/preview.js
index c0532711..a9ae919c 100644
--- a/src/pages/exchangepage/template/preview.js
+++ b/src/pages/exchangepage/template/preview.js
@@ -1,7 +1,7 @@
import ReactDOM from 'react-dom';
import React, { Component } from 'react';
import { Button } from 'zent';
-import {RadioGroup,RadioButton,Input,openDialog ,Notify,Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu,Sweetalert } from 'zent';
+import {RadioGroup,RadioButton,Input,openDialog,Dialog,Notify,Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu,Sweetalert } from 'zent';
import "../../../assets/comm.css"
import _ from "lodash";
import "./preview.less"
@@ -10,7 +10,6 @@ export default class acclist extends React.Component{
constructor(props){
super(props)
this.state={
- step:1,
layout:"list",
type:1,
top_url:"",
@@ -30,9 +29,7 @@ export default class acclist extends React.Component{
this.setState({activeshow:false});
}
- onListChange(e){
- this.setState({step:e.target.value })
- }
+
opendescFn(){
this.setState({activeshow:true});
}
@@ -42,16 +39,17 @@ export default class acclist extends React.Component{
opendetaildescFn(){
this.setState({detailactiveshow:true});
- }
+ }
+
render(){
let propsData=this.props.data;
- console.log('预览', propsData);
+ console.log('预览', this.props);
return(
-
+
{
- this.state.step==1 ? (
+ this.props.step==1 ? (
{
@@ -77,7 +75,7 @@ export default class acclist extends React.Component{
) : null
}
{
- this.state.step==2?this.state.activeshow&&propsData.product_list.describe.type==2&&propsData.product_list.describe.content?
this.showactiveIcon(c)} goodsdata={propsData.product_list}/>:
+ this.props.step==2?this.state.activeshow&&propsData.product_list.describe.type==2&&propsData.product_list.describe.content?
this.showactiveIcon(c)} goodsdata={propsData.product_list}/>:
{
!propsData.product_list.top_image?
:
@@ -98,7 +96,7 @@ export default class acclist extends React.Component{
}
{
- this.state.step==3 ? this.state.detailactiveshow&&propsData.product_detail.describe.type==2&&propsData.product_detail.describe.content?
this.showactivedetail(c)} goodsdata={propsData.product_detail}/>:(
+ this.props.step==3 ? this.state.detailactiveshow&&propsData.product_detail.describe.type==2&&propsData.product_detail.describe.content?this.showactivedetail(c)} goodsdata={propsData.product_detail}/>:(
@@ -117,15 +115,8 @@ export default class acclist extends React.Component{
}
-
- {this.onListChange(e)} } value={this.state.step}>
- 落地页
- 列表页
- 详情页
-
-
-
+
)
}
-}
\ No newline at end of file
+}
diff --git a/src/pages/exchangepage/template/preview.less b/src/pages/exchangepage/template/preview.less
index 6246be0f..3e8f3500 100644
--- a/src/pages/exchangepage/template/preview.less
+++ b/src/pages/exchangepage/template/preview.less
@@ -4,23 +4,30 @@
left: 0;
bottom: 0;
right: 0;
- background: rgba(0, 0, 0, 0.5);
+ background: rgba(0, 0, 0, 0.8);
z-index: 8;
}
.preview-box{
.preview-top-close{
padding-left: 28px;
+ position: absolute;
+ top: 30px;
+ right: 30px;
+ font-size: 22px;
+ cursor: pointer;
+ font-weight: bold;
}
}
+
#preview-bg{
z-index: 10;
- height: 600px;
+ height: 100%;
position: relative;
overflow-y: hidden;
background: #fff;
box-shadow: 0 0 1px #C1C1C1;
.goodstemplate, .detailstemplate{
- height: 600px;
+ height:100%;
}
.editor-main{
top: 0;
@@ -47,7 +54,12 @@
margin: 0;
}
.viewdetailBtn{
- top:660px;
+ top:50%;
+ width:200px;
+ left: 50%;
+ margin-left: -350px;
+ height: 40px;
+ margin-top: 220px!important;
}
img{
width: 100%;
@@ -117,11 +129,17 @@
align-items: center;
}
-.verifycode{
- width: 83px !important;
- height: 43px;
+.previewComponent .verifycode{
+ width: 21%!important;
+ height: 18%;
position: absolute;
- right: 20px;
- top: 80px;
- z-index: 666;
-}
\ No newline at end of file
+ right: 9%;
+ top: 39%;
+ border-radius:32px;
+ z-index: 555;
+}
+
+.preview-box .previewComponent .exchageBtn{
+ width: 90%;
+ margin: 30px 5%;
+}