1
1
# YYFJS
2
2
3
- YYF前端请求和数据接口JS库 。
3
+ [ YYF ] ( https://github.com/YunYinORG/YYF ) 前端请求和数据接口封装JS库 。
4
4
5
- The frontend JavaScript library for YYF RESTful API request.
5
+ The frontend JavaScript library for [ YYF] ( https://github.com/YunYinORG/YYF ) RESTful API request.
6
6
7
7
[ ![ Build Status] ( https://travis-ci.org/YunYinORG/YYFJS.svg?branch=master )] ( https://travis-ci.org/YunYinORG/YYFJS )
8
8
[ ![ npm] ( https://img.shields.io/npm/v/yyfjs.svg )] ( https://www.npmjs.com/package/yyfjs )
9
+ [ ![ lib size] ( http://img.badgesize.io/YunYinORG/YYFJS/gh-pages/yyf.js?color=green )] ( https://github.com/YunYinORG/YYFJS/tree/gh-pages )
10
+ [ ![ lib gzip size] ( http://img.badgesize.io/https://unpkg.com/yyfjs?compression=gzip&label=gzip )] ( https://unpkg.com/yyfjs )
9
11
10
- 1 . [ 安装和使用] ( #1- install )
11
- 2 . [ 接口API] ( #2- interface )
12
- 3 . [ 配置] ( #3- configure )
13
- 4 . [ Vue插件] ( #4- vue )
14
- 5 . [ 流程图] ( #5- flowchart )
12
+ 1 . [ 安装和使用] ( #install )
13
+ 2 . [ 接口API] ( #interface )
14
+ 3 . [ 配置] ( #configure )
15
+ 4 . [ Vue插件] ( #vue )
16
+ 5 . [ 流程图] ( #flowchart )
15
17
16
- ## 1. Install
18
+ 在线演示示例:
19
+
20
+ * [ jsfiddle.net] ( https://jsfiddle.net/NewFuture/56oyup6f/ )
21
+ * [ runjs.cn(墙内友好)] ( http://runjs.cn/code/j62fwfuw )
22
+
23
+ ## Install
17
24
** 安装**
18
25
19
26
### with npm(使用npm安装)
@@ -28,14 +35,15 @@ YYF.get('Index/test').success(console.log);
28
35
29
36
### in Browser(浏览器中直接使用)
30
37
31
- 可以在[ unpkg上] ( unpkg..com/yyfjs ) 下载最新版代码
38
+ * [ gh-pages 分支] ( https://github.com/YunYinORG/YYFJS/tree/gh-pages ) 稳定版和最新开发版
39
+ * 也可以在[ unpkg.com/yyfjs/] ( http://unpkg.com/yyfjs/ ) 下载最新版发布版代码
32
40
33
41
Just include the lib,exemple:
34
42
35
43
``` html
36
44
<html >
37
45
<head >
38
- <script src =" http://unpkg.. com/yyfjs" ></script >
46
+ <script src =" http://unpkg.com/yyfjs" ></script >
39
47
</head >
40
48
<body >
41
49
<script >
@@ -45,7 +53,7 @@ Just include the lib,exemple:
45
53
</html >
46
54
```
47
55
48
- ## 2. Interface
56
+ ## Interface
49
57
** 方法接口和API**
50
58
51
59
### 2.1 Examples
@@ -110,7 +118,7 @@ YYF.post('Resource/id', data)
110
118
111
119
参数细节参照[ 全局回调函数表handle] ( #33-handle )
112
120
113
- ## 3. Configure
121
+ ## Configure
114
122
115
123
** 配置**
116
124
@@ -223,7 +231,7 @@ YYF({
223
231
});
224
232
```
225
233
226
- ## 4. Vue
234
+ ## Vue
227
235
228
236
YYFJS 支持[ Vue] ( https://vuejs.org/ ) 插件
229
237
@@ -255,7 +263,7 @@ var app = new Vue({
255
263
})
256
264
```
257
265
258
- ## 5. Flowchart
266
+ ## Flowchart
259
267
260
268
基本流程: ` before() ` ==> [ send request] => ` ready() ` ==> ` [INVOKE?]() ` ==> ` final() `
261
269
0 commit comments