gc_mobile 1.0.4 → 1.0.5

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.
@@ -3,8 +3,13 @@ import mobile from "../../libs/main";
3
3
  export default {
4
4
  onLaunch: async function () {
5
5
  const res = await mobile({
6
- appCode: "DZ-TEST",
7
- apiPrefix: "dev"
6
+ appCode: "GC-MOBILE",
7
+ apiPrefix: "prod",
8
+ gc_rsa:{
9
+ appkey:"36994808",
10
+ appsecret:"C075B40D14FE11EBB839BD250AF9C3C0"
11
+ }
12
+
8
13
  });
9
14
  console.log("res", res.userInfo);
10
15
  this.$store.commit("setUserInfo", res.userInfo);
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "axios": "^1.7.2",
13
13
  "dingtalk-jsapi": "^3.0.35",
14
+ "gc_rsa": "^1.3.9",
14
15
  "lodash-es": "^4.17.21",
15
16
  "promise-polyfill": "^8.3.0",
16
17
  "vconsole": "^3.15.1"
@@ -2,14 +2,18 @@ lockfileVersion: 5.4
2
2
 
3
3
  specifiers:
4
4
  axios: ^1.7.2
5
+ crypto-js: ^4.2.0
5
6
  dingtalk-jsapi: ^3.0.35
7
+ gc_rsa: ^1.3.9
6
8
  lodash-es: ^4.17.21
7
9
  promise-polyfill: ^8.3.0
8
10
  vconsole: ^3.15.1
9
11
 
10
12
  dependencies:
11
13
  axios: 1.7.2
14
+ crypto-js: 4.2.0
12
15
  dingtalk-jsapi: 3.0.35
16
+ gc_rsa: 1.3.9
13
17
  lodash-es: 4.17.21
14
18
  promise-polyfill: 8.3.0
15
19
  vconsole: 3.15.1
@@ -23,10 +27,38 @@ packages:
23
27
  regenerator-runtime: 0.14.1
24
28
  dev: false
25
29
 
30
+ /ajv/6.12.6:
31
+ resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
32
+ dependencies:
33
+ fast-deep-equal: 3.1.3
34
+ fast-json-stable-stringify: 2.1.0
35
+ json-schema-traverse: 0.4.1
36
+ uri-js: 4.4.1
37
+ dev: false
38
+
39
+ /asn1/0.2.6:
40
+ resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==}
41
+ dependencies:
42
+ safer-buffer: 2.1.2
43
+ dev: false
44
+
45
+ /assert-plus/1.0.0:
46
+ resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==}
47
+ engines: {node: '>=0.8'}
48
+ dev: false
49
+
26
50
  /asynckit/0.4.0:
27
51
  resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
28
52
  dev: false
29
53
 
54
+ /aws-sign2/0.7.0:
55
+ resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==}
56
+ dev: false
57
+
58
+ /aws4/1.13.0:
59
+ resolution: {integrity: sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==}
60
+ dev: false
61
+
30
62
  /axios/1.7.2:
31
63
  resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==}
32
64
  dependencies:
@@ -37,6 +69,27 @@ packages:
37
69
  - debug
38
70
  dev: false
39
71
 
72
+ /bcrypt-pbkdf/1.0.2:
73
+ resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==}
74
+ dependencies:
75
+ tweetnacl: 0.14.5
76
+ dev: false
77
+
78
+ /call-bind/1.0.7:
79
+ resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
80
+ engines: {node: '>= 0.4'}
81
+ dependencies:
82
+ es-define-property: 1.0.0
83
+ es-errors: 1.3.0
84
+ function-bind: 1.1.2
85
+ get-intrinsic: 1.2.4
86
+ set-function-length: 1.2.2
87
+ dev: false
88
+
89
+ /caseless/0.12.0:
90
+ resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
91
+ dev: false
92
+
40
93
  /combined-stream/1.0.8:
41
94
  resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
42
95
  engines: {node: '>= 0.8'}
@@ -54,6 +107,30 @@ packages:
54
107
  requiresBuild: true
55
108
  dev: false
56
109
 
110
+ /core-util-is/1.0.2:
111
+ resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
112
+ dev: false
113
+
114
+ /crypto-js/4.2.0:
115
+ resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==}
116
+ dev: false
117
+
118
+ /dashdash/1.14.1:
119
+ resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
120
+ engines: {node: '>=0.10'}
121
+ dependencies:
122
+ assert-plus: 1.0.0
123
+ dev: false
124
+
125
+ /define-data-property/1.1.4:
126
+ resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
127
+ engines: {node: '>= 0.4'}
128
+ dependencies:
129
+ es-define-property: 1.0.0
130
+ es-errors: 1.3.0
131
+ gopd: 1.0.1
132
+ dev: false
133
+
57
134
  /delayed-stream/1.0.0:
58
135
  resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
59
136
  engines: {node: '>=0.4.0'}
@@ -65,6 +142,48 @@ packages:
65
142
  promise-polyfill: 7.1.2
66
143
  dev: false
67
144
 
145
+ /ecc-jsbn/0.1.2:
146
+ resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==}
147
+ dependencies:
148
+ jsbn: 0.1.1
149
+ safer-buffer: 2.1.2
150
+ dev: false
151
+
152
+ /es-define-property/1.0.0:
153
+ resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==}
154
+ engines: {node: '>= 0.4'}
155
+ dependencies:
156
+ get-intrinsic: 1.2.4
157
+ dev: false
158
+
159
+ /es-errors/1.3.0:
160
+ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
161
+ engines: {node: '>= 0.4'}
162
+ dev: false
163
+
164
+ /extend/3.0.2:
165
+ resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
166
+ dev: false
167
+
168
+ /extsprintf/1.3.0:
169
+ resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==}
170
+ engines: {'0': node >=0.6.0}
171
+ dev: false
172
+
173
+ /fast-deep-equal/3.1.3:
174
+ resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
175
+ dev: false
176
+
177
+ /fast-json-stable-stringify/2.1.0:
178
+ resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
179
+ dev: false
180
+
181
+ /flyio/0.6.14:
182
+ resolution: {integrity: sha512-RE2OXE1ZZmcXOKb0jCtGyquHDxpAqHg17CZ8lmQKRfl3x1kP+NBpaQDx4WgN7DNpLJjFnspTzTEQpwRGg6/xaA==}
183
+ dependencies:
184
+ request: 2.88.2
185
+ dev: false
186
+
68
187
  /follow-redirects/1.15.6:
69
188
  resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==}
70
189
  engines: {node: '>=4.0'}
@@ -75,6 +194,19 @@ packages:
75
194
  optional: true
76
195
  dev: false
77
196
 
197
+ /forever-agent/0.6.1:
198
+ resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==}
199
+ dev: false
200
+
201
+ /form-data/2.3.3:
202
+ resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==}
203
+ engines: {node: '>= 0.12'}
204
+ dependencies:
205
+ asynckit: 0.4.0
206
+ combined-stream: 1.0.8
207
+ mime-types: 2.1.35
208
+ dev: false
209
+
78
210
  /form-data/4.0.0:
79
211
  resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
80
212
  engines: {node: '>= 6'}
@@ -84,6 +216,123 @@ packages:
84
216
  mime-types: 2.1.35
85
217
  dev: false
86
218
 
219
+ /function-bind/1.1.2:
220
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
221
+ dev: false
222
+
223
+ /gc_rsa/1.3.9:
224
+ resolution: {integrity: sha512-e55K7iUwG5uLfanQ3h8gEYKnED0HiHwCRtFBxCCpMLL7AzYhIjRius1xx5rqTiWop8Ql6MogYFVkcPJDoVADSQ==}
225
+ dependencies:
226
+ crypto-js: 4.2.0
227
+ flyio: 0.6.14
228
+ lodash-es: 4.17.21
229
+ qs: 6.9.1
230
+ url: 0.11.3
231
+ dev: false
232
+
233
+ /get-intrinsic/1.2.4:
234
+ resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
235
+ engines: {node: '>= 0.4'}
236
+ dependencies:
237
+ es-errors: 1.3.0
238
+ function-bind: 1.1.2
239
+ has-proto: 1.0.3
240
+ has-symbols: 1.0.3
241
+ hasown: 2.0.2
242
+ dev: false
243
+
244
+ /getpass/0.1.7:
245
+ resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==}
246
+ dependencies:
247
+ assert-plus: 1.0.0
248
+ dev: false
249
+
250
+ /gopd/1.0.1:
251
+ resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
252
+ dependencies:
253
+ get-intrinsic: 1.2.4
254
+ dev: false
255
+
256
+ /har-schema/2.0.0:
257
+ resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==}
258
+ engines: {node: '>=4'}
259
+ dev: false
260
+
261
+ /har-validator/5.1.5:
262
+ resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==}
263
+ engines: {node: '>=6'}
264
+ deprecated: this library is no longer supported
265
+ dependencies:
266
+ ajv: 6.12.6
267
+ har-schema: 2.0.0
268
+ dev: false
269
+
270
+ /has-property-descriptors/1.0.2:
271
+ resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
272
+ dependencies:
273
+ es-define-property: 1.0.0
274
+ dev: false
275
+
276
+ /has-proto/1.0.3:
277
+ resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==}
278
+ engines: {node: '>= 0.4'}
279
+ dev: false
280
+
281
+ /has-symbols/1.0.3:
282
+ resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
283
+ engines: {node: '>= 0.4'}
284
+ dev: false
285
+
286
+ /hasown/2.0.2:
287
+ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
288
+ engines: {node: '>= 0.4'}
289
+ dependencies:
290
+ function-bind: 1.1.2
291
+ dev: false
292
+
293
+ /http-signature/1.2.0:
294
+ resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==}
295
+ engines: {node: '>=0.8', npm: '>=1.3.7'}
296
+ dependencies:
297
+ assert-plus: 1.0.0
298
+ jsprim: 1.4.2
299
+ sshpk: 1.18.0
300
+ dev: false
301
+
302
+ /is-typedarray/1.0.0:
303
+ resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
304
+ dev: false
305
+
306
+ /isstream/0.1.2:
307
+ resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
308
+ dev: false
309
+
310
+ /jsbn/0.1.1:
311
+ resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==}
312
+ dev: false
313
+
314
+ /json-schema-traverse/0.4.1:
315
+ resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
316
+ dev: false
317
+
318
+ /json-schema/0.4.0:
319
+ resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
320
+ dev: false
321
+
322
+ /json-stringify-safe/5.0.1:
323
+ resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
324
+ dev: false
325
+
326
+ /jsprim/1.4.2:
327
+ resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==}
328
+ engines: {node: '>=0.6.0'}
329
+ dependencies:
330
+ assert-plus: 1.0.0
331
+ extsprintf: 1.3.0
332
+ json-schema: 0.4.0
333
+ verror: 1.10.0
334
+ dev: false
335
+
87
336
  /lodash-es/4.17.21:
88
337
  resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
89
338
  dev: false
@@ -104,6 +353,19 @@ packages:
104
353
  resolution: {integrity: sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==}
105
354
  dev: false
106
355
 
356
+ /oauth-sign/0.9.0:
357
+ resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==}
358
+ dev: false
359
+
360
+ /object-inspect/1.13.2:
361
+ resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==}
362
+ engines: {node: '>= 0.4'}
363
+ dev: false
364
+
365
+ /performance-now/2.1.0:
366
+ resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
367
+ dev: false
368
+
107
369
  /promise-polyfill/7.1.2:
108
370
  resolution: {integrity: sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==}
109
371
  dev: false
@@ -116,10 +378,150 @@ packages:
116
378
  resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
117
379
  dev: false
118
380
 
381
+ /psl/1.9.0:
382
+ resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
383
+ dev: false
384
+
385
+ /punycode/1.4.1:
386
+ resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
387
+ dev: false
388
+
389
+ /punycode/2.3.1:
390
+ resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
391
+ engines: {node: '>=6'}
392
+ dev: false
393
+
394
+ /qs/6.12.2:
395
+ resolution: {integrity: sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==}
396
+ engines: {node: '>=0.6'}
397
+ dependencies:
398
+ side-channel: 1.0.6
399
+ dev: false
400
+
401
+ /qs/6.5.3:
402
+ resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
403
+ engines: {node: '>=0.6'}
404
+ dev: false
405
+
406
+ /qs/6.9.1:
407
+ resolution: {integrity: sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA==}
408
+ engines: {node: '>=0.6'}
409
+ dev: false
410
+
119
411
  /regenerator-runtime/0.14.1:
120
412
  resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
121
413
  dev: false
122
414
 
415
+ /request/2.88.2:
416
+ resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==}
417
+ engines: {node: '>= 6'}
418
+ deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
419
+ dependencies:
420
+ aws-sign2: 0.7.0
421
+ aws4: 1.13.0
422
+ caseless: 0.12.0
423
+ combined-stream: 1.0.8
424
+ extend: 3.0.2
425
+ forever-agent: 0.6.1
426
+ form-data: 2.3.3
427
+ har-validator: 5.1.5
428
+ http-signature: 1.2.0
429
+ is-typedarray: 1.0.0
430
+ isstream: 0.1.2
431
+ json-stringify-safe: 5.0.1
432
+ mime-types: 2.1.35
433
+ oauth-sign: 0.9.0
434
+ performance-now: 2.1.0
435
+ qs: 6.5.3
436
+ safe-buffer: 5.2.1
437
+ tough-cookie: 2.5.0
438
+ tunnel-agent: 0.6.0
439
+ uuid: 3.4.0
440
+ dev: false
441
+
442
+ /safe-buffer/5.2.1:
443
+ resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
444
+ dev: false
445
+
446
+ /safer-buffer/2.1.2:
447
+ resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
448
+ dev: false
449
+
450
+ /set-function-length/1.2.2:
451
+ resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
452
+ engines: {node: '>= 0.4'}
453
+ dependencies:
454
+ define-data-property: 1.1.4
455
+ es-errors: 1.3.0
456
+ function-bind: 1.1.2
457
+ get-intrinsic: 1.2.4
458
+ gopd: 1.0.1
459
+ has-property-descriptors: 1.0.2
460
+ dev: false
461
+
462
+ /side-channel/1.0.6:
463
+ resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
464
+ engines: {node: '>= 0.4'}
465
+ dependencies:
466
+ call-bind: 1.0.7
467
+ es-errors: 1.3.0
468
+ get-intrinsic: 1.2.4
469
+ object-inspect: 1.13.2
470
+ dev: false
471
+
472
+ /sshpk/1.18.0:
473
+ resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==}
474
+ engines: {node: '>=0.10.0'}
475
+ hasBin: true
476
+ dependencies:
477
+ asn1: 0.2.6
478
+ assert-plus: 1.0.0
479
+ bcrypt-pbkdf: 1.0.2
480
+ dashdash: 1.14.1
481
+ ecc-jsbn: 0.1.2
482
+ getpass: 0.1.7
483
+ jsbn: 0.1.1
484
+ safer-buffer: 2.1.2
485
+ tweetnacl: 0.14.5
486
+ dev: false
487
+
488
+ /tough-cookie/2.5.0:
489
+ resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==}
490
+ engines: {node: '>=0.8'}
491
+ dependencies:
492
+ psl: 1.9.0
493
+ punycode: 2.3.1
494
+ dev: false
495
+
496
+ /tunnel-agent/0.6.0:
497
+ resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
498
+ dependencies:
499
+ safe-buffer: 5.2.1
500
+ dev: false
501
+
502
+ /tweetnacl/0.14.5:
503
+ resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
504
+ dev: false
505
+
506
+ /uri-js/4.4.1:
507
+ resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
508
+ dependencies:
509
+ punycode: 2.3.1
510
+ dev: false
511
+
512
+ /url/0.11.3:
513
+ resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==}
514
+ dependencies:
515
+ punycode: 1.4.1
516
+ qs: 6.12.2
517
+ dev: false
518
+
519
+ /uuid/3.4.0:
520
+ resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
521
+ deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
522
+ hasBin: true
523
+ dev: false
524
+
123
525
  /vconsole/3.15.1:
124
526
  resolution: {integrity: sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==}
125
527
  dependencies:
@@ -128,3 +530,12 @@ packages:
128
530
  core-js: 3.37.1
129
531
  mutation-observer: 1.0.3
130
532
  dev: false
533
+
534
+ /verror/1.10.0:
535
+ resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
536
+ engines: {'0': node >=0.6.0}
537
+ dependencies:
538
+ assert-plus: 1.0.0
539
+ core-util-is: 1.0.2
540
+ extsprintf: 1.3.0
541
+ dev: false
package/libs/main.js CHANGED
@@ -1,16 +1,17 @@
1
- import g from "lodash-es";
2
- import * as o from "dingtalk-jsapi";
3
- import i from "qs";
1
+ import m from "lodash-es";
2
+ import * as i from "dingtalk-jsapi";
3
+ import s from "qs";
4
4
  import h from "axios";
5
+ import w from "gc_rsa";
5
6
  const r = window.navigator.userAgent.toLowerCase();
6
7
  let a = {
7
8
  code: "",
8
9
  name: "未知"
9
10
  };
10
- function w() {
11
+ function y() {
11
12
  return typeof window < "u" && typeof document < "u" && typeof document.querySelector == "function" && typeof navigator < "u" && typeof XMLHttpRequest == "function";
12
13
  }
13
- const y = [
14
+ const v = [
14
15
  {
15
16
  code: "weixin",
16
17
  name: "微信",
@@ -26,39 +27,39 @@ const y = [
26
27
  name: "钉钉",
27
28
  value: /DingTalk/i.test(r)
28
29
  }
29
- ], v = (e) => e.value, m = g.find(y, v);
30
- m ? a = m : w() && (a = {
30
+ ], I = (e) => e.value, g = m.find(v, I);
31
+ g ? a = g : y() && (a = {
31
32
  code: "h5",
32
33
  name: "H5"
33
34
  });
34
- const I = a, x = (e) => e == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcding" : e == "prod" ? "https://smart.ihotel.cn/gw/v1/platform-gcding" : e || "https://test.ihotel.cn/gw/v1/platform-gcding", P = i.parse(location.search, { ignoreQueryPrefix: !0 }), c = g.get(P, "corpId"), k = async ({ appCode: e, apiPrefix: n }) => {
35
- const s = x(n);
35
+ const x = a, P = (e) => e == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcding" : e == "prod" ? "https://smart.ihotel.cn/guardian/gw/v1/platform-gcding" : e || "https://test.ihotel.cn/gw/v1/platform-gcding", k = s.parse(location.search, { ignoreQueryPrefix: !0 }), c = m.get(k, "corpId"), _ = async ({ appCode: e, apiPrefix: n }) => {
36
+ const o = P(n);
36
37
  return new Promise(async (u) => {
37
- var l, d, f;
38
+ var l, f, d;
38
39
  if (c) {
39
- const { code: p } = await o.getAuthCode({
40
+ const { code: p } = await i.getAuthCode({
40
41
  corpId: c
41
42
  }), t = await h.post(
42
- `${s}/api/auth/queryAuthNoExternalCompatible`,
43
+ `${o}/api/auth/queryAuthNoExternalCompatible`,
43
44
  {
44
45
  appCode: e,
45
46
  authCode: p,
46
47
  corpId: c
47
48
  }
48
49
  );
49
- t.data && ((l = t.data) == null ? void 0 : l.result) === 0 ? u({ userInfo: (d = t == null ? void 0 : t.data) == null ? void 0 : d.retVal, res: t }) : (o.alert({
50
- title: (f = t == null ? void 0 : t.data) == null ? void 0 : f.msg
50
+ t.data && ((l = t.data) == null ? void 0 : l.result) === 0 ? u({ userInfo: (f = t == null ? void 0 : t.data) == null ? void 0 : f.retVal, res: t }) : (i.alert({
51
+ title: (d = t == null ? void 0 : t.data) == null ? void 0 : d.msg
51
52
  }), u({ res: t }));
52
53
  } else
53
- o.alert({
54
+ i.alert({
54
55
  title: "未配置参数:corpId"
55
56
  });
56
57
  });
57
58
  }, $ = {
58
- login: k,
59
- dd: o
60
- }, q = () => new Promise((e) => {
61
- const { token: n } = i.parse(location.search, { ignoreQueryPrefix: !0 });
59
+ login: _,
60
+ dd: i
61
+ }, q = () => new Promise(async (e) => {
62
+ const { token: n } = s.parse(location.search, { ignoreQueryPrefix: !0 });
62
63
  e(n ? {
63
64
  userInfo: {
64
65
  ucToken: n
@@ -67,7 +68,7 @@ const I = a, x = (e) => e == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcdi
67
68
  }), C = {
68
69
  login: q
69
70
  }, E = () => new Promise((e) => {
70
- const { token: n } = i.parse(location.search, { ignoreQueryPrefix: !0 });
71
+ const { token: n } = s.parse(location.search, { ignoreQueryPrefix: !0 });
71
72
  e(n ? {
72
73
  userInfo: {
73
74
  ucToken: n
@@ -76,7 +77,7 @@ const I = a, x = (e) => e == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcdi
76
77
  }), M = {
77
78
  login: E
78
79
  }, Q = () => new Promise((e) => {
79
- const { token: n } = i.parse(location.search, { ignoreQueryPrefix: !0 });
80
+ const { token: n } = s.parse(location.search, { ignoreQueryPrefix: !0 });
80
81
  e(n ? {
81
82
  userInfo: {
82
83
  ucToken: n
@@ -84,29 +85,31 @@ const I = a, x = (e) => e == "dev" ? "https://test.ihotel.cn/gw/v1/platform-gcdi
84
85
  } : { userInfo: null });
85
86
  }), T = {
86
87
  login: Q
87
- }, _ = {
88
+ }, b = {
88
89
  dd: $,
89
90
  h5: C,
90
91
  wxmp: T,
91
92
  weixin: M
92
93
  };
93
- class b {
94
+ class j {
94
95
  constructor(n) {
95
- this.config = n, this.env = I, this.js = _[this.env.code], this.userInfo = null;
96
+ this.config = n, this.env = x, this.js = b[this.env.code], this.userInfo = null;
97
+ const { gc_rsa: o } = n;
98
+ console.log("网关配置:", o), o && w(o);
96
99
  }
97
100
  async init() {
98
101
  try {
99
- const n = await this.js.login(this.config), { userInfo: s } = n;
100
- this.userInfo = s;
102
+ const n = await this.js.login(this.config), { userInfo: o } = n;
103
+ this.userInfo = o;
101
104
  } catch (n) {
102
105
  console.log(n);
103
106
  }
104
107
  }
105
108
  }
106
- async function L(e) {
107
- const n = new b(e);
109
+ async function D(e) {
110
+ const n = new j(e);
108
111
  return await n.init(), n;
109
112
  }
110
113
  export {
111
- L as default
114
+ D as default
112
115
  };
package/libs/main.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(t,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios")):typeof define=="function"&&define.amd?define(["lodash-es","dingtalk-jsapi","qs","axios"],s):(t=typeof globalThis<"u"?globalThis:t||self,t.Main=s(t._,t.dd$1,t.qs,t.axios))})(this,function(t,s,c,h){"use strict";function w(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const u=w(s),a=window.navigator.userAgent.toLowerCase();let d={code:"",name:"未知"};function y(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const v=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(a)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(a)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(a)}],x=e=>e.value,f=t.find(v,x);f?d=f:y()&&(d={code:"h5",name:"H5"});const I=d,P=e=>e=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":e=="prod"?"https://smart.ihotel.cn/gw/v1/platform-gcding":e||"https://test.ihotel.cn/gw/v1/platform-gcding",j=c.parse(location.search,{ignoreQueryPrefix:!0}),l=t.get(j,"corpId"),k={dd:{login:async({appCode:e,apiPrefix:n})=>{const i=P(n);return new Promise(async r=>{var g,p,m;if(l){const{code:T}=await u.getAuthCode({corpId:l}),o=await h.post(`${i}/api/auth/queryAuthNoExternalCompatible`,{appCode:e,authCode:T,corpId:l});o.data&&((g=o.data)==null?void 0:g.result)===0?r({userInfo:(p=o==null?void 0:o.data)==null?void 0:p.retVal,res:o}):(u.alert({title:(m=o==null?void 0:o.data)==null?void 0:m.msg}),r({res:o}))}else u.alert({title:"未配置参数:corpId"})})},dd:u},h5:{login:()=>new Promise(e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})},wxmp:{login:()=>new Promise(e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})},weixin:{login:()=>new Promise(e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})}};class ${constructor(n){this.config=n,this.env=I,this.js=k[this.env.code],this.userInfo=null}async init(){try{const n=await this.js.login(this.config),{userInfo:i}=n;this.userInfo=i}catch(n){console.log(n)}}}async function q(e){const n=new $(e);return await n.init(),n}return q});
1
+ (function(o,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios"),require("gc_rsa")):typeof define=="function"&&define.amd?define(["lodash-es","dingtalk-jsapi","qs","axios","gc_rsa"],s):(o=typeof globalThis<"u"?globalThis:o||self,o.Main=s(o._,o.dd$1,o.qs,o.axios,o.gc_rsa))})(this,function(o,s,c,h,w){"use strict";function y(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=y(s),u=window.navigator.userAgent.toLowerCase();let d={code:"",name:"未知"};function v(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const x=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(u)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(u)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(u)}],I=e=>e.value,f=o.find(x,I);f?d=f:v()&&(d={code:"h5",name:"H5"});const P=d,_=e=>e=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":e=="prod"?"https://smart.ihotel.cn/guardian/gw/v1/platform-gcding":e||"https://test.ihotel.cn/gw/v1/platform-gcding",j=c.parse(location.search,{ignoreQueryPrefix:!0}),l=o.get(j,"corpId"),k={dd:{login:async({appCode:e,apiPrefix:n})=>{const t=_(n);return new Promise(async r=>{var g,p,m;if(l){const{code:T}=await a.getAuthCode({corpId:l}),i=await h.post(`${t}/api/auth/queryAuthNoExternalCompatible`,{appCode:e,authCode:T,corpId:l});i.data&&((g=i.data)==null?void 0:g.result)===0?r({userInfo:(p=i==null?void 0:i.data)==null?void 0:p.retVal,res:i}):(a.alert({title:(m=i==null?void 0:i.data)==null?void 0:m.msg}),r({res:i}))}else a.alert({title:"未配置参数:corpId"})})},dd:a},h5:{login:()=>new Promise(async e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})},wxmp:{login:()=>new Promise(e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})},weixin:{login:()=>new Promise(e=>{const{token:n}=c.parse(location.search,{ignoreQueryPrefix:!0});e(n?{userInfo:{ucToken:n}}:{userInfo:null})})}};class q{constructor(n){this.config=n,this.env=P,this.js=k[this.env.code],this.userInfo=null;const{gc_rsa:t}=n;console.log("网关配置:",t),t&&w(t)}async init(){try{const n=await this.js.login(this.config),{userInfo:t}=n;this.userInfo=t}catch(n){console.log(n)}}}async function $(e){const n=new q(e);return await n.init(),n}return $});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gc_mobile",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "example",
@@ -26,6 +26,7 @@
26
26
  "dependencies": {
27
27
  "axios": "^1.7.2",
28
28
  "dingtalk-jsapi": "^3.0.33",
29
+ "gc_rsa": "^1.3.9",
29
30
  "lodash-es": "^4.17.21",
30
31
  "qs": "^6.12.1"
31
32
  }
package/src/index.js CHANGED
@@ -1,12 +1,18 @@
1
1
  import env from "./lib/env";
2
2
  import modules from "./modules";
3
-
3
+ import gc_rsa from "gc_rsa";
4
4
  class Mobile {
5
5
  constructor(config) {
6
6
  this.config = config;
7
7
  this.env = env;
8
8
  this.js = modules[this.env.code];
9
9
  this.userInfo = null;
10
+
11
+ const { gc_rsa: rsa_config } = config;
12
+ console.log("网关配置:", rsa_config);
13
+ if (rsa_config) {
14
+ gc_rsa(rsa_config);
15
+ }
10
16
  }
11
17
  async init() {
12
18
  try {
package/src/lib/api.js CHANGED
@@ -2,7 +2,7 @@ export const prefix = (prefix) => {
2
2
  if (prefix == "dev") {
3
3
  return "https://test.ihotel.cn/gw/v1/platform-gcding";
4
4
  } else if (prefix == "prod") {
5
- return "https://smart.ihotel.cn/gw/v1/platform-gcding";
5
+ return "https://smart.ihotel.cn/guardian/gw/v1/platform-gcding";
6
6
  } else {
7
7
  return prefix ? prefix : "https://test.ihotel.cn/gw/v1/platform-gcding";
8
8
  }
package/src/modules/h5.js CHANGED
@@ -1,8 +1,12 @@
1
1
  // 普通h5环境
2
2
  import qs from "qs";
3
+ // import axios from "axios";
3
4
  const login = () => {
4
- return new Promise((resolve) => {
5
+ return new Promise(async (resolve) => {
5
6
  const { token } = qs.parse(location.search, { ignoreQueryPrefix: true });
7
+ // const res = await axios.get(
8
+ // "https://smart.ihotel.cn/guardian/gw/v1/platform-gcding"
9
+ // );
6
10
  if (token) {
7
11
  resolve({
8
12
  userInfo: {
package/vite.config.js CHANGED
@@ -33,7 +33,8 @@ export default defineConfig(({ mode }) => {
33
33
  "axios",
34
34
  "lodash-es",
35
35
  "dingtalk-jsapi",
36
- "qs"
36
+ "qs",
37
+ "gc_rsa"
37
38
  ]
38
39
  : []
39
40
  }