manage-client 1.8.23-34 → 1.8.23-35

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,155 +1,155 @@
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 str = 'http://112.35.127.105:8300/', str2 = 'http://127.0.0.1:8086/'
12
- var proxyTable = {
13
- /*'/rs/logic/exportfile': {
14
- target: str2
15
- },*/
16
- '/file': {
17
- target: str
18
- },
19
- // 查找资源服务数据
20
- '/rs/search': {
21
- target: str
22
- },
23
- // 用户登录服务地址
24
- '/rs/user': {
25
- target: str
26
- },
27
- '/rs/path/getParams': {
28
- target: str
29
- },
30
- '/rs/logic/getInitData': {
31
- target: str
32
- },
33
- '/rs/data': {
34
- target: str
35
- },
36
- '/rs/license': {
37
- target: str
38
- },
39
- '/rs/db': {
40
- target: str
41
- },
42
- '/excel': {
43
- target: str
44
- },
45
-
46
- '/rs/logic/getSaleInitData': {
47
- target: str
48
- },
49
- '/rs/logic/getLogin': {
50
- target: str
51
- },
52
- '/rs/config': {
53
- target: 'http://127.0.0.1:8080/manage'
54
- },
55
- '/rs/sql/getLicenseById': {
56
- target: str
57
- },
58
- /*'/rs/Invoice': {
59
- target: 'http://127.0.0.1:8090/Invoice/rs/aisino/invoice'
60
- },*/
61
- '/rs/report': {
62
- //target: 'http://127.0.0.1:8080/manage'
63
- target: 'http://127.0.0.1:8081'
64
- },
65
- '/rs/vue': {
66
- // target: 'http://127.0.0.1:8089/manage'
67
- target: str
68
- },
69
- '/rs': {
70
- //target: 'http://127.0.0.1:8080'
71
- // target: 'http://192.168.50.203:8082/manage'
72
- target: str2
73
- }
74
- }
75
-
76
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
77
- publicPath: config.output.publicPath,
78
- stats: {
79
- colors: true,
80
- chunks: false
81
- }
82
- })
83
-
84
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
85
- // force page reload when html-webpack-plugin template changes
86
- compiler.plugin('compilation', function (compilation) {
87
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
88
- hotMiddleware.publish({ action: 'reload' })
89
- cb()
90
- })
91
- })
92
-
93
- // proxy api requests
94
- Object.keys(proxyTable).forEach(function (context) {
95
- var options = proxyTable[context]
96
- if (typeof options === 'string') {
97
- options = { target: options }
98
- }
99
- app.use(proxyMiddleware(context, options))
100
- })
101
-
102
- // handle fallback for HTML5 history API
103
- app.use(require('connect-history-api-fallback')())
104
-
105
- // serve webpack bundle output
106
- app.use(devMiddleware)
107
-
108
- // enable hot-reload and state-preserving
109
- // compilation error display
110
- app.use(hotMiddleware)
111
-
112
- // serve pure static assets
113
- app.use('/static', express.static('./static'))
114
-
115
- // app.all('/rs/*', function (req, res) {
116
- // proxy.web(req, res, {
117
- // target: 'http://127.0.0.1:8081/reports'
118
- // })
119
- // })
120
-
121
- // app.all('/rs/*', function (req, res) {
122
- // proxy.web(req, res, {
123
- // target: 'http://127.0.0.1:8081/ldap'
124
- // })
125
- // })
126
- // app.all('/excel/*', function (req, res) {
127
- // proxy.web(req, res, {
128
- // target: 'http://127.0.0.1:8081/charge'
129
- // })
130
- // })
131
-
132
- // app.all('/rs/*', function (req, res) {
133
- // proxy.web(req, res, {
134
- // target: 'http://127.0.0.1:82/charge'
135
- // })
136
- // })
137
-
138
- // app.all('/*', function (req, res) {
139
- // proxy.web(req, res, {
140
- // target: 'http://127.0.0.1:82'
141
- // })
142
- // })
143
- // app.all('/rs/user', function (req, res) {
144
- // proxy.web(req, res, {
145
- // target: 'http://127.0.0.1:82'
146
- // })
147
- // })
148
-
149
- module.exports = app.listen(8085, function (err) {
150
- if (err) {
151
- console.log(err)
152
- return
153
- }
154
- console.log('Listening at http://localhost:8085')
155
- })
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 str = 'http://112.35.127.105:8300/', str2 = 'http://112.35.127.105:8300/'
12
+ var proxyTable = {
13
+ /*'/rs/logic/exportfile': {
14
+ target: str2
15
+ },*/
16
+ '/file': {
17
+ target: str
18
+ },
19
+ // 查找资源服务数据
20
+ '/rs/search': {
21
+ target: str
22
+ },
23
+ // 用户登录服务地址
24
+ '/rs/user': {
25
+ target: str
26
+ },
27
+ '/rs/path/getParams': {
28
+ target: str
29
+ },
30
+ '/rs/logic/getInitData': {
31
+ target: str
32
+ },
33
+ '/rs/data': {
34
+ target: str
35
+ },
36
+ '/rs/license': {
37
+ target: str
38
+ },
39
+ '/rs/db': {
40
+ target: str
41
+ },
42
+ '/excel': {
43
+ target: str
44
+ },
45
+
46
+ '/rs/logic/getSaleInitData': {
47
+ target: str
48
+ },
49
+ '/rs/logic/getLogin': {
50
+ target: str
51
+ },
52
+ '/rs/config': {
53
+ target: 'http://127.0.0.1:8080/manage'
54
+ },
55
+ '/rs/sql/getLicenseById': {
56
+ target: str
57
+ },
58
+ /*'/rs/Invoice': {
59
+ target: 'http://127.0.0.1:8090/Invoice/rs/aisino/invoice'
60
+ },*/
61
+ '/rs/report': {
62
+ //target: 'http://127.0.0.1:8080/manage'
63
+ target: 'http://127.0.0.1:8081'
64
+ },
65
+ '/rs/vue': {
66
+ // target: 'http://127.0.0.1:8089/manage'
67
+ target: str
68
+ },
69
+ '/rs': {
70
+ //target: 'http://127.0.0.1:8080'
71
+ // target: 'http://192.168.50.203:8082/manage'
72
+ target: str
73
+ }
74
+ }
75
+
76
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
77
+ publicPath: config.output.publicPath,
78
+ stats: {
79
+ colors: true,
80
+ chunks: false
81
+ }
82
+ })
83
+
84
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
85
+ // force page reload when html-webpack-plugin template changes
86
+ compiler.plugin('compilation', function (compilation) {
87
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
88
+ hotMiddleware.publish({ action: 'reload' })
89
+ cb()
90
+ })
91
+ })
92
+
93
+ // proxy api requests
94
+ Object.keys(proxyTable).forEach(function (context) {
95
+ var options = proxyTable[context]
96
+ if (typeof options === 'string') {
97
+ options = { target: options }
98
+ }
99
+ app.use(proxyMiddleware(context, options))
100
+ })
101
+
102
+ // handle fallback for HTML5 history API
103
+ app.use(require('connect-history-api-fallback')())
104
+
105
+ // serve webpack bundle output
106
+ app.use(devMiddleware)
107
+
108
+ // enable hot-reload and state-preserving
109
+ // compilation error display
110
+ app.use(hotMiddleware)
111
+
112
+ // serve pure static assets
113
+ app.use('/static', express.static('./static'))
114
+
115
+ // app.all('/rs/*', function (req, res) {
116
+ // proxy.web(req, res, {
117
+ // target: 'http://127.0.0.1:8081/reports'
118
+ // })
119
+ // })
120
+
121
+ // app.all('/rs/*', function (req, res) {
122
+ // proxy.web(req, res, {
123
+ // target: 'http://127.0.0.1:8081/ldap'
124
+ // })
125
+ // })
126
+ // app.all('/excel/*', function (req, res) {
127
+ // proxy.web(req, res, {
128
+ // target: 'http://127.0.0.1:8081/charge'
129
+ // })
130
+ // })
131
+
132
+ // app.all('/rs/*', function (req, res) {
133
+ // proxy.web(req, res, {
134
+ // target: 'http://127.0.0.1:82/charge'
135
+ // })
136
+ // })
137
+
138
+ // app.all('/*', function (req, res) {
139
+ // proxy.web(req, res, {
140
+ // target: 'http://127.0.0.1:82'
141
+ // })
142
+ // })
143
+ // app.all('/rs/user', function (req, res) {
144
+ // proxy.web(req, res, {
145
+ // target: 'http://127.0.0.1:82'
146
+ // })
147
+ // })
148
+
149
+ module.exports = app.listen(8085, function (err) {
150
+ if (err) {
151
+ console.log(err)
152
+ return
153
+ }
154
+ console.log('Listening at http://localhost:8085')
155
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "1.8.23-34",
3
+ "version": "1.8.23-35",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {