Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
footseen-large-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b58cee3d
authored
Jun 21, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
d0af3288
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
6 deletions
yazhaiTest/lib/login.js
yazhaiTest/lineBack.html
yazhaiTest/lib/login.js
View file @
b58cee3d
...
...
@@ -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'
,
...
...
yazhaiTest/lineBack.html
View file @
b58cee3d
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment