67 lines
2.0 KiB
Plaintext
67 lines
2.0 KiB
Plaintext
@model Senparc.Weixin.MP.Helpers.JsSdkUiPackage
|
|
@{
|
|
ViewData["Title"] = "移民局政务服务平台";
|
|
Layout = "~/Views/Shared/_LayoutQr1.cshtml";
|
|
}
|
|
<div class="content1">
|
|
<div style="width:100%;text-align:center;">
|
|
<div>
|
|
<img src="~/images/crj.jpg" class="logo1" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<wx-open-launch-weapp id="launch-btn"
|
|
username="gh_e5e2507034ea"
|
|
style="width:95vw;z-index: 10; overflow: hidden;">
|
|
<script type="text/wxtag-template">
|
|
<button style="width:100%;height:45px;border:none;color:#fff;line-height: 45px;background:#0f5abf;border-radius: 10px;font-size:20px;margin-top: 10px;">预约办理</button>
|
|
</script>
|
|
</wx-open-launch-weapp>
|
|
</div>
|
|
</div>
|
|
@section css
|
|
{
|
|
<style>
|
|
body {
|
|
background-color: #fff;
|
|
}
|
|
|
|
.logo1 {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.content1 {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
</style>
|
|
}
|
|
@section Scripts
|
|
{
|
|
<script type="text/javascript">
|
|
wx.config({
|
|
debug: false,
|
|
appId: '@Model.AppId',
|
|
timestamp: '@Model.Timestamp', // 必填,生成签名的时间戳
|
|
nonceStr: '@Model.NonceStr', // 必填,生成签名的随机串
|
|
signature: '@Model.Signature',// 必填,签名
|
|
jsApiList: ['getNetworkType'],
|
|
openTagList: ['wx-open-launch-weapp']
|
|
});
|
|
wx.error(function (res) {
|
|
console.log(res);
|
|
alert('验证失败');
|
|
});
|
|
var btn = document.getElementById('launch-btn');
|
|
btn.addEventListener('launch', function (e) {
|
|
console.log('success');
|
|
});
|
|
btn.addEventListener('error', function (e) {
|
|
console.log('fail', e.detail);
|
|
});
|
|
</script>
|
|
} |