201 lines
6.6 KiB
Plaintext
201 lines
6.6 KiB
Plaintext
@{
|
||
Layout = null;
|
||
}
|
||
|
||
<!DOCTYPE html>
|
||
<script src="@Url.Content("~/Scripts/jquery-1.12.4.min.js")"></script>
|
||
<link href="@Url.Content("~/Scripts/dist/style/weui.min.css")" rel="stylesheet" />
|
||
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||
<script src="@Url.Content("~/Scripts/jquery.date_input.pack.js")"></script>
|
||
<link href="@Url.Content("~/Scripts/datePicker.css")" rel="stylesheet" />
|
||
<script src="@Url.Content("~/layuiadmin/layui/layui.js")"></script>
|
||
<style type="text/css">
|
||
.demos-header {
|
||
padding: 35px 0;
|
||
}
|
||
|
||
.demos-title {
|
||
text-align: center;
|
||
font-size: 34px;
|
||
color: #3cc51f;
|
||
font-weight: 400;
|
||
margin: 0 15%;
|
||
}
|
||
.back_top{
|
||
width: 100%;
|
||
}
|
||
.von_wx {
|
||
width: 200px;
|
||
margin: 0 auto;
|
||
border-radius: 50%;
|
||
height: 200px;
|
||
border: 8px solid #16ebde;
|
||
text-align: center;
|
||
font-size: 30px;
|
||
line-height: 200px;
|
||
background: #0a7cde;
|
||
color: #FFF;
|
||
margin-top: 20px;
|
||
}
|
||
.clear_box::after{
|
||
content: "";
|
||
display: block;
|
||
clear: both;
|
||
}
|
||
.top_kmts.clear_box {
|
||
width: 60%;
|
||
margin: 0 auto;
|
||
text-align: center;
|
||
margin-top: 10px;
|
||
}
|
||
.line_left {
|
||
width: 20%;
|
||
height: 5px;
|
||
background: #097cd2;
|
||
float: left;
|
||
margin-top: 9px;
|
||
}
|
||
.con_content{
|
||
font-size: 16px;
|
||
margin: 0 10px;
|
||
float: left;
|
||
}
|
||
.line_right {
|
||
width: 20%;
|
||
background: #097cd2;
|
||
height: 5px;
|
||
float: left;
|
||
margin-top: 9px;
|
||
}
|
||
.con_rows_box{
|
||
margin-top: 20px;
|
||
|
||
}
|
||
.con_rows_box ul {
|
||
padding: 0px;
|
||
margin: 0px;
|
||
width: 95%;
|
||
margin: 0 auto;
|
||
padding: 10px 10px;
|
||
box-sizing: border-box;
|
||
border-left: 7px solid #097cd2;
|
||
margin-bottom: 20px;
|
||
}
|
||
.con_rows_box ul li {
|
||
font-size: 12px;
|
||
list-style: none;
|
||
padding: 3px;
|
||
box-sizing: border-box;
|
||
|
||
}
|
||
.cm_a {
|
||
font-size: 14px;
|
||
margin-bottom: 8px;
|
||
display: block;
|
||
color: #097cd2;
|
||
}
|
||
</style>
|
||
|
||
<html>
|
||
<head>
|
||
<meta name="viewport" content="width=device-width" />
|
||
<title>疾控开门</title>
|
||
<script>
|
||
wx.config({
|
||
debug: false, //是否调试,true,会弹窗
|
||
appId: '@dccdc.Common.Global.YMAppId', //得到这个东西,首先必须有一个公众号,或者企业号,如果已经拥有了,你可以就知道AppId在哪里了。
|
||
timestamp: '@ViewBag.timeStamp',//生成签名的时间戳,随机数,之后会用这个生成一个签名
|
||
nonceStr: '@ViewBag.nonceStr',//生成签名的随机串,随机串,之后会用这个生成一个签名
|
||
signature: '@ViewBag.signature',//这个就是签名了,在步骤4,我会详细讲解
|
||
jsApiList: [
|
||
'getLocation' //开启扫一扫功能,这里还可以添加更多的功能,比如微信支付
|
||
|
||
]
|
||
});
|
||
|
||
var loading;
|
||
function showLocation(text) {
|
||
|
||
//console.log(text, text.result[0].y, text.result[0].x);
|
||
$.ajax({
|
||
url: "@Url.Action("opendoor")",
|
||
data: {
|
||
doorid: '@ViewBag.doorid',
|
||
openId:'@ViewBag.openId' ,
|
||
jd: text.result[0].x,
|
||
wd: text.result[0].y
|
||
},
|
||
type: "post",
|
||
dataType: "json",
|
||
beforeSend: function () {
|
||
$.showLoading("正在开门请稍后……");
|
||
},
|
||
success: function (data) {
|
||
$.hideLoading();
|
||
var cm_div = document.getElementById("km_con");
|
||
if (data.State == 1) {
|
||
|
||
cm_div.innerText = "已开门"
|
||
//$("#km_con").innerText = "已开门"
|
||
$.toast(data.Message);
|
||
|
||
}
|
||
else {
|
||
cm_div.innerText = "未开门"
|
||
//$("#km_con").innerText = "未开门"
|
||
$.toast(data.Message, "forbidden");
|
||
|
||
}
|
||
}
|
||
});
|
||
}
|
||
wx.ready(function () {
|
||
wx.getLocation({
|
||
type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
||
success: function (res) {
|
||
var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
|
||
var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
|
||
// var speed = res.speed; // 速度,以米/每秒计
|
||
//var accuracy = res.accuracy; // 位置精度
|
||
var url = "http://api.map.baidu.com/geoconv/v1/?coords=" + longitude + "," + latitude + "&from=1&to=5&ak=flXgV7k0gqWG9Y15Xf4ALf7a6hGhH0lS"
|
||
+ "&callback=showLocation";
|
||
jQuery.getScript(url);
|
||
}
|
||
});
|
||
});
|
||
// wx.getLocation()
|
||
|
||
</script>
|
||
</head>
|
||
<body>
|
||
|
||
<script src="@Url.Content("~/Scripts/dist/weui.min.js")"></script>
|
||
<img src="~/Images/gzh_km_top.png" class="back_top" style="display:block;width:100%"/>
|
||
<div class="top_kmts clear_box">
|
||
<div class="line_left"></div>
|
||
<div class="con_content">
|
||
乐陵市铁营镇卫生院提示您
|
||
</div>
|
||
<div class="line_right"></div>
|
||
</div>
|
||
<div class="con_rows_box clear_box">
|
||
<ul>
|
||
<a class="cm_a">出门正确步骤</a>
|
||
<li><san class="li_y">1.</san>出门前先洗手</li>
|
||
<li><san class="li_y">2.</san>佩戴一次性医用口罩</li>
|
||
<li><san class="li_y">3.</san>回家后,外衣外裤,使用酒精喷雾消毒</li>
|
||
<li><san class="li_y">4.</san>摘掉口罩</li>
|
||
<li><san class="li_y">5.</san>再次洗手消毒</li>
|
||
<li><san class="li_y">6.</san>手机、钥匙、眼镜等使用消毒湿巾或75%的酒精消毒</li>
|
||
</ul>
|
||
<ul>
|
||
<a class="cm_a">出门后要注意</a>
|
||
<li><san class="li_y">1.</san>不要到人流密集的场所</li>
|
||
<li><san class="li_y">2.</san>多准备好纸巾、垃圾袋等</li>
|
||
</ul>
|
||
</div>
|
||
<div class="von_wx">
|
||
<a id="km_con">开门中...</a>
|
||
</div>
|
||
</body>
|
||
</html> |