-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpass2south.html
190 lines (172 loc) · 7.06 KB
/
pass2south.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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<head xmlns="http://www.w3.org/1999/html">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name="viewport">
<link rel="icon" href="favicon.ico">
<title>e码通</title>
<link href="css/app.3beeee47.css" rel="preload" as="style">
<link href="css/chunk-vendors.fec8c032.css" rel="preload" as="style">
<link href="js/app.8735e41c.js" rel="preload" as="script">
<link href="js/chunk-vendors.ecda39ab.js" rel="preload" as="script">
<link href="css/chunk-vendors.fec8c032.css" rel="stylesheet">
<link href="css/app.3beeee47.css" rel="stylesheet">
<link href="/index.html" rel="import" id="index">
</head>
<body>
<noscript><strong>We're sorry but neu-ecode-web doesn't work properly without JavaScript enabled. Please enable it
to
continue.</strong></noscript>
<div>
<div data-v-1db03a06="" class="header">
<div data-v-1db03a06="" class="header-logo">
<img src="img/东北大学logo.png" alt="">
<div data-v-1db03a06="" class="iconfont-right"><img src="img/e码通.png"></div>
</div>
</div>
</div>
<!--onclick="F_Open_dialog()"-->
<div id="app2" data-v-1db03a06="" class="info-warp">
<div data-v-1db03a06="" class="avater"><input type="file" id="btn_file" style="display:none"
onchange="previewFile()"><img id="u_image" data-v-1db03a06="" src="img/face.jpg" alt="点击此处更换照片"
onclick="F_Open_dialog()"><span style="
font-size: 60px;
position: absolute;
left: calc(50% + 45px);
top: calc(160px + 5vh);
background: #fff;
border-radius:100%"><img src="img/dui.png" width="70" height="70"></span></div>
<div data-v-1db03a06="" class="user">
<div data-v-1db03a06="" class="name">崔明</div>
<div data-v-1db03a06="" class="code">2170642</div>
</div>
<div data-v-1db03a06="" class="pass">
<span data-v-1db03a06="">通行权限:</span>
<span data-v-1db03a06="" class="yes">允许</span>
<!---->
<!---->
</div>
<div data-v-1db03a06="" class="address">南湖校区南门<span data-v-1db03a06=""> 入</span></div>
<div data-v-1db03a06="" class="time">
<script language=Javascript>
function checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
const now = new Date();
document.write((1900 + now.getYear()) + "-" + checkTime((now.getMonth() + 1)) + "-" + checkTime(now.getDate()) + " "
+ checkTime(now.getHours()) + ":" + checkTime(now.getMinutes()) + ":" + checkTime(now.getSeconds()))
</script>
</div>
</div>
<div data-v-1db03a06="" class="footer">
<div data-v-1db03a06="">© 东北大学</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
<script>
function previewFile() {
// 通过标签选择器获取HTML元素
// var preview = document.querySelector('img');
var preview = document.getElementById("u_image")
var file = document.getElementById('btn_file').files[0];
// Js内置文件流
var reader = new FileReader();
// 更新img标签的src属性为图片的本地路径,就可以显示了
reader.onloadend = function () {
preview.src = reader.result;
}
// 图片文件不空就显示
if (file) {
reader.readAsDataURL(file);
} else {
// 图片文件是空的
preview.src = "";
}
}
var LocString = String(window.document.location.href);
function getQueryVariable(str) {
var rs = new RegExp("(^|)" + str + "=([^&]*)(&|$)", "gi").exec(LocString), tmp;
if (tmp = rs) return tmp[2];
return "没有这个参数";
}
axios.post('/user', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
function dateFormat(fmt, date) {
let ret;
const opt = {
"Y+": date.getFullYear().toString(), // 年
"m+": (date.getMonth() + 1).toString(), // 月
"d+": date.getDate().toString(), // 日
"H+": date.getHours().toString(), // 时
"M+": date.getMinutes().toString(), // 分
"S+": date.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
}
;
}
;
return fmt;
}
Vue.use(VueRouter)
const Foo = { template: '<div>foo</div>' }
const Bar = { template: '<div>bar</div>' }
const routes = [
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar }
]
var routerApp = new VueRouter({
routes // (缩写)相当于 routes: routes
})
var app = new Vue({
el: '#app2', // element
router: routerApp,
data: {
message: 'Hello Vue!',
id: 0,
name: '',
local: '',
path: "",
date: null,
image: null,
},
methods: {},
created: function () {
console.log(getQueryVariable("id"))
this.id = getQueryVariable("id")
console.log(getQueryVariable("name"))
this.name = decodeURI(getQueryVariable("name"))
console.log(getQueryVariable("local"))
this.local = decodeURI(getQueryVariable("local"))
tempData = new Date()
this.date = dateFormat("YYYY-mm-dd HH:MM:SS", tempData)
console.log(this.date)
}
})
Vue.use(VueRouter)
</script>
<!--
点击图片实现文件上传
https://www.cnblogs.com/brady-wang/p/5267489.html
-->
<script type="text/javascript">
function F_Open_dialog() {
document.getElementById("btn_file").click();
}
</script>
</body>