<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>代理授权</title>
</head>
<body>
</body>
<script>
var code = getPara("code");
var redirect = getPara("url");
if(redirect){
if(!code){
var appid = getPara("appid");
var state = getPara("state");
var redirect_url = encodeURIComponent('https://nx.nx10010.cn/proxy.html?url='+redirect);
var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+"&redirect_uri=" + redirect_url + "&response_type=code&scope=snsapi_base&state="+state+"#wechat_redirect";
location.href = url;
}else{
var state = getPara("state");
if(redirect.split('?').length > 1){