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
9a8a29de
authored
Jun 20, 2022
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
13a86c61
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
33 deletions
yazhaiTest/css/login.css
yazhaiTest/css/login.less
yazhaiTest/css/neck.css
yazhaiTest/css/neck.less
yazhaiTest/lib/login.js
yazhaiTest/pc.html
yazhaiTest/css/login.css
View file @
9a8a29de
...
...
@@ -31,7 +31,7 @@
margin-top
:
40px
;
cursor
:
pointer
;
}
#
google-login-btn
{
.
google-login-btn
{
width
:
390px
;
height
:
70px
;
background
:
url(https://www.footseen.xyz/yazhaiTest/images/google-login-btn.png)
no-repeat
;
...
...
@@ -41,7 +41,7 @@
margin-top
:
0px
;
cursor
:
pointer
;
}
#
google-login-btn
.abcRioButton
{
.
google-login-btn
.abcRioButton
{
height
:
70px
!important
;
width
:
390px
!important
;
opacity
:
0
;
...
...
yazhaiTest/css/login.less
View file @
9a8a29de
...
...
@@ -31,7 +31,7 @@
margin-top: 40px;
cursor: pointer;
}
#
google-login-btn{
.
google-login-btn{
width: 390px;
height: 70px;
background: url(https://www.footseen.xyz/yazhaiTest/images/google-login-btn.png)no-repeat;
...
...
yazhaiTest/css/neck.css
View file @
9a8a29de
...
...
@@ -430,6 +430,10 @@ body::-webkit-scrollbar {
font-size
:
18px
;
padding-top
:
20px
;
}
.video-list-box
{
width
:
1440px
;
margin
:
0
auto
;
}
.more-shadow
{
width
:
100vw
;
position
:
fixed
;
...
...
yazhaiTest/css/neck.less
View file @
9a8a29de
...
...
@@ -452,7 +452,10 @@
padding-top: 20px;
}
}
.video-list-box{
width: 1440px;
margin: 0 auto;
}
.more-shadow{
width: 100vw;
position: fixed;
...
...
yazhaiTest/lib/login.js
View file @
9a8a29de
...
...
@@ -5,7 +5,7 @@ function loginGo(){
html
+=
' <div style="display: none;" class="login-box1">'
;
html
+=
' <div class="login-title">登入</div>'
;
html
+=
' <div class="phone-login-btn"></div>'
;
html
+=
' <div class="g
-signin2" data-onsuccess="onSignIn" data-theme="dark" id="google-login-btn
"></div>'
;
html
+=
' <div class="g
oogle-login-btn" id="buttonDiv
"></div>'
;
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 src="https://www.footseen.xyz/yazhaiTest/images/login-icon2.png" alt=""></div>'
;
...
...
@@ -125,21 +125,11 @@ function loginGo(){
html
+=
'<div class="login-face-out">跳過,稍後再決定</div>'
;
html
+=
'</div>'
;
$
(
".login-content"
).
html
(
html
);
function
handleCredentialResponse
(
response
)
{
console
.
log
(
"Encoded JWT ID token: "
+
response
.
credential
);
}
function
onSignIn
(
googleUser
)
{
// Useful data for your client-side scripts:
var
profile
=
googleUser
.
getBasicProfile
();
console
.
log
(
"ID: "
+
profile
.
getId
());
// Don't send this directly to your server!
console
.
log
(
'Full Name: '
+
profile
.
getName
());
console
.
log
(
'Given Name: '
+
profile
.
getGivenName
());
console
.
log
(
'Family Name: '
+
profile
.
getFamilyName
());
console
.
log
(
"Image URL: "
+
profile
.
getImageUrl
());
console
.
log
(
"Email: "
+
profile
.
getEmail
());
// The ID token you need to pass to your backend:
var
id_token
=
googleUser
.
getAuthResponse
().
id_token
;
console
.
log
(
"ID Token: "
+
id_token
);
}
var
html
=
[];
html
+=
'<div style="display: none;" class=nav-login-btn>登入/註冊</div>'
;
html
+=
'<div style="display: none;" class="nav-login">'
;
...
...
@@ -242,6 +232,18 @@ function loginGo(){
layer
.
closeAll
()
}
})
window
.
onload
=
function
()
{
google
.
accounts
.
id
.
initialize
({
client_id
:
"YOUR_GOOGLE_CLIENT_ID"
,
callback
:
handleCredentialResponse
});
google
.
accounts
.
id
.
renderButton
(
document
.
getElementById
(
"buttonDiv"
),
{
theme
:
"outline"
,
size
:
"large"
}
// customization attributes
);
google
.
accounts
.
id
.
prompt
();
// also display the One Tap dialog
}
console
.
log
(
2121
)
})
var
jsSrc
=
(
navigator
.
language
||
navigator
.
browserLanguage
).
toLowerCase
();
if
(
jsSrc
.
indexOf
(
'zh-cn'
)
!=-
1
){
...
...
yazhaiTest/pc.html
View file @
9a8a29de
...
...
@@ -91,7 +91,7 @@
</div>
<div
class=
"m-box"
>
<div
style=
"height: 60px;"
></div>
<div
id=
"buttonDiv"
></div>
<ul
class=
"live-box-ul clearfix"
>
<!-- <li>
<div class="live-top-box">
...
...
@@ -321,20 +321,6 @@ $(function(){
// $("head").append(html)
// $(".google-login").attr("src","https://apis.google.com/js/platform.js")
function handleCredentialResponse(response) {
console.log("Encoded JWT ID token: " + response.credential);
}
window.onload = function () {
google.accounts.id.initialize({
client_id: "534183685500-ag0vai0jh6todldi4rg6lvp0gcsojk0n.apps.googleusercontent.com",
callback: handleCredentialResponse
});
google.accounts.id.renderButton(
document.getElementById("buttonDiv"),
{ theme: "outline", size: "large" } // customization attributes
);
google.accounts.id.prompt(); // also display the One Tap dialog
}
loginGo()
var scrollOk=true;
...
...
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