基本信息
源码名称:微信扫描网站登录实例
源码大小:34.55M
文件格式:.zip
开发语言:C#
更新时间:2017-03-21
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 20 元 
   源码介绍
打开微信扫一扫二维码 登录网页


@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Login</title>
    <style>
        #qrcode-container {
            width: 256px;
            height: 256px;
            margin: 0 auto;
        }

        .author_tip {
            margin: 20px auto;
            width: 256px;
            margin-top: 50px;
            color: #a06b06;
            font-family: "微软雅黑";
            line-height: 150%;
            font-size: 18px;
        }

            .author_tip div {
                width: 100%;
                text-align: right;
                font-size: 15px;
            }
    </style>
</head>
<body>
    <div class="author_tip">
        PC端微信扫码授权登录<br />
        <div>-- Cboyce  2016-9-13</div>
    </div>

    <!--生成二维码的容器 div-->
    <div id="qrcode-container">
    </div>

    <script src="~/Plugins/Jquery/jquery-1.9.1.min.js"></script>
    <script src="~/Plugins/jquery-qrcode/jquery.qrcode.min.js"></script>
    <script>
        jQuery(function () {
            //生成二维码           
            jQuery('#qrcode-container').qrcode("@ViewBag.url");

            //轮询判断用户是否授权
            var interval = setInterval(function () {
                $.post("@Url.Action("UserIsLogin", "Home")", { "uuid": "@ViewBag.uuid" }, function (data, status) {
                    if ("success" == status) {
                        //用户成功授权=>跳转
                        if ("success" == data) {
                            window.location.href = '@Url.Action("Index", "Home")';
                            clearInterval(interval);
                        }
                    }
                });
            }, 200);
        })
    </script>
</body>
</html>