From e2a0980e4a701a3dd07c339ff24ec4221dbed2dd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 12 三月 2021 18:05:28 +0800
Subject: [PATCH] 2021-03-12

---
 src/index.js                                      |    2 
 src/pc/components/navbar/normal-navbar/index.jsx  |    2 
 src/views/design/header/index.scss                |    2 +
 src/views/appmanage/index.scss                    |    1 
 src/views/design/header/index.jsx                 |    8 ++--
 src/menu/components/carousel/prop-card/index.scss |    4 +-
 src/views/pcdesign/index.jsx                      |   19 +++++++--
 src/templates/menuconfig/editfirstmenu/index.jsx  |    2 
 src/menu/stylecontroller/styleInput/index.jsx     |   13 +++++-
 src/templates/menuconfig/editfirstmenu/index.scss |    3 +
 src/templates/menuconfig/menuelement/card.jsx     |    2 
 src/templates/menuconfig/editsecmenu/index.scss   |    3 +
 src/templates/menuconfig/editthdmenu/index.scss   |    3 +
 src/templates/menuconfig/editsecmenu/index.jsx    |    2 
 src/templates/menuconfig/editthdmenu/index.jsx    |    2 
 src/pc/components/navbar/normal-navbar/index.scss |    3 +
 src/views/login/index.jsx                         |    2 
 17 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/src/index.js b/src/index.js
index d83cf4f..c842e6d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -59,8 +59,8 @@
 
 // 娴嬭瘯绯荤粺鏂囦欢缃簬admin涓�
 
-// fetch(process.env.NODE_ENV === 'production' ? '../options.json' : './options.json')
 fetch('./options.json')
+// fetch(process.env.NODE_ENV === 'production' ? '../options.json' : './options.json')
   .then(response => response.json())
   .catch(() => {
     document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">绯荤粺閰嶇疆淇℃伅鑾峰彇澶辫触锛岃鑱旂郴绠$悊鍛橈紒</div>'
diff --git a/src/menu/components/carousel/prop-card/index.scss b/src/menu/components/carousel/prop-card/index.scss
index c4bbe92..a21b98f 100644
--- a/src/menu/components/carousel/prop-card/index.scss
+++ b/src/menu/components/carousel/prop-card/index.scss
@@ -39,12 +39,12 @@
   }
   .ant-carousel:not(.ant-carousel-vertical) {
     .slick-dots li button {
-      height: 5px;
+      height: 8px;
     }
   }
   .ant-carousel.ant-carousel-vertical {
     .slick-dots li button {
-      width: 5px;
+      width: 8px;
     }
   }
   .ant-carousel {
diff --git a/src/menu/stylecontroller/styleInput/index.jsx b/src/menu/stylecontroller/styleInput/index.jsx
index 7426b2d..eadf6ef 100644
--- a/src/menu/stylecontroller/styleInput/index.jsx
+++ b/src/menu/stylecontroller/styleInput/index.jsx
@@ -51,7 +51,7 @@
       }
     }
 
-    let _val = parseInt(val)
+    let _val = parseFloat(val)
 
     if (isNaN(_val)) {
       _val = ''
@@ -81,7 +81,7 @@
         }
       }
 
-      let _val = parseInt(val)
+      let _val = parseFloat(val)
 
       if (isNaN(_val)) {
         _val = ''
@@ -105,7 +105,14 @@
   changeValue = (e) => {
     const { unit } = this.state
     let val = e.target.value
-    let _val = parseInt(val)
+
+    if (/\d+\.$/.test(val)) {
+      this.setState({
+        value: val
+      })
+      return
+    }
+    let _val = parseFloat(val)
     
     if (isNaN(_val)) {
       _val = ''
diff --git a/src/pc/components/navbar/normal-navbar/index.jsx b/src/pc/components/navbar/normal-navbar/index.jsx
index a59fb4c..efa2b56 100644
--- a/src/pc/components/navbar/normal-navbar/index.jsx
+++ b/src/pc/components/navbar/normal-navbar/index.jsx
@@ -215,7 +215,7 @@
                   )
                 } else {
                   return (
-                    <Menu.Item key={fst.MenuID} onClick={(e) => e.stopPropagation()}>
+                    <Menu.Item key={fst.MenuID}>
                       <span onClick={(e) => e.stopPropagation()} onDoubleClick={() => this.changeMenu(fst)}>{fst.name}</span>
                     </Menu.Item>
                   )
diff --git a/src/pc/components/navbar/normal-navbar/index.scss b/src/pc/components/navbar/normal-navbar/index.scss
index ebd7439..92e03cb 100644
--- a/src/pc/components/navbar/normal-navbar/index.scss
+++ b/src/pc/components/navbar/normal-navbar/index.scss
@@ -40,6 +40,9 @@
         .ant-menu-item:hover, .ant-menu-item-active, .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open, .ant-menu-submenu-active, .ant-menu-submenu-title:hover {
           color: unset;
         }
+        .ant-menu-item span {
+          display: inline-block;
+        }
       }
       .ant-menu-horizontal > .ant-menu-item:hover, .ant-menu-horizontal > .ant-menu-submenu:hover, .ant-menu-horizontal > .ant-menu-item-active, .ant-menu-horizontal > .ant-menu-submenu-active, .ant-menu-horizontal > .ant-menu-item-open, .ant-menu-horizontal > .ant-menu-submenu-open, .ant-menu-horizontal > .ant-menu-item-selected, .ant-menu-horizontal > .ant-menu-submenu-selected {
         color: unset;
diff --git a/src/templates/menuconfig/editfirstmenu/index.jsx b/src/templates/menuconfig/editfirstmenu/index.jsx
index df9e322..3df062c 100644
--- a/src/templates/menuconfig/editfirstmenu/index.jsx
+++ b/src/templates/menuconfig/editfirstmenu/index.jsx
@@ -336,7 +336,7 @@
           <div className="tipcard card5" style={{backgroundImage: 'url(' + card5 + ')'}}>
             <p>缂栬緫鐘舵�佷腑锛岃彍鍗曚箣澶栧尯鍩熶細閿佸畾锛屾煡鐪嬬郴缁熸暟鎹鐐瑰嚮銆�</p>
             <div>
-              <a target="blank" href="#/main" >鏂伴〉闈�</a>
+              <span className="new-view" onClick={() => {window.open('#/main')}} >鏂伴〉闈�</span>
             </div>
           </div>
         </div>
diff --git a/src/templates/menuconfig/editfirstmenu/index.scss b/src/templates/menuconfig/editfirstmenu/index.scss
index bbf49ea..ac8a533 100644
--- a/src/templates/menuconfig/editfirstmenu/index.scss
+++ b/src/templates/menuconfig/editfirstmenu/index.scss
@@ -61,8 +61,9 @@
       }
       div {
         text-align: center;
-        a {
+        .new-view {
           display: inline-block;
+          cursor: pointer;
           color: #fff;
           padding: 2px 10px;
           border-radius: 4px;
diff --git a/src/templates/menuconfig/editsecmenu/index.jsx b/src/templates/menuconfig/editsecmenu/index.jsx
index 2c7d6e3..6d9733e 100644
--- a/src/templates/menuconfig/editsecmenu/index.jsx
+++ b/src/templates/menuconfig/editsecmenu/index.jsx
@@ -415,7 +415,7 @@
           <div className="tipcard card5" style={{backgroundImage: 'url(' + card5 + ')'}}>
             <p>缂栬緫鐘舵�佷腑锛岃彍鍗曚箣澶栧尯鍩熶細閿佸畾锛屾煡鐪嬬郴缁熸暟鎹鐐瑰嚮銆�</p>
             <div>
-              <a target="blank" href="#/main" >鏂伴〉闈�</a>
+              <span className="new-view" onClick={() => {window.open('#/main')}} >鏂伴〉闈�</span>
             </div>
           </div>
         </div>
diff --git a/src/templates/menuconfig/editsecmenu/index.scss b/src/templates/menuconfig/editsecmenu/index.scss
index 7a6519b..59277cb 100644
--- a/src/templates/menuconfig/editsecmenu/index.scss
+++ b/src/templates/menuconfig/editsecmenu/index.scss
@@ -63,8 +63,9 @@
       }
       div {
         text-align: center;
-        a {
+        .new-view {
           display: inline-block;
+          cursor: pointer;
           color: #fff;
           padding: 2px 10px;
           border-radius: 4px;
diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/templates/menuconfig/editthdmenu/index.jsx
index f73271f..72cc5e2 100644
--- a/src/templates/menuconfig/editthdmenu/index.jsx
+++ b/src/templates/menuconfig/editthdmenu/index.jsx
@@ -786,7 +786,7 @@
             <div className="tipcard card5" style={{backgroundImage: 'url(' + card5 + ')'}}>
               <p>缂栬緫鐘舵�佷腑锛岃彍鍗曚箣澶栧尯鍩熶細閿佸畾锛屾煡鐪嬬郴缁熸暟鎹鐐瑰嚮銆�</p>
               <div>
-                <a target="blank" href="#/main" >鏂伴〉闈�</a>
+                <span className="new-view" onClick={() => {window.open('#/main')}} >鏂伴〉闈�</span>
               </div>
             </div>
           </div> : null
diff --git a/src/templates/menuconfig/editthdmenu/index.scss b/src/templates/menuconfig/editthdmenu/index.scss
index da4bd83..53a842c 100644
--- a/src/templates/menuconfig/editthdmenu/index.scss
+++ b/src/templates/menuconfig/editthdmenu/index.scss
@@ -63,8 +63,9 @@
       }
       div {
         text-align: center;
-        a {
+        .new-view {
           display: inline-block;
+          cursor: pointer;
           color: #fff;
           padding: 2px 10px;
           border-radius: 4px;
diff --git a/src/templates/menuconfig/menuelement/card.jsx b/src/templates/menuconfig/menuelement/card.jsx
index 3777966..36a5981 100644
--- a/src/templates/menuconfig/menuelement/card.jsx
+++ b/src/templates/menuconfig/menuelement/card.jsx
@@ -52,7 +52,7 @@
       </div>
       {/* 鑷畾涔夋ā鏉匡紝鍦ㄦ柊椤甸潰缂栬緫 */}
       {!card.forbidden && card.type !== 'CustomPage' ? <Icon className="edit" type="edit" onClick={edit} /> : null}
-      {card.type === 'CustomPage' ? <a href={`#/menudesign/${_param}`} target="_blank" rel="noopener noreferrer"><Icon className="edit" type="edit" /></a> : null}
+      {card.type === 'CustomPage' ? <Icon className="edit" onClick={() => {window.open(`#/menudesign/${_param}`)}} type="edit" /> : null}
       <Icon className="close" type="close" onClick={close} />
     </div>
   )
diff --git a/src/views/appmanage/index.scss b/src/views/appmanage/index.scss
index e8a8abe..b1aa6a4 100644
--- a/src/views/appmanage/index.scss
+++ b/src/views/appmanage/index.scss
@@ -1,6 +1,7 @@
 .mk-app-manage {
   background: #fff;
   min-height: 100vh;
+  padding-bottom: 70px;
 
   .mob-header-container {
     padding-right: 0px;
diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx
index 9b78dc7..258382a 100644
--- a/src/views/design/header/index.jsx
+++ b/src/views/design/header/index.jsx
@@ -324,14 +324,14 @@
         {editLevel === 'HS' ? <Button className="level4-close" type="primary" onClick={this.exitManage}>閫�鍑�</Button> : null}
         {/* 杩涘叆缂栬緫鎸夐挳 */}
         {!editLevel ? <Icon onClick={this.enterEdit} className="edit-check" type="edit" /> : null}
-        {!editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' ?
-          <a href="#/appmanage" target="_blank" className="mobile" type="edit"> 搴旂敤绠$悊 <Icon type="arrow-right" /></a> : null
+        {!editLevel && options.sysType === 'local' && window.GLOB.systemType !== 'production' && this.props.memberLevel >= 30 ?
+          <span onClick={() => {window.open('#/appmanage')}} className="mobile" type="edit"> 搴旂敤绠$悊 <Icon type="arrow-right" /></span> : null
         }
         {/* window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'home', MenuId: 'home_page_id', MenuName: '棣栭〉' }))) */}
         {!editLevel && window.GLOB.systemType !== 'production' && this.props.memberLevel >= 20 ?
-          <a className="home-edit" href={`#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=`} target="_blank" rel="noopener noreferrer">
+          <span className="home-edit" onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}>
             棣栭〉 <Icon type="arrow-right" />
-          </a> : null
+          </span> : null
         }
         {/* 缂栬緫鑿滃崟 */}
         {editLevel === 'level1' ? <EditMenu menulist={this.state.menulist} reload={this.reload} exitEdit={this.exitEdit}/> : null}
diff --git a/src/views/design/header/index.scss b/src/views/design/header/index.scss
index 166e21a..705e4d5 100644
--- a/src/views/design/header/index.scss
+++ b/src/views/design/header/index.scss
@@ -128,11 +128,13 @@
     top: 135px;
     right: 50px;
     color: #1890ff;
+    cursor: pointer;
   }
   .home-edit {
     position: absolute;
     top: 100px;
     right: 50px;
+    cursor: pointer;
     color: #1890ff;
   }
 }
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 568da58..6a0fcac 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -504,7 +504,7 @@
         </div>
         <div className="login-bottom">
           {webSite && copyRight ?
-            <a target="blank" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
+            <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
             <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
           }
           {ICP ? <p dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></p> : null}
diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index 515a08f..a6c55e8 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -67,6 +67,7 @@
   }
 
   UNSAFE_componentWillMount() {
+    if (this.props.memberLevel < 30) return
     try {
       let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
 
@@ -110,6 +111,10 @@
   }
 
   componentDidMount () {
+    if (this.props.memberLevel < 30) {
+      document.getElementById('mk-pc-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">鏈簲鐢ㄦ病鏈塒C绔〉闈㈢殑缂栬緫鏉冮檺锛岃鑱旂郴绠$悊鍛橈紒</div>'
+      return
+    }
     MKEmitter.addListener('delButtons', this.delButtons)
     MKEmitter.addListener('thawButtons', this.thawButtons)
     MKEmitter.addListener('copyButtons', this.copyButtons)
@@ -163,7 +168,11 @@
       param.MenuName = menu.MenuName
     }
 
-    this.props.history.push('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify(param))))
+    param = window.btoa(window.encodeURIComponent(JSON.stringify(param)))
+
+    if (param === this.props.match.params.param) return
+
+    this.props.history.push('/pcdesign/' + param)
   }
 
   getAppMessage = () => {
@@ -1396,7 +1405,7 @@
 
     return (
       <ConfigProvider locale={localedict}>
-        <div className={'mk-pc-view '} id="mk-menu-design-view">
+        <div className={'mk-pc-view '} id="mk-pc-design-view">
           {loading ? <Spin className="view-spin" size="large" /> : null}
           <DndProvider backend={HTML5Backend}>
             <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}>
@@ -1460,8 +1469,10 @@
   }
 }
 
-const mapStateToProps = () => {
-  return {}
+const mapStateToProps = (state) => {
+  return {
+    memberLevel: state.memberLevel
+  }
 }
 
 const mapDispatchToProps = (dispatch) => {

--
Gitblit v1.8.0