提交确实的文件

feature/pay
cyc 6 years ago
parent 80dc193869
commit 5b82484514

@ -0,0 +1,41 @@
$(function(){
var url = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoaeyo28cm9bj2cxoxs&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dingding/index/auth_login");
var obj = DDLogin({
id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id例如<div id="login_container"></div>或<span id="login_container"></span>
goto: url,
style: "",
href: "",
width : "300px",
height: "300px"
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
var origin = event.origin;
login_url = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoaeyo28cm9bj2cxoxs&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dingding/index/auth_login&loginTmpCode='+loginTmpCode;
window.location.href = login_url;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
$('.login_type').click(function(){
if($(this).html() == '账号登录'){
$('.pc_login').removeClass('hide');
$('#login_container').addClass('hide');
$('.ding_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).prev().removeClass('login_type_active');
}
if($(this).html() == '钉钉扫码登录'){
$('.ding_login').removeClass('hide');
$('#login_container').removeClass('hide');
$('.pc_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).next().removeClass('login_type_active');
}
});
});

@ -0,0 +1,29 @@
.ding_login{
width:365px;
height:400px;
margin:0 auto;
}
.login_header{
width: 100%;
height: 64px;
font-size: 18px;
color: #898d90;
overflow: hidden;
border-bottom: 1px solid #e8e8e8;
}
.login_type{
width: 50%;
line-height: 60px;
text-align: center;
border-bottom: 4px solid transparent;
float: left;
cursor: pointer;
}
.login_type_active{
color: #38adff;
border-bottom: 4px solid #38adff;
cursor: default;
}
.hide{
display: none;
}

@ -0,0 +1,41 @@
$(function(){
var url = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoaeyo28cm9bj2cxoxs&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dingding/index/auth_login");
var obj = DDLogin({
id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id例如<div id="login_container"></div>或<span id="login_container"></span>
goto: url,
style: "",
href: "",
width : "300px",
height: "300px"
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
var origin = event.origin;
login_url = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoaeyo28cm9bj2cxoxs&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dingding/index/auth_login&loginTmpCode='+loginTmpCode;
window.location.href = login_url;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
$('.login_type').click(function(){
if($(this).html() == '账号登录'){
$('.pc_login').removeClass('hide');
$('#login_container').addClass('hide');
$('.ding_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).prev().removeClass('login_type_active');
}
if($(this).html() == '钉钉扫码登录'){
$('.ding_login').removeClass('hide');
$('#login_container').removeClass('hide');
$('.pc_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).next().removeClass('login_type_active');
}
});
});

@ -0,0 +1,29 @@
.ding_login{
width:365px;
height:400px;
margin:0 auto;
}
.login_header{
width: 100%;
height: 64px;
font-size: 18px;
color: #898d90;
overflow: hidden;
border-bottom: 1px solid #e8e8e8;
}
.login_type{
width: 50%;
line-height: 60px;
text-align: center;
border-bottom: 4px solid transparent;
float: left;
cursor: pointer;
}
.login_type_active{
color: #38adff;
border-bottom: 4px solid #38adff;
cursor: default;
}
.hide{
display: none;
}

@ -0,0 +1,43 @@
$(function(){
var url = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoagxeeheunc0p95eu8&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/webht.php/apps/dingmail/index/auth_login");
var obj = DDLogin({
id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id例如<div id="login_container"></div>或<span id="login_container"></span>
goto: url,
style: "",
href: "",
width : "300px",
height: "300px"
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
var origin = event.origin;
login_url = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoagxeeheunc0p95eu8&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/webht.php/apps/dingmail/index/auth_login&loginTmpCode='+loginTmpCode;
window.location.href = login_url;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
$('.login_type').click(function(){
console.log($(this).html());
if($(this).html() == '钉钉帐号密码登录'){
$('.pc_login').removeClass('hide');
$('#login_container').addClass('hide');
$('.ding_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).prev().removeClass('login_type_active');
}
if($(this).html() == '钉钉扫码登录'){
$('.ding_login').removeClass('hide');
$('#login_container').removeClass('hide');
$('.pc_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).next().removeClass('login_type_active');
}
});
});

@ -0,0 +1,42 @@
$(function(){
var url = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoar4ini4akuc7mifny&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://share.chtcdn.com/webht.php/apps/dingmailtest/index/auth_login");
var obj = DDLogin({
id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id例如<div id="login_container"></div>或<span id="login_container"></span>
goto: url,
style: "",
href: "",
width : "300px",
height: "300px"
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
var origin = event.origin;
login_url = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoar4ini4akuc7mifny&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://share.chtcdn.com/webht.php/apps/dingmailtest/index/auth_login&loginTmpCode='+loginTmpCode;
window.location.href = login_url;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
$('.login_type').click(function(){
if($(this).html() == '账号登录'){
$('.pc_login').removeClass('hide');
$('#login_container').addClass('hide');
$('.ding_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).prev().removeClass('login_type_active');
}
if($(this).html() == '钉钉扫码登录'){
$('.ding_login').removeClass('hide');
$('#login_container').removeClass('hide');
$('.pc_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).next().removeClass('login_type_active');
}
});
});
Loading…
Cancel
Save