diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index 3f67d0e2..c433eb41 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -324,6 +324,22 @@ export default class exchangeAdd extends React.Component { } } + /* 获取直连天下商品数据 */ + getProductInfoSelectData(reseller_id) { + return new Promise((resolve, reject) => { + let param = { + reseller_id: reseller_id + } + getProductInfoSelect(param).then((res) => { + if (res.code === 200) { + resolve(res.data.data) + } else { + reject([]) + } + }) + }) + } + // 立减金 加款后 商品范围列表数据进行变动 getTableList() { if (sessionStorage.getItem("addMoneyData")) { @@ -929,7 +945,8 @@ export default class exchangeAdd extends React.Component { } onDisabledTime = (date) => { - const min = new Date() + let step1 = JSON.parse(sessionStorage.getItem("knockGold_effectDate")) + const min = new Date(step1.begin_time) const hour = min.getHours() const minute = min.getMinutes() const second = min.getSeconds() @@ -1004,22 +1021,6 @@ export default class exchangeAdd extends React.Component { }) } - // 获取直连天下商品数据 - getProductInfoSelectData(reseller_id) { - return new Promise((resolve, reject) => { - let param = { - reseller_id: reseller_id - } - getProductInfoSelect(param).then((res) => { - if (res.code === 200) { - resolve(res.data.data) - } else { - reject([]) - } - }) - }) - } - /* 商品范围列表编辑 */ productEditShow(rowData) { if (this.state.direct_reseller_id > 0) { diff --git a/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js b/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js index bcfdf969..55d98d62 100644 --- a/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js +++ b/src/pages/exchangepage/couponTemplate/goodsPage/config/bottomBar.js @@ -1,10 +1,13 @@ import React from 'react'; -import { ColorPicker, Notify, RadioGroup, RadioButton } from 'zent'; +import { ColorPicker, Notify, RadioGroup, RadioButton, Switch, ImageUpload } from 'zent'; import "@/assets/comm.css" import Form from "@/components/form/main" import FormItem from "@/components/form-item/main" import { uploadImg, handelResponse } from "@/assets/api.js" import Ipt from "@/components/input/main" +import '@/assets/comm.css' +import './comm.less' + export default class edittemplate extends React.Component { constructor(props) { super(props) @@ -12,9 +15,10 @@ export default class edittemplate extends React.Component { model: { top_image: "", list: "2", - font_color: "#f1f2f3", + font_color: "#000000", button_color: "#FACD6A", - describe: { type: "", content: "", bg_image: '' } + describe: { type: "", content: "", bg_image: '' }, + checkedLarge: false } } } @@ -63,12 +67,8 @@ export default class edittemplate extends React.Component { } }; - //悬浮富文本 - getsusEditext(c) { - let model1 = this.state.model; - model1.describe.content = c; - this.setState({ model: model1 }); - this.props.seteditorHtml(c); + handleChangeLarge = checked => { + this.setState({ checkedLarge: checked }); } //富文本 getEditext(c) { @@ -196,7 +196,7 @@ export default class edittemplate extends React.Component { } render() { return ( -
+

底部栏设置

@@ -204,46 +204,229 @@ export default class edittemplate extends React.Component {
- + { this.onactivityChange(e) }} value={this.state.model.describe.type}> - this.hasItemFn(1)} value={"1"}>圆形 - this.hasItemFn(2)} value={"2"}>方形 + this.hasItemFn(1)} value={"1"}>默认 + this.hasItemFn(2)} value={"2"}>自定义
- - { this.onactivityChange(e) }} value={this.state.model.describe.type}> - this.hasItemFn(1)} value={"1"}>居左 - this.hasItemFn(2)} value={"2"}>居中 - this.hasItemFn(2)} value={"2"}>居右 - - - -
- { this.fontcolor('#f0f') }}> - { this.fontcolor('#04C160') }}> - { this.fontcolor('#AE99D3') }}> - { this.fontcolor('#FACD6A') }}> - { this.fontcolor('#FE7962') }}> -
- + +

(建议上传宽高为100*100像素的.png图片)

+
+
+
+ 首页 +

显示 +

+ +
+ { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> + { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> +
+ +
+ + + { + let model2 = this.state.model; + model2.title = e; + this.setState({ model: model2 }) + this.props.settitle(e) + }} + onClearItem={(e) => { + let model2 = this.state.model; + model2.title = ""; + this.setState({ model: model2 }) + }} + value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> + +
+
+
+ 订单 +

显示 +

+
+ +
+ { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> + { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> +
+ +
+ + + { + let model2 = this.state.model; + model2.title = e; + this.setState({ model: model2 }) + this.props.settitle(e) + }} + onClearItem={(e) => { + let model2 = this.state.model; + model2.title = ""; + this.setState({ model: model2 }) + }} + value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> + +
+
+
+ 我的券 +

显示 +

+
+ +
+ { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> + { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> +
+ +
+ + + { + let model2 = this.state.model; + model2.title = e; + this.setState({ model: model2 }) + this.props.settitle(e) + }} + onClearItem={(e) => { + let model2 = this.state.model; + model2.title = ""; + this.setState({ model: model2 }) + }} + value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> + +
+
+ +
+ { this.fontcolor('#000000') }}> + { 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') }}> +
+ +
+
+
+
+ +

(建议上传宽高为750*100像素的图片)

+
+
+ + +
+ { this.onUploadChange(e) }} + onUpload={this.onUpload} + defaultFileList={this.state.model.top_image ? [{ 'src': this.state.model.top_image }] : null} + onError={this.onUploadError} + /> +
+ +
+
- - - { - let model2 = this.state.model; - model2.title = e; - this.setState({ model: model2 }) - this.props.settitle(e) - }} - onClearItem={(e) => { - let model2 = this.state.model; - model2.title = ""; - this.setState({ model: model2 }) - }} - value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> -
diff --git a/src/pages/exchangepage/couponTemplate/goodsPage/config/comm.less b/src/pages/exchangepage/couponTemplate/goodsPage/config/comm.less new file mode 100644 index 00000000..6254b3ab --- /dev/null +++ b/src/pages/exchangepage/couponTemplate/goodsPage/config/comm.less @@ -0,0 +1,48 @@ +.component-item{ + display: flex; + flex-direction: column; + padding: 16px 8px; + margin-bottom: 8px; + background: #f5faff; +} +.component-item .v-editItem{ + font-size: 14px; + display: flex; + justify-content:space-between; + align-items: center; +} +.component-item .v-editItem>span{ + color: #999; +} +.component-item .showType{ + margin-right: 10px; + color: #333!important; +} +.bottomBar .form-compontent{ + padding-top:0; + .choice-up-image{ + margin-right: 15px; + .zent-image-upload-tips[data-zv="9.12.7"]{ + text-align: center; + color: #333; + } + } + .colorItemfont{ + margin-top: 0; + } +} +.tips{ + color: #999; + span{ + color:#f00; + } +} +.color-control{ + margin-top: 10px; + display: flex; + justify-content: space-between; +} + +.backpic-item{ + margin-bottom: 30px; +} \ No newline at end of file diff --git a/src/pages/exchangepage/couponTemplate/goodsPage/config/searchBar.js b/src/pages/exchangepage/couponTemplate/goodsPage/config/searchBar.js index 5dcf0f34..29517e78 100644 --- a/src/pages/exchangepage/couponTemplate/goodsPage/config/searchBar.js +++ b/src/pages/exchangepage/couponTemplate/goodsPage/config/searchBar.js @@ -211,7 +211,7 @@ export default class edittemplate extends React.Component {
- + { this.onactivityChange(e) }} value={this.state.model.describe.type}> this.hasItemFn(1)} value={"1"}>居左 this.hasItemFn(2)} value={"2"}>居中 diff --git a/src/pages/exchangepage/couponTemplate/goodsPage/config/title.js b/src/pages/exchangepage/couponTemplate/goodsPage/config/title.js index d0cab8d9..86d5637d 100644 --- a/src/pages/exchangepage/couponTemplate/goodsPage/config/title.js +++ b/src/pages/exchangepage/couponTemplate/goodsPage/config/title.js @@ -203,32 +203,47 @@ export default class edittemplate extends React.Component {
- -
- { this.fontcolor('#f0f') }}> - { this.fontcolor('#04C160') }}> - { this.fontcolor('#AE99D3') }}> - { this.fontcolor('#FACD6A') }}> - { this.fontcolor('#FE7962') }}> -
- -
-
-
- { - let model2 = this.state.model; - model2.title = e; - this.setState({ model: model2 }) - this.props.settitle(e) - }} - onClearItem={(e) => { + { let model2 = this.state.model; - model2.title = ""; + model2.title = e; this.setState({ model: model2 }) + this.props.settitle(e) }} - value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> - + onClearItem={(e) => { + let model2 = this.state.model; + model2.title = ""; + this.setState({ model: model2 }) + }} + value={this.state.model.title} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'300px'} alignment={'left'} /> + + + { this.onactivityChange(e) }} value={this.state.model.describe.type}> + this.hasItemFn(1)} value={"1"}>居左 + this.hasItemFn(2)} value={"2"}>居中 + this.hasItemFn(2)} value={"2"}>居右 + + + +
+ { this.fontcolor('#f0f') }}> + { this.fontcolor('#04C160') }}> + { this.fontcolor('#AE99D3') }}> + { this.fontcolor('#FACD6A') }}> + { this.fontcolor('#FE7962') }}> +
+ +
+
+
+ + { this.onactivityChange(e) }} value={this.state.model.describe.type}> + this.hasItemFn(1)} value={"1"}>A- + this.hasItemFn(2)} value={"2"}>A + this.hasItemFn(2)} value={"2"}>A+ + + +
diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 5bdb2859..1c2fde79 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -847,13 +847,12 @@ export default class edittemplate extends React.Component {
{/* 组件库 */} { - this.state.showType==2? this.componentName(c)}/>:null + this.state.showType==2&&this.state.activeNavStatus==2? this.componentName(c)}/>:null } - {/* this.state.showType==2&&this.state.activeNavStatus==2? */}
-
+
{this.state.activeNavStatus == 1 ? (