From 53ae8b0a762a3fcbfe35acc9055ffbaeec621742 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 19 三月 2022 21:14:55 +0800
Subject: [PATCH] 2022-03-19

---
 public/options.json                                 |   14 +++---
 src/mob/components/topbar/normal-navbar/options.jsx |   33 ++++++++++++----
 src/mob/components/topbar/normal-navbar/index.scss  |    9 ++++
 src/mob/components/topbar/normal-navbar/index.jsx   |    7 ++-
 4 files changed, 45 insertions(+), 18 deletions(-)

diff --git a/public/options.json b/public/options.json
index f317ad5..792a858 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,17 +1,17 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "mkindustry",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
-  "licenseKey": "",
-  "probation": "",
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "licenseKey": "7EFE13KIKLILIJB64C12",
+  "probation": "2021-12-31",
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx
index 6fcaff3..0a3809a 100644
--- a/src/mob/components/topbar/normal-navbar/index.jsx
+++ b/src/mob/components/topbar/normal-navbar/index.jsx
@@ -7,6 +7,7 @@
 import asyncIconComponent from '@/utils/asyncIconComponent'
 import getWrapForm from './options'
 import MKEmitter from '@/utils/events.js'
+import avatar from '@/assets/img/avatar.jpg'
 import './index.scss'
 
 const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
@@ -20,6 +21,7 @@
   }
 
   state = {
+    avatar: sessionStorage.getItem('CloudAvatar') || avatar,
     card: null,
     back: false
   }
@@ -181,7 +183,7 @@
   }
 
   render() {
-    const { card } = this.state
+    const { card, avatar } = this.state
 
     let right = null
     if (card.wrap.logout === 'true') {
@@ -210,7 +212,8 @@
         </Popover>
         <div className="am-navbar">
           <div className="am-navbar-left">
-            {card.wrap.back !== 'false' ? <LeftOutlined /> : null}
+            {card.wrap.back !== 'false' && card.wrap.menuPosition !== 'left' ? <LeftOutlined /> : null}
+            {card.wrap.menuPosition === 'left' ? <div className="img" style={{backgroundImage: `url(${avatar})`}}></div> : null}
           </div>
           {card.wrap.type !== 'search' ?
             <div className="am-navbar-title">{card.wrap.title || ''}</div> :
diff --git a/src/mob/components/topbar/normal-navbar/index.scss b/src/mob/components/topbar/normal-navbar/index.scss
index fe4a5c8..46e93c6 100644
--- a/src/mob/components/topbar/normal-navbar/index.scss
+++ b/src/mob/components/topbar/normal-navbar/index.scss
@@ -36,6 +36,15 @@
       .anticon-left {
         margin: 0 8px 0 5px;
       }
+      .img {
+        width: 30px;
+        height: 30px;
+        border-radius: 4px;
+        margin-top: 9px;
+        margin-right: 5px;
+        background-size: cover;
+        background-position: center center;
+      }
     }
     .am-navbar-title {
       text-align: center;
diff --git a/src/mob/components/topbar/normal-navbar/options.jsx b/src/mob/components/topbar/normal-navbar/options.jsx
index cb365d1..0fca168 100644
--- a/src/mob/components/topbar/normal-navbar/options.jsx
+++ b/src/mob/components/topbar/normal-navbar/options.jsx
@@ -46,6 +46,21 @@
     },
     {
       type: 'radio',
+      field: 'menuPosition',
+      label: '鑿滃崟浣嶇疆',
+      initval: wrap.menuPosition || 'right',
+      tooltip: '鑷畾涔夎彍鍗曠殑浣嶇疆銆�',
+      required: false,
+      options: [
+        {value: 'left', label: '宸︿晶'},
+        {value: 'right', label: '鍙充晶'},
+      ],
+      controlFields: [
+        {field: 'back', values: ['right']},
+      ]
+    },
+    {
+      type: 'radio',
       field: 'back',
       label: '杩斿洖',
       initval: wrap.back || 'true',
@@ -108,15 +123,6 @@
       ]
     },
     {
-      type: 'select',
-      field: 'linkmenu',
-      label: '鍏宠仈鑿滃崟',
-      initval: wrap.linkmenu || '',
-      tooltip: '浣跨敤鎵爜鐧诲綍鍔熻兘鎴栬彍鍗曡烦杞姛鑳芥椂锛岄渶閫夋嫨璺宠浆鐨勮彍鍗曘��',
-      required: false,
-      options: menulist
-    },
-    {
       type: 'radio',
       field: 'reload',
       label: '杩斿洖鍚�',
@@ -132,6 +138,15 @@
       }]
     },
     {
+      type: 'select',
+      field: 'linkmenu',
+      label: '鍏宠仈鑿滃崟',
+      initval: wrap.linkmenu || '',
+      tooltip: '浣跨敤鎵爜鐧诲綍鍔熻兘鎴栬彍鍗曡烦杞姛鑳芥椂锛岄渶閫夋嫨璺宠浆鐨勮彍鍗曘��',
+      required: false,
+      options: menulist
+    },
+    {
       type: 'table',
       field: 'menus',
       label: '鑷畾涔夎彍鍗�',

--
Gitblit v1.8.0