Explorar el Código

'完善选择日期功能'

liuyanpeng hace 1 año
padre
commit
9bba8de303
Se han modificado 4 ficheros con 658 adiciones y 236 borrados
  1. 3 3
      src/common/Common.js
  2. 633 222
      src/shelf/DeviceTimingSwitcher.vue
  3. 12 1
      src/shelf/util.js
  4. 10 10
      webpack.dev.js

+ 3 - 3
src/common/Common.js

@@ -51,11 +51,11 @@ export default{
    */
   getRootPath: function () {
     var protocol = window.location.protocol;
-    console.log('protocol:' + protocol);
+    // console.log('protocol:' + protocol);
     var host = window.location.host;
-    console.log('host:' + host);
+    // console.log('host:' + host);
     var localhostPaht = protocol + '//' + host;
-    console.log('localhostPaht:' + localhostPaht);
+    // console.log('localhostPaht:' + localhostPaht);
     return localhostPaht;
   },
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 633 - 222
src/shelf/DeviceTimingSwitcher.vue


+ 12 - 1
src/shelf/util.js

@@ -40,4 +40,15 @@ export const ajaxApiGet = (url, datas) => {
       },
     });
   });
-};
+};
+
+// 防抖函数
+export const debounce = (fn, delay) => {
+  let timer = null;
+  return function (...args) {
+    if (timer) clearTimeout(timer);
+    timer = setTimeout(() => {
+      fn.apply(this, args);
+    }, delay);
+  };
+};

+ 10 - 10
webpack.dev.js

@@ -60,59 +60,59 @@ module.exports = WebpackMerge.merge(baseConfig, {
     
     proxy: {
       '/api': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/static': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/dashboard': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/mock': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/authApi': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/Dictionary': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/Files': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: false,
         changeOrigin: true,
         secure:true,
       },
       '/WebSocket': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: true,
         changeOrigin: true,
       },
       '/TrainVideo': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: true,
         changeOrigin: true,
       },
       '/gateway-api': {
-        target: 'http://192.168.1.7:11022/',
+        target: 'https://a.leanwo.com:11022/',
         ws: true,
         changeOrigin: true,
         secure:true,

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio