审计记录

WebContent/WEB-INF/res/authRedirect.html 2.7 KB
zxt@theyeasy.com committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/Layuiglobal.css">
<style>
h4 {
	border-bottom: 1px solid #eee;
	line-height: 40px;
	padding-left: 20px;
}

.accredittrue,.accreditfalse {
	text-align: center;
	margin-top: 60px;
	display: none;
}

.wxblock {
	border: 1px solid #43c2af;
	border-radius: 10px;
	width: 680px;
	height: 380px;
}

.succbck {
	background: url(../../res/images/succ1.png) no-repeat center;
	-webkit-background-size: contain;
	background-size: contain;
}

.failbck {
	background: url(../../res/images/fail1.png) no-repeat center;
	-webkit-background-size: contain;
	background-size: contain;
}

.result {
	display: inline-block;
	margin-top: 70px;
}

.result i {
	width: 40px;
	height: 40px;
	float: left;
	margin-right: 10px;
	display: inline-block;
}

.result span {
	color: #0088CC;
	line-height: 40px;
	font-size: 20px;
	float: left;
	font-weight: bold;
}

.wxblock {
	overflow: hidden;
	border: 1px solid #ccc;
	text-align: center;
	margin: 40px auto;
}

h4 {
	line-height: 40px;
}

h4 i {
	font-size: 30px;
	margin-right: 10px;
}
</style>
</head>
<body>
	<h4>
		<i class="layui-icon">&#xe620;</i>微信号配置
	</h4>
	<section class="wxblock">
		<div class="accredittrue">
			<p class="result">
				<i class="succbck"></i><span>授权成功!</span>
			</p>
		</div>
		<div class="accreditfalse" style="display: none;">
			<p class="result">
				<i class="failbck"></i><span class="failtxt">授权失败!</span>
			</p>
		</div>
	</section>

</body>
<script src='/zzhnc/res/js/jquery.min.js'></script>
<script type="text/javascript" src="/zzhnc/res/js/jquery.qqFace.js"></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script src="/zzhnc/res/js/me.js"></script>
<script>
	layui.use([ 'layer', 'element' ], function() {
		var element = layui.element;
		var layer = layui.layer //初始化弹窗组件
		var timer;//声明一个定时器 
		var loadurl = window.location.href;
		console.log(loadurl);
		var arr = loadurl.split("auth_code=");
		var url = arr[1];
		console.log(url);
		var arr1 = url.split("&expires_in");
		console.log(arr1[0], arr1[1]);
		var auth_code = arr1[0];
		console.log(auth_code);

		function publik() {
			$.post("../wx/getAuthAuthorization", {
				auth_code : auth_code,
				merchantId: 1
			}, function(data) {
				console.log(data);
				if (data.code == 0) {
					$(".accredittrue").show();
					$(".accreditfalse").hide();
				} else {
					$(".accreditfalse").hide();
					$(".failtxt").html(data.msg);
					$(".accredittrue").show();
				}
			})
		}
		
		publik();

	})
</script>
</html>