Commit b58cee3d by libai

测试

parent d0af3288
......@@ -144,6 +144,11 @@ function loginGo(){
})
$(".line_btn").on("click",function(){
lineLog()
setInterval(function(){
if(localStorage.uid!=undefined){
window.location.reload()
}
},1000)
})
$('.facebook_btn').on('click', function () {
FB.login(function (response) {
......@@ -156,7 +161,7 @@ function loginGo(){
$.ajax({
url:$ip+'third/login',
data:{
openid:382456482257502,
openid:info.id,
opentype:6,
authToken:response.authResponse.accessToken,
authSecret:'02f716c256cb1aab9299145ede73c13f',
......
......@@ -17,6 +17,7 @@
<body>
<!-- <h1 id="timeJump">登錄成功,<span id="jTime">5</span>秒后返回App</h1> -->
<script type="text/javascript" src="lib/jquery-3.1.1.min.js"></script>
<script src="lib/default.js"></script>
<script>
var urlParam = url_get_params();
$.ajax({
......@@ -39,17 +40,38 @@
id_token: mAutho.id_token
},
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);
}
})
}
})
function lineGo(){
}
function url_get_params() {
var url = location.href;
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