Luolei 6 سال پیش
والد
کامیت
0c27988dc4
9فایلهای تغییر یافته به همراه34 افزوده شده و 19 حذف شده
  1. 2 1
      .babelrc
  2. 1 1
      package.json
  3. 5 2
      src/html/disclaimer.html
  4. 5 2
      src/html/drugInfo.html
  5. 2 3
      src/html/index.html
  6. 5 2
      src/html/information.html
  7. 5 2
      src/html/page.html
  8. 5 2
      src/html/scale.html
  9. 4 4
      src/js/promise.js

+ 2 - 1
.babelrc

@@ -1,4 +1,5 @@
 
 {
-  "presets": ["@babel/preset-env"]
+  "presets": ["@babel/preset-env"],
+  "plugins": ["@babel/plugin-transform-runtime"]
 }

+ 1 - 1
package.json

@@ -12,8 +12,8 @@
   },
   "devDependencies": {
     "@babel/core": "^7.4.4",
+    "@babel/plugin-transform-runtime": "^7.4.4",
     "@babel/preset-env": "^7.4.4",
-    "@babel/preset-es2015": "^7.0.0-beta.53",
     "babel-loader": "^8.0.5",
     "clean-webpack-plugin": "^2.0.1",
     "css-loader": "^2.1.1",

+ 5 - 2
src/html/disclaimer.html

@@ -38,7 +38,7 @@
       padding: 0 30px 40px;
     }
   </style>
-  <script>
+  <!-- <script>
     if (!Function.prototype.bind) {
       Function.prototype.bind = function (oThis) {
         if (typeof this !== "function") {
@@ -56,7 +56,10 @@
         return fBound;
       };
     }
-  </script>
+  </script> -->
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
 </head>
 
 <body>

+ 5 - 2
src/html/drugInfo.html

@@ -148,7 +148,7 @@
       color: #33475f
     }
   </style>
-  <script>
+  <!-- <script>
     if (!Function.prototype.bind) {
       Function.prototype.bind = function (oThis) {
         if (typeof this !== "function") {
@@ -166,7 +166,10 @@
         return fBound;
       };
     }
-  </script>
+  </script> -->
+  <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
+  <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
+  <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
 </head>
 
 <body>

+ 2 - 3
src/html/index.html

@@ -26,11 +26,10 @@
   </script> -->
   
   <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-sham.min.js"></script>
-  <script src="https://wzrd.in/standalone/es7-shim@latest"></script>
+  <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script> -->
+  <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-sham.min.js"></script> -->
 </head>
 
 <body>

+ 5 - 2
src/html/information.html

@@ -148,7 +148,7 @@
       color: #000
     }
   </style>
-  <script>
+  <!-- <script>
     if (!Function.prototype.bind) {
       Function.prototype.bind = function (oThis) {
         if (typeof this !== "function") {
@@ -166,7 +166,10 @@
         return fBound;
       };
     }
-  </script>
+  </script> -->
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
 </head>
 
 <body>

+ 5 - 2
src/html/page.html

@@ -6,7 +6,7 @@
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title><%= htmlWebpackPlugin.options.title %></title>
-  <script>
+  <!-- <script>
     if (!Function.prototype.bind) {
       Function.prototype.bind = function (oThis) {
         if (typeof this !== "function") {
@@ -24,7 +24,10 @@
         return fBound;
       };
     }
-  </script>
+  </script> -->
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
 </head>
 
 <body>

+ 5 - 2
src/html/scale.html

@@ -118,7 +118,7 @@
       box-sizing: border-box;
     }
   </style>
-  <script>
+  <!-- <script>
     if (!Function.prototype.bind) {
       Function.prototype.bind = function (oThis) {
         if (typeof this !== "function") {
@@ -136,7 +136,10 @@
         return fBound;
       };
     }
-  </script>
+  </script> -->
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
 </head>
 
 <body>

+ 4 - 4
src/js/promise.js

@@ -1,10 +1,10 @@
 require('@babel/polyfill');
 const qs = require('qs');
 const config = {
-  pushInner:'/api/icss/push/pushInner',
-  calculate:'/api/icss/calc/calculate',
-  disclaimer: '/api/icss/disclaimerInformation/getDisclaimerInformations',
-  information: '/api/icss/introduceInfo/getByQuestionId',
+  pushInner:'http://192.168.2.241:5050/api/icss/push/pushInner',
+  calculate:'http://192.168.2.241:5050/api/icss/calc/calculate',
+  disclaimer: 'http://192.168.2.241:5050/api/icss/disclaimerInformation/getDisclaimerInformations',
+  information: 'http://192.168.2.241:5050/api/icss/introduceInfo/getByQuestionId',
 }
 const imageUrlPrefix = 'http://192.168.2.241:82';
 const getUrlArgObject = function(parm) {