-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (46 loc) · 1.37 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button id="signup" >注册</button>
<button id="signin" >登录</button>
<div id="cookies">
</div>
<script>
document.getElementById('signup').onclick = () => {
console.log('注册')
const params = {
data: {},
path: '/moduleLogin/activity/signup',
}
const d = {
module: 'app',
method: 'openPage',
params: JSON.stringify(params),
}
window.gateioV2.callNative(JSON.stringify(d))
}
document.getElementById('signin').onclick = () => {
console.log('登录')
window.gateio.startLogin()
}
const cookies = document.cookie
const cookieArr = cookies.split('; ')
let html = ''
for(let i = 0; i < cookieArr.length; i++) {
const [key, value] = cookieArr[i].split('=')
html += `
<div>
<span style="color: red;">${key}</span>
<span style="color: #000">${value}</span>
</div>
`
}
document.getElementById('cookies').innerHTML = html
</script>
</body>
</html>