w-web-api 1.0.14 → 1.0.15

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.14
2
+ * w-web-api v1.0.15
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
package/docs/WWebApi.html CHANGED
@@ -604,7 +604,7 @@
604
604
  <br class="clear">
605
605
 
606
606
  <footer>
607
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Sun Apr 17 2022 14:48:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
607
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
608
608
  </footer>
609
609
 
610
610
  <script>prettyPrint();</script>
@@ -405,7 +405,7 @@ export default WWebApi
405
405
  <br class="clear">
406
406
 
407
407
  <footer>
408
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Sun Apr 17 2022 14:48:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
408
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
409
409
  </footer>
410
410
 
411
411
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -68,7 +68,7 @@
68
68
  <br class="clear">
69
69
 
70
70
  <footer>
71
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Sun Apr 17 2022 14:48:31 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
71
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Mon Apr 18 2022 09:56:05 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
72
72
  </footer>
73
73
 
74
74
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-web-api",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "main": "dist/w-web-api.umd.js",
5
5
  "dependencies": {
6
6
  "@mdi/js": "^6.6.96",
@@ -1,10 +1,14 @@
1
1
  import axios from 'axios'
2
2
  import ltdtpick from 'wsemi/src/ltdtpick.mjs'
3
+ import genPm from 'wsemi/src/genPm.mjs'
3
4
 
4
5
 
5
6
  async function provideApis(url, group, apis) {
6
7
  //url: 指API伺服器提供的接入網址, 例如 http://localhost:11005/replaceAPIsByLevels
7
8
 
9
+ //pm
10
+ let pm = genPm()
11
+
8
12
  //ks
9
13
  let ks = [
10
14
  'id', //'id-for-apis-pets-guineapigs-1'
@@ -36,7 +40,6 @@ async function provideApis(url, group, apis) {
36
40
  // rin = JSON.stringify(rin)
37
41
 
38
42
  //axios
39
- let rout
40
43
  await axios({
41
44
  method: 'post',
42
45
  url,
@@ -45,22 +48,22 @@ async function provideApis(url, group, apis) {
45
48
  })
46
49
  .then((res) => {
47
50
  // console.log(res)
48
- rout = {
49
- state: 'success',
51
+ let r = {
50
52
  msg: '成功傳輸API清單',
51
53
  res,
52
54
  }
55
+ pm.resolve(r)
53
56
  })
54
57
  .catch((err) => {
55
58
  // console.log(err)
56
- rout = {
57
- state: 'error',
59
+ let r = {
58
60
  msg: '無法傳輸API清單',
59
61
  res: err,
60
62
  }
63
+ pm.reject(r)
61
64
  })
62
65
 
63
- return rout
66
+ return pm
64
67
  }
65
68
 
66
69
 
@@ -1 +1 @@
1
- {"apis":"2022-04-17T14:11:38+08:00|UNLyf4"}
1
+ {"apis":"RnCO2r"}