+2
-1
@@ -26,3 +26,4 @@ import Vue from 'vue' | ||
| const Components = { | ||
| wx_test | ||
| wx_test, | ||
| utils | ||
| } | ||
@@ -29,0 +30,0 @@ |
+1
-1
| { | ||
| "name": "wapx-lib", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "private": false, | ||
@@ -5,0 +5,0 @@ "scripts": { |
+12
-16
| # wapx-lib | ||
| ## Project setup | ||
| ## 安装 | ||
| ``` | ||
| npm install | ||
| npm install wapx-lib --save | ||
| ``` | ||
| ### Compiles and hot-reloads for development | ||
| ``` | ||
| npm run serve | ||
| ``` | ||
| ## 使用 | ||
| main.js中加入 | ||
| import 'wapx-lib' | ||
| ### Compiles and minifies for production | ||
| ## 常用方法 | ||
| ``` | ||
| npm run build | ||
| ``` | ||
| this.$get(url,res=>{ ... }) | ||
| this.$postJson(url,data,res=>{ ... }) | ||
| this.$postImage(url,data,res=>{ ... }) | ||
| this.$postFile(url,data,res=>{ ... }) | ||
| ### Lints and fixes files | ||
| ``` | ||
| npm run lint | ||
| ``` | ||
| ### Customize configuration | ||
| See [Configuration Reference](https://cli.vuejs.org/config/). | ||
| let value = this.$utils.getUrlKey(name) | ||
| ``` |
| <template> | ||
| <div> | ||
| 测试UI | ||
| <div> | ||
| {{res}} | ||
| </div> | ||
| </div> | ||
@@ -8,4 +11,19 @@ </template> | ||
| export default { | ||
| name:"wx_test" | ||
| name:"wx_test", | ||
| data(){ | ||
| return{ | ||
| res:{} | ||
| } | ||
| }, | ||
| created() { | ||
| }, | ||
| methods:{ | ||
| testUrl(){ | ||
| let url="https://api.wapg.cn/jd_union/recommend/rate_recommend?rate_start=10&rate_end=50&filter=true&page=1&size=20" | ||
| this.$get(url,res=>{ | ||
| this.res=res; | ||
| }) | ||
| } | ||
| } | ||
| } | ||
| </script> |
32113
1.01%459
0.22%20
-20%