You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

203 lines
5.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>预约信息</title>
<script src="/js/qrcode.js"></script>
<script src="/js/jquery.js"></script>
<style>
html {
font-size: 100px;
}
body {
margin: 0;
}
.wrap {
background: rgb(0, 105, 135);
/* width: 10rem; */
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
margin-bottom: 0;
position: relative;
background: #006987;
height: 100vh;
}
.logo {
width: 60%;
margin: 0.42rem 0.4rem;
margin-top: 0.82rem;
display: block;
}
.card {
margin: 0.42rem;
background: #fff;
height: 100vh;
overflow: scroll;
box-shadow: 0 .48rem 1.49333rem .42667rem rgba(0, 0, 0, .047058823529411764), 0 .32rem .85333rem 0 rgba(0, 0, 0, .0784313725490196), 0 .16rem .32rem -.21333rem rgba(0, 0, 0, .11764705882352941);
}
.visit-info {
margin: .85333rem 0.28rem 0 0.28rem;
}
.visit-info-zn {
font-weight: 700;
font-size: 0.5rem;
letter-spacing: 0;
text-align: left;
line-height: 1.5;
}
.visit-info-cn {
font-weight: 700;
font-size: 0.47333rem;
letter-spacing: 0;
text-align: left;
line-height: 1.5;
}
.visit-time {
margin: .85333rem 0.28rem 0 0.28rem;
}
.visit-time-text {
color: #006987;
font-weight: 700;
font-size: 0.47333rem;
line-height: 1.5;
/* letter-spacing: 0;
text-align: justify;
text-align-last: justify; */
}
.visit-time-text-span {
/* text-align: justify; */
}
.visit-time-name {
color: #006987;
font-size: 0.47333rem;
line-height: 1.5;
text-align: left;
}
.qr {
margin-top: 1.06667rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.code {
width: 4rem;
height: 4rem;
}
.course-name {
margin: 1.06667rem 0.228rem 0 0.228rem;
color: #016987;
font-size: 0.47333rem;
line-height: 1.5;
letter-spacing: 0;
}
.refresh {
margin: 0.228rem 0.228rem 0 0.228rem;
color: #016987;
font-size: 0.47333rem;
line-height: 1.5;
letter-spacing: 0;
}
</style>
</head>
<body onunload="clearIn">
<div class="wrap">
<div class="card">
<img class="logo" src="/login-logo.png" alt="">
<div class="visit-info">
<div class="visit-info-zn">入校码有效期</div>
<div class="visit-info-cn">CAMPUS PASS VALID THROUGH</div>
</div>
<div class="visit-time">
<div class="visit-time-text">
<span class="visit-time-text-span">{{$appointment->start_time}}-{{$appointment->end_time}}</span>
</div>
<div class="visit-time-name">预约人:{{$appointment->name}}</div>
<div class="visit-time-name">预约场地:{{$appointment->site_detail->implode('address', '')}}</div>
</div>
<div class="qr">
<div class="qr-view" id="qrcode">
</div>
<div class="refresh" onclick="getCode()">点击刷新二维码</div>
</div>
{{-- <div class="course-name">苏州科技商学院第五期高级科创人才研修班模块二</div>--}}
</div>
</div>
</body>
<script>
$(function () {
var timer = null
if (!timer) {
setInterval(function () {
getCode()
}, 3 * 60 * 1000)
}
getCode()
})
function getCode() {
var url = 'https://wx.sstbc.com/api/user/qrcode-refresh'
$.ajax({
type: "get",
timeout: 15000,
contentType: 'application/json',
data: {'code': '{{$appointment->code}}'},
url: url,
dataType: "json",
success: function (result, textStatus, xhr) {
console.log(result)
var qrcodeText = result.qrcode;
$("#qrcode").empty()
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: qrcodeText,
width: 700,
height: 700,
colorDark: "#000000",
colorLight: "#ffffff",
// correctLevel : QRCode.CorrectLevel.H
});
},
complete: function (xhr, textStatus) {
//
}
});
}
function clearIn() {
if (timer) {
clearInterval(timer)
timer = null
}
}
</script>
</html>