钉钉免登移动端已经成功了,但是PC端还是不行,怎么试都不行,请各位高人给些建议!以下是我的代码:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="GetMianDengCodePC.aspx.vb" Inherits="Pages_PublicPages_GetMianDengCodePC" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" src="http://g.alicdn.com/dingding/dingtalk-pc-api/2.3.1/index.js" ></script>
<script type="text/javascript">
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
};
DingTalkPC.ready(function () {
DingTalkPC.runtime.permission.requestAuthCode({
corpId: 'dingxxxxxxxxxxxxxxxxxxxx', //企业ID
onSuccess: function (result) {
var yingYong = getQueryString("application");
window.location.href = "/Pages/PublicPages/ValidateMianDeng.aspx?code=" + result.code + "&application="+yingYong;
},
onFail: function (err) {
window.location.href = "/Pages/PublicPages/Login.aspx";
}
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。