-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtype.html
More file actions
155 lines (142 loc) · 4.26 KB
/
Copy pathtype.html
File metadata and controls
155 lines (142 loc) · 4.26 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!--
* @Author: mokevip
* @Date: 2020-09-14 09:24:16
* @LastEditors: mokevip
* @LastEditTime: 2020-09-14 11:00:40
* @Description:
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache,must-revalidate">
<meta http-equiv="Cache" content="no-cache">
<title>答题类型选择</title>
<link rel="stylesheet" href="./css/iview.css">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?b3a7eb27703def9ba98376aca09290db";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<style>
body {
line-height: 1.6;
background-color: #f8f8f9;
padding-top: 20px;
/* 适配刘海屏 */
padding-top: calc(20px + env(safe-area-inset-top));
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.page-title {
margin: 20px 0 16px;
padding: 0 4vw;
font-size: 18px;
font-weight: bold;
color: #17233d;
text-align: center;
}
.typeList {
width: 94vw;
margin: 0 auto;
padding-bottom: 40px;
}
.timu {
margin-bottom: 16px;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
transition: all 0.2s ease-in-out;
border: none;
cursor: pointer;
text-align: center;
font-size: 16px;
font-weight: 500;
color: #17233d;
}
.timu:active {
transform: scale(0.98);
background-color: #e6f7ff;
color: #1890ff;
}
.ivu-card-body {
padding: 20px;
}
/* 大屏适配 */
@media screen and (min-width: 768px) {
body {
padding-top: 40px;
max-width: 800px;
margin: 0 auto;
border-left: 1px solid #eee;
border-right: 1px solid #eee;
background-color: #fff;
}
.typeList {
width: 100%;
padding-left: 20px;
padding-right: 20px;
box-sizing: border-box;
}
.timu {
box-shadow: none;
border: 1px solid #dcdee2;
}
.timu:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border-color: #57a3f3;
color: #1890ff;
}
}
</style>
</head>
<body>
<div id="el">
<p class="page-title">请选择答题模式:</p>
<div class="typeList">
<div v-for="i in typeList" @click='goNext(i.id)'>
<Card class="timu">
{{i.name}}
</Card>
</div>
</div>
</div>
<script src="./js/vue.min.js"></script>
<script src="./js/iview.min.js"></script>
<script>
const vue = new Vue({
el: "#el",
data: {
typeList: [{
id: 'random',
name: "乱序答题"
}, {
id: 'order',
name: "顺序答题"
}, {
id: 'search',
name: "搜题模式"
}, {
id: 'recite',
name: "背题模式"
}, {
id: 'wrong',
name: "错题模式"
}]
},
methods: {
goNext(id) {
sessionStorage.type = id;
window.location.href = "./timu.html"
}
}
})
</script>
</body>
</html>