Luolei 6 роки тому
батько
коміт
4801f81762
4 змінених файлів з 13 додано та 10 видалено
  1. 1 0
      package.json
  2. 2 2
      src/html/index.html
  3. 3 2
      src/index.js
  4. 7 6
      webpack.config.js

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
     "babel-loader": "^8.0.5",
     "clean-webpack-plugin": "^2.0.1",
     "css-loader": "^2.1.1",
+    "es5-shim": "^4.5.13",
     "express": "^4.16.4",
     "file-loader": "^3.0.1",
     "html-webpack-plugin": "^3.2.0",

Різницю між файлами не показано, бо вона завелика
+ 2 - 2
src/html/index.html


+ 3 - 2
src/index.js

@@ -3,8 +3,8 @@ require('./css/reset.css');
 require('./css/popup.css');
 require('./js/popup');
 const $ = require("jquery");
-
 const { post,config,getUrlArgObject } = require('./js/promise.js');
+
 const {bqtsFun,ybzlFun,cyywFun,knzdFun,jtFun,tjwzFun,tjtgFun,tjhyFun,tjfjFun,yszdFun} = require('./js/indexDom.js');
 //   symptom: "恶心呕吐腰痛", //胸痛,背痛,恶心,呕吐     //恶心呕吐腰痛   //牙周袋形成
 var msg = {
@@ -17,7 +17,8 @@ var msg = {
   pacs: getUrlArgObject('pacsJson'),
   diag: getUrlArgObject('diagJson'),
   featureType: "1,4,5,6,7,8,22",
-  other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson')
+  other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+  hospitalCode:getUrlArgObject('hospitalCode') || ''
 }//推送相关信息
 
 window.msg = msg

+ 7 - 6
webpack.config.js

@@ -7,6 +7,7 @@ const webpack = require('webpack');
 const proxyHost = "http://192.168.2.241:5050";
 module.exports = {
   entry: {
+    shim: './node_modules/es5-shim',
     index: path.resolve(__dirname, 'src', 'index.js'),
     page: path.resolve(__dirname, 'src', 'page.js'),
     information: path.resolve(__dirname, 'src/js', 'information.js'),
@@ -28,7 +29,7 @@ module.exports = {
       title: 'index',
       template: path.resolve(__dirname, 'src/html', 'index.html'),
       filename: 'index.html',
-      chunks: ['index', 'vendor', 'common'],
+      chunks: ['shim','index', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
       minify: {
@@ -41,7 +42,7 @@ module.exports = {
       title: 'page',
       template: path.resolve(__dirname, 'src/html', 'page.html'),
       filename: 'page.html',
-      chunks: ['page', 'vendor', 'common'],
+      chunks: ['shim','page', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
       minify: {
@@ -54,7 +55,7 @@ module.exports = {
       title: 'information',
       template: path.resolve(__dirname, 'src/html', 'information.html'),
       filename: 'information.html',
-      chunks: ['information', 'vendor', 'common'],
+      chunks: ['shim','information', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
       minify: {
@@ -67,7 +68,7 @@ module.exports = {
       title: 'drugInfo',
       template: path.resolve(__dirname, 'src/html', 'drugInfo.html'),
       filename: 'drugInfo.html',
-      chunks: ['information', 'vendor', 'common'],
+      chunks: ['shim','information', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
       minify: {
@@ -80,7 +81,7 @@ module.exports = {
       title: 'disclaimer',
       template: path.resolve(__dirname, 'src/html', 'disclaimer.html'),
       filename: 'disclaimer.html',
-      chunks: ['vendor', 'common', 'disclaimer'],
+      chunks: ['shim','vendor', 'common', 'disclaimer'],
       inject: true,
       hash: true, //防止缓存
       minify: {
@@ -93,7 +94,7 @@ module.exports = {
       title: 'scale',
       template: path.resolve(__dirname, 'src/html', 'scale.html'),
       filename: 'scale.html',
-      chunks: ['vendor', 'common', 'scale'],
+      chunks: ['shim','vendor', 'common', 'scale'],
       inject: true,
       hash: true, //防止缓存
       minify: {