瀏覽代碼

Merge branch 'fanghuisheng' of uskycloud/usky-web-mobile into master

王涛 5 天之前
父節點
當前提交
a7f0393680
共有 2 個文件被更改,包括 48 次插入124 次删除
  1. 48 6
      src/pages/index.vue
  2. 0 118
      unpackage/config/setting.js

+ 48 - 6
src/pages/index.vue

@@ -94,8 +94,21 @@
       </view>
     </template>
   </oa-scroll>
-  <uni-drawer ref="showLeft" mode="left" style="height: calc(100vh - 40px); width: 90vw; margin-top: 44px;" :disableScroll="false">
-    <scroll-view style="height: calc(100% - 4px);width:100vw;background:#0d2e59;" scroll-y="true">
+  <uni-drawer
+    ref="showLeft"
+    mode="left"
+    :mask="true"
+    :maskClick="true"
+    class="tenant-drawer"
+    :style="{
+      '--navbar-offset': `calc(44px + ${proxy.$settingStore.StatusBarHeight})`,
+      top: `calc(44px + ${proxy.$settingStore.StatusBarHeight})`,
+      height: 'calc(100vh - 40px)',
+      pointerEvents: 'none',
+    }"
+    @change="onTenantDrawerChange"
+  >
+    <scroll-view style="height: calc(100% - 4px); width: 80vw; background: #0d2e59;" scroll-y="true">
       <view class="unit">
         <view class="unit-title">切换企业</view>
           <view :class="item.id == tenantIdChange ? 'active' : ''" class="list" v-for="(item, index) in tenantIdList" :key="index">
@@ -133,7 +146,7 @@ const useStore = useStores();
 const commonStore = commonStores();
 /*----------------------------------变量声明-----------------------------------*/
 const accountState = ref(false); // 有效账号状态(用于企业切换)
-const showLeft = ref(false); // 左侧菜单
+const showLeft = ref(null); // 左侧菜单
 const showLeftState = ref(false); // 左侧菜单显示状态
 const tenantIdChange = ref(useStore.selectTenantId); // 切换租户ID
 const tenantIdList = ref([]); // 租户ID列表
@@ -168,6 +181,10 @@ function showDrawer() {
 function closeDrawer(e) {
   showLeft.value.close();
 }
+// 遮罩点击关闭时同步抽屉状态
+function onTenantDrawerChange(open) {
+  showLeftState.value = open;
+}
 //获取企业列表
 function getTenantList(id) {
   getTenantByUser(id).then((res) => {
@@ -572,19 +589,44 @@ onShow(() => {
   height: 18px;
   margin-top:14px;
 }
+.tenant-drawer {
+  top: var(--navbar-offset, 44px) !important;
+  height: calc(100vh - 40px) !important;
+  bottom: auto !important;
+  pointer-events: none;
+
+  :deep(.uni-drawer__mask),
+  :deep(.uni-drawer__content) {
+    pointer-events: auto;
+  }
+  :deep(.uni-drawer__mask) {
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    height: auto;
+  }
+  :deep(.uni-drawer__content) {
+    top: 0;
+    width: 80vw !important;
+    height: 100%;
+    bottom: auto;
+    background: #0d2e59;
+  }
+}
 .unit {
-  width: 100vw !important;
+  width: 80vw !important;
   height: 100%;
   background: #0d2e59;
   &-title {
-    margin: 15px 0 10px 10px;
+    padding: 15px 0 0px 10px;
     color: #fff;
   }
   .list {
     margin-top: 10px;
     padding: 10px;
     position: relative;
-    width: 90%;
+    width: 100%;
     &-image {
       width: 29px;
       height: 29px;

+ 0 - 118
unpackage/config/setting.js

@@ -118,110 +118,6 @@ filesToModify.forEach((file) => {
                     "xhdpi": "unpackage/res/push-xunJian/48x48.png",
                     "xxhdpi": "unpackage/res/push-xunJian/72x72.png"
                 }
-            } else if (args === 'huiYi') {
-                state.name = '智能会议'
-                state.appid = '__UNI__F3963F8'
-                state.description = '智能会议APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序,旨在提升会议体验和管理效率。'
-                state.versionName = "1.0.3"
-                state.versionCode = 3
-                state.h5.title = '智能会议'
-
-                maps.amap.name = "amapBOujshtbA"
-                maps.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
-                maps.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
-
-                geolocation.amap.name = "amapBOujshtbA"
-                geolocation.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
-                geolocation.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
-                geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
-                geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
-                icons.android = {
-                    "hdpi": "unpackage/res/icons/72x72.png",
-                    "xhdpi": "unpackage/res/icons/96x96.png",
-                    "xxhdpi": "unpackage/res/icons/144x144.png",
-                    "xxxhdpi": "unpackage/res/icons/192x192.png"
-                }
-                icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
-                icons.ios.ipad = {
-                    "app": "unpackage/res/icons/76x76.png",
-                    "app@2x": "unpackage/res/icons/152x152.png",
-                    "notification": "unpackage/res/icons/20x20.png",
-                    "notification@2x": "unpackage/res/icons/40x40.png",
-                    "proapp@2x": "unpackage/res/icons/167x167.png",
-                    "settings": "unpackage/res/icons/29x29.png",
-                    "settings@2x": "unpackage/res/icons/58x58.png",
-                    "spotlight": "unpackage/res/icons/40x40.png",
-                    "spotlight@2x": "unpackage/res/icons/80x80.png"
-                }
-                icons.ios.iphone = {
-                    "app@2x": "unpackage/res/icons/120x120.png",
-                    "app@3x": "unpackage/res/icons/180x180.png",
-                    "notification@2x": "unpackage/res/icons/40x40.png",
-                    "notification@3x": "unpackage/res/icons/60x60.png",
-                    "settings@2x": "unpackage/res/icons/58x58.png",
-                    "settings@3x": "unpackage/res/icons/87x87.png",
-                    "spotlight@2x": "unpackage/res/icons/80x80.png",
-                    "spotlight@3x": "unpackage/res/icons/120x120.png"
-                }
-                push.unipush.icons.small = {
-                    "hdpi": "unpackage/res/push/36x36.png",
-                    "ldpi": "unpackage/res/push/18x18.png",
-                    "mdpi": "unpackage/res/push/24x24.png",
-                    "xhdpi": "unpackage/res/push/48x48.png",
-                    "xxhdpi": "unpackage/res/push/72x72.png"
-                }
-            } else if (args === 'menJin') {
-                state.name = '智能门禁'
-                state.appid = '__UNI__8D6E9FD'
-                state.description = '智能门禁APP,是一款集成了现代信息技术和智能化管理功能的移动应用程序。'
-                state.versionName = "1.0.1"
-                state.versionCode = 2
-                state.h5.title = '智能门禁'
-
-                maps.amap.name = "amapBOujshtbA"
-                maps.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
-                maps.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
-
-                geolocation.amap.name = "amapBOujshtbA"
-                geolocation.amap.appkey_ios = "fb35d03fbb17cbf7a8743a522da3c7fc"
-                geolocation.amap.appkey_android = "ffc71dfd4e576596027f8f45a1b8fb2f"
-                geolocation.tencent.apikey_ios = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
-                geolocation.tencent.apikey_android = "EGOBZ-74ZET-ST7XS-VYICT-RBLHZ-KLFEX"
-                icons.android = {
-                    "hdpi": "unpackage/res/icons/72x72.png",
-                    "xhdpi": "unpackage/res/icons/96x96.png",
-                    "xxhdpi": "unpackage/res/icons/144x144.png",
-                    "xxxhdpi": "unpackage/res/icons/192x192.png"
-                }
-                icons.ios.appstore = "unpackage/res/icons/1024x1024.png"
-                icons.ios.ipad = {
-                    "app": "unpackage/res/icons/76x76.png",
-                    "app@2x": "unpackage/res/icons/152x152.png",
-                    "notification": "unpackage/res/icons/20x20.png",
-                    "notification@2x": "unpackage/res/icons/40x40.png",
-                    "proapp@2x": "unpackage/res/icons/167x167.png",
-                    "settings": "unpackage/res/icons/29x29.png",
-                    "settings@2x": "unpackage/res/icons/58x58.png",
-                    "spotlight": "unpackage/res/icons/40x40.png",
-                    "spotlight@2x": "unpackage/res/icons/80x80.png"
-                }
-                icons.ios.iphone = {
-                    "app@2x": "unpackage/res/icons/120x120.png",
-                    "app@3x": "unpackage/res/icons/180x180.png",
-                    "notification@2x": "unpackage/res/icons/40x40.png",
-                    "notification@3x": "unpackage/res/icons/60x60.png",
-                    "settings@2x": "unpackage/res/icons/58x58.png",
-                    "settings@3x": "unpackage/res/icons/87x87.png",
-                    "spotlight@2x": "unpackage/res/icons/80x80.png",
-                    "spotlight@3x": "unpackage/res/icons/120x120.png"
-                }
-                push.unipush.icons.small = {
-                    "hdpi": "unpackage/res/push/36x36.png",
-                    "ldpi": "unpackage/res/push/18x18.png",
-                    "mdpi": "unpackage/res/push/24x24.png",
-                    "xhdpi": "unpackage/res/push/48x48.png",
-                    "xxhdpi": "unpackage/res/push/72x72.png"
-                }
             }
         } else if ('./src/pages.json') {
             state.pages.forEach((e, index) => {
@@ -239,20 +135,6 @@ filesToModify.forEach((file) => {
                         }
                     }
                     state.condition.list[0].path = "pages/login"
-                } else if (args === 'huiYi') {
-                    if (e.style.navigationBarTitleText === "人脸识别") {
-                        if (index != 0) {
-                            state.pages.splice(0, 1, ...state.pages.splice(index, 1, state.pages[0]))
-                        }
-                    }
-                    state.condition.list[0].path = "pages/face/index"
-                } else if (args === 'menJin') {
-                    if (e.style.navigationBarTitleText === "门禁识别") {
-                        if (index != 0) {
-                            state.pages.splice(0, 1, ...state.pages.splice(index, 1, state.pages[0]))
-                        }
-                    }
-                    state.condition.list[0].path = "pages/door/index"
                 }
             })
         }