Commit b58cee3d by libai

测试

parent d0af3288
...@@ -144,6 +144,11 @@ function loginGo(){ ...@@ -144,6 +144,11 @@ function loginGo(){
}) })
$(".line_btn").on("click",function(){ $(".line_btn").on("click",function(){
lineLog() lineLog()
setInterval(function(){
if(localStorage.uid!=undefined){
window.location.reload()
}
},1000)
}) })
$('.facebook_btn').on('click', function () { $('.facebook_btn').on('click', function () {
FB.login(function (response) { FB.login(function (response) {
...@@ -156,7 +161,7 @@ function loginGo(){ ...@@ -156,7 +161,7 @@ function loginGo(){
$.ajax({ $.ajax({
url:$ip+'third/login', url:$ip+'third/login',
data:{ data:{
openid:382456482257502, openid:info.id,
opentype:6, opentype:6,
authToken:response.authResponse.accessToken, authToken:response.authResponse.accessToken,
authSecret:'02f716c256cb1aab9299145ede73c13f', authSecret:'02f716c256cb1aab9299145ede73c13f',
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<body> <body>
<!-- <h1 id="timeJump">登錄成功,<span id="jTime">5</span>秒后返回App</h1> --> <!-- <h1 id="timeJump">登錄成功,<span id="jTime">5</span>秒后返回App</h1> -->
<script type="text/javascript" src="lib/jquery-3.1.1.min.js"></script> <script type="text/javascript" src="lib/jquery-3.1.1.min.js"></script>
<script src="lib/default.js"></script>
<script> <script>
var urlParam = url_get_params(); var urlParam = url_get_params();
$.ajax({ $.ajax({
...@@ -39,17 +40,38 @@ ...@@ -39,17 +40,38 @@
id_token: mAutho.id_token id_token: mAutho.id_token
}, },
success: function (res) { success: function (res) {
console.log(res) console.log('line',res)
$.ajax({
url:$ip+'third/login',
data:{
openid:res.sub,
opentype:8,
authToken:mAutho.id_token,
nickname:res.name,
facepath:res.iss
},
success:function(data){
console.log('line',data)
if(data.code!=1){
layer.msg(data.msg)
return;
}
localStorage.token=data.token
localStorage.uid=data.uid
setTimeout(function(){
window.close()
},500)
}
})
// window.location.href = "footseenlogin://" + encodeURIComponent("www.firefly.live?token=" + mAutho.id_token + "&name=" + res.name + "&profileImageUrl=" + res.iss + "&id=" + res.sub); // window.location.href = "footseenlogin://" + encodeURIComponent("www.firefly.live?token=" + mAutho.id_token + "&name=" + res.name + "&profileImageUrl=" + res.iss + "&id=" + res.sub);
} }
}) })
} }
}) })
function lineGo(){
}
function url_get_params() { function url_get_params() {
var url = location.href; var url = location.href;
var theRequest = new Object(); var theRequest = new Object();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment