+
+
{
-
goodsConfig.search && goodsConfig.search.iswitch ?
this.customComponent(e, 'search', 'marketing-sousuolan-', '搜索栏')} className={this.state.selectDom == 'search' ? 'selectBorder' : ''} ref="search">
: null
-
}
-
-
{
-
!goodsConfig.top_image ?
:
}
-
{
-
goodsConfig.picture && goodsConfig.picture.iswitch ?
this.customComponent(e, 'picture', 'marketing-tupian', '图片')} ref="picture" className={this.state.selectDom == 'picture' ? 'selectBorder' : ''}>
: null
}
-
{
-
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.comstyle == 1 ?
this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
{goodsConfig.title.text}
: null
-
}
{
-
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.comstyle == 2 ?
this.customComponent(e, 'title', 'marketing-fuwenbenkuang', '标题')} ref="title" className={this.state.selectDom == 'title' ? 'selectBorder' : ''}>
: null
-
}
-
{
-
goodsConfig.title && goodsConfig.title.iswitch && goodsConfig.title.text || goodsConfig.picture && goodsConfig.picture.iswitch && goodsConfig.picture.img ?
: null
-
}
-
{
-
goodsConfig.list == 2 ?
: goodsConfig.list == 3 ?
:
-
}
-
-
-
{
-
goodsConfig.describe.type == 1 ?
: goodsConfig.describe.type == 3 ?
: null
-
}
-
{
-
goodsConfig.describe.type == 2 ?
: null
-
}
{
-
goodsConfig.list == 2 ?
: null
-
}
{
goodsConfig.bottomBar && goodsConfig.bottomBar.iswitch && naVisual.length > 1 ?
this.customComponent(e, 'bottomBar', 'marketing-list', '底部栏')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}>
: null
}
-
-
-
{
-
this.state.selectDom ?
-
{this.state.comName}
-
|
-
删除
-
: null
-
}
-
)
-
}
-
}
\ No newline at end of file
diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js
index fecd6dcc..e474379d 100644
--- a/src/pages/exchangepage/edittemplate/main.js
+++ b/src/pages/exchangepage/edittemplate/main.js
@@ -5,25 +5,25 @@ import React from 'react'
import { BlockLoading, Button, Notify, RadioButton, RadioGroup } from 'zent'
import { addSystemTemplate, addTheme, handelResponse, putMyTheme, putSystemTemplate, putTheme, uploadImg } from '../../../assets/api.js'
import '../../../assets/comm.css'
-import PreviewEffect from '../previewEffect/main'
-import CouponGoodsDetailForm from './couponCard/couponDetailconfig'; //优惠券商品详情页
-import CouponReduceDetailForm from './couponCard/couponReduceDetail'; //优惠券立减金详情页
-// 优惠券
-import CouponLandingForm from './couponCard/landPage'; //优惠券落地页表单
-import CouponComLib from './couponCard/goodsPage/componentLib/main'; //优惠券组件库
-import CouponGoodsListForm from './couponCard/goodsPage/config/main'; //优惠券商品列表页
-import DetailsPage from './exchange/detailsPage'; //商品详情form页面
-import Detailstemplate from './detailstemplate'
-import Descteplate from './goodsdesc'
-import GoodsForm from './exchange/goodsPage'; //商品页表单
-import Goodstemplate from './goodstemplate'
-import LandingForm from './exchange/landingPage'; //落地页表单
import './main.less'
+import PreviewEffect from '../previewEffect/main'
+import Detailstemplate from './detailstemplate'
+import DetailsPage from './exchange/detailsPage'; //商品详情form页面
+import GoodsForm from './exchange/goodsPage'; //商品页表单
+import LandingForm from './exchange/landingPage'; //落地页表单
+import Descteplate from './goodsdesc'
+import Goodstemplate from './goodstemplate'
import Reduce from './reduce'; //商品详情页立减金
import ReduceConfig from './reduceConfig'; //商品详情立减金页面
import Whitedetails from './whiteList/whitedetails'; //白名单详情页
import Whitegoods from './whiteList/whitegoods'; //白名单商品页面
import WhiteLand from './whiteList/whiteLand'; //白名单落地页
+// 优惠券
+import CouponLandingForm from './couponCard/landPage'; //优惠券落地页表单
+import CouponGoodsDetailForm from './couponCard/couponDetailconfig'; //优惠券商品详情页
+import CouponReduceDetailForm from './couponCard/couponReduceDetail'; //优惠券立减金详情页
+import CouponComLib from './couponCard/goodsPage/componentLib/main'; //优惠券组件库
+import CouponGoodsListForm from './couponCard/goodsPage/config/main'; //优惠券商品列表页
//落地页
let model = {
title: '落地页标题',
@@ -64,18 +64,18 @@ let couponProduct_list = {
button_color: '#FACD6A',
describe: { type: '', content: '', bg_image: '' },
picture: {
- iswitch: false,
+ iswitch: 0, //0 不显示 1显示
img: '',
jumpType: '0',//0不跳转 1跳转
jumpUrl: ''
},
backgroundImg: {
- iswitch: false,
+ iswitch: 0,
bgImg: '',
bgColor: '#f2f3f4'
},
search: {
- iswitch: false,
+ iswitch: 0,
shape: 'circular',
textAlign: 'center',
borderColor: '#FFFAF5',
@@ -84,7 +84,7 @@ let couponProduct_list = {
placeholder: '请输入商品名称'
},
title: {
- iswitch: false,
+ iswitch: 0,
text: '商品列表',
textAlign: 'left',
fontColor: '#333',
@@ -93,11 +93,11 @@ let couponProduct_list = {
pic: ''
},
bottomBar: {
- iswitch: false,
+ iswitch: 0,
navlist: [
{
id: 1,
- iswitch: true,
+ iswitch: 1,
name: 'index',
pic: {
show: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/home.png',
@@ -107,7 +107,7 @@ let couponProduct_list = {
},
{
id: 2,
- iswitch: true,
+ iswitch: 1,
name: 'order',
pic: {
show: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/order.png',
@@ -117,7 +117,7 @@ let couponProduct_list = {
},
{
id: 3,
- iswitch: true,
+ iswitch: 1,
name: 'coupon',
pic: {
show: 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/coupon.png',
@@ -139,10 +139,10 @@ export default class edittemplate extends React.Component {
systemTitle: '',//控制系统模版标题回显
activeshow: true, //控制商品列表页活动说明显示与否
loading_visible: false,//保存加载效果
- componentOfconfig: '',//选择组件库
+ componentOfconfig: '',//自定义基础组件库
detailactiveshow: true,
pagedisable: false,
- showType: 3, //兑换码/白名单/立减金
+ showType: 3, //兑换码3/白名单1/优惠券4 优惠券白名单8
//落地页
model,
//商品列表
@@ -156,105 +156,41 @@ export default class edittemplate extends React.Component {
pageStep: 1,
showPage: 1,
setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' },
- detailType: 1 //详情页1 权益 2-立减金
+ detailType: 1 //详情页1 权益 2立减金
}
this.canvasImgDom = this.canvasImgDom.bind(this)
this.canvasImgDomScr = this.canvasImgDomScr.bind(this)
}
- //获取落地页表单数据
- getLandingdata(val) {
- this.setState({ model: val })
- }
+
componentDidMount() {
- //开启
+ //开启/关闭自定义组件
Bus.addListener('componentLib', (prop) => {
let coupongoodsConfig = this.state.product_list
- coupongoodsConfig[prop.name].iswitch = true
+ console.log(169,prop);
+ coupongoodsConfig[prop.attr].iswitch = prop.value
this.setState({ product_list: coupongoodsConfig })
})
- //关闭
- Bus.addListener('componentLibClose', (prop) => {
- let coupongoodsConfig = this.state.product_list
- coupongoodsConfig[prop].iswitch = false
- this.setState({ product_list: coupongoodsConfig, componentOfconfig: '' })
- })
Bus.addListener('picture', (prop) => {
let coupongoodsConfig = this.state.product_list
coupongoodsConfig.picture.img = prop
this.setState({ product_list: coupongoodsConfig })
})
//背景图
- Bus.addListener('bgImg', (prop) => {
+ Bus.addListener('bgImgConfig', (prop) => {
let bgImgConfig = this.state.product_list
- bgImgConfig.backgroundImg.bgImg = prop
+ bgImgConfig.backgroundImg[prop.attr] = prop.value;
this.setState({ product_list: bgImgConfig })
})
- Bus.addListener('globalColor', (prop) => {
- let bgImgConfig = this.state.product_list
- bgImgConfig.backgroundImg.bgColor = prop
- this.setState({ product_list: bgImgConfig })
- })
-
- Bus.addListener('shape', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.shape = prop
+ //搜索栏
+ Bus.addListener('searchBarConfig', (prop) => {
+ let searchConfig = this.state.product_list
+ searchConfig.search[prop.attr] = prop.value
this.setState({ product_list: searchConfig })
- })
- Bus.addListener('textAlign', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.textAlign = prop
- this.setState({ product_list: searchConfig })
- })
- Bus.addListener('placeholder', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.placeholder = prop
- this.setState({ product_list: searchConfig })
- })
- Bus.addListener('borderColor', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.borderColor = prop
- this.setState({ product_list: searchConfig })
- })
- Bus.addListener('searchbgColor', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.bgColor = prop
- this.setState({ product_list: searchConfig })
- })
- Bus.addListener('searchfontColor', (prop) => {
- let searchConfig = this.state.product_list
- searchConfig.search.fontColor = prop
- this.setState({ product_list: searchConfig })
- })
+ })
//标题设置
- Bus.addListener('comstyle', (prop) => {
+ Bus.addListener('titleBarConfig', (prop) => {
let titleConfig = this.state.product_list
- titleConfig.title.comstyle = prop
- this.setState({ product_list: titleConfig })
- })
- Bus.addListener('titlePic', (prop) => {
- let titleConfig = this.state.product_list
- titleConfig.title.pic = prop
- this.setState({ product_list: titleConfig })
- })
-
- Bus.addListener('title', (prop) => {
- let titleConfig = this.state.product_list
- titleConfig.title.text = prop
- this.setState({ product_list: titleConfig })
- })
- Bus.addListener('titleAlign', (prop) => {
- let titleConfig = this.state.product_list
- titleConfig.title.textAlign = prop
- this.setState({ product_list: titleConfig })
- })
- Bus.addListener('fontColor', (prop) => {
- let titleConfig = this.state.product_list
- titleConfig.title.fontColor = prop
- this.setState({ product_list: titleConfig })
- })
- Bus.addListener('fontSize', (prop) => {
- let titleConfig = this.state.product_list
- titleConfig.title.fontSize = prop
+ titleConfig.title[prop.attr] = prop.value
this.setState({ product_list: titleConfig })
})
//底部栏
@@ -585,6 +521,10 @@ export default class edittemplate extends React.Component {
})
}
}
+ //获取落地页表单数据
+ getLandingdata(val) {
+ this.setState({ model: val })
+ }
//获取落地页数据
getlandConfig(c) {
console.log(578);