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
06cf5c9f
authored
Jun 21, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
f1fd6d8d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
2 deletions
yazhaiTest/css/login.css
yazhaiTest/css/login.less
yazhaiTest/lib/hello.js
yazhaiTest/lib/login.js
yazhaiTest/pc.html
yazhaiTest/css/login.css
View file @
06cf5c9f
...
...
@@ -69,6 +69,7 @@
}
.more-login-box
.more-login-icon
img
{
width
:
68px
;
cursor
:
pointer
;
}
.login-input-area
{
position
:
relative
;
...
...
yazhaiTest/css/login.less
View file @
06cf5c9f
...
...
@@ -68,6 +68,7 @@
font-size: 0;
img{
width: 68px;
cursor: pointer;
}
}
}
...
...
yazhaiTest/lib/hello.js
0 → 100644
View file @
06cf5c9f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
yazhaiTest/lib/login.js
View file @
06cf5c9f
...
...
@@ -9,7 +9,7 @@ function loginGo(){
html
+=
' <div class="more-login"><img src="https://www.footseen.xyz/yazhaiTest/images/more-login.png" alt=""></div>'
;
html
+=
' <div class="more-login-box">'
;
html
+=
' <div class="more-login-icon"><img id="twitter_btn" src="https://www.footseen.xyz/yazhaiTest/images/login-icon2.png" alt=""></div>'
;
html
+=
' <div class="more-login-icon"><img src="https://www.footseen.xyz/yazhaiTest/images/login-icon3.png" alt=""></div>'
;
html
+=
' <div class="more-login-icon"><img
class="facebook_btn"
src="https://www.footseen.xyz/yazhaiTest/images/login-icon3.png" alt=""></div>'
;
html
+=
' <div class="more-login-icon"><img src="https://www.footseen.xyz/yazhaiTest/images/login-icon4.png" alt=""></div>'
;
html
+=
' </div>'
;
html
+=
' </div>'
;
...
...
@@ -141,7 +141,24 @@ function loginGo(){
login_twitter
(
'twitter'
);
})
$
(
'.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
(
response
)
// 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
googleLogin
(){
google
.
accounts
.
id
.
initialize
({
...
...
@@ -1026,4 +1043,51 @@ function login_twitter(network) { //登录方法,并将twitter ä½œä¸ºå‚æ•°ä¼
// window.location.href = ;
},
log
);
}
//facebook
var
info
;
function
statusChangeCallback
(
response
)
{
// Called with the results from FB.getLoginStatus().
console
.
log
(
'statusChangeCallback'
);
console
.
log
(
response
);
// The current login status of the person.
if
(
response
.
status
===
'connected'
)
{
// Logged into your webpage and Facebook.
info
=
response
testAPI
();
}
else
{
// Not logged into your webpage or we are unable to tell.
// document.getElementById('status').innerHTML = 'Please log ' +
// 'into this webpage.';
}
}
function
checkLoginState
()
{
// Called when a person is finished with the Login Button.
FB
.
getLoginStatus
(
function
(
response
)
{
// See the onlogin handler
statusChangeCallback
(
response
);
});
}
window
.
fbAsyncInit
=
function
()
{
FB
.
init
({
appId
:
'382456482257502'
,
cookie
:
true
,
// Enable cookies to allow the server to access the session.
xfbml
:
true
,
// Parse social plugins on this webpage.
version
:
'v13.0'
// Use this Graph API version for this call.
});
FB
.
getLoginStatus
(
function
(
response
)
{
// Called after the JS SDK has been initialized.
statusChangeCallback
(
response
);
// Returns the login status.
});
};
function
testAPI
()
{
// Testing Graph API after login. See statusChangeCallback() for when this call is made.
console
.
log
(
'Welcome! Fetching your information.... '
);
FB
.
api
(
'/me'
,
function
(
response
)
{
console
.
log
(
'Successful login for: '
+
response
.
name
);
// 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);
});
}
\ No newline at end of file
yazhaiTest/pc.html
View file @
06cf5c9f
...
...
@@ -18,7 +18,7 @@
<link
rel=
"stylesheet"
href=
"css/neck.css"
>
<link
rel=
"stylesheet"
href=
"css/login.css?v=20220620"
>
<script
src=
"https://accounts.google.com/gsi/client"
async
defer
></script>
<script
src=
"
https://adodson.com/hello.js/dist/hello.all
.js"
></script>
<script
src=
"
lib/hello
.js"
></script>
</head>
<body
style=
"background: #F4F5F8"
>
...
...
@@ -316,6 +316,7 @@
<script
src=
"lib/fingerprint2.js"
></script>
<script
src=
"lib/default.js?v='20220407'"
></script>
<script
src=
"lib/login.js?v=20220620"
></script>
<script
async
defer
crossorigin=
"anonymous"
src=
"https://connect.facebook.net/en_US/sdk.js"
></script>
<script>
$
(
function
(){
// var html=[]
...
...
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