manage-client 1.22.6-ca → 1.22.10-ca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,99 +1,93 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- // var httpProxy = require('http-proxy')
6
-
7
- var app = express()
8
- var compiler = webpack(config)
9
- // var proxy = httpProxy.createProxyServer()
10
-
11
- var bendi = 'http://127.0.0.1:8081/', changan = 'http://192.168.2.79:7003/'
12
- var proxyTable = {
13
- // 查找资源服务数据
14
- '/rs/sql/manageSingleTable': {
15
- target:changan
16
- },
17
- '/rs/search': {
18
- target: changan
19
- },
20
- '/rs/logic/getLogin': {
21
- target: changan
22
- },
23
- '/rs/logic/getInitData': {
24
- target: changan
25
- },
26
- '/rs/logic/getSaleInitData': {
27
- target: changan
28
- },
29
- // 用户登录服务地址
30
- '/rs/user': {
31
- target: changan
32
- },
33
- '/rs/data': {
34
- target: changan
35
- },
36
- '/rs/license': {
37
- target: changan
38
- },
39
- '/rs/sql': {
40
- target: bendi
41
- },
42
- '/rs/logic': {
43
- target: bendi
44
- },
45
- '/xyhf/rs/xyhf': {
46
- target: changan
47
- },
48
- '/rs': {
49
- //target: changan
50
- target: changan
51
- }
52
- }
53
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
54
- publicPath: config.output.publicPath,
55
- stats: {
56
- colors: true,
57
- chunks: false
58
- }
59
- })
60
-
61
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
62
- // force page reload when html-webpack-plugin template changes
63
- compiler.plugin('compilation', function (compilation) {
64
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
65
- hotMiddleware.publish({ action: 'reload' })
66
- cb()
67
- })
68
- })
69
-
70
- // proxy api requests
71
- Object.keys(proxyTable).forEach(function (context) {
72
- var options = proxyTable[context]
73
- if (typeof options === 'string') {
74
- options = { target: options }
75
- }
76
- app.use(proxyMiddleware(context, options))
77
- })
78
-
79
- // handle fallback for HTML5 history API
80
- app.use(require('connect-history-api-fallback')())
81
-
82
- // serve webpack bundle output
83
- app.use(devMiddleware)
84
-
85
- // enable hot-reload and state-preserving
86
- // compilation error display
87
- app.use(hotMiddleware)
88
-
89
- // serve pure static assets
90
- app.use('/static', express.static('./static'))
91
-
92
-
93
- module.exports = app.listen(8085, function (err) {
94
- if (err) {
95
- console.log(err)
96
- return
97
- }
98
- console.log('Listening at http://localhost:8085')
99
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ // var httpProxy = require('http-proxy')
6
+
7
+ var app = express()
8
+ var compiler = webpack(config)
9
+ // var proxy = httpProxy.createProxyServer()
10
+
11
+ var bendi = 'http://127.0.0.1:5001/ldap/', changan = 'http://192.168.2.79:7003/'
12
+ var proxyTable = {
13
+ // 查找资源服务数据
14
+ '/rs/sql/manageSingleTable': {
15
+ target:changan
16
+ },
17
+ '/rs/search': {
18
+ target: changan
19
+ },
20
+ '/rs/logic/getLogin': {
21
+ target: changan
22
+ },
23
+ '/rs/logic/getInitData': {
24
+ target: changan
25
+ },
26
+ '/rs/logic/getSaleInitData': {
27
+ target: changan
28
+ },
29
+ // 用户登录服务地址
30
+ '/rs/user': {
31
+ target: changan
32
+ },
33
+ '/rs/data': {
34
+ target: changan
35
+ },
36
+ '/rs/license': {
37
+ target: changan
38
+ },
39
+ '/xyhf/rs/xyhf': {
40
+ target: changan
41
+ },
42
+ '/rs': {
43
+ //target: changan
44
+ target: changan
45
+ }
46
+ }
47
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
48
+ publicPath: config.output.publicPath,
49
+ stats: {
50
+ colors: true,
51
+ chunks: false
52
+ }
53
+ })
54
+
55
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
56
+ // force page reload when html-webpack-plugin template changes
57
+ compiler.plugin('compilation', function (compilation) {
58
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
59
+ hotMiddleware.publish({ action: 'reload' })
60
+ cb()
61
+ })
62
+ })
63
+
64
+ // proxy api requests
65
+ Object.keys(proxyTable).forEach(function (context) {
66
+ var options = proxyTable[context]
67
+ if (typeof options === 'string') {
68
+ options = { target: options }
69
+ }
70
+ app.use(proxyMiddleware(context, options))
71
+ })
72
+
73
+ // handle fallback for HTML5 history API
74
+ app.use(require('connect-history-api-fallback')())
75
+
76
+ // serve webpack bundle output
77
+ app.use(devMiddleware)
78
+
79
+ // enable hot-reload and state-preserving
80
+ // compilation error display
81
+ app.use(hotMiddleware)
82
+
83
+ // serve pure static assets
84
+ app.use('/static', express.static('./static'))
85
+
86
+
87
+ module.exports = app.listen(8085, function (err) {
88
+ if (err) {
89
+ console.log(err)
90
+ return
91
+ }
92
+ console.log('Listening at http://localhost:8085')
93
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "1.22.6-ca",
3
+ "version": "1.22.10-ca",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {