manage-client 3.2.175 → 3.2.176

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,173 +1,182 @@
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
- // Define HTTP proxies to your custom API backend
12
- // https://github.com/chimurai/http-proxy-middleware
13
- // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
- var shaoguan = 'http://119.146.1.106:8300/'
15
- var qtx= 'http://36.103.222.144:6300/'
16
- var bendi = 'http://192.168.50.4:8400'
17
- // var bendi = 'http://172.168.1.11:9001'
18
- var fuwu = 'http://172.168.1.11:9001/'
19
- // var fuwu = 'http://203.57.101.233:9001'
20
- var system = 'http://192.168.50.4:8400'
21
- // 192.168.
22
- // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
23
- // var str = 'http://192.168.10.233:8300', str2 = 'http://192.168.10.14:8300'
24
- var proxyTable = {
25
- '/rs/logic/exportfile': {
26
- target: bendi
27
- },
28
- '/files': {
29
- target: bendi
30
- },
31
- // 查找资源服务数据
32
- '/rs/search': {
33
- target: bendi
34
- },
35
- // 查找资源服务数据
36
- '/rs/logic/getLogin': {
37
- target: bendi
38
- },
39
- // 查找资源服务数据
40
- '/rs/logic/getInitData': {
41
- target: bendi
42
- },
43
- '/rs/logic/getSaleInitData': {
44
- target: bendi
45
- },
46
- // 用户登录服务地址
47
- '/rs/user': {
48
- target: bendi
49
- },
50
- '/rs/path/getParams': {
51
- target: bendi
52
- },
53
- '/rs/data': {
54
- target: bendi
55
- },
56
- '/rs/license': {
57
- target: bendi
58
- },
59
- '/rs/db': {
60
- target: bendi
61
- },
62
- '/excel': {
63
- target: bendi
64
- },
65
- '/rs/config': {
66
- target: bendi
67
- },
68
- '/rs/sql/getLicenseById': {
69
- target: bendi
70
- },
71
- '/rs/report': {
72
- target: bendi
73
- },
74
- '/rs/vue': {
75
- target: bendi
76
- },
77
- '/rs/file': {
78
- target: bendi
79
- },
80
- '/rs': {
81
- target: bendi
82
- }
83
- }
84
-
85
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
86
- publicPath: config.output.publicPath,
87
- stats: {
88
- colors: true,
89
- chunks: false
90
- }
91
- })
92
-
93
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
94
- // force page reload when html-webpack-plugin template changes
95
- compiler.plugin('compilation', function (compilation) {
96
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
97
- hotMiddleware.publish({action: 'reload'})
98
- cb()
99
- })
100
- })
101
-
102
- // proxy api requests
103
- Object.keys(proxyTable).forEach(function (context) {
104
- var options = proxyTable[context]
105
- if (typeof options === 'string') {
106
- options = {target: options}
107
- }
108
- app.use(proxyMiddleware(context, options))
109
- })
110
-
111
- // handle fallback for HTML5 history API
112
- app.use(require('connect-history-api-fallback')())
113
- // app.use(function (req, res, next) {
114
- // res.header('Access-Control-Allow-Origin', '*')
115
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
116
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
117
- // res.header('X-Powered-By', '3,2,1')
118
- // res.header('Access-Control-Allow-Credentials', 'true')
119
- // res.header('Content-Type', 'application/json;charset=utf-8')
120
- // next()
121
- // })
122
-
123
- // serve webpack bundle output
124
- app.use(devMiddleware)
125
-
126
- // enable hot-reload and state-preserving
127
- // compilation error display
128
- app.use(hotMiddleware)
129
-
130
- // serve pure static assets
131
- app.use('/static', express.static('./static'))
132
-
133
- // app.all('/rs/*', function (req, res) {
134
- // proxy.web(req, res, {
135
- // target: 'http://127.0.0.1:8081/reports'
136
- // })
137
- // })
138
-
139
- // app.all('/rs/*', function (req, res) {
140
- // proxy.web(req, res, {
141
- // target: 'http://127.0.0.1:8081/ldap'
142
- // })
143
- // })
144
- // app.all('/excel/*', function (req, res) {
145
- // proxy.web(req, res, {
146
- // target: 'http://127.0.0.1:8081/charge'
147
- // })
148
- // })
149
-
150
- // app.all('/rs/*', function (req, res) {
151
- // proxy.web(req, res, {
152
- // target: 'http://127.0.0.1:82/charge'
153
- // })
154
- // })
155
-
156
- // app.all('/*', function (req, res) {
157
- // proxy.web(req, res, {
158
- // target: 'http://127.0.0.1:82'
159
- // })
160
- // })
161
- // app.all('/rs/user', function (req, res) {
162
- // proxy.web(req, res, {
163
- // target: 'http://127.0.0.1:82'
164
- // })
165
- // })
166
-
167
- module.exports = app.listen(8085, function (err) {
168
- if (err) {
169
- console.log(err)
170
- return
171
- }
172
- console.log('Listening at http://localhost:8085')
173
- })
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
+ // Define HTTP proxies to your custom API backend
12
+ // https://github.com/chimurai/http-proxy-middleware
13
+ // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
+ var shaoguan = 'http://119.146.1.106:8300/'
15
+ var qtx= 'http://36.103.222.144:6300/'
16
+ var bendi = 'http://192.168.50.4:8400'
17
+ // var bendi = 'http://172.168.1.11:9001'
18
+ var fuwu = 'http://172.168.1.11:9001/'
19
+ // var fuwu = 'http://203.57.101.233:9001'
20
+ var system = 'http://192.168.50.4:8400'
21
+ // 192.168.
22
+ // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
23
+ // var str = 'http://192.168.10.233:8300', str2 = 'http://192.168.10.14:8300'
24
+ var proxyTable = {
25
+ '/rs/logic/exportfile': {
26
+ target: bendi
27
+ },
28
+ '/rs/sql/otherChargeQuery': {
29
+ target: 'http://localhost:8080/'
30
+ },
31
+ '/rs/sql/BusinessType': {
32
+ target: 'http://localhost:8080/'
33
+ },
34
+ '/files': {
35
+ target: bendi
36
+ },
37
+ // 查找资源服务数据
38
+ '/rs/search': {
39
+ target: bendi
40
+ },
41
+ // 查找资源服务数据
42
+ '/rs/logic/getLogin': {
43
+ target: bendi
44
+ },
45
+ // 查找资源服务数据
46
+ '/rs/logic/getInitData': {
47
+ target: bendi
48
+ },
49
+ '/rs/logic/getSaleInitData': {
50
+ target: bendi
51
+ },
52
+ // 用户登录服务地址
53
+ '/rs/user': {
54
+ target: bendi
55
+ },
56
+ '/rs/path/getParams': {
57
+ target: bendi
58
+ },
59
+ '/rs/data': {
60
+ target: bendi
61
+ },
62
+ '/rs/license': {
63
+ target: bendi
64
+ },
65
+ '/rs/db': {
66
+ target: bendi
67
+ },
68
+ '/excel': {
69
+ target: bendi
70
+ },
71
+ '/rs/config': {
72
+ target: bendi
73
+ },
74
+ '/rs/sql/getLicenseById': {
75
+ target: bendi
76
+ },
77
+ '/rs/report': {
78
+ target: bendi
79
+ },
80
+ '/rs/vue': {
81
+ target: bendi
82
+ },
83
+ '/rs/file': {
84
+ target: bendi
85
+ },
86
+ '/rs/logic/SumSettleFileImport': {
87
+ target: 'http://127.0.0.1:8080'
88
+ },
89
+ '/rs': {
90
+ target: bendi
91
+ }
92
+ }
93
+
94
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
95
+ publicPath: config.output.publicPath,
96
+ stats: {
97
+ colors: true,
98
+ chunks: false
99
+ }
100
+ })
101
+
102
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
103
+ // force page reload when html-webpack-plugin template changes
104
+ compiler.plugin('compilation', function (compilation) {
105
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
106
+ hotMiddleware.publish({action: 'reload'})
107
+ cb()
108
+ })
109
+ })
110
+
111
+ // proxy api requests
112
+ Object.keys(proxyTable).forEach(function (context) {
113
+ var options = proxyTable[context]
114
+ if (typeof options === 'string') {
115
+ options = {target: options}
116
+ }
117
+ app.use(proxyMiddleware(context, options))
118
+ })
119
+
120
+ // handle fallback for HTML5 history API
121
+ app.use(require('connect-history-api-fallback')())
122
+ // app.use(function (req, res, next) {
123
+ // res.header('Access-Control-Allow-Origin', '*')
124
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
125
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
126
+ // res.header('X-Powered-By', '3,2,1')
127
+ // res.header('Access-Control-Allow-Credentials', 'true')
128
+ // res.header('Content-Type', 'application/json;charset=utf-8')
129
+ // next()
130
+ // })
131
+
132
+ // serve webpack bundle output
133
+ app.use(devMiddleware)
134
+
135
+ // enable hot-reload and state-preserving
136
+ // compilation error display
137
+ app.use(hotMiddleware)
138
+
139
+ // serve pure static assets
140
+ app.use('/static', express.static('./static'))
141
+
142
+ // app.all('/rs/*', function (req, res) {
143
+ // proxy.web(req, res, {
144
+ // target: 'http://127.0.0.1:8081/reports'
145
+ // })
146
+ // })
147
+
148
+ // app.all('/rs/*', function (req, res) {
149
+ // proxy.web(req, res, {
150
+ // target: 'http://127.0.0.1:8081/ldap'
151
+ // })
152
+ // })
153
+ // app.all('/excel/*', function (req, res) {
154
+ // proxy.web(req, res, {
155
+ // target: 'http://127.0.0.1:8081/charge'
156
+ // })
157
+ // })
158
+
159
+ // app.all('/rs/*', function (req, res) {
160
+ // proxy.web(req, res, {
161
+ // target: 'http://127.0.0.1:82/charge'
162
+ // })
163
+ // })
164
+
165
+ // app.all('/*', function (req, res) {
166
+ // proxy.web(req, res, {
167
+ // target: 'http://127.0.0.1:82'
168
+ // })
169
+ // })
170
+ // app.all('/rs/user', function (req, res) {
171
+ // proxy.web(req, res, {
172
+ // target: 'http://127.0.0.1:82'
173
+ // })
174
+ // })
175
+
176
+ module.exports = app.listen(8085, function (err) {
177
+ if (err) {
178
+ console.log(err)
179
+ return
180
+ }
181
+ console.log('Listening at http://localhost:8085')
182
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.2.175",
3
+ "version": "3.2.176",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {