From a8348c198f0502b7b76bc86a897000212cfdc8a2 Mon Sep 17 00:00:00 2001 From: Wind-58 Date: Tue, 13 Sep 2022 11:03:28 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A0=81=E4=B8=A2=E5=A4=B1=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/exchangecodeAdd/index.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index d1e8b4c4..66dfca91 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -261,6 +261,7 @@ export default class exchangeAdd extends React.Component { code_name: reqCopy.title, issued: reqCopy.quantity, stock: reqCopy.stock, + restrict: reqCopy.restrict, describe: reqCopy.describe, date_time: [reqCopy.begin_time, reqCopy.end_time], range: reqCopy.goods From 080532a25c5f17ba69a1dc5b667431d3bbdedb8e Mon Sep 17 00:00:00 2001 From: Wind-58 Date: Tue, 13 Sep 2022 11:19:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E7=A0=81=E7=BB=84=E4=BB=B6=E5=A4=9A=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/exchangecodeAdd/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/exchangecode/exchangecodeAdd/index.jsx b/src/pages/exchangecode/exchangecodeAdd/index.jsx index 66dfca91..614bfa98 100644 --- a/src/pages/exchangecode/exchangecodeAdd/index.jsx +++ b/src/pages/exchangecode/exchangecodeAdd/index.jsx @@ -1,4 +1,4 @@ -import React, { Fragment } from "react" +import React from "react" import Ipt from "@/components/input/main" import Form from "@/components/form/main" import FormItem from "@/components/form-item/main" From 1f011a2085cc133e112bddfa3f00263db00780da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Tue, 13 Sep 2022 14:57:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E7=AB=8B=E5=87=8F=E9=87=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=81=94=E5=8A=A8=EF=BC=8C=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goodDetail/product/preview.js | 30 ------- .../couponTemplate/goodDetail/reduce/main.js | 54 ----------- .../edittemplate/couponReduceDetail.js | 90 +++++++++++++++++++ .../couponconfig.js} | 17 ++-- .../edittemplate/detailstemplate.js | 12 ++- .../edittemplate/goodstemplate.less | 26 +++++- src/pages/exchangepage/edittemplate/main.js | 36 ++++++-- src/pages/exchangepage/edittemplate/reduce.js | 10 +++ 8 files changed, 169 insertions(+), 106 deletions(-) delete mode 100644 src/pages/exchangepage/couponTemplate/goodDetail/product/preview.js delete mode 100644 src/pages/exchangepage/couponTemplate/goodDetail/reduce/main.js create mode 100644 src/pages/exchangepage/edittemplate/couponReduceDetail.js rename src/pages/exchangepage/{couponTemplate/goodDetail/product/config.js => edittemplate/couponconfig.js} (94%) diff --git a/src/pages/exchangepage/couponTemplate/goodDetail/product/preview.js b/src/pages/exchangepage/couponTemplate/goodDetail/product/preview.js deleted file mode 100644 index 9d71a2f0..00000000 --- a/src/pages/exchangepage/couponTemplate/goodDetail/product/preview.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import "./main.less" -import "../../../assets/comm.css" -import './goodstemplate.less' -export default class edittemplate extends React.Component{ - constructor(props){ - super(props) - } - opendescFn(){ - this.props.opendesc(true) - } - render(){ - return( -
- - -

- -

- { - this.props.detaildata.describe.bg_image&&this.props.detaildata.describe.type==1?:this.props.detaildata.describe.type==3?
:null - } - { - this.props.detaildata.describe.type==2?:null - } - -
- ) - } -} \ No newline at end of file diff --git a/src/pages/exchangepage/couponTemplate/goodDetail/reduce/main.js b/src/pages/exchangepage/couponTemplate/goodDetail/reduce/main.js deleted file mode 100644 index b52d8910..00000000 --- a/src/pages/exchangepage/couponTemplate/goodDetail/reduce/main.js +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; -import { ColorPicker} from 'zent'; -import Form from "@/components/form/main" -import FormItem from "@/components/form-item/main" -export default class edittemplate extends React.Component { - constructor(props) { - super(props) - this.state = { - model: { - font_color: "#AB582F", - button_color: "#fff", - describe: { type: "", content: " ", bg_image: '' }, - } - } - } - handleChange = (color) => { - let model1 = this.state.model; - model1.font_color = color; - this.setState({ - model: model1 - }); - } - handleChange1 = (color) => { - let model1 = this.state.model; - model1.button_color = color; - this.setState({ - model: model1 - }); - } - render() { - return ( -
-
-

商品详情页立减金设置

-
-
-
-
样式
- -
- -
-
- -
- -
-
-
-
-
- ) - } -} \ No newline at end of file diff --git a/src/pages/exchangepage/edittemplate/couponReduceDetail.js b/src/pages/exchangepage/edittemplate/couponReduceDetail.js new file mode 100644 index 00000000..680fb84a --- /dev/null +++ b/src/pages/exchangepage/edittemplate/couponReduceDetail.js @@ -0,0 +1,90 @@ +import React from 'react'; +import { ColorPicker } from 'zent'; +import Form from "@/components/form/main" +import FormItem from "@/components/form-item/main" +import _ from "lodash"; +export default class edittemplate extends React.Component { + constructor(props) { + super(props) + this.state = { + font_color: "#AB582F", + button_color: "#FACD6A", + } + } + changeFontcor = (color) => { + this.setState({ + font_color: color + }); + this.props.setReduceFontcolor(color); + } + changeButtoncor = (color) => { + this.setState({ + button_color: color + }); + this.props.setReduceButtoncolor(color); + } + fontcolor(color) { + this.setState({ + font_color: color + }); + this.props.setReduceFontcolor(color); + } + buttoncolor(color) { + this.setState({ + button_color: color + }); + this.props.setReduceButtoncolor(color); + } + componentWillMount(e) { + let config = JSON.parse(sessionStorage.getItem('editorConfig')); + if (config && config.couponList && config.couponList.product_detail) { + let { font_color, button_color } = config.couponList.product_detail.reduce; + this.setState({ font_color, button_color }); + } + } + componentWillUnmount() { + let oldobj = JSON.parse(sessionStorage.getItem('editorConfig')); + let couponList = oldobj.couponList; + couponList.product_detail.reduce = _.cloneDeep(this.state); + oldobj.couponList = couponList; + sessionStorage.setItem('editorConfig', JSON.stringify(oldobj)); + } + render() { + return ( +
+
+

商品详情页立减金设置

+
+
+
+
样式
+ +
+ { this.fontcolor('#ffffff') }}> + { this.fontcolor('#04C160') }}> + { this.fontcolor('#AE99D3') }}> + { this.fontcolor('#FACD6A') }}> + { this.fontcolor('#FE7962') }}> +
+ +
+
+
+ +
+ { this.buttoncolor('#ffffff') }}> + { this.buttoncolor('#04C160') }}> + { this.buttoncolor('#AE99D3') }}> + { this.buttoncolor('#FACD6A') }}> + { this.buttoncolor('#FE7962') }}> +
+ +
+
+
+
+
+
+ ) + } +} \ No newline at end of file diff --git a/src/pages/exchangepage/couponTemplate/goodDetail/product/config.js b/src/pages/exchangepage/edittemplate/couponconfig.js similarity index 94% rename from src/pages/exchangepage/couponTemplate/goodDetail/product/config.js rename to src/pages/exchangepage/edittemplate/couponconfig.js index 60aeb3cd..e58a0e04 100644 --- a/src/pages/exchangepage/couponTemplate/goodDetail/product/config.js +++ b/src/pages/exchangepage/edittemplate/couponconfig.js @@ -4,6 +4,7 @@ import "@/assets/comm.css" import Form from "@/components/form/main" import Wangeditor from '@/pages/exchangepage/edittemplate/wangeditorCom.js' import FormItem from "@/components/form-item/main" +import _ from "lodash"; import { uploadImg, handelResponse, addTheme, putMyTheme, putTheme, putSystemTemplate, addSystemTemplate } from "@/assets/api.js" export default class edittemplate extends React.Component { constructor(props) { @@ -138,21 +139,15 @@ export default class edittemplate extends React.Component { } componentWillMount() { let config = JSON.parse(sessionStorage.getItem('editorConfig')); - if (config && config.exchangeList && config.exchangeList.product_detail) { - this.setState({ model: config.exchangeList.product_detail }); + if (config && config.couponList && config.couponList.product_detail) { + this.setState({ model: config.couponList.product_detail }); } } componentWillUnmount() { let oldobj = JSON.parse(sessionStorage.getItem('editorConfig')); - if (oldobj && oldobj.exchangeList) { - let exchangeList = oldobj.exchangeList - exchangeList.product_detail = this.state.model; - oldobj.exchangeList = exchangeList; - } else { - let exchangeList = {} - exchangeList.product_detail = this.state.model; - oldobj.exchangeList = exchangeList; - } + let couponList = oldobj.couponList; + couponList.product_detail = _.cloneDeep(this.state.model); + oldobj.couponList = couponList; sessionStorage.setItem('editorConfig', JSON.stringify(oldobj)); } diff --git a/src/pages/exchangepage/edittemplate/detailstemplate.js b/src/pages/exchangepage/edittemplate/detailstemplate.js index 9d71a2f0..620d556c 100644 --- a/src/pages/exchangepage/edittemplate/detailstemplate.js +++ b/src/pages/exchangepage/edittemplate/detailstemplate.js @@ -23,7 +23,17 @@ export default class edittemplate extends React.Component{ { this.props.detaildata.describe.type==2?:null } - + { + this.props.templateType!=2?: +
+
+

¥0.00

+

共省¥0.01

+
+ +
+ } + ) } diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.less b/src/pages/exchangepage/edittemplate/goodstemplate.less index d8d4821e..c04f70f6 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.less +++ b/src/pages/exchangepage/edittemplate/goodstemplate.less @@ -3,9 +3,6 @@ height: 653px; background: #F2F7F8; position: relative; - // overflow-y: auto; - // overflow-x: auto; - >.preBtn { position: absolute; width: 28px; @@ -115,6 +112,29 @@ .fixbottom{ bottom: 0!important; } + .payBtn-view{//优惠券支付模块 + width: 100%; + height: 60px; + position: absolute; + bottom: 0; + left: 0; + z-index: 9999; + background: #D7D7D7; + .coupon-price{ + display: flex; + flex-direction: column; + flex: 1; + text-align: right; + padding-right: 15px; + } + .payBtn{ + width: 100px; + height: 100%; + border: 0; + } + + + } } .goodstemplate { diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 9e4b7716..81dce7a8 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -11,7 +11,7 @@ import Detailstemplate from './detailstemplate' import Descteplate from './goodsdesc' import LandingForm from './landingPage' //落地页表单 import GoodsForm from './goodsPage' //商品页表单 -import DetailsPage from './detailsPage' //商品详情页面 +import DetailsPage from './detailsPage' //商品详情form页面 import WhiteLand from './whiteLand' //白名单落地页 import Whitegoods from './whitegoods' //白名单商品页面 import Whitedetails from './whitedetails' //白名单详情页 @@ -22,8 +22,8 @@ import BottomBarView from './couponConfig/bottomBar' // 优惠券 import CouponLandingForm from '../couponTemplate/landingPage/config/main' //优惠券落地页表单 import CouponGoodsListForm from '../couponTemplate/goodsPage/config/main' //优惠券商品列表页 -import CouponGoodsDetailForm from '../couponTemplate/goodDetail/product/config' //优惠券商品详情页 -import CouponReduceDetailForm from '../couponTemplate/goodDetail/reduce/main' //优惠券商品详情页 +import CouponGoodsDetailForm from './couponconfig' //优惠券商品详情页 +import CouponReduceDetailForm from './couponReduceDetail' //优惠券立减金详情页 import CouponComLib from '../couponTemplate/goodsPage/componentLib/main' //优惠券组件库 // import import _ from 'lodash' @@ -51,7 +51,11 @@ let product_list = { let product_detail = { font_color: '#ffffff', button_color: '#FACD6A', - describe: { type: '', content: '', bg_image: '' } + describe: { type: '', content: '', bg_image: '' }, + reduce:{ + font_color: "#AB582F", + button_color: "#FACD6A", + } } //优惠券商品列表 let couponProduct_list = { @@ -619,6 +623,7 @@ export default class edittemplate extends React.Component { detailpage.describe.type = c this.setState({ product_detail: detailpage }) } + //活动说明类型 getactiveTypeFn(c) { let goodsConfig = this.state.product_list @@ -675,6 +680,16 @@ export default class edittemplate extends React.Component { detailConfig.describe.bg_image = c this.setState({ product_detail: detailConfig }) } + getReduceButtoncolor(c) { + let reducedetailConfig = this.state.product_detail + reducedetailConfig.reduce.button_color = c + this.setState({ product_detail: reducedetailConfig }) + } + getReduceFontcolor(c) { + let reducedetailConfig = this.state.product_detail + reducedetailConfig.reduce.font_color = c + this.setState({ product_detail: reducedetailConfig }) + } onClose() { this.setState({ preview_visible: false }) } @@ -1126,7 +1141,8 @@ export default class edittemplate extends React.Component { this.state.detailType == 1 ? this.setState({ detailactiveshow: true })} detaildata={this.state.product_detail} - /> : + templateType={this.state.showType} + /> : } )} @@ -1250,8 +1266,14 @@ export default class edittemplate extends React.Component { }} setbottomImg={(c) => this.getbottomimgFn(c)} setdetailftc={(c) => this.getdetailfont_color(c)} - />: - ) :this.state.activeNavStatus == 1?: + />: this.getdetailEditorHtmlFn(c)} + setdetailActive={(c) => this.getdetailActiveFn(c)} + setdetailbgc={(c) => { + this.getdetailbgcolor(c) + }} + setbottomImg={(c) => this.getbottomimgFn(c)} + setdetailftc={(c) => this.getdetailfont_color(c)}/> + ) :this.state.activeNavStatus == 1?:this.getReduceFontcolor(c)} setReduceButtoncolor={(c)=>this.getReduceButtoncolor(c)}/> } {this.state.preview_visible ? ( diff --git a/src/pages/exchangepage/edittemplate/reduce.js b/src/pages/exchangepage/edittemplate/reduce.js index f6bdd00b..f2700941 100644 --- a/src/pages/exchangepage/edittemplate/reduce.js +++ b/src/pages/exchangepage/edittemplate/reduce.js @@ -17,6 +17,16 @@ export default class edittemplate extends React.Component{
+ { + this.props.templateType==2? +
+
+

¥0.00

+

共省¥0.01

+
+ +
:null + }
) } From ae7369180c14b9b0ebbfdd4c27dac0412977361b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Tue, 13 Sep 2022 16:26:08 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E7=AB=8B=E5=87=8F=E9=87=91=E6=A8=A1=E6=9D=BF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/edittemplate/goodstemplate.js | 4 +++- src/pages/exchangepage/edittemplate/main.less | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.js b/src/pages/exchangepage/edittemplate/goodstemplate.js index 339ed0c4..111b78cf 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.js +++ b/src/pages/exchangepage/edittemplate/goodstemplate.js @@ -157,7 +157,9 @@ export default class edittemplate extends React.Component { { - goodsConfig.list == 2 ? : null + goodsConfig.list == 2 ? : null } diff --git a/src/pages/exchangepage/edittemplate/main.less b/src/pages/exchangepage/edittemplate/main.less index 08a5abcd..4e22af3f 100644 --- a/src/pages/exchangepage/edittemplate/main.less +++ b/src/pages/exchangepage/edittemplate/main.less @@ -536,7 +536,7 @@ border: 1px solid #F2F2F2; } - img { + #top { width: 100%; } @@ -579,9 +579,9 @@ .editor-main { top: 0; - img { - width: auto !important; - } + // img { + // width: auto !important; + // } } }