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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * w-web-api v1.0.40
2
+ * w-web-api v1.0.41
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
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 18:00:09 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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>
@@ -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 18:00:09 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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 18:00:09 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-web-api",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "main": "dist/w-web-api.umd.js",
5
5
  "dependencies": {
6
6
  "@mdi/js": "^7.4.47",
@@ -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
- // rin = JSON.stringify(rin)
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 r = {
53
- msg: '成功傳輸API清單',
54
- res,
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
- pm.resolve(r)
60
+ else {
61
+ pm.reject(msg)
62
+ }
63
+
57
64
  })
58
65
  .catch((err) => {
59
- // console.log(err)
60
- let r = {
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