Browse Source

优化安全距离

fanghuisheng 11 months ago
parent
commit
0e185b46b5
7 changed files with 38 additions and 24 deletions
  1. 1 1
      src/api/mine/index.js
  2. 5 5
      src/api/mine/info.js
  3. 1 1
      src/main.js
  4. 5 5
      src/pages/index.vue
  5. 2 2
      src/pages/mine.vue
  6. 14 10
      src/store/modules/setting.js
  7. 10 0
      src/store/modules/user.js

+ 1 - 1
src/api/mine/index.js

@@ -9,7 +9,7 @@ export function msgApi() {
     return {
         Select(data) {
             return request({
-                url: "/service-iot/mceSetting/mceSettingInfo",
+                url: "/system/mceSetting/mceSettingInfo",
                 method: "GET",
                 data: data,
             });

+ 5 - 5
src/api/mine/info.js

@@ -27,7 +27,7 @@ export function getKnowledgeBaseDetails(param) {
  */
 export function getMceReceiveStatic(param) {
   return request({
-    url: "/service-iot/mceReceive/mceReceiveStatic",
+    url: "/system/mceReceive/mceReceiveStatic",
     method: "GET",
     data: param,
   });
@@ -37,7 +37,7 @@ export function getMceReceiveStatic(param) {
  */
 export function getMceList(param) {
   return request({
-    url: "/service-iot/mceReceive/mceList",
+    url: "/system/mceReceive/mceList",
     method: "GET",
     data: param,
   });
@@ -47,7 +47,7 @@ export function getMceList(param) {
  */
 export function getMceSettingInfo(params) {
   return request({
-      url: '/service-iot/mceSetting/mceSettingInfo',
+      url: '/system/mceSetting/mceSettingInfo',
       method: 'get',
       data: params,
   })
@@ -57,7 +57,7 @@ export function getMceSettingInfo(params) {
  */
 export function updateMceReceiveStatus(params) {
   return request({
-      url: '/service-iot/mceReceive',
+      url: '/system/mceReceive',
       method: 'put',
       data: params,
   })
@@ -68,7 +68,7 @@ export function updateMceReceiveStatus(params) {
 //
 export function addMceSetting(data) {
   return request({
-      url: '/service-iot/mceSetting/addMceSetting',
+      url: '/system/mceSetting/addMceSetting',
       method: 'post',
       data
   })

+ 1 - 1
src/main.js

@@ -9,7 +9,7 @@ import config from "@/config"; // config
 import JsonExcel from "vue-json-excel";
 
 // 引入微信js-sdk
-// import jweixin from 'weixin-js-sdk'
+import jweixin from 'weixin-js-sdk'
 
 // 引入UI组件
 import uviewPlus from "@/uni_modules/uview-plus";

+ 5 - 5
src/pages/index.vue

@@ -112,15 +112,15 @@ const { dialogFlag } = toRefs(state);
  * @初始化
  */
 function init() {
-  setTimeout(() => {
-    //#ifdef H5
-    useStore.GetWxOpenId(2); //调用获取微信公众号openId
-    //#endif
+  //#ifdef H5
+  useStore.GetWxOpenId(2); //调用获取微信公众号openId
+  //#endif
 
+  setTimeout(() => {
     getAppRoutersData(); //调用路由信息接口
     getMobileBannerApi(); //调用banner图接口
     getLocation(); //调用获取地理位置方法
-  }, 50);
+  }, 1000);
 }
 
 /**

+ 2 - 2
src/pages/mine.vue

@@ -47,7 +47,7 @@
               <view>关于我们</view>
             </view>
           </view>
-          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleHelp()" v-if="proxy.$common.isVisible()">
+          <view class="list-cell list-cell-arrow" @click="proxy.$settingStore.handleHelp()">
             <view class="menu-item">
               <view class="iconfont oaIcon-Help menu-item-icon"></view>
               <view>常见问题</view>
@@ -113,7 +113,7 @@
           </view>
         </view>
 
-        <view class="menu-list" @click="proxy.$settingStore.handleLogout" v-if="proxy.$common.isVisible()">
+        <view class="menu-list" @click="proxy.$settingStore.handleLogout">
           <view class="list-cell">
             <view class="menu-item">
               <view class="button">退 出 登 录</view>

+ 14 - 10
src/store/modules/setting.js

@@ -1,15 +1,20 @@
-
+import { storage } from "@/utils/storage";
+import { getToken, setToken, removeToken } from "@/utils/auth";
 import { defineStore } from "pinia";
+// 接口引用
+import { uploadAvatar, updateUserProfile } from "@/api/system/user";
+import { baseAppInfoApi } from "@/api/common/index";
+import { checkUpdates } from "@/api/system/setting";
+// 组件引用
+import { useStores } from "@/store/modules/index";
+import jweixin from 'weixin-js-sdk'
 import config from "@/config";
-import { storage } from "@/utils/storage";
-import modal from "@/plugins/modal.plugins.js";
 import tab from "@/plugins/tab.plugins.js";
+import modal from "@/plugins/modal.plugins.js";
+import common from "@/plugins/common.plugins.js";
 import setting from "@/plugins/setting.plugins.js";
-import { useStores } from "@/store/modules/index";
 
-import { uploadAvatar, updateUserProfile } from "@/api/system/user";
-import { baseAppInfoApi } from "@/api/common/index";
-import { checkUpdates } from "@/api/system/setting";
+
 
 const settingStore = defineStore("storage-setting", {
     state: () => ({
@@ -63,10 +68,9 @@ const settingStore = defineStore("storage-setting", {
          */
         systemHeightTop() {
             let systemInfo = uni.getSystemInfoSync();
-            var statusBarHeight = systemInfo.statusBarHeight
             this.webViewHeight = systemInfo.safeArea.bottom  //高度+安全区域的高度
-            this.StatusBar = statusBarHeight
-            this.tabBarHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom + "px"
+            this.StatusBar = systemInfo.statusBarHeight
+            this.tabBarHeight = common.isWechatMp() ? "0px" : (systemInfo.screenHeight - systemInfo.safeArea.bottom + "px")
             this.barHightTop = this.StatusBar ? this.StatusBar + 44 + 'px' : '44px'
 
             //#ifdef MP

+ 10 - 0
src/store/modules/user.js

@@ -6,6 +6,7 @@ import { login, logout, getInfo, getMobileTenantConfig, getCodeImg } from "@/api
 import { getUserProfile, appAdd, appDel } from "@/api/system/user";
 import { phoneVerify } from "@/api/common/index.js";
 // 组件引用
+import jweixin from 'weixin-js-sdk'
 import config from "@/config";
 import modal from "@/plugins/modal.plugins.js";
 import common from "@/plugins/common.plugins.js";
@@ -269,6 +270,7 @@ const useStores = defineStore("useStores", {
               loginBg: "",
               loginLogo: "",
               tenantId: "",
+              wxOpenId: ""
             });//清空登录页数据
             removeToken();
             storage.clean();
@@ -293,6 +295,10 @@ const useStores = defineStore("useStores", {
             wxOpenId: common.getUrlList().openId
           })
         }
+
+        // if (uni.getSystemInfoSync().platform == "ios") {
+        //   jweixin.call('hideToolbar');
+        // }
       } else if (type == 2 && common.isWechatMp()) {
         if (window.location.href.indexOf("openId=") == -1) {
           window.location.href = config.baseUrl + "/service-iot/weChat/getPageAuthorization?openId=" + this.wxOpenId;
@@ -301,6 +307,10 @@ const useStores = defineStore("useStores", {
             wxOpenId: common.getUrlList().openId
           })
         }
+
+        // if (uni.getSystemInfoSync().platform == "ios") {
+        //   jweixin.call('hideToolbar');
+        // }
       }
     },