Commit f817f0cf by libai

测试

parent 20098f0a
alert(12121)
\ No newline at end of file
...@@ -5,7 +5,7 @@ function loginGo(){ ...@@ -5,7 +5,7 @@ function loginGo(){
html+=' <div style="display: none;" class="login-box1">'; html+=' <div style="display: none;" class="login-box1">';
html+=' <div class="login-title">登入</div>'; html+=' <div class="login-title">登入</div>';
html+=' <div class="phone-login-btn"></div>'; html+=' <div class="phone-login-btn"></div>';
html+=' <div class="google-login-btn"></div>'; html+=' <div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark" class="google-login-btn"></div>';
html+=' <div class="more-login"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png" alt=""></div>'; html+=' <div class="more-login"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png" alt=""></div>';
html+=' <div class="more-login-box">'; html+=' <div class="more-login-box">';
html+=' <div class="more-login-icon"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png" alt=""></div>'; html+=' <div class="more-login-icon"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png" alt=""></div>';
...@@ -125,7 +125,20 @@ function loginGo(){ ...@@ -125,7 +125,20 @@ function loginGo(){
html+='<div class="login-face-out">跳過,稍後再決定</div>'; html+='<div class="login-face-out">跳過,稍後再決定</div>';
html+='</div>'; html+='</div>';
$(".login-content").html(html); $(".login-content").html(html);
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=[]; var html=[];
html+='<div style="display: none;" class=nav-login-btn>登入/註冊</div>'; html+='<div style="display: none;" class=nav-login-btn>登入/註冊</div>';
html+='<div style="display: none;" class="nav-login">'; html+='<div style="display: none;" class="nav-login">';
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</script> </script>
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<link rel="stylesheet" href="css/layer.css"> <link rel="stylesheet" href="css/layer.css">
<link rel="stylesheet" href="css/neck.css"> <link rel="stylesheet" href="css/neck.css">
<link rel="stylesheet" href="css/login.css"> <link rel="stylesheet" href="css/login.css">
<script class="google-login" async defer></script>
</head> </head>
<body style="background: #F4F5F8"> <body style="background: #F4F5F8">
...@@ -313,6 +315,11 @@ ...@@ -313,6 +315,11 @@
<script src="lib/login.js"></script> <script src="lib/login.js"></script>
<script> <script>
$(function(){ $(function(){
var html=[]
html+='<meta name="google-signin-scope" content="profile email">'
html+='<meta name="google-signin-client_id" content="534183685500.apps.googleusercontent.com">'
$("head").append(html)
$(".google-login").attr("src","https://apis.google.com/js/platform.js")
loginGo() loginGo()
var scrollOk=true; var scrollOk=true;
var pageNumber=1 var pageNumber=1
...@@ -758,7 +765,7 @@ $(function(){ ...@@ -758,7 +765,7 @@ $(function(){
} }
if(data.jump==3){ if(data.jump==3){
if(localStorage.uid==undefined){ if(localStorage.uid==undefined){
loginLayer() loginLayer()
return; return;
} }
$(".neck-nav-ul li").removeClass("neck-nav-li-click") $(".neck-nav-ul li").removeClass("neck-nav-li-click")
......
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