347617796@qq.com 2 سال پیش
والد
کامیت
37c611d716

+ 147 - 112
index.html

@@ -8,138 +8,173 @@
     <script src="static/js/polyfill.min.js"></script>
     <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
     <script type="text/javascript" src="//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
-    <script>
-      //某些情况下安卓没有提前注入plus对象,导致异常,有这种情况出现直接reload,直到plus存在
-      if (window.navigator.userAgent.toLowerCase().match(/html5plus/i) == 'html5plus') {
-        if (!window.plus) {
-          window.location.reload()
-        }
+  <script>
+
+    //某些情况下安卓没有提前注入plus对象,导致异常,有这种情况出现直接reload,直到plus存在
+    if (window.navigator.userAgent.toLowerCase().match(/html5plus/i) == 'html5plus') {
+      if (!window.plus) {
+        window.location.reload()
       }
-      if (window.plus) {
-        function set_item(key, val) {
-          if (window.plus) {
-            return plus.storage.setItem(key, val)
-          } else {
-            return localStorage.setItem(key, val)
-          }
-        }
-        function get_item(key) {
-          if (window.plus) {
-            return plus.storage.getItem(key)
-          } else {
-            return localStorage.getItem(key)
-          }
-        }
-        if (!get_item('first_init') && plus.webview.currentWebview().id == plus.runtime.appid) {
-          set_item('first_init', '1');
-          plus.io.requestFileSystem(plus.io.PRIVATE_WWW, function(fs) {
-            var full_url = 'file://' + fs.root.fullPath + 'init.html'
-            var init_w = plus.webview.create(full_url, full_url);
-            init_w.show()
-          }, function(e) {
-            console.log(e)
-          });
+    }
 
+
+    if (window.plus) {
+
+      function set_item(key, val){
+        if(window.plus){
+          return plus.storage.setItem(key, val)
+        }else{
+          return localStorage.setItem(key, val)
         }
-        plus.navigator.setStatusBarStyle('light');
-        document.documentElement.style.backgroundColor = '#26A2FF';
-        plus.navigator.setStatusBarBackground('#26A2FF');
-        function setBadgeNumber(newNum) {
-          plus.runtime.setBadgeNumber(newNum);
-          if (plus.os.name != 'Android') {
-            var GeTuiSdk = plus.ios.importClass('GeTuiSdk');
-            GeTuiSdk.setBadge(newNum);
-          }
-        }
-        if (plus.webview.currentWebview().id == plus.runtime.appid) {
-          plus.push.addEventListener('receive', function(msg) {
-            console.log(msg)
-          }, false);
-        }
-        if (plus.navigator.isImmersedStatusbar()) {
-          var bar_height = plus.navigator.getStatusbarHeight();
-          document.documentElement.style.marginTop = bar_height + 'px';
-          document.documentElement.style.height = 'calc(100vh - ' + bar_height + 'px)'
-          document.documentElement.classList.add('app_view_html')
-          var myEvent = new Event('resize');
-          window.dispatchEvent(myEvent);
-          plus.webview.currentWebview().setStyle({
-            softinputMode: "adjustResize",
-          })
+      }
+      function get_item(key){
+        if(window.plus){
+          return plus.storage.getItem(key)
+        }else{
+          return localStorage.getItem(key)
         }
-        var first = null
-        var wv_current = plus.webview.currentWebview().nativeInstanceObject()
+      }
+      //plus.storage.removeItem('first_init')
+      if(!get_item('first_init') && plus.webview.currentWebview().id == plus.runtime.appid){
+        set_item('first_init', '1');
+        plus.io.requestFileSystem( plus.io.PRIVATE_WWW, function( fs ) {
+          var full_url = 'file://'+fs.root.fullPath+'init.html'
+          var init_w = plus.webview.create(full_url,full_url);
+          init_w.show()
+        }, function ( e ) {
+          console.log(e)
+        } );
+
+      }
+
+      plus.navigator.setStatusBarStyle('light');
+      document.documentElement.style.backgroundColor = '#26A2FF';
+      plus.navigator.setStatusBarBackground('#26A2FF');
+
+      function setBadgeNumber(newNum) {
+        plus.runtime.setBadgeNumber(newNum);
         if (plus.os.name != 'Android') {
-          wv_current.plusCallMethod({
-            'setKeyboardDisplayRequiresUserAction': false
-          })
+          var GeTuiSdk = plus.ios.importClass('GeTuiSdk');
+          GeTuiSdk.setBadge(newNum);
         }
-        var wgtVer = null;
-        plus.runtime.getProperty(plus.runtime.appid, function(inf) {
-          wgtVer = inf.version
-        });
       }
-      window.onload = function() {
-        if (window.plus) {
-          document.body.classList.add('on_app')
+      if (plus.navigator.isImmersedStatusbar()) {
+        var bar_height = plus.navigator.getStatusbarHeight();
+        document.documentElement.style.marginTop = bar_height + 'px';
+        document.documentElement.style.height = 'calc(100vh - ' + bar_height + 'px)'
+        document.documentElement.classList.add('app_view_html')
+        var myEvent = new Event('resize');
+        window.dispatchEvent(myEvent);
+        plus.webview.currentWebview().setStyle({
+          softinputMode: "adjustResize",
+        })
+      }
+      var first = null
+      //解决在hbuilder中ios打包后,获取焦点失效的bug
+      //setInterval(function () {
+		  var wv_current = plus.webview.currentWebview().nativeInstanceObject()
+		  if (plus.os.name != 'Android') {
+			wv_current.plusCallMethod({
+			  'setKeyboardDisplayRequiresUserAction': false
+			})
+		  }
+		  var webview = plus.webview.all();
+		  webview = webview[webview.length - 1]
+      //}, 1000)
+
+      plus.key.addEventListener('backbutton', function (e) {
+        if (plus.storage.getItem('qr_scaning')) {
+          return false;
         }
-        (function(window) {
-          window.addEventListener('focusout', function() {
-            //软键盘收起的事件处理
-            window.setTimeout(function() {
-              if (!(document.activeElement && (document.activeElement.type == 'textarea' || document.activeElement
-                  .type == 'text' || document.activeElement.type == 'password' || document.activeElement.type ==
-                  'search'))) {
-                let ua = window.navigator.userAgent.toLowerCase();
-                if (ua.match(/MicroMessenger/i) == 'micromessenger') {
-                  window.scroll(0, 0)
+        webview.canBack(function (e) {
+          if (e.canBack) {
+            webview.back()
+          } else {
+            if (webview.id == plus.runtime.appid) {
+              //首次按键,提示‘再按一次退出应用’
+              if (!first) {
+                first = new Date().getTime()
+                plus.nativeUI.toast("再按一次退出应用");
+                setTimeout(function () {
+                  first = null
+                }, 1000)
+              } else {
+                if (new Date().getTime() - first < 1500) {
+                  plus.runtime.quit()
                 }
               }
-            }, 300)
-          });
+            } else {
+              webview.close();
+            }
+          }
+        })
+      })
+      var wgtVer = null;
+      plus.runtime.getProperty(plus.runtime.appid, function (inf) {
+        wgtVer = inf.version
+      });
+    }
+    window.onload = function () {
+      if(window.plus){
+        document.body.classList.add('on_app')
+      }
+      (function (window) {
+        window.addEventListener('focusout', function () {
+          //软键盘收起的事件处理
+          window.setTimeout(function () {
+            if (!(document.activeElement && (document.activeElement.type == 'textarea' || document.activeElement.type == 'text' || document.activeElement.type == 'password' || document.activeElement.type == 'search'||document.activeElement.type == 'tel'))) {
+              let ua = window.navigator.userAgent.toLowerCase();
+              if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+                window.scroll(0, 0)
+              }
+            }
+          }, 300)
+        });
+        var winW = document.documentElement.clientWidth || window.innerWidth
+        if (winW > 750) {
+          winW = 750
+        }
+        var fontSize = Math.round(winW / 7.5)
+        if (fontSize % 2 > 0) {
+          fontSize += 1
+        }
+
+        setInterval(function () {
+          document.body.style.height = '100%'
+        }, 100)
+        document.documentElement.style.fontSize = fontSize + 'px'
+        window.onresize = function () {
+          if (window.plus) {
+            setTimeout(function () {
+              var bar_height = plus.navigator.getStatusbarHeight();
+              document.documentElement.style.marginTop = bar_height + 'px';
+              document.documentElement.style.backgroundColor = '#26A2FF';
+              document.documentElement.style.height = 'calc(100vh - ' + bar_height + 'px)'
+            }, 100)
+          }
+
           var winW = document.documentElement.clientWidth || window.innerWidth
+          document.body.clientWidth
           if (winW > 750) {
             winW = 750
           }
-          var fontSize = Math.round(winW / 7.5)
+          fontSize = Math.round(winW / 7.5)
           if (fontSize % 2 > 0) {
             fontSize += 1
           }
-          setInterval(function() {
-            document.body.style.height = '100%'
-          }, 100)
           document.documentElement.style.fontSize = fontSize + 'px'
-          window.onresize = function() {
-            if (window.plus) {
-              setTimeout(function() {
-                var bar_height = plus.navigator.getStatusbarHeight();
-                document.documentElement.style.marginTop = bar_height + 'px';
-                document.documentElement.style.backgroundColor = '#26A2FF';
-                document.documentElement.style.height = 'calc(100vh - ' + bar_height + 'px)'
-              }, 100)
-            }
-            var winW = document.documentElement.clientWidth || window.innerWidth
-            document.body.clientWidth
-            if (winW > 750) {
-              winW = 750
-            }
-            fontSize = Math.round(winW / 7.5)
-            if (fontSize % 2 > 0) {
-              fontSize += 1
-            }
-            document.documentElement.style.fontSize = fontSize + 'px'
+        }
+        setTimeout(function () {
+          document.body.style.opacity = 1;
+          document.documentElement.style.opacity = 1;
+          if (window.plus && plus.webview.currentWebview().id == plus.runtime.appid) {
+            localStorage.setItem('window_height', plus.screen.resolutionHeight + 1)
           }
-          setTimeout(function() {
-            document.body.style.opacity = 1;
-            document.documentElement.style.opacity = 1;
-            if (window.plus && plus.webview.currentWebview().id == plus.runtime.appid) {
-              localStorage.setItem('window_height', plus.screen.resolutionHeight + 1)
-            }
-          }, 100)
+        }, 100)
 
-        }(window))
-      }
-    </script>
+      }(window))
+    }
+  </script>
   </head>
 
   <body style="opacity: 0">

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 155 - 248
package-lock.json


+ 1 - 1
package.json

@@ -24,6 +24,7 @@
     "laravel-echo": "^1.7.0",
     "lrz": "^4.9.40",
     "moment": "^2.24.0",
+    "node-sass": "^4.14.0",
     "p2p-ckplayer": "^0.1.4",
     "px2rem-loader": "^0.1.9",
     "qrcode.vue": "^1.6.3",
@@ -79,7 +80,6 @@
     "less": "^3.11.1",
     "less-loader": "^5.0.0",
     "node-notifier": "^5.4.3",
-    "node-sass": "^4.14.0",
     "optimize-css-assets-webpack-plugin": "^3.2.0",
     "ora": "^1.2.0",
     "portfinder": "^1.0.25",

+ 122 - 147
src/App.vue

@@ -173,50 +173,125 @@ export default {
     },
     set_keep_alive_update_data (key, value) {
       this.keep_alive_update_data[key] = value
-    }
-  },
-  mounted () {
-    if (window.plus) {
-      this.user_info = JSON.parse(plus.storage.getItem('user_info'))
-    } else {
-      this.user_info = JSON.parse(localStorage.getItem('user_info'))
-    }
-    let self = this
-    FastClick.attach(document.body)
-    Vue.prototype.$keep_alive_update = (key, value) => {
+    },
+    // 初始化页面
+    init() {
+      let self = this;
+      self.create_web_view(false);
+      self.$router.beforeEach((to, from, next) => {
+      let view_id = ''
       if (window.plus) {
-        let all_view = plus.webview.all()
-        let js = 'window.VueObj.$root.$children[0].set_keep_alive_update_data("' + key + '", ' + JSON.stringify(value) + ');'
-        for (let i = 0; i < all_view.length; i++) {
-          all_view[i].evalJS(js)
+        view_id = plus.storage.getItem(process.env.APPID)
+      } else {
+        self.parse_com(self.$root.$children)
+        self.keep_alive_update_data = {}
+      }
+      if (window.plus && plus.webview.currentWebview().id != view_id && from.name != 'empty' && to.fullPath.indexOf('replace=1') < 0) {
+        let StatusBarStyle = plus.navigator.getStatusBarStyle()
+        plus.navigator.setStatusBarStyle('light')
+        let div_mark = document.createElement('DIV')
+        div_mark.style.zIndex = 1000
+        div_mark.id = 'div_mark'
+        div_mark.style.top = 0
+        div_mark.style.left = 0
+        div_mark.style.right = 0
+        div_mark.style.bottom = 0
+        div_mark.style.position = 'fixed'
+        document.body.appendChild(div_mark)
+        var plusUrl = plus.webview.currentWebview().getURL()
+        var _empty_webview = plus.webview.getWebviewById(view_id)
+        plusUrl = plusUrl.split('#')[0] + '#' + to.fullPath
+        if (_empty_webview && plus.storage.getItem(view_id + '_loaded')) {
+          _empty_webview.evalJS('window.VueObj.$router.replace({path: "' + to.fullPath + '"});')
+          // self.create_web_view(true)
+          setTimeout(() => {
+            _empty_webview.show('pop-in', 300, function () {
+              // 窗口显示动画完成
+              plus.nativeUI.closeWaiting()
+              self.create_web_view(true)
+            }, {acceleration: 'capture'})
+            document.body.removeChild(div_mark)
+          }, 100)
+          _empty_webview.onclose = function () {
+            let close_setp = localStorage.getItem('close_setp')
+            if (close_setp * 1 < -1) {
+              localStorage.setItem('close_setp', close_setp * 1 + 1)
+              plus.webview.currentWebview().close()
+            }
+            plus.navigator.setStatusBarStyle(StatusBarStyle)
+          }
+        } else {
+          if (window.plus) {
+            let webview = plus.webview.create(plusUrl, plusUrl)
+            plus.nativeUI.showWaiting('加载中....')
+            webview.onloaded = function () {
+              document.body.removeChild(div_mark)
+              webview.show('pop-in', 300, function () {
+                // 窗口显示动画完成
+                plus.nativeUI.closeWaiting()
+              }, {acceleration: 'capture'})
+            }
+            webview.onclose = function () {
+              let close_setp = localStorage.getItem('close_setp')
+              if (close_setp * 1 < -1) {
+                localStorage.setItem('close_setp', close_setp * 1 + 1)
+                plus.webview.currentWebview().close()
+              }
+              plus.navigator.setStatusBarStyle(StatusBarStyle)
+            }
+          }
         }
+        return false
+      }
+    
+      let routersArr = sessionStorage.getItem('routers') && sessionStorage.getItem('routers').split(',') || []
+      if (routersArr.length == 0) {
+        routersArr.push(from.path)
+        routersArr.push(to.path)
+        next()
       } else {
-        self.set_keep_alive_update_data(key, value)
+        // 如果是后退
+        if (routersArr.indexOf(to.path) != -1) {
+          // 从哪里后退的,调用他的状态更新方法,复原状态
+          self.$store.commit('RESET', window.$routes_map[from.name].store_name)
+          routersArr.splice(routersArr.indexOf(to.path) + 1, 100)
+          // 后退时延迟100毫秒执行动画,这样体验会好一些
+          next()
+          self.transitionName = 'slide-right'
+        } else {
+          self.transitionName = 'slide-left'
+          routersArr.push(to.path)
+          next()
+        }
       }
-    }
-    document.body.addEventListener(
-      'click',
-      function (e) {
+      sessionStorage.setItem('routers', routersArr.join(','))
+      })
+    },
+    // 初始化APP特性
+    initTx() {
+      let self = this;
+      FastClick.attach(document.body)
+      Vue.prototype.$keep_alive_update = (key, value) => {
+        if (window.plus) {
+          let all_view = plus.webview.all()
+          let js = 'window.VueObj.$root.$children[0].set_keep_alive_update_data("' + key + '", ' + JSON.stringify(value) + ');'
+          for (let i = 0; i < all_view.length; i++) {
+            all_view[i].evalJS(js)
+          }
+        } else {
+          self.set_keep_alive_update_data(key, value)
+        }
+      }
+      document.body.addEventListener('click', function (e) {
         let blur_fun = function () {
           setTimeout(() => {
-            if (
-              !(
-                document.activeElement &&
-                (document.activeElement.type == 'textarea' ||
-                  document.activeElement.type == 'text' ||
-                  document.activeElement.type == 'password' ||
-                  document.activeElement.type == 'search' ||
-                  document.activeElement.type == 'number')
-              ) &&
-              window.plus
-            ) {
+            if (!(document.activeElement && (document.activeElement.type == 'textarea' || document.activeElement.type == 'text' || document.activeElement.type == 'password' || document.activeElement.type == 'search' || document.activeElement.type == 'number'||document.activeElement.type == 'tel')) && window.plus) {
               plus.webview.currentWebview().setStyle({
                 softinputMode: 'adjustResize',
                 height: localStorage.getItem('window_height')
               })
             }
           }, 200)
-          e.target.classList.remove('cur_focus')
           setTimeout(() => {
             localStorage.removeItem('has_input_focus')
           }, 50)
@@ -226,19 +301,11 @@ export default {
             document.documentElement.style.height = 'calc(100% - ' + bar_height + 'px)'
           }
         }
-        e.target.removeEventListener('blur', blur_fun, false)
-        localStorage.setItem('last_click_pos', JSON.stringify({ y: e.offsetY, x: e.offsetX }))
+        e.target.removeEventListener('blur', blur_fun, false);
+        localStorage.setItem('last_click_pos', JSON.stringify({y: e.offsetY, x: e.offsetX}))
         self.getParentNodes(e.target, 'van-cell--clickable', 'cell-clicked-bg')
         self.getParentNodes(e.target, 'van-grid-item__content', 'col-clicked-bg')
-        if (
-          e.target.type == 'textarea' ||
-          e.target.type == 'text' ||
-          e.target.type == 'password' ||
-          e.target.type == 'search' ||
-          e.target.type == 'number' ||
-          e.target.classList.contains('input_label') ||
-          e.target.classList.contains('hidden_input')
-        ) {
+        if (e.target.type == 'textarea' || e.target.type == 'text' || e.target.type == 'password' || e.target.type == 'search' || e.target.type == 'number' || e.target.classList.contains('input_label') || e.target.classList.contains('hidden_input')||document.activeElement.type == 'tel') {
           if (navigator.userAgent.indexOf('Android') > 0 && window.plus) {
             setTimeout(() => {
               let _target = e.target.cloneNode(true)
@@ -251,7 +318,6 @@ export default {
               setTimeout(() => {
                 e.target.classList.remove('ad_has_focus')
                 e.target.parentNode.removeChild(_target)
-                e.target.classList.add('cur_focus')
                 setTimeout(() => {
                   window.scroll(0, 0)
                   var myEvent = new Event('resize')
@@ -260,7 +326,6 @@ export default {
               }, 100)
             }, 200)
           }
-
           if (e.target.classList.contains('input_label')) {
             if (e.target.children[0].classList.contains('hasfocus')) {
               return
@@ -293,9 +358,17 @@ export default {
             document.activeElement.blur()
           }
         }
-      },
-      true
-    )
+      }, true)
+    },
+    
+  },
+  mounted () {
+    if (window.plus) {
+      this.user_info = JSON.parse(plus.storage.getItem('user_info'))
+    } else {
+      this.user_info = JSON.parse(localStorage.getItem('user_info'))
+    }
+    this.initTx();
   },
   created () {
     localStorage.removeItem('menuCommon')
@@ -305,105 +378,7 @@ export default {
     } else {
       this.$setCache('isAndroid', 2)
     }
-    let self = this
-    self.create_web_view(false)
-    self.$router.beforeEach((to, from, next) => {
-      let view_id = ''
-      if (window.plus) {
-        view_id = plus.storage.getItem(process.env.APPID)
-      } else {
-        self.parse_com(self.$root.$children)
-        self.keep_alive_update_data = {}
-      }
-      if (window.plus && plus.webview.currentWebview().id != view_id && from.name != 'empty' && to.fullPath.indexOf('replace=1') < 0) {
-        let StatusBarStyle = plus.navigator.getStatusBarStyle()
-        plus.navigator.setStatusBarStyle('light')
-        let div_mark = document.createElement('DIV')
-        div_mark.style.zIndex = 1000
-        div_mark.id = 'div_mark'
-        div_mark.style.top = 0
-        div_mark.style.left = 0
-        div_mark.style.right = 0
-        div_mark.style.bottom = 0
-        div_mark.style.position = 'fixed'
-        document.body.appendChild(div_mark)
-        var plusUrl = plus.webview.currentWebview().getURL()
-        var _empty_webview = plus.webview.getWebviewById(view_id)
-        plusUrl = plusUrl.split('#')[0] + '#' + to.fullPath
-        if (_empty_webview && plus.storage.getItem(view_id + '_loaded')) {
-          _empty_webview.evalJS('window.VueObj.$router.replace({path: "' + to.fullPath + '"});')
-          setTimeout(() => {
-            _empty_webview.show(
-              'pop-in',
-              300,
-              function () {
-                // 窗口显示动画完成
-                plus.nativeUI.closeWaiting()
-                self.create_web_view(true)
-              },
-              { acceleration: 'capture' }
-            )
-            document.body.removeChild(div_mark)
-          }, 100)
-          _empty_webview.onclose = function () {
-            let close_setp = localStorage.getItem('close_setp')
-            if (close_setp * 1 < -1) {
-              localStorage.setItem('close_setp', close_setp * 1 + 1)
-              plus.webview.currentWebview().close()
-            }
-            plus.navigator.setStatusBarStyle(StatusBarStyle)
-          }
-        } else {
-          if (window.plus) {
-            let webview = plus.webview.create(plusUrl, plusUrl)
-            plus.nativeUI.showWaiting('加载中....')
-            webview.onloaded = function () {
-              document.body.removeChild(div_mark)
-              webview.show(
-                'pop-in',
-                300,
-                function () {
-                  // 窗口显示动画完成
-                  plus.nativeUI.closeWaiting()
-                },
-                { acceleration: 'capture' }
-              )
-            }
-            webview.onclose = function () {
-              let close_setp = localStorage.getItem('close_setp')
-              if (close_setp * 1 < -1) {
-                localStorage.setItem('close_setp', close_setp * 1 + 1)
-                plus.webview.currentWebview().close()
-              }
-              plus.navigator.setStatusBarStyle(StatusBarStyle)
-            }
-          }
-        }
-        return false
-      }
-
-      let routersArr = (sessionStorage.getItem('routers') && sessionStorage.getItem('routers').split(',')) || []
-      if (routersArr.length == 0) {
-        routersArr.push(from.path)
-        routersArr.push(to.path)
-        next()
-      } else {
-        // 如果是后退
-        if (routersArr.indexOf(to.path) != -1) {
-          // 从哪里后退的,调用他的状态更新方法,复原状态
-          self.$store.commit('RESET', window.$routes_map[from.name].store_name)
-          routersArr.splice(routersArr.indexOf(to.path) + 1, 100)
-          // 后退时延迟100毫秒执行动画,这样体验会好一些
-          next()
-          self.transitionName = 'slide-right'
-        } else {
-          self.transitionName = 'slide-left'
-          routersArr.push(to.path)
-          next()
-        }
-      }
-      sessionStorage.setItem('routers', routersArr.join(','))
-    })
+     this.init();
   }
 }
 </script>

+ 0 - 1
src/components/common/scroller/src/components/Scroller.vue

@@ -224,7 +224,6 @@ export default {
   },
 
   mounted() {
-    console.log(this.isNeed);
     if (this.isNeed) {
       this.$nextTick(() => {
         this.init();

+ 4 - 28
src/components/integral/integral_entry_n.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
     <van-nav-bar :title="type==1?'录入A分':'奖扣B分'" left-text="返回" @click-left="$route_back" left-arrow></van-nav-bar>
-    <div class="body_com has_header">
-      <scroller :isNeed="isNeed">
+    <div class="body_com">
+      <scroller >
         <van-cell-group>
           <EmployeeSelectorCell
             use_employee_list
@@ -29,7 +29,6 @@
             </div>
             <van-cell title="指定规则">
               <template slot="right-icon">
-                <!-- <div class="switchall" :class="{scitchBlue:!item.diy}"> -->
                 <div>
                   <van-switch v-model="item.diy" inactive-color="#9a9a9a" size="24"/>
                 </div>
@@ -76,7 +75,6 @@
               name="日期"
               v-model="item.event_time"
             ></DateCell>
-            <!-- <div v-if="reviewed_score.length > 0"> -->
             <div v-if="!isCreator">
               <EmployeeSelectorCell
                 bar_title="选择递交审批人"
@@ -89,20 +87,8 @@
                 :employee_list="reviewed_score"
               ></EmployeeSelectorCell>
             </div>
-            <!-- <van-cell v-if="reviewed_score.length == 0" title="递交审批" is-link @click.stop="$toast('您没有递交审批人,请联系管理员')" /> -->
-
             <van-cell required>
-              <Mtextarea
-                v-model="item.remark"
-                placeholder="请输入事件内容"
-                name="申请事由"
-                v-validate="'required|max:100'"
-                :text_max="100"
-                :imgs_max="3"
-                images
-                speech
-                :imgs.sync="item.files"
-              ></Mtextarea>
+              <Mtextarea v-model="item.remark"  placeholder="请输入事件内容" name="申请事由"  v-validate="'required|max:100'" :text_max="100" :imgs_max="3" images speech:imgs.sync="item.files"></Mtextarea>
             </van-cell>
           </van-cell-group>
         </div>
@@ -118,7 +104,6 @@
       </scroller>
     </div>
     <van-popup v-model="showRes" style=" width: 100vw; height: 100vh;">
-      <!-- <div style="height: 20px;background-color: #26A2FF;"></div> -->
       <div style="background-color: #26A2FF;"></div>
       <van-nav-bar title="返回结果" left-text="返回" @click-left="back()" left-arrow></van-nav-bar>
       <div class="rentrun">
@@ -155,19 +140,10 @@
             </van-cell-group>
           </scroller>
         </div>
-        <!--  style="border-top: 1px solid #f1f1f1;" -->
         <van-row>
           <van-col span="12" :offset="6">
             <van-button type="info" @click="back()" block>我知道了</van-button>
         </van-col>
-          <!--
-          <van-col span="12">
-            <div class="buttom_btn one" @click="go">+ 继续添加</div>
-          </van-col>
-          <van-col span="12">
-            <div class="buttom_btn color_blue" @click="$router.replace('/')">> 回到首页</div>
-          </van-col>
-          -->
         </van-row>
       </div>
     </van-popup>
@@ -616,7 +592,7 @@ export default {
     this.$nextTick(() => {
       this.showRule = true
     })
-  }
+  },
 }
 </script>
 <style scoped lang="less">

+ 1 - 1
src/components/pk/pk_rules.vue

@@ -114,7 +114,7 @@ export default {
     get_rules_list(id, page) {
       let self = this
       self.showLoading()
-      request('get','/api/integral/pk/rules',{ pk_id: id, page: page }).then((res) => {
+      request('get','/api/integral/pk/rules',{ pk_id: id, page: page,page_size:1000 }).then((res) => {
         if (res.data.code == '1') {
           self.$toast.clear()
           self.rules_list = res.data.data.list.list

+ 7 - 4
src/components/user/login.vue

@@ -23,9 +23,10 @@ export default {
     };
   },
   created() {
-    console.log('进入登录页');
-    if (cookGetToken()) {
-      setToken(cookGetToken());
+    let token=cookGetToken()
+    console.log('进入登录页:'+token);
+    if (token) {
+      setToken(token);
       this.detailAxiox(1);
     } else {
       window.location.href = process.env.BASE_API; //重新授权
@@ -46,7 +47,9 @@ export default {
             this.$store.commit('SET_USERINFO', res.data.data.user); // 设置员工信息
             window.sessionStorage.setItem('__VCKEEPALIVE__', JSON.stringify(['/']));
             window.sessionStorage.setItem('routers', '/');
-            console.log(getToken());
+            // this.$router.push({
+            //   name: 'home'
+            // })
             wxAuth(true);
           }
         }

+ 2 - 2
src/main.js

@@ -8,8 +8,8 @@ import './utils/validator'
 import '../css/reset.css'
 import echarts from 'echarts'
 
-// import VConsole from 'vconsole'
-// new VConsole()
+import VConsole from 'vconsole'
+new VConsole()
 
 import {
   Tabbar,Empty, TabbarItem,Grid, GridItem,Field,NavBar,Row, Col,Cell, CellGroup,Toast,Popup,Dialog,RadioGroup, Radio,Notify,

+ 1 - 3
src/permission.js

@@ -53,6 +53,7 @@ function thens(to, from, next){
   }
   // 初始一些数据
   init(to);
+  // next()
   wxAuth(false,next,to)
 }
 
@@ -82,9 +83,6 @@ function detailAxiox(){
       store.commit("SET_USERINFO", res.data.data.user); // 设置员工信息
       window.sessionStorage.setItem('__VCKEEPALIVE__', JSON.stringify(['/']))
       window.sessionStorage.setItem('routers', '/')
-      console.log(getToken());
-      console.log(JSON.parse(localStorage.getItem('user_info')))
-      console.log(store.getters.user_info)
     }
   })
 }

+ 2 - 1
src/utils/auth.js

@@ -42,7 +42,8 @@ export function getToken() {
   }
 }
 export function cookGetToken() {
-  return Cookies.get(TokenKey)
+  // return Cookies.get(TokenKey)|| getToken(TokenKey)
+  return Cookies.get(TokenKey)|| 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOm51bGwsImlhdCI6MTY3NTczNzEzOSwiZXhwIjoxNjc2MzM3MTM5LCJuYmYiOjE2NzU3MzcxMzksImp0aSI6InZZbmtIUHpFZ3JzS2lkWWkiLCJzdWIiOjc0LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.Omz7v07Iox44cuTAPgflBjA-4GtT9aN8uf4619DoGzw'
 }
 
 export function getUserId() {

+ 0 - 14
src/utils/wx-auth-two.js

@@ -8,14 +8,9 @@ let isfot = false
 export const wxAuth = async (ifHome, next, to) => {
   if (isfot) return
   const wechatConfigUrl = location.href.split('#')[0]
-  console.log('--获取url--')
-  console.log(wechatConfigUrl)
-  console.log(window.wechatConfigUrl)
   if (window.wechatConfigUrl === wechatConfigUrl && window.WWOpenData) {
     if (getToken()) {
-      console.log('--满足跳转条件--')
       if (ifHome) {
-        console.log('--跳转首页--')
         Router.push({
           name: 'home'
         })
@@ -42,15 +37,11 @@ async function wxConfigByCorp(ifHome, body, next) {
   var data;
   await allocations(body).then((res) => {
     if (res.data.code == 1) {
-      console.log("--请求配置成功--")
       data = res.data.data
     }
   }).catch(() => {})
   const wxConfigParams = data.config
   const appSignature = data.agentConfig
-  console.log(wxConfigParams)
-  console.log(appSignature)
-  console.log('--wxConfig开始--')
   await Vue.prototype.$wx.config({ // 鉴权(企业的身份与权限)
     beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
     debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
@@ -69,12 +60,10 @@ async function wxConfigByCorp(ifHome, body, next) {
     ] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
   });
   await Vue.prototype.$wx.ready(function() {
-    console.log('--wx.agentConfig开始--')
     const u = navigator.userAgent;
     const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; // 安卓
     const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
     if (isAndroid) {
-      console.log('--安卓手机--');
       Vue.prototype.$wx.agentConfig({ //鉴权(应用的身份与权限)
         corpid: appSignature.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
         agentid: appSignature.agentid, // 必填,企业微信的应用id (e.g. 1000247)
@@ -83,8 +72,6 @@ async function wxConfigByCorp(ifHome, body, next) {
         signature: appSignature.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
         jsApiList: ['selectExternalContact'], //必填
         success: function(res) { // 回调  //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-          console.log('--agentConfig成功--')
-          console.log(res)
           isfot = false
           if (next) {
             next()
@@ -105,7 +92,6 @@ async function wxConfigByCorp(ifHome, body, next) {
       });
     }
     if (isIOS) {
-      console.log('苹果手机');
       Vue.prototype.$wx.agentConfig({
         corpid: appSignature.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
         agentid: appSignature.agentid, // 必填,企业微信的应用id (e.g. 1000247)生产环境

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است