-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
49 lines (44 loc) · 1.03 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>teaching-python</title>
<script>
//GET传参:
// url:文件地址
//
window.submitCode = function (name, code) {
console.log(name);
console.log(code);
}
function loadPorject() {
var myEvent = new CustomEvent('loadPorject', {
detail: {
projectName: "自由创作",
courseName: "自由创作",
url: info.workFileUrl
}
});
setTimeout(() => {
window.document.dispatchEvent(myEvent);
}, 500)
}
function setUserInfo() {
var myEvent = new CustomEvent('setUserInfo', {
detail: {
username: "未登录",
avatar: "./static/avatar.png",
}
});
setTimeout(() => {
window.document.dispatchEvent(myEvent);
}, 500)
}
</script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>