系统模版流程自测,细节优化
This commit is contained in:
parent
70723332c8
commit
ea2efa7f18
|
@ -206,7 +206,7 @@ export default class couponLandpage extends React.Component {
|
||||||
multiple
|
multiple
|
||||||
sortable
|
sortable
|
||||||
tips="单张图片不超过 5M"
|
tips="单张图片不超过 5M"
|
||||||
onChange={(e) => { this.this.onUploadChange(e,'top_image') }}
|
onChange={(e) => { this.onUploadChange(e,'top_image') }}
|
||||||
onUpload={this.onUpload}
|
onUpload={this.onUpload}
|
||||||
defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
|
defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
|
||||||
onError={this.onUploadError}
|
onError={this.onUploadError}
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default class edittemplate extends React.Component{
|
||||||
[1,3].includes(this.props.templateType)?<button className="exchangeBtn" style={{background:this.props.detaildata.button_color,color:this.props.detaildata.font_color}}>立即兑换</button>:
|
[1,3].includes(this.props.templateType)?<button className="exchangeBtn" style={{background:this.props.detaildata.button_color,color:this.props.detaildata.font_color}}>立即兑换</button>:
|
||||||
<div className="dflexaj payBtn-view">
|
<div className="dflexaj payBtn-view">
|
||||||
<div className="coupon-price">
|
<div className="coupon-price">
|
||||||
<p>¥0.00</p>
|
<p>¥<span>0.00</span></p>
|
||||||
<p>共省¥0.01</p>
|
<p>共省¥0.01</p>
|
||||||
</div>
|
</div>
|
||||||
<button className="payBtn" style={{background:this.props.detaildata.button_color,color:this.props.detaildata.font_color}}>立即支付</button>
|
<button className="payBtn" style={{background:this.props.detaildata.button_color,color:this.props.detaildata.font_color}}>立即支付</button>
|
||||||
|
|
|
@ -227,7 +227,7 @@ export default class edittemplate extends React.Component {
|
||||||
{
|
{
|
||||||
this.state.isSystemModel ? (
|
this.state.isSystemModel ? (
|
||||||
<FormItem labelname="权重" required={false} labelwidth="100px">
|
<FormItem labelname="权重" required={false} labelwidth="100px">
|
||||||
<NumberInput onChange={c => this.sortFn(c)} value={this.state.model.sort} placeholder="请输入数字" integer={true} max={999} />
|
<NumberInput onChange={c => this.sortFn(c)} value={this.state.model.sort} placeholder="请输入数字" integer={true} max={999} width={'300px'} className="sort_number"/>
|
||||||
</FormItem>) : null
|
</FormItem>) : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,8 +125,16 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: left;
|
||||||
padding-right: 15px;
|
padding-left: 15px;
|
||||||
|
:first-of-type{
|
||||||
|
color: #FF5533;
|
||||||
|
span{
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.payBtn{
|
.payBtn{
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
@ -273,7 +281,10 @@
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.sort_number{
|
||||||
|
border: 0!important;
|
||||||
|
border-bottom: 1px solid #e0e0e0!important;
|
||||||
|
}
|
||||||
//商品详情页区分立减金/权益
|
//商品详情页区分立减金/权益
|
||||||
.details_type {
|
.details_type {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -292,7 +303,7 @@
|
||||||
|
|
||||||
/*商品详情页-立减金*/
|
/*商品详情页-立减金*/
|
||||||
.details-reduce {
|
.details-reduce {
|
||||||
background: #fff;
|
background: #F3F5F7;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.reduce-pic {
|
.reduce-pic {
|
||||||
|
|
|
@ -136,6 +136,7 @@ export default class edittemplate extends React.Component {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
mouldType: 1,//区分是系统模板还是落地页 0-系统模板 1-落地页新增 2-落地页编辑
|
mouldType: 1,//区分是系统模板还是落地页 0-系统模板 1-落地页新增 2-落地页编辑
|
||||||
|
systemTitle: '',//控制系统模版标题回显
|
||||||
activeshow: true, //控制商品列表页活动说明显示与否
|
activeshow: true, //控制商品列表页活动说明显示与否
|
||||||
loading_visible: false,//保存加载效果
|
loading_visible: false,//保存加载效果
|
||||||
componentOfconfig: '',//选择组件库
|
componentOfconfig: '',//选择组件库
|
||||||
|
@ -617,6 +618,9 @@ export default class edittemplate extends React.Component {
|
||||||
}
|
}
|
||||||
onmodelChange(e) {
|
onmodelChange(e) {
|
||||||
let editorData = _.cloneDeep(JSON.parse(sessionStorage.getItem('editorConfig')))
|
let editorData = _.cloneDeep(JSON.parse(sessionStorage.getItem('editorConfig')))
|
||||||
|
if (this.state.mouldType == 0 && e.target.value != 3) {
|
||||||
|
this.setState({ systemTitle: editorData.exchangeList.land.title });
|
||||||
|
}
|
||||||
let holdData;
|
let holdData;
|
||||||
switch (e.target.value) {
|
switch (e.target.value) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -626,10 +630,16 @@ export default class edittemplate extends React.Component {
|
||||||
holdData = editorData.exchangeList
|
holdData = editorData.exchangeList
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
let {activeNavStatus,showType,model}=this.state;
|
let { activeNavStatus, showType, model,product_list,product_detail } = this.state;
|
||||||
if (activeNavStatus == 1 && [4, 8].includes(showType)) {//落地页
|
if (activeNavStatus == 1 && [4, 8].includes(showType)) {//落地页
|
||||||
editorData.coupon.land = model;
|
editorData.coupon.land = model;
|
||||||
}
|
}
|
||||||
|
if (activeNavStatus == 2 && [4, 8].includes(showType)) {//列表页
|
||||||
|
editorData.coupon.product_list = product_list;
|
||||||
|
}
|
||||||
|
if (activeNavStatus == 3 && [4, 8].includes(showType)) {//详情页
|
||||||
|
editorData.coupon.product_detail = product_detail;
|
||||||
|
}
|
||||||
sessionStorage.setItem('editorConfig', JSON.stringify(editorData));
|
sessionStorage.setItem('editorConfig', JSON.stringify(editorData));
|
||||||
holdData = editorData.coupon
|
holdData = editorData.coupon
|
||||||
break;
|
break;
|
||||||
|
@ -738,9 +748,7 @@ export default class edittemplate extends React.Component {
|
||||||
addFn() {
|
addFn() {
|
||||||
let item = this.state.activeNavStatus
|
let item = this.state.activeNavStatus
|
||||||
item++
|
item++
|
||||||
if (item > 3) {
|
if (item > 3) item = 3
|
||||||
item = 3
|
|
||||||
}
|
|
||||||
this.setState({ activeNavStatus: item })
|
this.setState({ activeNavStatus: item })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -823,18 +831,13 @@ export default class edittemplate extends React.Component {
|
||||||
? 'activeNav thumbheader'
|
? 'activeNav thumbheader'
|
||||||
: 'thumbheader'
|
: 'thumbheader'
|
||||||
}>
|
}>
|
||||||
<h3>{this.state.model.title}</h3>
|
{this.state.mouldType == 0 && this.state.showType != 3}
|
||||||
{!this.state.model.top_image ? (
|
<h3>{this.state.mouldType == 0 && this.state.showType != 3 ? this.state.systemTitle : this.state.model.title} </h3>
|
||||||
<img
|
<img
|
||||||
|
key={this.state.model.top_image}
|
||||||
|
src={!this.state.model.top_image ? 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png' : this.state.model.top_image}
|
||||||
id='top'
|
id='top'
|
||||||
src={
|
|
||||||
'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png'
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<img src={this.state.model.top_image} id='top' />
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className='hascode'>
|
<div className='hascode'>
|
||||||
<img src={this.state.showType == 8 ? this.state.model.white_image ? this.state.model.white_image : 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/5dd765e3b46042f7ecd8c576e6fa9568.png' : this.state.model.middle_image ? this.state.model.middle_image : 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/5dd765e3b46042f7ecd8c576e6fa9568.png'} id='top' />
|
<img src={this.state.showType == 8 ? this.state.model.white_image ? this.state.model.white_image : 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/5dd765e3b46042f7ecd8c576e6fa9568.png' : this.state.model.middle_image ? this.state.model.middle_image : 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/5dd765e3b46042f7ecd8c576e6fa9568.png'} id='top' />
|
||||||
{[1, 8].includes(this.state.showType) ? (
|
{[1, 8].includes(this.state.showType) ? (
|
||||||
|
@ -904,67 +907,30 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
<div className='xj-wrapper' style={{ 'zIndex': '1' }}>
|
<div className='xj-wrapper' style={{ 'zIndex': '1' }}>
|
||||||
<div className={[4, 8].includes(this.state.showType) && this.state.activeNavStatus == 2 ? 'xj-center-small' : 'xj-center'}>
|
<div className={[4, 8].includes(this.state.showType) && this.state.activeNavStatus == 2 ? 'xj-center-small' : 'xj-center'}>
|
||||||
{this.state.activeNavStatus == 1 ? (
|
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img
|
||||||
className='perimg'
|
className='perimg'
|
||||||
onClick={this.reduceFn.bind(this)}
|
onClick={this.reduceFn.bind(this)}
|
||||||
src={
|
src={[2, 3].includes(this.state.activeNavStatus) ?
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/pre.png'
|
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/preBtn.png' : 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/pre.png'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
className='nextimg'
|
className='nextimg'
|
||||||
onClick={this.addFn.bind(this)}
|
onClick={this.addFn.bind(this)}
|
||||||
src={
|
src={[1, 2].includes(this.state.activeNavStatus) ?
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/nextBtn.png'
|
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/nextBtn.png' : 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/next.png'
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : this.state.activeNavStatus == 2 ? (
|
<div className='editor-main'
|
||||||
<div>
|
|
||||||
<img
|
|
||||||
className='perimg'
|
|
||||||
onClick={this.reduceFn.bind(this)}
|
|
||||||
src={
|
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/preBtn.png'
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<img
|
|
||||||
className='nextimg'
|
|
||||||
onClick={this.addFn.bind(this)}
|
|
||||||
src={
|
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/nextBtn.png'
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div>
|
|
||||||
<img
|
|
||||||
className='perimg'
|
|
||||||
onClick={this.reduceFn.bind(this)}
|
|
||||||
src={
|
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/preBtn.png'
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<img
|
|
||||||
className='nextimg'
|
|
||||||
onClick={this.addFn.bind(this)}
|
|
||||||
src={
|
|
||||||
'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/next.png'
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div
|
|
||||||
className='editor-main'
|
|
||||||
ref={this.canvasImgDom}
|
ref={this.canvasImgDom}
|
||||||
style={{
|
style={{
|
||||||
display: this.state.activeNavStatus == 1 ? 'block' : 'none'
|
display: this.state.activeNavStatus == 1 ? 'block' : 'none'
|
||||||
}}>
|
}}>
|
||||||
<div className='xj-viewer-title'>
|
<div className='xj-viewer-title'>
|
||||||
<span className='xj-viewer-title-line'>
|
<span className='xj-viewer-title-line'>
|
||||||
{this.state.model.title}
|
{this.state.mouldType == 0 && this.state.showType != 3 ? this.state.systemTitle : this.state.model.title}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -977,20 +943,12 @@ export default class edittemplate extends React.Component {
|
||||||
style={{ background: this.state.model.bg_color }}
|
style={{ background: this.state.model.bg_color }}
|
||||||
ref={this.canvasImgDomScr}>
|
ref={this.canvasImgDomScr}>
|
||||||
<div className='top'>
|
<div className='top'>
|
||||||
{!this.state.model.top_image ? (
|
|
||||||
<img
|
|
||||||
src={
|
|
||||||
'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png'
|
|
||||||
}
|
|
||||||
id='top'
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<img
|
<img
|
||||||
|
key={this.state.model.top_image}
|
||||||
crossOrigin='anonymous'
|
crossOrigin='anonymous'
|
||||||
src={this.state.model.top_image}
|
src={!this.state.model.top_image ? 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png' : this.state.model.top_image}
|
||||||
id='top'
|
id='top'
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div className='center' id='center'>
|
<div className='center' id='center'>
|
||||||
<img
|
<img
|
||||||
|
@ -1098,14 +1056,10 @@ export default class edittemplate extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className='xj-center-fixed' style={{ 'marginLeft': '288px' }}></div>
|
||||||
className='xj-center-fixed'
|
|
||||||
style={{ 'marginLeft': '288px' }}></div>
|
|
||||||
<div className='xj-rightPanel'>
|
<div className='xj-rightPanel'>
|
||||||
<div className='RootEditor'>
|
<div className='RootEditor'>
|
||||||
<div
|
<div>
|
||||||
className='schema-editor-container'
|
|
||||||
data-editor-role='XJWebsitePage'>
|
|
||||||
{[1, 3].includes(this.state.showType) ? (
|
{[1, 3].includes(this.state.showType) ? (
|
||||||
<div className='control page-title-control'>
|
<div className='control page-title-control'>
|
||||||
{this.state.activeNavStatus == 1 ? (
|
{this.state.activeNavStatus == 1 ? (
|
||||||
|
@ -1180,12 +1134,7 @@ export default class edittemplate extends React.Component {
|
||||||
{this.state.loading_visible ? (
|
{this.state.loading_visible ? (
|
||||||
<div className='loadingShow'>
|
<div className='loadingShow'>
|
||||||
<div className='modal model44'></div>
|
<div className='modal model44'></div>
|
||||||
<BlockLoading
|
<BlockLoading loading icon='circle' iconSize={64} iconText='保存中' className='save_loading'/>
|
||||||
loading
|
|
||||||
icon='circle'
|
|
||||||
iconSize={64}
|
|
||||||
iconText='保存中'
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -465,7 +465,12 @@
|
||||||
.edittemplate {
|
.edittemplate {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: #f3f4f5;
|
background: #f3f4f5;
|
||||||
|
.save_loading{
|
||||||
|
position: fixed;
|
||||||
|
top: 30%;
|
||||||
|
left: 50%;
|
||||||
|
z-index: 999999;
|
||||||
|
}
|
||||||
.zent-image-upload-item-thumb[data-zv="9.11.0"] {
|
.zent-image-upload-item-thumb[data-zv="9.11.0"] {
|
||||||
border: 1px dashed #f1f2f3;
|
border: 1px dashed #f1f2f3;
|
||||||
}
|
}
|
||||||
|
@ -491,7 +496,7 @@
|
||||||
|
|
||||||
#leftComponent {
|
#leftComponent {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 300px;
|
width: 330px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ export default class edittemplate extends React.Component {
|
||||||
this.props.opendesc(true)
|
this.props.opendesc(true)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
console.log(16,this.props.detaildata);
|
||||||
return (
|
return (
|
||||||
<div className="editor-main goodstemplate details-reduce">
|
<div className="editor-main goodstemplate details-reduce">
|
||||||
<img src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png'} className="preBtn" />
|
<img src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png'} className="preBtn" />
|
||||||
|
@ -22,7 +23,7 @@ export default class edittemplate extends React.Component {
|
||||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_coupon.png" alt="" className="reduce-pic" />
|
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_coupon.png" alt="" className="reduce-pic" />
|
||||||
<div className="dflexaj payBtn-view">
|
<div className="dflexaj payBtn-view">
|
||||||
<div className="coupon-price">
|
<div className="coupon-price">
|
||||||
<p>¥0.00</p>
|
<p>¥<span>0.00</span></p>
|
||||||
<p>共省¥0.01</p>
|
<p>共省¥0.01</p>
|
||||||
</div>
|
</div>
|
||||||
<button className="payBtn" style={{ background: this.props.detaildata.reduce.button_color, color: this.props.detaildata.reduce.font_color }}>立即支付</button>
|
<button className="payBtn" style={{ background: this.props.detaildata.reduce.button_color, color: this.props.detaildata.reduce.font_color }}>立即支付</button>
|
||||||
|
|
|
@ -326,7 +326,7 @@ export default class preview extends React.Component {
|
||||||
) : (
|
) : (
|
||||||
<div className="dflexaj payBtn-view">
|
<div className="dflexaj payBtn-view">
|
||||||
<div className="coupon-price">
|
<div className="coupon-price">
|
||||||
<p>¥0.00</p>
|
<p>¥<span>0.00</span></p>
|
||||||
<p>共省¥0.01</p>
|
<p>共省¥0.01</p>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
@ -349,7 +349,7 @@ export default class preview extends React.Component {
|
||||||
{[1, 3].includes(this.props.pageType) ? null : (
|
{[1, 3].includes(this.props.pageType) ? null : (
|
||||||
<div className="dflexaj payBtn-view">
|
<div className="dflexaj payBtn-view">
|
||||||
<div className="coupon-price">
|
<div className="coupon-price">
|
||||||
<p>¥0.00</p>
|
<p>¥<span>0.00</span></p>
|
||||||
<p>共省¥0.01</p>
|
<p>共省¥0.01</p>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
|
Loading…
Reference in New Issue