address-client 1.4.3-1 → 1.4.3-10-chengran

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,141 +1,122 @@
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 proxyTable = {
14
- '/images': {
15
- // target: 'http://localhost:8086'
16
- target: 'http://192.168.50.222:7000/ldap'
17
- },
18
- // 查找资源服务数据
19
- '/rs/search': {
20
- // target: 'http://192.168.50.202:8099'
21
- // target: 'http://192.168.20.2:8081'
22
- target: 'http://192.168.50.222:7000/ldap'
23
- // target: 'http://192.168.20.191:8011'
24
- },
25
- // 用户登录服务地址
26
- '/rs/user': {
27
- // target: 'http://192.168.50.202:8099'
28
- // target: 'http://192.168.2.77:8081'
29
- target: 'http://192.168.50.222:7000/ldap'
30
- // target: 'http://192.168.20.191:8011'
31
- },
32
- '/rs/path/getParams': {
33
- // target: 'http://192.168.50.202:8099'
34
- //target: 'http://127.0.0.1:8888/product'
35
- target: 'http://192.168.50.222:8200/system'
36
- // target: 'http://192.168.20.191:8011'
37
- },
38
- '/rs/logic/getInitData': {
39
- // target: 'http://192.168.50.202:8099'
40
- //target: 'http://127.0.0.1:8888/product'
41
- target: 'http://192.168.50.222:8200/system'
42
- // target: 'http://192.168.20.191:8011'
43
- },
44
- '/rs/db': {
45
- target: 'http://192.168.50.222:7000/ldap'
46
- // target: 'http://127.0.0.1:8012'
47
- // target: 'http://192.168.20.191:s8011'
48
- },
49
- '/excel': {
50
- // target: 'http://127.0.0.1:9090/product'
51
- target: 'http://192.168.50.222:8300'
52
- },
53
- '/rs/file': {
54
- target: 'http://192.168.50.222:8300'
55
- },
56
- '/rs': {
57
- // target: 'http://127.0.0.1:8090/address'
58
- target: 'http://192.168.50.222:8300'
59
- }
60
- }
61
-
62
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
63
- publicPath: config.output.publicPath,
64
- stats: {
65
- colors: true,
66
- chunks: false
67
- }
68
- })
69
-
70
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
71
- // force page reload when html-webpack-plugin template changes
72
- compiler.plugin('compilation', function (compilation) {
73
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
74
- hotMiddleware.publish({ action: 'reload' })
75
- cb()
76
- })
77
- })
78
-
79
- // proxy api requests
80
- Object.keys(proxyTable).forEach(function (context) {
81
- var options = proxyTable[context]
82
- if (typeof options === 'string') {
83
- options = { target: options }
84
- }
85
- app.use(proxyMiddleware(context, options))
86
- })
87
-
88
- // handle fallback for HTML5 history API
89
- app.use(require('connect-history-api-fallback')())
90
-
91
- // serve webpack bundle output
92
- app.use(devMiddleware)
93
-
94
- // enable hot-reload and state-preserving
95
- // compilation error display
96
- app.use(hotMiddleware)
97
-
98
- // serve pure static assets
99
- app.use('/static', express.static('./static'))
100
-
101
- // app.all('/rs/*', function (req, res) {
102
- // proxy.web(req, res, {
103
- // target: 'http://127.0.0.1:8081/reports'
104
- // })
105
- // })
106
-
107
- // app.all('/rs/*', function (req, res) {
108
- // proxy.web(req, res, {
109
- // target: 'http://127.0.0.1:8081/ldap'
110
- // })
111
- // })
112
- // app.all('/excel/*', function (req, res) {
113
- // proxy.web(req, res, {
114
- // target: 'http://127.0.0.1:8081/charge'
115
- // })
116
- // })
117
-
118
- // app.all('/rs/*', function (req, res) {
119
- // proxy.web(req, res, {
120
- // target: 'http://127.0.0.1:82/charge'
121
- // })
122
- // })
123
-
124
- // app.all('/*', function (req, res) {
125
- // proxy.web(req, res, {
126
- // target: 'http://127.0.0.1:82'
127
- // })
128
- // })
129
- // app.all('/rs/user', function (req, res) {
130
- // proxy.web(req, res, {
131
- // target: 'http://127.0.0.1:82'
132
- // })
133
- // })
134
-
135
- module.exports = app.listen(8084, function (err) {
136
- if (err) {
137
- console.log(err)
138
- return
139
- }
140
- console.log('Listening at http://localhost:8084')
141
- })
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 str = 'http://117.34.91.57:8300/', str2= 'http://117.34.91.57:8300/'
14
+ var proxyTable = {
15
+
16
+ '/rs/logic/getLogin': {
17
+ target: str2
18
+ },
19
+ '/rs/user': {
20
+ target: str2
21
+ },
22
+ '/rs/db': {
23
+ target: str
24
+ },
25
+ '/rs/search': {
26
+ target: str2
27
+ },
28
+ '/rs/data': {
29
+ target: str2
30
+ },
31
+ '/rs/logic/getInitData': {
32
+ target: str2
33
+ },
34
+ '/rs/logic/getSaleInitData': {
35
+ target: str2
36
+ },
37
+ '/rs': {
38
+ // target: 'http://192.168.50.199:8300'
39
+ target: str
40
+ }
41
+ }
42
+
43
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
44
+ publicPath: config.output.publicPath,
45
+ stats: {
46
+ colors: true,
47
+ chunks: false
48
+ }
49
+ })
50
+
51
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
52
+ // force page reload when html-webpack-plugin template changes
53
+ compiler.plugin('compilation', function (compilation) {
54
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
55
+ hotMiddleware.publish({ action: 'reload' })
56
+ cb()
57
+ })
58
+ })
59
+
60
+ // proxy api requests
61
+ Object.keys(proxyTable).forEach(function (context) {
62
+ var options = proxyTable[context]
63
+ if (typeof options === 'string') {
64
+ options = { target: options }
65
+ }
66
+ app.use(proxyMiddleware(context, options))
67
+ })
68
+
69
+ // handle fallback for HTML5 history API
70
+ app.use(require('connect-history-api-fallback')())
71
+
72
+ // serve webpack bundle output
73
+ app.use(devMiddleware)
74
+
75
+ // enable hot-reload and state-preserving
76
+ // compilation error display
77
+ app.use(hotMiddleware)
78
+
79
+ // serve pure static assets
80
+ app.use('/static', express.static('./static'))
81
+
82
+ // app.all('/rs/*', function (req, res) {
83
+ // proxy.web(req, res, {
84
+ // target: 'http://127.0.0.1:8081/reports'
85
+ // })
86
+ // })
87
+
88
+ // app.all('/rs/*', function (req, res) {
89
+ // proxy.web(req, res, {
90
+ // target: 'http://127.0.0.1:8081/ldap'
91
+ // })
92
+ // })
93
+ // app.all('/excel/*', function (req, res) {
94
+ // proxy.web(req, res, {
95
+ // target: 'http://127.0.0.1:8081/charge'
96
+ // })
97
+ // })
98
+
99
+ // app.all('/rs/*', function (req, res) {
100
+ // proxy.web(req, res, {
101
+ // target: 'http://127.0.0.1:82/charge'
102
+ // })
103
+ // })
104
+
105
+ // app.all('/*', function (req, res) {
106
+ // proxy.web(req, res, {
107
+ // target: 'http://127.0.0.1:82'
108
+ // })
109
+ // })
110
+ // app.all('/rs/user', function (req, res) {
111
+ // proxy.web(req, res, {
112
+ // target: 'http://127.0.0.1:82'
113
+ // })
114
+ // })
115
+
116
+ module.exports = app.listen(8087, function (err) {
117
+ if (err) {
118
+ console.log(err)
119
+ return
120
+ }
121
+ console.log('Listening at http://localhost:8087')
122
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-client",
3
- "version": "1.4.3-1",
3
+ "version": "1.4.3-10-chengran",
4
4
  "description": "地址管理前台组件",
5
5
  "author": "wanbochao",
6
6
  "license": "ISC",
@@ -80,7 +80,7 @@
80
80
  "style-loader": "^0.20.3",
81
81
  "system-clients": "^1.6.1",
82
82
  "url-loader": "^0.5.7",
83
- "vue-client": "^1.17.11",
83
+ "vue-client": "1.20.76",
84
84
  "vue-hot-reload-api": "^1.2.0",
85
85
  "vue-html-loader": "^1.0.0",
86
86
  "vue-loader": "^8.2.1",