forked from wendux/fly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
engine.html
68 lines (63 loc) · 2.35 KB
/
engine.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>fly ajax-engine</title>
<meta name="viewport" content="width=device-width,initial-scale=0.5,user-scalable=no"/>
<script src="../dist/fly.min.js"></script>
<script src="../dist/engine-wrapper.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.16.2/axios.js"></script>
<script>
var log = console.log;
var engine = EngineWrapper(function (request, responseCallback) {
responseCallback({
statusCode: 200,
responseText: "你变或者不变,我都不变😜。",
extraFeild: "自定义字段"
})
})
fly.engine = engine;
//
// fly.post("../package.json",{aa:8,bb:9,tt:{xx:5}}).then((d) => {
// console.log("get result:",d)
// }).catch((e) => console.log("error", e))
// var formData = new FormData();
// formData.append('username', 'Chris');
// axios.post("../package.json",formData).then(log).catch(log)
// fly.post("../package.json",formData).then(log).catch(log)
fly.get("../package.json").then(d => {
log(d.data)
log(d.extraFeild)
})
axios.post("../package.json")
</script>
</head>
<body>
</body>
</html>
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://nodejs.org/">
<img height="100" src="https://github.com/wendux/fly/raw/master/imgs/node.png" alt="node logo">
</a>
</td>
<td align="center" valign="middle">
<a href="https://mp.weixin.qq.com/cgi-bin/wx">
<img height="100" src="https://github.com/wendux/fly/raw/master/imgs/mp.png" alt="Mini Program logo">
</a>
</td>
<td align="center" valign="middle">
<a href="http://facebook.github.io/react-native/">
<img height="100" src="https://github.com/wendux/fly/raw/master/imgs/rn.png" alt="mpvue logo">
</a>
</td>
<td align="center" valign="middle">
<a href="https://www.quickapp.cn/">
<img height="100" src="https://github.com/wendux/fly/raw/master/imgs/hp.png" alt="quick app logo">
</a>
</td>
</tr>
</tbody>
</table>