فهرست منبع

调整企业微信白屏

Lijy 2 سال پیش
والد
کامیت
e04d309c60

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 187 - 187
fhKeeper/formulahousekeeper/timesheet_h5/package-lock.json


+ 3 - 7
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -8,21 +8,17 @@
     <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
     <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico"/>
     <title>工时管家</title>
+    <!-- <script src="/axios.min.js"></script> -->
     <link rel="stylesheet" href="https://at.alicdn.com/t/font_1456778_1mgn5degp7t.css">
     <!-- <script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js"></script> -->
     <!-- <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.25.0/axios.min.js"></script> -->
     <!-- <script src="../src/assets/axios.min.js"></script> -->
     <!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
-    <script src="./axios.min.js"></script> 
+    <!-- <script src="./axios.min.js"></script>  -->
     <!-- 引入企业微信js -->
     <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script>
     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script>
-    <script language="javascript"> 
-        function killerrors() {
-            return true;
-        }
-        window.onerror = killerrors;
-      </script>
+
     <meta name="wpk-bid" content="dta_2_71020">
         <script>
         var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/main.js

@@ -9,6 +9,9 @@ import $axios from "@/utils/request";
 import mixin from "./mixin/index";
 import store from "./store/index";
 
+import axios from 'axios'; /* 引入axios进行地址访问*/
+Vue.prototype.$http = axios;
+
 import "@/components/Vant";
 
 import { Form , Toast , Grid, GridItem , DatetimePicker , Popover,

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/utils/request.js

@@ -1,4 +1,4 @@
-// import axios from "axios";
+import axios from "axios";
 import store from "../store";
 import router from "../router";
 import qs from "qs"

+ 18 - 10
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -28,7 +28,8 @@
             return {
                 isCorpWX:false,
                 isWX:false,
-                user: JSON.parse(localStorage.userInfo),
+                // user: JSON.parse(localStorage.userInfo) || '',
+                user: '',
                 unreadNum:0,
                 images: [
                     // require('../../assets/img/index/banner_1.png'),
@@ -39,16 +40,19 @@
             };
         },
         created() {
+            if(localStorage.userInfo) {
+                this.user = JSON.parse(localStorage.userInfo)
+            }
         },
         mounted() {
             // 手机上看控制台
-            // if(this.user.companyName == '比基尼小镇'){
-                // let consoleScript = document.createElement("script");
-                // consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
-                // consoleScript.onload = function () {
-                //     new VConsole()
-                // }
-                // document.head.appendChild(consoleScript);
+            // if(this.user.companyId == '7'){
+            //     let consoleScript = document.createElement("script");
+            //     consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
+            //     consoleScript.onload = function () {
+            //         new VConsole()
+            //     }
+            //     document.head.appendChild(consoleScript);
             // }
             var ua = navigator.userAgent.toLowerCase();
             if (ua.indexOf("wxwork") > 0) {
@@ -60,7 +64,11 @@
             if (localStorage.userInfo != null) {
                 that.getAccountInfo();
             } else {
-                this.$router.push("/login");
+                if(window.location.href.indexOf('userId') != '-1') {
+                    that.getAccountInfo()
+                } else {
+                    this.$router.push("/login");
+                }
             }
            
         },
@@ -218,7 +226,7 @@
                         this.user = res.data;
                         this.getModule()
                         this.getMessage();
-                        this.bindIfNessary();
+                        // this.bindIfNessary();
                     } 
                 }).catch(err=> {
                     alert('err=' + err);