seimin 3 years ago
parent
commit
24fc191313
4 changed files with 742 additions and 9 deletions
  1. 0 2
      main.js
  2. 693 5
      package-lock.json
  3. 5 2
      package.json
  4. 44 0
      upload/production.js

+ 0 - 2
main.js

@@ -2,8 +2,6 @@ import Vue from 'vue'
2 2
 import App from './App'
3 3
 // #ifdef H5
4 4
 import wx from 'weixin-jsapi'
5
-import VConsole from 'vconsole'
6
-// new VConsole();
7 5
 
8 6
 Vue.prototype.wx = wx //声明扫码
9 7
 Vue.prototype.audios = [] //待播放的语音集合

+ 693 - 5
package-lock.json

@@ -1,18 +1,706 @@
1 1
 {
2 2
   "name": "HSMSV1-app",
3 3
   "version": "1.0.0",
4
-  "lockfileVersion": 1,
4
+  "lockfileVersion": 2,
5 5
   "requires": true,
6
+  "packages": {
7
+    "": {
8
+      "name": "HSMSV1-app",
9
+      "version": "1.0.0",
10
+      "license": "ISC",
11
+      "dependencies": {
12
+        "weixin-jsapi": "^1.1.0"
13
+      },
14
+      "devDependencies": {
15
+        "shelljs": "^0.8.5",
16
+        "ssh2-sftp-client": "^7.2.0"
17
+      }
18
+    },
19
+    "node_modules/asn1": {
20
+      "version": "0.2.6",
21
+      "resolved": "https://registry.npmmirror.com/asn1/download/asn1-0.2.6.tgz?cache=0&sync_timestamp=1635986760581&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fasn1%2Fdownload%2Fasn1-0.2.6.tgz",
22
+      "integrity": "sha1-DTp7tuZOAqkMAwOzHykoaOoJoI0=",
23
+      "dev": true,
24
+      "license": "MIT",
25
+      "dependencies": {
26
+        "safer-buffer": "~2.1.0"
27
+      }
28
+    },
29
+    "node_modules/balanced-match": {
30
+      "version": "1.0.2",
31
+      "resolved": "https://registry.npmmirror.com/balanced-match/download/balanced-match-1.0.2.tgz",
32
+      "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=",
33
+      "dev": true
34
+    },
35
+    "node_modules/bcrypt-pbkdf": {
36
+      "version": "1.0.2",
37
+      "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
38
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
39
+      "dev": true,
40
+      "dependencies": {
41
+        "tweetnacl": "^0.14.3"
42
+      }
43
+    },
44
+    "node_modules/brace-expansion": {
45
+      "version": "1.1.11",
46
+      "resolved": "https://registry.npmmirror.com/brace-expansion/download/brace-expansion-1.1.11.tgz",
47
+      "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
48
+      "dev": true,
49
+      "dependencies": {
50
+        "balanced-match": "^1.0.0",
51
+        "concat-map": "0.0.1"
52
+      }
53
+    },
54
+    "node_modules/buffer-from": {
55
+      "version": "1.1.2",
56
+      "resolved": "https://registry.npmmirror.com/buffer-from/download/buffer-from-1.1.2.tgz",
57
+      "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=",
58
+      "dev": true
59
+    },
60
+    "node_modules/concat-map": {
61
+      "version": "0.0.1",
62
+      "resolved": "https://registry.npmmirror.com/concat-map/download/concat-map-0.0.1.tgz",
63
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
64
+      "dev": true
65
+    },
66
+    "node_modules/concat-stream": {
67
+      "version": "2.0.0",
68
+      "resolved": "https://registry.npmmirror.com/concat-stream/download/concat-stream-2.0.0.tgz",
69
+      "integrity": "sha1-QUz1r3kKSMYKub5FJ9VtXkETPLE=",
70
+      "dev": true,
71
+      "engines": [
72
+        "node >= 6.0"
73
+      ],
74
+      "dependencies": {
75
+        "buffer-from": "^1.0.0",
76
+        "inherits": "^2.0.3",
77
+        "readable-stream": "^3.0.2",
78
+        "typedarray": "^0.0.6"
79
+      }
80
+    },
81
+    "node_modules/cpu-features": {
82
+      "version": "0.0.2",
83
+      "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
84
+      "integrity": "sha1-n2NhVvEVX9BL26oCi7PC++886no=",
85
+      "dev": true,
86
+      "hasInstallScript": true,
87
+      "optional": true,
88
+      "dependencies": {
89
+        "nan": "^2.14.1"
90
+      },
91
+      "engines": {
92
+        "node": ">=8.0.0"
93
+      }
94
+    },
95
+    "node_modules/err-code": {
96
+      "version": "2.0.3",
97
+      "resolved": "https://registry.npmmirror.com/err-code/download/err-code-2.0.3.tgz",
98
+      "integrity": "sha1-I8Lzt1b/38YI0w4nyalBAkgH5/k=",
99
+      "dev": true
100
+    },
101
+    "node_modules/fs.realpath": {
102
+      "version": "1.0.0",
103
+      "resolved": "https://registry.npmmirror.com/fs.realpath/download/fs.realpath-1.0.0.tgz",
104
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
105
+      "dev": true
106
+    },
107
+    "node_modules/function-bind": {
108
+      "version": "1.1.1",
109
+      "resolved": "https://registry.npmmirror.com/function-bind/download/function-bind-1.1.1.tgz",
110
+      "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=",
111
+      "dev": true
112
+    },
113
+    "node_modules/glob": {
114
+      "version": "7.2.0",
115
+      "resolved": "https://registry.npmmirror.com/glob/download/glob-7.2.0.tgz",
116
+      "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
117
+      "dev": true,
118
+      "dependencies": {
119
+        "fs.realpath": "^1.0.0",
120
+        "inflight": "^1.0.4",
121
+        "inherits": "2",
122
+        "minimatch": "^3.0.4",
123
+        "once": "^1.3.0",
124
+        "path-is-absolute": "^1.0.0"
125
+      },
126
+      "engines": {
127
+        "node": "*"
128
+      }
129
+    },
130
+    "node_modules/has": {
131
+      "version": "1.0.3",
132
+      "resolved": "https://registry.npmmirror.com/has/download/has-1.0.3.tgz",
133
+      "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
134
+      "dev": true,
135
+      "dependencies": {
136
+        "function-bind": "^1.1.1"
137
+      },
138
+      "engines": {
139
+        "node": ">= 0.4.0"
140
+      }
141
+    },
142
+    "node_modules/inflight": {
143
+      "version": "1.0.6",
144
+      "resolved": "https://registry.npmmirror.com/inflight/download/inflight-1.0.6.tgz",
145
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
146
+      "dev": true,
147
+      "dependencies": {
148
+        "once": "^1.3.0",
149
+        "wrappy": "1"
150
+      }
151
+    },
152
+    "node_modules/inherits": {
153
+      "version": "2.0.4",
154
+      "resolved": "https://registry.npmmirror.com/inherits/download/inherits-2.0.4.tgz",
155
+      "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=",
156
+      "dev": true
157
+    },
158
+    "node_modules/interpret": {
159
+      "version": "1.4.0",
160
+      "resolved": "https://registry.npmmirror.com/interpret/download/interpret-1.4.0.tgz",
161
+      "integrity": "sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=",
162
+      "dev": true,
163
+      "engines": {
164
+        "node": ">= 0.10"
165
+      }
166
+    },
167
+    "node_modules/is-core-module": {
168
+      "version": "2.8.1",
169
+      "resolved": "https://registry.npmmirror.com/is-core-module/download/is-core-module-2.8.1.tgz",
170
+      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
171
+      "dev": true,
172
+      "dependencies": {
173
+        "has": "^1.0.3"
174
+      }
175
+    },
176
+    "node_modules/minimatch": {
177
+      "version": "3.0.4",
178
+      "resolved": "https://registry.npmmirror.com/minimatch/download/minimatch-3.0.4.tgz",
179
+      "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
180
+      "dev": true,
181
+      "dependencies": {
182
+        "brace-expansion": "^1.1.7"
183
+      },
184
+      "engines": {
185
+        "node": "*"
186
+      }
187
+    },
188
+    "node_modules/nan": {
189
+      "version": "2.15.0",
190
+      "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
191
+      "integrity": "sha1-PzSkc/8Y4VwbVia2KQO1rW5mX+4=",
192
+      "dev": true,
193
+      "optional": true
194
+    },
195
+    "node_modules/once": {
196
+      "version": "1.4.0",
197
+      "resolved": "https://registry.npmmirror.com/once/download/once-1.4.0.tgz",
198
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
199
+      "dev": true,
200
+      "dependencies": {
201
+        "wrappy": "1"
202
+      }
203
+    },
204
+    "node_modules/path-is-absolute": {
205
+      "version": "1.0.1",
206
+      "resolved": "https://registry.npmmirror.com/path-is-absolute/download/path-is-absolute-1.0.1.tgz",
207
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
208
+      "dev": true,
209
+      "engines": {
210
+        "node": ">=0.10.0"
211
+      }
212
+    },
213
+    "node_modules/path-parse": {
214
+      "version": "1.0.7",
215
+      "resolved": "https://registry.npmmirror.com/path-parse/download/path-parse-1.0.7.tgz?cache=0&sync_timestamp=1632469101267&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpath-parse%2Fdownload%2Fpath-parse-1.0.7.tgz",
216
+      "integrity": "sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=",
217
+      "dev": true
218
+    },
219
+    "node_modules/promise-retry": {
220
+      "version": "2.0.1",
221
+      "resolved": "https://registry.npmmirror.com/promise-retry/download/promise-retry-2.0.1.tgz",
222
+      "integrity": "sha1-/3R6E2IKtXumiPX8Z4VUEMNw2iI=",
223
+      "dev": true,
224
+      "dependencies": {
225
+        "err-code": "^2.0.2",
226
+        "retry": "^0.12.0"
227
+      },
228
+      "engines": {
229
+        "node": ">=10"
230
+      }
231
+    },
232
+    "node_modules/readable-stream": {
233
+      "version": "3.6.0",
234
+      "resolved": "https://registry.npmmirror.com/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1632380409088&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz",
235
+      "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=",
236
+      "dev": true,
237
+      "dependencies": {
238
+        "inherits": "^2.0.3",
239
+        "string_decoder": "^1.1.1",
240
+        "util-deprecate": "^1.0.1"
241
+      },
242
+      "engines": {
243
+        "node": ">= 6"
244
+      }
245
+    },
246
+    "node_modules/rechoir": {
247
+      "version": "0.6.2",
248
+      "resolved": "https://registry.npmmirror.com/rechoir/download/rechoir-0.6.2.tgz",
249
+      "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
250
+      "dev": true,
251
+      "dependencies": {
252
+        "resolve": "^1.1.6"
253
+      },
254
+      "engines": {
255
+        "node": ">= 0.10"
256
+      }
257
+    },
258
+    "node_modules/resolve": {
259
+      "version": "1.21.0",
260
+      "resolved": "https://registry.npmmirror.com/resolve/download/resolve-1.21.0.tgz",
261
+      "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
262
+      "dev": true,
263
+      "dependencies": {
264
+        "is-core-module": "^2.8.0",
265
+        "path-parse": "^1.0.7",
266
+        "supports-preserve-symlinks-flag": "^1.0.0"
267
+      },
268
+      "bin": {
269
+        "resolve": "bin/resolve"
270
+      }
271
+    },
272
+    "node_modules/retry": {
273
+      "version": "0.12.0",
274
+      "resolved": "https://registry.npmmirror.com/retry/download/retry-0.12.0.tgz",
275
+      "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=",
276
+      "dev": true,
277
+      "engines": {
278
+        "node": ">= 4"
279
+      }
280
+    },
281
+    "node_modules/safe-buffer": {
282
+      "version": "5.2.1",
283
+      "resolved": "https://registry.npmmirror.com/safe-buffer/download/safe-buffer-5.2.1.tgz",
284
+      "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=",
285
+      "dev": true
286
+    },
287
+    "node_modules/safer-buffer": {
288
+      "version": "2.1.2",
289
+      "resolved": "https://registry.npmmirror.com/safer-buffer/download/safer-buffer-2.1.2.tgz",
290
+      "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=",
291
+      "dev": true
292
+    },
293
+    "node_modules/shelljs": {
294
+      "version": "0.8.5",
295
+      "resolved": "https://registry.npmmirror.com/shelljs/download/shelljs-0.8.5.tgz",
296
+      "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
297
+      "dev": true,
298
+      "dependencies": {
299
+        "glob": "^7.0.0",
300
+        "interpret": "^1.0.0",
301
+        "rechoir": "^0.6.2"
302
+      },
303
+      "bin": {
304
+        "shjs": "bin/shjs"
305
+      },
306
+      "engines": {
307
+        "node": ">=4"
308
+      }
309
+    },
310
+    "node_modules/ssh2": {
311
+      "version": "1.5.0",
312
+      "resolved": "https://registry.npmmirror.com/ssh2/download/ssh2-1.5.0.tgz",
313
+      "integrity": "sha1-TcVZupihy7Qg6NQpmN/jXQ7akrw=",
314
+      "dev": true,
315
+      "hasInstallScript": true,
316
+      "dependencies": {
317
+        "asn1": "^0.2.4",
318
+        "bcrypt-pbkdf": "^1.0.2"
319
+      },
320
+      "engines": {
321
+        "node": ">=10.16.0"
322
+      },
323
+      "optionalDependencies": {
324
+        "cpu-features": "0.0.2",
325
+        "nan": "^2.15.0"
326
+      }
327
+    },
328
+    "node_modules/ssh2-sftp-client": {
329
+      "version": "7.2.0",
330
+      "resolved": "https://registry.npmmirror.com/ssh2-sftp-client/download/ssh2-sftp-client-7.2.0.tgz",
331
+      "integrity": "sha512-h850dHBeLuKfL9uTQ7y11p8QA687Sr057+Q1paB7dMuO4GDtNwxj/CPwJmvIM5BCzEuNrWf9CnMnIdC23TxzcA==",
332
+      "dev": true,
333
+      "dependencies": {
334
+        "concat-stream": "^2.0.0",
335
+        "promise-retry": "^2.0.1",
336
+        "ssh2": "^1.5.0"
337
+      },
338
+      "engines": {
339
+        "node": ">=10.24.1"
340
+      }
341
+    },
342
+    "node_modules/string_decoder": {
343
+      "version": "1.3.0",
344
+      "resolved": "https://registry.npmmirror.com/string_decoder/download/string_decoder-1.3.0.tgz",
345
+      "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=",
346
+      "dev": true,
347
+      "dependencies": {
348
+        "safe-buffer": "~5.2.0"
349
+      }
350
+    },
351
+    "node_modules/supports-preserve-symlinks-flag": {
352
+      "version": "1.0.0",
353
+      "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/download/supports-preserve-symlinks-flag-1.0.0.tgz",
354
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
355
+      "dev": true,
356
+      "engines": {
357
+        "node": ">= 0.4"
358
+      }
359
+    },
360
+    "node_modules/tweetnacl": {
361
+      "version": "0.14.5",
362
+      "resolved": "https://registry.npmmirror.com/tweetnacl/download/tweetnacl-0.14.5.tgz",
363
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
364
+      "dev": true
365
+    },
366
+    "node_modules/typedarray": {
367
+      "version": "0.0.6",
368
+      "resolved": "https://registry.npmmirror.com/typedarray/download/typedarray-0.0.6.tgz?cache=0&sync_timestamp=1632754353122&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypedarray%2Fdownload%2Ftypedarray-0.0.6.tgz",
369
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
370
+      "dev": true
371
+    },
372
+    "node_modules/util-deprecate": {
373
+      "version": "1.0.2",
374
+      "resolved": "https://registry.npmmirror.com/util-deprecate/download/util-deprecate-1.0.2.tgz",
375
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
376
+      "dev": true
377
+    },
378
+    "node_modules/weixin-jsapi": {
379
+      "version": "1.1.0",
380
+      "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",
381
+      "integrity": "sha1-UalaIiTFnR2PAv3bxt5S2hazRLM="
382
+    },
383
+    "node_modules/wrappy": {
384
+      "version": "1.0.2",
385
+      "resolved": "https://registry.npmmirror.com/wrappy/download/wrappy-1.0.2.tgz",
386
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
387
+      "dev": true
388
+    }
389
+  },
6 390
   "dependencies": {
7
-    "vconsole": {
8
-      "version": "3.3.4",
9
-      "resolved": "https://registry.npm.taobao.org/vconsole/download/vconsole-3.3.4.tgz",
10
-      "integrity": "sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E="
391
+    "asn1": {
392
+      "version": "0.2.6",
393
+      "resolved": "https://registry.npmmirror.com/asn1/download/asn1-0.2.6.tgz?cache=0&sync_timestamp=1635986760581&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fasn1%2Fdownload%2Fasn1-0.2.6.tgz",
394
+      "integrity": "sha1-DTp7tuZOAqkMAwOzHykoaOoJoI0=",
395
+      "dev": true,
396
+      "requires": {
397
+        "safer-buffer": "~2.1.0"
398
+      }
399
+    },
400
+    "balanced-match": {
401
+      "version": "1.0.2",
402
+      "resolved": "https://registry.npmmirror.com/balanced-match/download/balanced-match-1.0.2.tgz",
403
+      "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=",
404
+      "dev": true
405
+    },
406
+    "bcrypt-pbkdf": {
407
+      "version": "1.0.2",
408
+      "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
409
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
410
+      "dev": true,
411
+      "requires": {
412
+        "tweetnacl": "^0.14.3"
413
+      }
414
+    },
415
+    "brace-expansion": {
416
+      "version": "1.1.11",
417
+      "resolved": "https://registry.npmmirror.com/brace-expansion/download/brace-expansion-1.1.11.tgz",
418
+      "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
419
+      "dev": true,
420
+      "requires": {
421
+        "balanced-match": "^1.0.0",
422
+        "concat-map": "0.0.1"
423
+      }
424
+    },
425
+    "buffer-from": {
426
+      "version": "1.1.2",
427
+      "resolved": "https://registry.npmmirror.com/buffer-from/download/buffer-from-1.1.2.tgz",
428
+      "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=",
429
+      "dev": true
430
+    },
431
+    "concat-map": {
432
+      "version": "0.0.1",
433
+      "resolved": "https://registry.npmmirror.com/concat-map/download/concat-map-0.0.1.tgz",
434
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
435
+      "dev": true
436
+    },
437
+    "concat-stream": {
438
+      "version": "2.0.0",
439
+      "resolved": "https://registry.npmmirror.com/concat-stream/download/concat-stream-2.0.0.tgz",
440
+      "integrity": "sha1-QUz1r3kKSMYKub5FJ9VtXkETPLE=",
441
+      "dev": true,
442
+      "requires": {
443
+        "buffer-from": "^1.0.0",
444
+        "inherits": "^2.0.3",
445
+        "readable-stream": "^3.0.2",
446
+        "typedarray": "^0.0.6"
447
+      }
448
+    },
449
+    "cpu-features": {
450
+      "version": "0.0.2",
451
+      "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
452
+      "integrity": "sha1-n2NhVvEVX9BL26oCi7PC++886no=",
453
+      "dev": true,
454
+      "optional": true,
455
+      "requires": {
456
+        "nan": "^2.14.1"
457
+      }
458
+    },
459
+    "err-code": {
460
+      "version": "2.0.3",
461
+      "resolved": "https://registry.npmmirror.com/err-code/download/err-code-2.0.3.tgz",
462
+      "integrity": "sha1-I8Lzt1b/38YI0w4nyalBAkgH5/k=",
463
+      "dev": true
464
+    },
465
+    "fs.realpath": {
466
+      "version": "1.0.0",
467
+      "resolved": "https://registry.npmmirror.com/fs.realpath/download/fs.realpath-1.0.0.tgz",
468
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
469
+      "dev": true
470
+    },
471
+    "function-bind": {
472
+      "version": "1.1.1",
473
+      "resolved": "https://registry.npmmirror.com/function-bind/download/function-bind-1.1.1.tgz",
474
+      "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=",
475
+      "dev": true
476
+    },
477
+    "glob": {
478
+      "version": "7.2.0",
479
+      "resolved": "https://registry.npmmirror.com/glob/download/glob-7.2.0.tgz",
480
+      "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
481
+      "dev": true,
482
+      "requires": {
483
+        "fs.realpath": "^1.0.0",
484
+        "inflight": "^1.0.4",
485
+        "inherits": "2",
486
+        "minimatch": "^3.0.4",
487
+        "once": "^1.3.0",
488
+        "path-is-absolute": "^1.0.0"
489
+      }
490
+    },
491
+    "has": {
492
+      "version": "1.0.3",
493
+      "resolved": "https://registry.npmmirror.com/has/download/has-1.0.3.tgz",
494
+      "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
495
+      "dev": true,
496
+      "requires": {
497
+        "function-bind": "^1.1.1"
498
+      }
499
+    },
500
+    "inflight": {
501
+      "version": "1.0.6",
502
+      "resolved": "https://registry.npmmirror.com/inflight/download/inflight-1.0.6.tgz",
503
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
504
+      "dev": true,
505
+      "requires": {
506
+        "once": "^1.3.0",
507
+        "wrappy": "1"
508
+      }
509
+    },
510
+    "inherits": {
511
+      "version": "2.0.4",
512
+      "resolved": "https://registry.npmmirror.com/inherits/download/inherits-2.0.4.tgz",
513
+      "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=",
514
+      "dev": true
515
+    },
516
+    "interpret": {
517
+      "version": "1.4.0",
518
+      "resolved": "https://registry.npmmirror.com/interpret/download/interpret-1.4.0.tgz",
519
+      "integrity": "sha1-Zlq4vE2iendKQFhOgS4+D6RbGh4=",
520
+      "dev": true
521
+    },
522
+    "is-core-module": {
523
+      "version": "2.8.1",
524
+      "resolved": "https://registry.npmmirror.com/is-core-module/download/is-core-module-2.8.1.tgz",
525
+      "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
526
+      "dev": true,
527
+      "requires": {
528
+        "has": "^1.0.3"
529
+      }
530
+    },
531
+    "minimatch": {
532
+      "version": "3.0.4",
533
+      "resolved": "https://registry.npmmirror.com/minimatch/download/minimatch-3.0.4.tgz",
534
+      "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
535
+      "dev": true,
536
+      "requires": {
537
+        "brace-expansion": "^1.1.7"
538
+      }
539
+    },
540
+    "nan": {
541
+      "version": "2.15.0",
542
+      "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
543
+      "integrity": "sha1-PzSkc/8Y4VwbVia2KQO1rW5mX+4=",
544
+      "dev": true,
545
+      "optional": true
546
+    },
547
+    "once": {
548
+      "version": "1.4.0",
549
+      "resolved": "https://registry.npmmirror.com/once/download/once-1.4.0.tgz",
550
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
551
+      "dev": true,
552
+      "requires": {
553
+        "wrappy": "1"
554
+      }
555
+    },
556
+    "path-is-absolute": {
557
+      "version": "1.0.1",
558
+      "resolved": "https://registry.npmmirror.com/path-is-absolute/download/path-is-absolute-1.0.1.tgz",
559
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
560
+      "dev": true
561
+    },
562
+    "path-parse": {
563
+      "version": "1.0.7",
564
+      "resolved": "https://registry.npmmirror.com/path-parse/download/path-parse-1.0.7.tgz?cache=0&sync_timestamp=1632469101267&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpath-parse%2Fdownload%2Fpath-parse-1.0.7.tgz",
565
+      "integrity": "sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=",
566
+      "dev": true
567
+    },
568
+    "promise-retry": {
569
+      "version": "2.0.1",
570
+      "resolved": "https://registry.npmmirror.com/promise-retry/download/promise-retry-2.0.1.tgz",
571
+      "integrity": "sha1-/3R6E2IKtXumiPX8Z4VUEMNw2iI=",
572
+      "dev": true,
573
+      "requires": {
574
+        "err-code": "^2.0.2",
575
+        "retry": "^0.12.0"
576
+      }
577
+    },
578
+    "readable-stream": {
579
+      "version": "3.6.0",
580
+      "resolved": "https://registry.npmmirror.com/readable-stream/download/readable-stream-3.6.0.tgz?cache=0&sync_timestamp=1632380409088&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Freadable-stream%2Fdownload%2Freadable-stream-3.6.0.tgz",
581
+      "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=",
582
+      "dev": true,
583
+      "requires": {
584
+        "inherits": "^2.0.3",
585
+        "string_decoder": "^1.1.1",
586
+        "util-deprecate": "^1.0.1"
587
+      }
588
+    },
589
+    "rechoir": {
590
+      "version": "0.6.2",
591
+      "resolved": "https://registry.npmmirror.com/rechoir/download/rechoir-0.6.2.tgz",
592
+      "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
593
+      "dev": true,
594
+      "requires": {
595
+        "resolve": "^1.1.6"
596
+      }
597
+    },
598
+    "resolve": {
599
+      "version": "1.21.0",
600
+      "resolved": "https://registry.npmmirror.com/resolve/download/resolve-1.21.0.tgz",
601
+      "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==",
602
+      "dev": true,
603
+      "requires": {
604
+        "is-core-module": "^2.8.0",
605
+        "path-parse": "^1.0.7",
606
+        "supports-preserve-symlinks-flag": "^1.0.0"
607
+      }
608
+    },
609
+    "retry": {
610
+      "version": "0.12.0",
611
+      "resolved": "https://registry.npmmirror.com/retry/download/retry-0.12.0.tgz",
612
+      "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=",
613
+      "dev": true
614
+    },
615
+    "safe-buffer": {
616
+      "version": "5.2.1",
617
+      "resolved": "https://registry.npmmirror.com/safe-buffer/download/safe-buffer-5.2.1.tgz",
618
+      "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=",
619
+      "dev": true
620
+    },
621
+    "safer-buffer": {
622
+      "version": "2.1.2",
623
+      "resolved": "https://registry.npmmirror.com/safer-buffer/download/safer-buffer-2.1.2.tgz",
624
+      "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=",
625
+      "dev": true
626
+    },
627
+    "shelljs": {
628
+      "version": "0.8.5",
629
+      "resolved": "https://registry.npmmirror.com/shelljs/download/shelljs-0.8.5.tgz",
630
+      "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
631
+      "dev": true,
632
+      "requires": {
633
+        "glob": "^7.0.0",
634
+        "interpret": "^1.0.0",
635
+        "rechoir": "^0.6.2"
636
+      }
637
+    },
638
+    "ssh2": {
639
+      "version": "1.5.0",
640
+      "resolved": "https://registry.npmmirror.com/ssh2/download/ssh2-1.5.0.tgz",
641
+      "integrity": "sha1-TcVZupihy7Qg6NQpmN/jXQ7akrw=",
642
+      "dev": true,
643
+      "requires": {
644
+        "asn1": "^0.2.4",
645
+        "bcrypt-pbkdf": "^1.0.2",
646
+        "cpu-features": "0.0.2",
647
+        "nan": "^2.15.0"
648
+      }
649
+    },
650
+    "ssh2-sftp-client": {
651
+      "version": "7.2.0",
652
+      "resolved": "https://registry.npmmirror.com/ssh2-sftp-client/download/ssh2-sftp-client-7.2.0.tgz",
653
+      "integrity": "sha512-h850dHBeLuKfL9uTQ7y11p8QA687Sr057+Q1paB7dMuO4GDtNwxj/CPwJmvIM5BCzEuNrWf9CnMnIdC23TxzcA==",
654
+      "dev": true,
655
+      "requires": {
656
+        "concat-stream": "^2.0.0",
657
+        "promise-retry": "^2.0.1",
658
+        "ssh2": "^1.5.0"
659
+      }
660
+    },
661
+    "string_decoder": {
662
+      "version": "1.3.0",
663
+      "resolved": "https://registry.npmmirror.com/string_decoder/download/string_decoder-1.3.0.tgz",
664
+      "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=",
665
+      "dev": true,
666
+      "requires": {
667
+        "safe-buffer": "~5.2.0"
668
+      }
669
+    },
670
+    "supports-preserve-symlinks-flag": {
671
+      "version": "1.0.0",
672
+      "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/download/supports-preserve-symlinks-flag-1.0.0.tgz",
673
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
674
+      "dev": true
675
+    },
676
+    "tweetnacl": {
677
+      "version": "0.14.5",
678
+      "resolved": "https://registry.npmmirror.com/tweetnacl/download/tweetnacl-0.14.5.tgz",
679
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
680
+      "dev": true
681
+    },
682
+    "typedarray": {
683
+      "version": "0.0.6",
684
+      "resolved": "https://registry.npmmirror.com/typedarray/download/typedarray-0.0.6.tgz?cache=0&sync_timestamp=1632754353122&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypedarray%2Fdownload%2Ftypedarray-0.0.6.tgz",
685
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
686
+      "dev": true
687
+    },
688
+    "util-deprecate": {
689
+      "version": "1.0.2",
690
+      "resolved": "https://registry.npmmirror.com/util-deprecate/download/util-deprecate-1.0.2.tgz",
691
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
692
+      "dev": true
11 693
     },
12 694
     "weixin-jsapi": {
13 695
       "version": "1.1.0",
14 696
       "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",
15 697
       "integrity": "sha1-UalaIiTFnR2PAv3bxt5S2hazRLM="
698
+    },
699
+    "wrappy": {
700
+      "version": "1.0.2",
701
+      "resolved": "https://registry.npmmirror.com/wrappy/download/wrappy-1.0.2.tgz",
702
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
703
+      "dev": true
16 704
     }
17 705
   }
18 706
 }

+ 5 - 2
package.json

@@ -4,7 +4,7 @@
4 4
   "description": "",
5 5
   "main": "main.js",
6 6
   "scripts": {
7
-    "test": "echo \"Error: no test specified\" && exit 1"
7
+    "production": "node ./upload/production.js"
8 8
   },
9 9
   "repository": {
10 10
     "type": "git",
@@ -14,7 +14,10 @@
14 14
   "author": "",
15 15
   "license": "ISC",
16 16
   "dependencies": {
17
-    "vconsole": "^3.3.4",
18 17
     "weixin-jsapi": "^1.1.0"
18
+  },
19
+  "devDependencies": {
20
+    "shelljs": "^0.8.5",
21
+    "ssh2-sftp-client": "^7.2.0"
19 22
   }
20 23
 }

+ 44 - 0
upload/production.js

@@ -0,0 +1,44 @@
1
+const shell = require('shelljs')
2
+const path = require('path');
3
+const config = {
4
+  ip: "118.190.89.49", // ssh地址
5
+  username: "root", // ssh 用户名
6
+  port: 22,      //端口
7
+  password: "dstech@123", // ssh 密码
8
+  path: '/home/itsm_v2_/web/app', // 上传地址,删除地址
9
+  buildPath: '../unpackage/dist/build/h5' // 本地打包后文件地址
10
+}
11
+let Client = require('ssh2-sftp-client');
12
+
13
+function connectSSh() {
14
+  let sftp = new Client();
15
+  sftp.connect({
16
+    host: config.ip,
17
+    port: config.port,
18
+    username: config.username,
19
+    password: config.password
20
+  }).then(() => {
21
+    console.log("-----先执行删除服务器文件-----")
22
+    return sftp.rmdir(config.path, true);
23
+  }).then(() => {
24
+    // 上传文件
25
+    console.log("-----开始上传-----")
26
+    return sftp.uploadDir(path.resolve(__dirname, config.buildPath), config.path);
27
+  }).then((data) => {
28
+    console.log("-----上传完成-----");
29
+    sftp.end();
30
+  }).catch((err) => {
31
+    console.log(err, '-----失败-----');
32
+    sftp.end();
33
+  });
34
+}
35
+function runTask() {
36
+  //打包完成
37
+  // if (shell.exec(`npm run build`).code == 0) {
38
+  //   console.log("-----打包成功-----");
39
+  //   //提交上传
40
+  //   connectSSh();
41
+  // }
42
+  connectSSh();
43
+}
44
+runTask()