diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx
index fd735680..9cfe8f15 100644
--- a/src/pages/exchangecode/exchangecodeAdd/index.jsx
+++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx
@@ -105,11 +105,15 @@ export default class exchangeAdd extends React.Component {
getResellerFunction(reseller_id) {
getReseller(reseller_id).then((res) => {
handelResponse(res, (req1, msg) => {
+ let reseller_obj = {
+ id: req1.id,
+ name: req1.name,
+ company_name: req1.company_name,
+ receive_email: req1.contact_email[0]
+ }
this.setState({
direct_reseller_id: req1.direct_reseller_id,
- reseller: req1,
- phone_list: req1.contact_phone,
- email_list: req1.contact_email[0]
+ reseller: reseller_obj
})
})
})
@@ -574,6 +578,8 @@ export default class exchangeAdd extends React.Component {
}
})
+ console.log(this.state.reseller)
+
let data = {
reseller_id: this.state.reseller.id,
reseller_name: this.state.reseller.name,
@@ -632,13 +638,12 @@ export default class exchangeAdd extends React.Component {
if (this.state.isState === 1) {
newData.copy_code_batch_id = code_batch_id
}
-
let data = {
code_batch: [newData],
reseller_id: this.state.reseller.id,
reseller_name: this.state.reseller.name,
company_name: this.state.reseller.company_name,
- receive_email: this.state.reseller.contact_email[0],
+ receive_email: this.state.reseller.receive_email,
payment_direction: this.state.payment_direction[this.state.paytype - 1]
}
return data
diff --git a/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js b/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js
index 55d98d62..6c2faa4a 100644
--- a/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js
+++ b/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js
@@ -7,94 +7,100 @@ import { uploadImg, handelResponse } from "@/assets/api.js"
import Ipt from "@/components/input/main"
import '@/assets/comm.css'
import './comm.less'
-
+import _ from 'lodash'
+import Bus from '@/assets/eventBus.js'
export default class edittemplate extends React.Component {
constructor(props) {
super(props)
this.state = {
- model: {
- top_image: "",
- list: "2",
- font_color: "#000000",
- button_color: "#FACD6A",
- describe: { type: "", content: "", bg_image: '' },
- checkedLarge: false
+ switch:false,
+ comType:1,
+ navlist:[
+ {
+ id:1,
+ switch:false,
+ name:'index',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'首页'
+ },
+ {
+ id:2,
+ switch:false,
+ name:'order',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'订单'
+ },
+ {
+ id:3,
+ switch:false,
+ name:'coupon',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'我的券'
}
+ ],
+ defaultText:'',
+ selectText:'',
+ background:''
}
}
componentWillMount(e) {
let config = JSON.parse(sessionStorage.getItem('editorConfig'));
if (config && config.couponList && config.couponList.product_list) {
- this.setState({ model: config.couponList.product_list });
+ let { navlist, defaultText, selectText, background } = config.couponList.product_list.bottomBar;
+ this.setState({ navlist, defaultText, selectText, background });
}
}
- onListChange(e) {
- let model = this.state.model;
- model.list = e.target.value;
- this.setState({ model: model })
- this.props.setarrayType(e.target.value);
- }
- //活动说明
- onactivityChange(e) {
- let model1 = this.state.model;
- model1.describe.type = e.target.value;
- this.setState({ model: model1 })
- this.props.setactiveType(e.target.value);
+ //样式
+ onstyleChange(e) {
+ this.setState({ comType: e.target.value });
+
}
hasItemFn(c) {
- let model1 = this.state.model;
- if (c == model1.describe.type) {
- model1.describe.type = '';
- this.setState({ model: model1 });
- this.props.setactiveType('');
- }
+
}
- //顶部banner
- onUploadChange(files) {
+ //首页/订单/我的券
+ upImgChange(index,type,files) {
if (files.length > 0 && files[0].status == "success") {
- let model = this.state.model;
- model.top_image = files[0].src;
- this.setState({ model: model })
- this.props.setbanner(files[0].src);
+ let model = this.state.navlist;
+ model[index].pic[type] = files[0].src;
+ this.setState({ navlist: model })
+ Bus.emit('navlist', model)
} else {
- let model = this.state.model;
- model.top_image = '';
- this.setState({ model: model })
- this.props.setbanner("");
+ let model = this.state.navlist;
+ model[index].pic[type] ='';
+ this.setState({ navlist: model })
+ Bus.emit('navlist', model)
}
};
-
- handleChangeLarge = checked => {
- this.setState({ checkedLarge: checked });
- }
- //富文本
- getEditext(c) {
- let model1 = this.state.model;
- model1.describe.content = c;
- this.setState({ model: model1 });
- this.props.seteditorHtml(c);
- }
-
- //底部描述图
- onUploadChange2(files) {
+ //背景图
+ onUploadChange(files){
if (files.length > 0 && files[0].status == "success") {
- let model1 = this.state.model;
- model1.describe.bg_image = files[0].src;
- this.setState({ model: model1 })
- this.props.setbottomImg(files[0].src);
+ this.setState({ background: files[0].src })
+ Bus.emit('background', files[0].src)
} else {
- let model1 = this.state.model;
- model1.describe.bg_image = '';
- this.setState({ model: model1 })
- this.props.setbottomImg("");
+ this.setState({ background: '' })
+ Bus.emit('background','')
}
- };
-
-
-
+ }
+ handleChangeStatus = (index,checked) => {
+ let model = this.state.navlist;
+ model[index].switch= checked;
+ this.setState({ navlist: model })
+ Bus.emit('navlist', model)
+ }
+
onUploadError = (type, data) => {
if (type === 'overMaxAmount') {
Notify.error(`最多可上传 ${data.maxAmount} 张图片`);
@@ -102,41 +108,32 @@ export default class edittemplate extends React.Component {
Notify.error(`图片大小不能超过 ${data.formattedMaxSize}`);
}
};
- handleChange = (color) => {
- let model1 = this.state.model;
- model1.font_color = color;
+ handleFont = (color) => {
this.setState({
- model: model1
+ defaultText: color
});
- this.props.setButtonbgcolor(color);
-
+ Bus.emit('defaultText', color)
}
- handleChange1 = (color) => {
- let model1 = this.state.model;
- model1.button_color = color;
+ handleSelectFont = (color) => {
this.setState({
- model: model1
+ selectText: color
});
- this.props.setButtoncolor(color);
+ Bus.emit('selectText', color)
}
// 字体颜色
fontcolor(cor) {
- let models = this.state.model;
- models.button_color = cor;
- this.setState({ model: models });
- this.props.setButtoncolor(cor);
+ this.setState({ defaultText: cor });
+ Bus.emit('defaultText', cor)
}
- // 背景颜色
- bgcolor(cor) {
- let models = this.state.model;
- models.font_color = cor;
- this.setState({ model: models });
- this.props.setButtonbgcolor(cor);
+ //选中颜色
+ selectfontcolor(cor){
+ this.setState({ selectText: cor });
+ Bus.emit('selectText', cor)
}
+
onUpload = (file, report) => {
let self = this;
- console.log('上传头像', file);
return new Promise((resolve, reject) => {
let path = ""
let formdata = new FormData();
@@ -145,53 +142,36 @@ export default class edittemplate extends React.Component {
uploadImg(formdata).then((res) => {
handelResponse(res, (req, msg) => {
path = req.path;
-
}, (err) => {
reject();
})
});
-
let count = 0;
const update = () => {
if (path) {
-
resolve(
path
);
-
}
else {
-
if (count < 100) {
count += 2;
report(count);
setTimeout(update, 500);
- console.log("上传中")
}
else {
-
reject();
}
}
-
-
};
setTimeout(update, 500);
});
-
};
componentWillUnmount() {
let oldobj = JSON.parse(sessionStorage.getItem('editorConfig'));
- if (oldobj && oldobj.couponList) {
- let couponList = oldobj.couponList
- couponList.product_list = this.state.model;
- oldobj.couponList = couponList;
- } else {
- oldobj = {}
- let couponList = {}
- couponList.product_list = this.state.model;
- oldobj.couponList = couponList;
- }
+ let couponList = oldobj.couponList;
+ couponList.product_list.bottomBar = _.cloneDeep(this.state);
+ oldobj.couponList = couponList;
sessionStorage.setItem('editorConfig', JSON.stringify(oldobj));
}
render() {
@@ -204,14 +184,14 @@ export default class edittemplate extends React.Component {
-
+
{
- let model2 = this.state.model;
- model2.title = e;
- this.setState({ model: model2 })
- this.props.settitle(e)
+ let model2 = this.state.navlist;
+ model2[0].text = e;
+ this.setState({ navlist: model2 })
+ Bus.emit('navlist', model2)
}}
onClearItem={(e) => {
- let model2 = this.state.model;
- model2.title = "";
- this.setState({ model: model2 })
+ let model2 =this.state.navlist;
+ model2[0].text = '';
+ this.setState({ navlist: model2 })
+ Bus.emit('navlist', model2)
}}
- value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} />
+ value={this.state.navlist[0].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
@@ -273,11 +254,11 @@ export default class edittemplate extends React.Component {
订单
显示
this.handleChangeStatus(1,checked)}
/>
-
+
{ this.onUploadChange(e) }}
+ onChange={(e) => { this.upImgChange(1,'show',e) }}
onUpload={this.onUpload}
- defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
+ defaultFileList={this.state.navlist[1].pic.show ? [{ 'src': this.state.navlist[1].pic.show }] : null}
onError={this.onUploadError}
/>
{ this.onUploadChange(e) }}
+ onChange={(e) => { this.upImgChange(1,'show',e) }}
onUpload={this.onUpload}
- defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
+ defaultFileList={this.state.navlist[1].pic.selectShow ? [{ 'src': this.state.navlist[1].pic.selectShow }] : null}
onError={this.onUploadError}
/>
-
+
{
- let model2 = this.state.model;
- model2.title = e;
- this.setState({ model: model2 })
- this.props.settitle(e)
+ let model2 = this.state.navlist;
+ model2[1].text = e;
+ Bus.emit('navlist', model2)
+ this.setState({ navlist: model2 })
}}
onClearItem={(e) => {
- let model2 = this.state.model;
- model2.title = "";
- this.setState({ model: model2 })
+ let model2 =this.state.navlist;
+ model2[1].text = '';
+ Bus.emit('navlist', model2)
+ this.setState({ navlist: model2 })
}}
- value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} />
+ value={this.state.navlist[1].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
@@ -327,11 +309,11 @@ export default class edittemplate extends React.Component {
我的券
显示
this.handleChangeStatus(2,checked)}
/>
-
+
{ this.onUploadChange(e) }}
+ onChange={(e) => { this.upImgChange(2,'show',e) }}
onUpload={this.onUpload}
- defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
+ defaultFileList={this.state.navlist[2].pic.show ? [{ 'src': this.state.navlist[2].pic.show }] : null}
onError={this.onUploadError}
/>
{ this.onUploadChange(e) }}
+ onChange={(e) => { this.upImgChange(2,'selectShow',e) }}
onUpload={this.onUpload}
- defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
+ defaultFileList={this.state.navlist[2].pic.selectShow ? [{ 'src': this.state.navlist[2].pic.selectShow }] : null}
onError={this.onUploadError}
/>
-
+
{
- let model2 = this.state.model;
- model2.title = e;
- this.setState({ model: model2 })
- this.props.settitle(e)
+ let model2 = this.state.navlist;
+ model2[2].text = e;
+ this.setState({ navlist: model2 })
+ Bus.emit('navlist', model2)
}}
onClearItem={(e) => {
- let model2 = this.state.model;
- model2.title = "";
- this.setState({ model: model2 })
+ let model2 =this.state.navlist;
+ model2[2].text = '';
+ this.setState({ navlist:model2})
+ Bus.emit('navlist', model2)
}}
- value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} />
+ value={this.state.navlist[2].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
-
+
-
{ this.fontcolor('#000000') }}>
-
{ this.fontcolor('#04C160') }}>
-
{ this.fontcolor('#AE99D3') }}>
-
{ this.fontcolor('#FACD6A') }}>
-
{ this.fontcolor('#FE7962') }}>
+
{ this.fontcolor('#fff') }}>
+
{ this.fontcolor('#04C160') }}>
+
{ this.fontcolor('#AE99D3') }}>
+
{ this.fontcolor('#FACD6A') }}>
+
{ this.fontcolor('#FE7962') }}>
-
+
-
+
-
{ this.fontcolor('#f0f') }}>
-
{ this.fontcolor('#04C160') }}>
-
{ this.fontcolor('#AE99D3') }}>
-
{ this.fontcolor('#FACD6A') }}>
-
{ this.fontcolor('#FE7962') }}>
+
{ this.selectfontcolor('#fff') }}>
+
{ this.selectfontcolor('#04C160') }}>
+
{ this.selectfontcolor('#AE99D3') }}>
+
{ this.selectfontcolor('#FACD6A') }}>
+
{ this.selectfontcolor('#FE7962') }}>
-
+
-
+
(建议上传宽高为750*100像素的图片)
-
+
{ this.onUploadChange(e) }}
onUpload={this.onUpload}
- defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null}
+ defaultFileList={this.state.background ? [{ 'src': this.state.background }] : null}
onError={this.onUploadError}
/>
diff --git a/src/pages/exchangepage/edittemplate/couponConfig/bottomBar.js b/src/pages/exchangepage/edittemplate/couponConfig/bottomBar.js
new file mode 100644
index 00000000..23c2ceae
--- /dev/null
+++ b/src/pages/exchangepage/edittemplate/couponConfig/bottomBar.js
@@ -0,0 +1,38 @@
+import React from 'react';
+import "./comm.less"
+import '@/assets/comm.css'
+export default class bottomBar extends React.Component {
+ constructor(props) {
+ super(props)
+ this.state={
+ navList:[],
+ active:0
+ }
+ }
+ componentWillReceiveProps(nextProps){
+ let navList=nextProps.bottomBarConfig.navlist;
+ let naVisual=navList.filter(item=>item.switch);
+ this.setState({navList:naVisual});
+ console.log(66,nextProps);
+ }
+ clickIcon(e,index){
+ this.setState({active:index});
+ }
+ render() {
+ let active=this.state.active;
+ return (
+
+ {
+ this.state.navList.map((item,index)=>{
+ return(
+ - this.clickIcon(e,index)}>
+
+ {item.text}
+
+ )
+ })
+ }
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/src/pages/exchangepage/edittemplate/couponConfig/comm.less b/src/pages/exchangepage/edittemplate/couponConfig/comm.less
index 2ecaf6ae..8188ee93 100644
--- a/src/pages/exchangepage/edittemplate/couponConfig/comm.less
+++ b/src/pages/exchangepage/edittemplate/couponConfig/comm.less
@@ -14,4 +14,31 @@
text-overflow:ellipsis;
}
+}
+//底部栏目
+.bottomBar-view{
+ width: 100%;
+ height: 50px;
+ background: #f00;
+ position: absolute;
+ bottom: 0;
+ display: flex;
+ justify-content: space-evenly;
+}
+.bottomBar-view>li{
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+
+}
+.bottomBar-view>li>img{
+ width: 20px;
+ height: 20px;
+}
+.bottomBar-view>li>span{
+ padding-top: 5px;
+ font-size: 12px;
}
\ No newline at end of file
diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.js b/src/pages/exchangepage/edittemplate/goodstemplate.js
index a025b1f3..756c564f 100644
--- a/src/pages/exchangepage/edittemplate/goodstemplate.js
+++ b/src/pages/exchangepage/edittemplate/goodstemplate.js
@@ -2,7 +2,8 @@ import React from 'react';
import "./main.less"
import "../../../assets/comm.css"
import './goodstemplate.less'
-import SearchBarView from './couponConfig/searchBar' //商品详情立减金页面
+import SearchBarView from './couponConfig/searchBar' //商品详情搜索栏
+import BottomBarView from './couponConfig/bottomBar' //底部栏
export default class edittemplate extends React.Component {
constructor(props) {
super(props)
@@ -39,6 +40,15 @@ export default class edittemplate extends React.Component {
{
goodsConfig.describe.type == 2 ? : null
}
+ {
+ goodsConfig.bottomBar? :null
+
+ }
+
+ 搜索
+ |
+
+
)
}
diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.less b/src/pages/exchangepage/edittemplate/goodstemplate.less
index 654fde35..d83e8f63 100644
--- a/src/pages/exchangepage/edittemplate/goodstemplate.less
+++ b/src/pages/exchangepage/edittemplate/goodstemplate.less
@@ -1,87 +1,131 @@
-.goodstemplate,.detailstemplate{
+.goodstemplate,
+.detailstemplate {
height: 653px;
- background: #F2F7F8;
- position: relative;
- overflow-y: auto;
- overflow-x: hidden;
- >.preBtn{
- position: absolute;
- width: 28px;
- height: 28px;
- top: 2%;
- z-index: 5;
- left:4%;
- }
- >.topbanner{
- width:100%;
- height: 187px;
- }
- >.content-title{
- position: relative;
- z-index: 999;
- height: 40px;
- line-height: 40px;
- margin-bottom: 50px;
- padding:0 13px;
- }
- >.goodsPic,>.goodsPicMatrax{
- width:349px;
- height: 195px;
- margin-left:13px;
+ background: #F2F7F8;
position: relative;
- margin-top: -50px;
- }
- >.goodsPicMatrax{
- height: auto;
- }
- >.exchageBtn{
- display: flex;
- align-items: center;
- justify-content: center;
- width:349px;
- color: #fff;
- background: #E8EAEC;
- border-radius: 44px;
- height: 44px;
- margin:30px 0 0 13px;
- &.bottomBtn{
- position: fixed;
- top:695px;
+ // overflow-y: auto;
+ // overflow-x: auto;
+
+ >.preBtn {
+ position: absolute;
+ width: 28px;
+ height: 28px;
+ top: 2%;
+ z-index: 5;
+ left: 4%;
+ }
+
+ >.topbanner {
+ width: 100%;
+ height: 187px;
+ }
+
+ >.content-title {
+ position: relative;
+ z-index: 999;
+ height: 40px;
+ line-height: 40px;
+ margin-bottom: 50px;
+ padding: 0 13px;
+ }
+
+ >.goodsPic,
+ >.goodsPicMatrax {
+ width: 349px;
+ height: 195px;
+ margin-left: 13px;
+ position: relative;
+ margin-top: -50px;
+ }
+
+ >.goodsPicMatrax {
+ height: auto;
+ }
+
+ >.exchageBtn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 349px;
+ color: #fff;
+ background: #E8EAEC;
+ border-radius: 44px;
+ height: 44px;
+ margin: 30px 0 0 13px;
+
+ &.bottomBtn {
+ position: fixed;
+ top: 695px;
+ }
+ }
+
+ .susactive_tip {
+ position: absolute;
+ top: 40px;
+ right: 0;
+ width: 30px;
+ // height: 70px;s
+ cursor: pointer;
+ }
+
+ .bottomactiveTip {
+ width: 375px;
+ margin: 10px 0;
+ padding: 24px 20px 60px;
+ box-sizing: border-box;
+ background: #fff;
+ border-radius: 4px;
+ box-shadow: 1px 1px 13px 2px #f1f2f3;
+ line-height: 1.5rem;
+
+ p {
+ width: 335px;
+ }
+ }
+
+ .delete-component {
+ display: flex;
+ position: absolute;
+ top: 193.2px;
+ right: -5px;
+ -ms-flex-align: center;
+ align-items: center;
+ padding: 6px 8px;
+ border-radius: 2px;
+ background: #fff;
+ font-size: 14px;
+ -webkit-transform: translate3d(100%, 64px, 0);
+ transform: translate3d(100%, 64px, 0);
+ &:before{
+ position: absolute;
+ left: 0;
+ top: 50%;
+ border-width: 5px 6px 5px 0;
+ border-style: solid;
+ border-color: transparent #fff transparent transparent;
+ content: "";
+ -webkit-transform: translate3d(-100%,-50%,0);
+ transform: translate3d(-100%,-50%,0);
+ }
+ .split{
+ padding: 0 5px;
+ }
}
- }
- .susactive_tip{
- position: absolute;
- top: 40px;
- right: 0;
- width: 30px;
- // height: 70px;s
- cursor: pointer;
- }
- .bottomactiveTip{
- width: 375px;
- margin:10px 0;
- padding: 24px 20px 60px;
- box-sizing: border-box;
- background: #fff;
- border-radius: 4px;
- box-shadow: 1px 1px 13px 2px #f1f2f3;
- line-height: 1.5rem;
- p{
- width: 335px;
- }
- }
}
-.goodstemplate{
- .bottomactiveTip{
+
+.goodstemplate {
+ .bottomactiveTip {
width: 350px;
- margin:12.5px;
- p{
+ margin: 12.5px;
+
+ p {
width: 310px;
}
}
- .searchBar{
+
+ .searchBar {
width: 80%;
- margin-left:10%;
+ margin-left: 10%;
margin-top: 2%;
height: 40px;
line-height: 40px;
@@ -92,31 +136,37 @@
}
}
-.detailstemplate{
+.detailstemplate {
position: relative;
background: #fff;
padding-bottom: 20px;
- .detail_bottomImg{
+
+ .detail_bottomImg {
width: 100%;
padding-bottom: 30px;
}
- .topBanner{
+
+ .topBanner {
width: 100%;
height: 373px;
}
- .splitLine{
+
+ .splitLine {
width: 100%;
height: 3px;
background: #f1f2f3;
}
- .splitLine:last-of-type{
+
+ .splitLine:last-of-type {
margin-bottom: 20px;
}
- .iptbg{
+
+ .iptbg {
width: 100%;
}
- .exchangeBtn{
- width:348px;
+
+ .exchangeBtn {
+ width: 348px;
height: 44px;
border-radius: 22px;
display: flex;
@@ -129,9 +179,11 @@
color: #fff;
}
}
-.activeTip{
+
+.activeTip {
position: relative;
- .imgTip{
+
+ .imgTip {
position: absolute;
top: 50%;
left: 60px;
@@ -141,23 +193,28 @@
font-size: 20px;
}
}
-.bottomTip{
+
+.bottomTip {
width: 100%;
margin-top: 10px;
}
-.bottomTipview{
+
+.bottomTipview {
margin-bottom: 30px;
}
-.desc-goods{
+
+.desc-goods {
background: #fff;
- .descript{
+
+ .descript {
padding: 30px 24px;
box-sizing: border-box;
line-height: 1.5rem;
background: #fff;
- color: #45464b!important;
+ color: #45464b !important;
}
- >p{
+
+ >p {
width: 100%;
height: 50px;
background: #f7f8f9;
@@ -168,32 +225,37 @@
font-size: 16px;
}
}
+
//商品详情页区分立减金/权益
-.details_type{
+.details_type {
position: relative;
top: 55px;
left: 0;
- width: 375px;
- margin: 0 auto;
- display: flex;
- align-items: center;
- justify-content: center;
- .zent-radio-button[data-zv="9.12.7"] {
- width: 100px;
- }
+ width: 375px;
+ margin: 0 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .zent-radio-button[data-zv="9.12.7"] {
+ width: 100px;
+ }
}
+
/*商品详情页-立减金*/
-.details-reduce{
+.details-reduce {
background: #fff;
position: relative;
- .reduce-pic{
+
+ .reduce-pic {
width: 100%;
- position: absolute!important;
- left:0;
+ position: absolute !important;
+ left: 0;
z-index: 1;
}
}
+
//优惠券图片
-.picture{
+.picture {
width: 100%;
-}
+}
\ No newline at end of file
diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js
index 7750301a..0c4fa199 100644
--- a/src/pages/exchangepage/edittemplate/main.js
+++ b/src/pages/exchangepage/edittemplate/main.js
@@ -31,7 +31,8 @@ import Whitegoods from './whitegoods' //白名单商品页面
import Whitedetails from './whitedetails' //白名单详情页
import Reduce from './reduce' //商品详情页立减金
import ReduceConfig from './reduceConfig' //商品详情立减金页面
-import SearchBarView from './couponConfig/searchBar' //商品详情立减金页面
+import SearchBarView from './couponConfig/searchBar'
+import BottomBarView from './couponConfig/bottomBar' //商品详情立减金页面
// 优惠券
import CouponLandingForm from '../couponTemplate/landingPage/config/main' //优惠券落地页表单
import CouponGoodsListForm from '../couponTemplate/goodsPage/config/main' //优惠券商品列表页
@@ -92,6 +93,44 @@ let couponProduct_list = {
textAlign: 'left',
fontColor: '#333',
fontSize: 1
+ },
+ bottomBar: {
+ switch:false,
+ navlist:[
+ {
+ id:1,
+ switch:false,
+ name:'index',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'首页'
+ },
+ {
+ id:2,
+ switch:false,
+ name:'order',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'订单'
+ },
+ {
+ id:3,
+ switch:false,
+ name:'coupon',
+ pic:{
+ show:'',
+ selectShow:''
+ },
+ text:'我的券'
+ }
+ ],
+ defaultText:'',
+ selectText:'',
+ background:''
}
}
export default class edittemplate extends React.Component {
@@ -180,6 +219,27 @@ export default class edittemplate extends React.Component {
titleConfig.title.fontSize = prop
this.setState({ product_list: titleConfig })
})
+ //底部栏
+ Bus.addListener('navlist', (prop) => {
+ let bottomConfig = this.state.product_list
+ bottomConfig.bottomBar.navlist = prop
+ this.setState({ product_list: bottomConfig })
+ })
+ Bus.addListener('background', (prop) => {
+ let bottomConfig = this.state.product_list
+ bottomConfig.bottomBar.background = prop
+ this.setState({ product_list: bottomConfig })
+ })
+ Bus.addListener('defaultText', (prop) => {
+ let bottomConfig = this.state.product_list
+ bottomConfig.bottomBar.defaultText = prop
+ this.setState({ product_list: bottomConfig })
+ })
+ Bus.addListener('selectText', (prop) => {
+ let bottomConfig = this.state.product_list
+ bottomConfig.bottomBar.selectText = prop
+ this.setState({ product_list: bottomConfig })
+ })
setTimeout(() => {
let img = document.getElementById('center-img')
let center = document.getElementById('center')
@@ -887,6 +947,9 @@ export default class edittemplate extends React.Component {
}
/>
) : null}
+ {
+ this.state.product_list.bottomBar? :null
+ }
diff --git a/src/pages/exchangepage/edittemplate/main.less b/src/pages/exchangepage/edittemplate/main.less
index 1dd00d87..ee37bd6c 100644
--- a/src/pages/exchangepage/edittemplate/main.less
+++ b/src/pages/exchangepage/edittemplate/main.less
@@ -14,7 +14,7 @@
right: 0;
}
.xj-center-small{
- margin: 0 485px 0 550px;
+ margin: 0 448px 0 490px;
}
.perimg {
position: absolute;
@@ -43,7 +43,6 @@
// height: 400px;
width: 375px;
margin-bottom: 200px;
-
}
.editor-main:before {
@@ -479,7 +478,7 @@
#leftComponent {
position: fixed;
- width: 350px;
+ width: 300px;
height: 100%;
background: #fff;
@@ -597,7 +596,7 @@
overflow: hidden;
.topbanner {
width: 100%;
- height: 70px;
+ height: 50px;
}
>.content-title{
position: relative;
@@ -675,6 +674,31 @@
border-radius: 15px;
margin: 10% 5%;
}
+ .bottomBar-view{
+ width: 100%;
+ height: 30px;
+ position: absolute;
+ bottom: 0;
+ display: flex;
+ justify-content: space-evenly;
+ }
+ .bottomBar-view>li{
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+
+ }
+ .bottomBar-view>li>img{
+ width: 8px;
+ height: 8px;
+ }
+ .bottomBar-view>li>span{
+ font-size: 6px;
+ }
+
}
}