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
e90ba620
authored
Nov 16, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
3d38d980
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
2 deletions
mTest/css/login.css
mTest/css/login.less
mTest/index.html
mTest/lib/login.js
mTest/css/login.css
View file @
e90ba620
...
...
@@ -492,4 +492,5 @@
position
:
absolute
;
top
:
0
;
left
:
0
;
opacity
:
0
;
}
mTest/css/login.less
View file @
e90ba620
...
...
@@ -505,4 +505,5 @@
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
\ No newline at end of file
mTest/index.html
View file @
e90ba620
...
...
@@ -37,6 +37,7 @@
<link
rel=
"stylesheet"
href=
"css/index.css?v=2022111401"
>
<link
rel=
"stylesheet"
href=
"css/login.css?v=2022111405"
>
<script
src=
"https://accounts.google.com/gsi/client"
async
defer
></script>
<script
async
defer
crossorigin=
"anonymous"
src=
"https://connect.facebook.net/en_US/sdk.js"
></script>
<style>
.layui-layer-shade
{
opacity
:
0.7
!important
;
...
...
@@ -260,7 +261,7 @@
<div
class=
"login-line-text"
>
其他方式登入
</div>
<ul
class=
"login-more-btn"
>
<li><img
src=
"images/d2.png"
alt=
""
></li>
<li><img
src=
"images/d3.png"
alt=
""
></li>
<li
class=
"facebook_btn"
><img
src=
"images/d3.png"
alt=
""
></li>
<li><img
src=
"images/d4.png"
alt=
""
></li>
</ul>
</div>
...
...
mTest/lib/login.js
View file @
e90ba620
...
...
@@ -494,7 +494,53 @@ function loginPage(){
googleLogin
()
$
(
".login-show"
).
show
()
}
$
(
".facebook_btn"
).
on
(
"click"
,
function
(){
FB
.
login
(
function
(
response
)
{
if
(
response
.
status
===
'connected'
)
{
// Logged into your webpage and Facebook.
FB
.
api
(
'/me'
,
function
(
info
)
{
//console.log('Successful login for: ' + info.name);
//console.log(info)
//console.log(response)
$
.
ajax
({
url
:
$ip
+
'third/login'
,
data
:{
openid
:
info
.
id
,
opentype
:
6
,
authToken
:
response
.
authResponse
.
accessToken
,
authSecret
:
'02f716c256cb1aab9299145ede73c13f'
,
nickname
:
info
.
name
,
pageID
:
localStorage
.
canvasCode
,
// facepath:p.thumbnail
},
success
:
function
(
data
){
//console.log('Facebook登录',data)
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
$
.
ajax
({
url
:
$ip
+
'activeLog/webActive'
,
data
:{
activeType
:
7
,
pageID
:
localStorage
.
canvasCode
,
uid
:
localStorage
.
uid
},
success
:
function
(
data
){
window
.
location
.
reload
()
}
})
}
})
// window.location.href = "footseenlogin://" + encodeURIComponent("www.firefly.live?token=" + response.authResponse.accessToken + "&name=" + info.name + "&id=" + info.id);
// document.getElementById('status').innerHTML =
// 'Thanks for logging in, ' + response.name + '!';
// window.location.href = "footseenlogin://" + encodeURIComponent("www.firefly.live?token=" + info.authResponse.accessToken + "&name=" + response.name + "&id=" + response.id);
});
}
else
{
// The person is not logged into your webpage or we are unable to tell.
}
});
})
function
handleCredentialResponse
(
response
)
{
//console.log("Encoded JWT ID token: " + response.credential);
$
.
ajax
({
...
...
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