w-web-api 1.0.40 → 1.0.41
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.
- package/dist/w-web-api.umd.js +1 -1
- package/docs/WWebApi.html +1 -1
- package/docs/WWebApi.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/server/provideApis.mjs +15 -12
package/dist/w-web-api.umd.js
CHANGED
package/docs/WWebApi.html
CHANGED
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
<br class="clear">
|
|
886
886
|
|
|
887
887
|
<footer>
|
|
888
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025
|
|
888
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025 20:28:27 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
889
889
|
</footer>
|
|
890
890
|
|
|
891
891
|
<script>prettyPrint();</script>
|
package/docs/WWebApi.mjs.html
CHANGED
|
@@ -835,7 +835,7 @@ export default WWebApi
|
|
|
835
835
|
<br class="clear">
|
|
836
836
|
|
|
837
837
|
<footer>
|
|
838
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025
|
|
838
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025 20:28:27 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
839
839
|
</footer>
|
|
840
840
|
|
|
841
841
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<br class="clear">
|
|
72
72
|
|
|
73
73
|
<footer>
|
|
74
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025
|
|
74
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Jul 14 2025 20:28:27 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
75
75
|
</footer>
|
|
76
76
|
|
|
77
77
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/server/provideApis.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import axios from 'axios'
|
|
2
|
+
import get from 'lodash-es/get.js'
|
|
2
3
|
import ltdtpick from 'wsemi/src/ltdtpick.mjs'
|
|
3
4
|
import genPm from 'wsemi/src/genPm.mjs'
|
|
4
5
|
|
|
@@ -32,13 +33,14 @@ async function provideApis(url, group, apis) {
|
|
|
32
33
|
|
|
33
34
|
//ltdtpick
|
|
34
35
|
apis = ltdtpick(apis, ks)
|
|
36
|
+
// console.log('apis', apis)
|
|
35
37
|
|
|
36
38
|
//rin
|
|
37
39
|
let rin = {
|
|
38
40
|
group,
|
|
39
41
|
apis,
|
|
40
42
|
}
|
|
41
|
-
//
|
|
43
|
+
// console.log('rin', rin)
|
|
42
44
|
|
|
43
45
|
//axios
|
|
44
46
|
await axios({
|
|
@@ -48,20 +50,21 @@ async function provideApis(url, group, apis) {
|
|
|
48
50
|
data: rin,
|
|
49
51
|
})
|
|
50
52
|
.then((res) => {
|
|
51
|
-
// console.log(res)
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
// console.log('then', res)
|
|
54
|
+
let data = get(res, 'data')
|
|
55
|
+
let state = get(data, 'state')
|
|
56
|
+
let msg = get(data, 'msg', '')
|
|
57
|
+
if (state === 'success') {
|
|
58
|
+
pm.resolve(msg)
|
|
55
59
|
}
|
|
56
|
-
|
|
60
|
+
else {
|
|
61
|
+
pm.reject(msg)
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
})
|
|
58
65
|
.catch((err) => {
|
|
59
|
-
// console.log(err)
|
|
60
|
-
|
|
61
|
-
msg: '無法傳輸API清單',
|
|
62
|
-
res: err,
|
|
63
|
-
}
|
|
64
|
-
pm.reject(r)
|
|
66
|
+
// console.log('catch', err)
|
|
67
|
+
pm.reject(err)
|
|
65
68
|
})
|
|
66
69
|
|
|
67
70
|
return pm
|