From 0a50e472cfc51b77b822f166c7156ccf22753b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Wed, 18 May 2022 15:16:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=90=BD=E5=9C=B0=E9=A1=B5H5=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=AB=8B=E5=87=8F=E9=87=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 2 +- .../edittemplate/goodstemplate.less | 4 ++-- .../exchangepage/edittemplate/landingPage.js | 1 - src/pages/exchangepage/edittemplate/main.js | 9 +++++---- src/pages/exchangepage/edittemplate/main.less | 1 - src/pages/exchangepage/edittemplate/reduce.js | 3 +-- src/pages/exchangepage/previewEffect/main.js | 17 +++++++++++++++- src/pages/exchangepage/template/main.js | 20 +++++++++++++++---- src/pages/exchangepage/template/preview.js | 2 +- 9 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/App.css b/src/App.css index 23ac7a11..0550d9df 100644 --- a/src/App.css +++ b/src/App.css @@ -188,6 +188,6 @@ resize: none; left: 0; top: 0; background-color: rgba(0,0,0,0.5); - z-index: 6; + z-index: 66; } diff --git a/src/pages/exchangepage/edittemplate/goodstemplate.less b/src/pages/exchangepage/edittemplate/goodstemplate.less index 0f71de5c..d51624c7 100644 --- a/src/pages/exchangepage/edittemplate/goodstemplate.less +++ b/src/pages/exchangepage/edittemplate/goodstemplate.less @@ -168,9 +168,9 @@ .details-reduce{ background: #fff; position: relative; - #reduceKnockGold{ + .reduce-pic{ + width: 100%; position: absolute!important; - top: 30px!important; left:0; z-index: 1; } diff --git a/src/pages/exchangepage/edittemplate/landingPage.js b/src/pages/exchangepage/edittemplate/landingPage.js index 00f658e4..99deb396 100644 --- a/src/pages/exchangepage/edittemplate/landingPage.js +++ b/src/pages/exchangepage/edittemplate/landingPage.js @@ -10,7 +10,6 @@ import Form from "../../../components/form/main" import FormItem from "../../../components/form-item/main" import { uploadImg, handelResponse, getThemeType } from "../../../assets/api.js" import Wangeditor from './wangeditorCom.js' - export default class edittemplate extends React.Component { constructor(props) { super(props) diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 88489484..e5e47023 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -90,7 +90,7 @@ export default class edittemplate extends React.Component { showPage: 1, fontSize: 10000 / (375 * 0.75), setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' }, - detailType: 2 //详情页1 权益 2-立减金 + detailType: 1 //详情页1 权益 2-立减金 } this.canvasImgDom = this.canvasImgDom.bind(this) this.canvasImgDomScr = this.canvasImgDomScr.bind(this) @@ -1067,12 +1067,13 @@ export default class edittemplate extends React.Component { this.ondetailTypeChange(e) }} value={this.state.detailType}> - - 立减金 - 权益 + + 立减金 + + { diff --git a/src/pages/exchangepage/edittemplate/main.less b/src/pages/exchangepage/edittemplate/main.less index f357a704..567d136e 100644 --- a/src/pages/exchangepage/edittemplate/main.less +++ b/src/pages/exchangepage/edittemplate/main.less @@ -1667,7 +1667,6 @@ box-sizing: border-box; justify-content: space-between; align-items: center; - img { width: 28px; height: 28px; diff --git a/src/pages/exchangepage/edittemplate/reduce.js b/src/pages/exchangepage/edittemplate/reduce.js index c20d9511..1dfd1215 100644 --- a/src/pages/exchangepage/edittemplate/reduce.js +++ b/src/pages/exchangepage/edittemplate/reduce.js @@ -3,7 +3,6 @@ import React, { Component } from 'react'; import "./main.less" import "../../../assets/comm.css" import './goodstemplate.less' -import ReducePage from '../../plan/knockGold/mobileCmponent' export default class edittemplate extends React.Component{ constructor(props){ super(props) @@ -18,7 +17,7 @@ export default class edittemplate extends React.Component{ return(
- +
) } diff --git a/src/pages/exchangepage/previewEffect/main.js b/src/pages/exchangepage/previewEffect/main.js index d5d7d36c..f6eedda4 100644 --- a/src/pages/exchangepage/previewEffect/main.js +++ b/src/pages/exchangepage/previewEffect/main.js @@ -14,6 +14,7 @@ export default class previewEffect extends React.Component { showType: 3, //兑换码/白名单/立减金 pageStep: 1, showPage: 1, + detailType:3 } } @@ -40,7 +41,10 @@ export default class previewEffect extends React.Component { this.setState({ setStyle: style, activeHeight: height }) } onpageChange(e) { - this.setState({ showPage: e.target.value, pageStep: e.target.value }) + this.setState({ showPage: e.target.value, pageStep: e.target.value,detailType:3 }) + } + ondetailTypeChange(e){ + this.setState({ detailType: e.target.value,pageStep:e.target.value}) } render() { return ( @@ -74,6 +78,17 @@ export default class previewEffect extends React.Component { 详情页 + { + this.state.showPage==3?( +
+

详情页分类:

+ { this.ondetailTypeChange(e) }} value={this.state.detailType}> + 权 益 + 立减金 + +
+ ):null + } diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js index 315dee30..5468167d 100644 --- a/src/pages/exchangepage/template/main.js +++ b/src/pages/exchangepage/template/main.js @@ -59,15 +59,18 @@ export default class mytemplate extends React.Component { toTopFlag: false, endreq: true, center: "", - bottom: "" + bottom: "", + detailType: 3 } } onpageChange(e) { - this.setState({ showPage: e.target.value }); - this.setState({ pageStep: e.target.value }); + this.setState({ showPage: e.target.value, pageStep: e.target.value,detailType:3 }); + } + ondetailTypeChange(e) { + this.setState({ detailType: e.target.value, pageStep: e.target.value }) } onTypeChange(e) { - this.setState({ showType: e.target.value, pageStep: 1, showPage: 1 }); + this.setState({ showType: e.target.value, pageStep: 1, showPage: 1,detailType:3 }); if (e.target.value == 1) {//白名单 let previewwhite = { ...this.state.previewwhite } this.setState({ previewData: previewwhite }); @@ -459,6 +462,15 @@ export default class mytemplate extends React.Component { 详情页 + {this.state.showPage == 3 ? ( +
+

详情页分类:

+ { this.ondetailTypeChange(e) }} value={this.state.detailType}> + 权 益 + 立减金 + +
+ ) : null}
diff --git a/src/pages/exchangepage/template/preview.js b/src/pages/exchangepage/template/preview.js index 29fc508c..0732f2f9 100644 --- a/src/pages/exchangepage/template/preview.js +++ b/src/pages/exchangepage/template/preview.js @@ -119,7 +119,7 @@ export default class acclist extends React.Component { }
- ) : null + ) : () } From 8fc7d9393d1df0edd1a663ddc0248abfeec30b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E7=BA=A2=E6=A2=85?= <1924913374@qq.com> Date: Wed, 18 May 2022 16:09:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=81=AE=E7=BD=A9?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=85=BC=E5=AE=B9=E5=B0=8F=E5=B1=8F=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mouseMenu/main.less | 10 +- src/pages/home/home.js | 201 ++++++++++++++--------------- src/pages/home/home.less | 17 ++- 3 files changed, 114 insertions(+), 114 deletions(-) diff --git a/src/components/mouseMenu/main.less b/src/components/mouseMenu/main.less index 6f1be9da..32a0a525 100644 --- a/src/components/mouseMenu/main.less +++ b/src/components/mouseMenu/main.less @@ -1,21 +1,23 @@ .mouseMenu { .menuBody { - min-width: 40%; - margin-left: 320px; - // height: 400px; + width: 60vw; + margin-left: 287px; background: #f1f2f3; position: relative; .first_menu { display: flex; + width: 60vw; >div { + width: 140px; .menu_items{ // justify-content: flex-start; padding: 0; font-size: 14px; color: #333; + width: 100%; line-height: 40px; &:hover{ - background: #f2f4f7; + background: #f00; color: #296bef; } diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 024f0ce2..e7249673 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -68,7 +68,7 @@ export default class App extends Component { } state = { visible: false, - mouseMenuMask:false, + mouseMenuMask: false, setrender: 1, linkshow: "系统管理", isShowSub: true, @@ -157,14 +157,14 @@ export default class App extends Component { currentTime: new Date().getTime(), timeOut: 15 * 60 * 1000, //设置超时时间: 1分 }; - //打开菜单移入遮罩 - openMouseMask(){ - this.setState({mouseMenuMask:true}); - } + //打开菜单移入遮罩 + openMouseMask() { + this.setState({ mouseMenuMask: true }); + } componentDidMount(e) { Bus.addListener('closeMask', (prop) => { - console.log(161,this); - this.setState({mouseMenuMask:prop}); + console.log(161, this); + this.setState({ mouseMenuMask: prop }); }) if (this.state.noShowSubMenu.indexOf(this.props.location.pathname) > -1) { this.setState({ isShowSub: false }); @@ -172,7 +172,7 @@ export default class App extends Component { this.setState({ isShowSub: true }); } } - componentWillUnmount() {} + componentWillUnmount() { } //获取用户信息 getUserInfuFn() { @@ -185,17 +185,17 @@ export default class App extends Component { self.setState({ userInfo: response }); sessionStorage.setItem("userInfo", JSON.stringify(response)); }, - (err) => {} + (err) => { } ); }) - .catch((err) => {}); + .catch((err) => { }); } //修改密码 modifyFn() { this.setState({ visible: true }); } //修改密码 - modifyPwdFn() {} + modifyPwdFn() { } //退出登录 exitFn() { let self = this; @@ -216,7 +216,7 @@ export default class App extends Component { }, 1000); } }) - .catch((err) => {}); + .catch((err) => { }); }, onCancel: this.onCancel, className: "questModal", @@ -251,7 +251,7 @@ export default class App extends Component { sessionStorage.setItem("updatetime", Date.now()); sessionStorage.setItem("productsList", JSON.stringify(req.data)); }, - (err) => {} + (err) => { } ); }); } @@ -309,7 +309,7 @@ export default class App extends Component { throw "终止循环"; } }); - } catch (e) {} + } catch (e) { } sessionStorage.setItem( "menulinklist", JSON.stringify(item[0].children) @@ -324,11 +324,11 @@ export default class App extends Component { return (
- - { - this.state.mouseMenuMask?
:null - } -
+ + { + this.state.mouseMenuMask ?
: null + } +
{/* logo */}
-
- {" "} - {" "} - - 更新日志 - -
-
- {" "} - {" "} - - 帮助中心 - -
- - {/* 用户头像信息 */} -
- {/* 帮助中心 */} - - {/* {!this.state.userInfo.head? : - } - */} -
- -
-

- {this.state.userInfo.head ? ( - - ) : ( - - )} -

- 姓名:{this.state.userInfo.real_name} - 账号:{this.state.userInfo.user_name} -

-

-

- { - this.exitFn(); - }} - className="exit-btn" - > - 退出 - - { - this.modifyFn(); - }} - className="modify-btn" - > - 修改密码 - -

-
-
- } - > - {/* */} -
- {this.state.userInfo.real_name}  - +
+ - + + +
+

+ {this.state.userInfo.head ? ( + + ) : ( + + )} +

+ 姓名:{this.state.userInfo.real_name} + 账号:{this.state.userInfo.user_name} +

+

+

+ { + this.exitFn(); + }} + className="exit-btn" + > + 退出 + + { + this.modifyFn(); + }} + className="modify-btn" + > + 修改密码 + +

+
+
+ } + > + {/* */} +
+ {this.state.userInfo.real_name}  + +
+ +
-