-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
54 lines (48 loc) · 1.68 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
<!--
* @Author: flwfdd
* @Date: 2022-05-28 00:01:07
* @LastEditTime: 2024-12-16 02:38:10
* @Description:
* _(:з」∠)_
-->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<title>BIT101</title>
<meta name="description" content="BIT101校园社区">
<link rel="apple-touch-icon" href="/pwa-512x512.png" />
<meta name="theme-color" content="#FF9A57">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!--引入思源字体-->
<link rel="preload" href="https://fonts.googleapis.com/css?family=Noto+Serif+SC:300,500,700,900&display=swap"
crossorigin as="style" onload="this.onload=null;this.rel='stylesheet'">
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1X4GFL2WXR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {dataLayer.push(arguments);}
gtag('js', new Date());
// User ID
let id = '';
let store = window.localStorage.getItem('store');
if (store && JSON.parse(store).fake_cookie) {
let fakeCookie = JSON.parse(store).fake_cookie;
let base64Url = fakeCookie.split('.')[1];
let base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
let jsonPayload = decodeURIComponent(atob(base64).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
let payload = JSON.parse(jsonPayload);
id = payload.id;
}
gtag('config', 'G-1X4GFL2WXR', {'user_id': id});
</script>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>