-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (62 loc) · 1.49 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="root">
{{msg}}
{{css}}
<textarea name="" id="" :value="css" cols="30" rows="10" />
</div>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type=text/javascript src=https://assets.vmei.com/libs/[email protected]/vue.min.js></script>
<script>
new Vue({
el: '#root',
data () {
return {
msg: '3423',
css: ''
}
},
mounted(){
axios({
method: 'post',
url: 'http://localhost:3001/postcss',
// url: 'https://api.pipk.top/postcss',
type: "json",
data: {
css: `{
user-select: none;
}`
}
}).then(res=>{
if(res.data.success){
this.css = res.data.data.css;
console.log(this.css);
}
})
}
})
// fetch('https://api.pipk.top/postcss',{
// method: 'POST',
// mode: 'no-cors', // 'cors' by default
// credentials: 'include',
// body: `{
// user-select: none;
// }`
// }).then(res => {
// console.log(res);
// if(res){
// res.json().then(re=>{
// console.log(re);
// })
// }
// })
</script>
</body>
</html>