MeiRiYiCheng_1_old/YBDevice.NApi/Views/Qr/Show.cshtml

97 lines
4.2 KiB
Plaintext
Raw Permalink Normal View History

2025-07-16 17:14:38 +08:00
@{
ViewData["Title"] = "健康生活每一天";
var cdnurl = Nirvana.Common.Configs.GetString("CDNURL");
var bgurl = $"{cdnurl}/img/qr/bg.jpg";
var borderurl = $"{cdnurl}/img/qr/border.png";
Layout = "~/Views/Shared/_LayoutQr.cshtml";
int officetype = (int)ViewData["officetype"];//公众号类型,1-认证的服务号,2-非认证号或者订阅号,3-个人号
}
<div class="container">
<!-- logo -->
<div class="row">
<img src="@cdnurl/img/qr/logo.png" class="img-small" style="height: 10vh;width: auto;" />
</div>
@if (officetype == 2)
{
<div id="jkm" style="display: none;" align="center">
<div class="text-white retcode">
<span class="text-gray" style="font-size: 2.5vh">您的健康码&nbsp;</span><br />
<span id="tagWV" class="tagWV" style="font-size: 5vh;color: rgb(255, 238, 2);font-weight:bold;">@ViewData["vrcode"]</span>
<br />
</div>
</div>
<br />
}
<!-- 二维码 -->
<div class="row text-center">
<div class="border">
<img alt="请稍候" id="qrimg" src="@ViewData["ercode"]" style="height: 13vh;width: 13vh;min-width: 23vh;min-height: 23vh;margin: 3vh;" />
</div>
</div>
@if (officetype == 2)
{
<!-- 健康码 -->
<div align="center" id="dyhV" style="display: none;">
<div align="center" id="wvvv" style="font-size: 16.5px;">
<span class="text-white text-weight">请长按识别二维码关注</span><br />
<span class="text-gray">关注后<span id="tagWV" style="font-size: 3vh;color: rgb(255, 238, 2);font-weight:bold;">回复 @ViewData["vrcode"]或【体重】</span>,查看您的健康报告</span>
<br>
</div>
</div>
}
else if (officetype == 3)
{
<!-- 健康码 -->
<div align="center" id="dyhV" style="display: none;">
<div align="center" id="wvvv" style="font-size: 16.5px;">
<span class="text-white text-weight">请长按识别二维码关注</span><br />
<span class="text-gray">添加成功之后<span id="tagWV" style="font-size: 3vh;color: rgb(255, 238, 2);font-weight:bold;">回复【体重】</span>,查看您的健康报告</span>
<br>
</div>
</div>
}
else
{
<!-- 提示 -->
<div align="center" id="addv" style="font-size: 2.5vh">
<h4 class="text-white text-weight" style="margin: 3vh;">请长按识别二维码关注</h4>
<span class="text-gray">关注后查看您的健康报告</span><br>
<span class="text-gray">(此二维码仅能使用一次,3分钟内有效)</span>
</div>
}
<!-- 小熊动画 -->
<div class="">
<img src="@cdnurl/img/qr/dox_logo.png" class="img-responsive" id="logimg" style="margin-left: -10vh;left: 50%;bottom:-20vh;position: absolute;width:auto;height: 20vh;" />
</div>
</div>
@section Scripts{
<script type="text/javascript">
$("#logimg").animate({
bottom: '+=20vh',
}, 2000);
/* begin禁用微信分享功能 */
function onBridgeReady() {
WeixinJSBridge.call('hideOptionMenu');
WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
// 在这里拿到e.err_msg这里面就包含了所有的网络类型
// alert(e.err_msg);
});
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
} else {
onBridgeReady();
}
/* end禁用微信分享功能 */
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
</script>
}