Commit 98d3890a by libai

测试

parent dfa08682
Showing with 2 additions and 17 deletions
...@@ -305,10 +305,7 @@ ...@@ -305,10 +305,7 @@
<div class="layer-register-right"></div> <div class="layer-register-right"></div>
</div> --> </div> -->
</div> </div>
<div id="g_id_onload"
data-client_id="534183685500"
data-callback="handleCredentialResponse">
</div>
</body> </body>
<script src="lib/jquery-3.1.1.min.js"></script> <script src="lib/jquery-3.1.1.min.js"></script>
...@@ -320,23 +317,11 @@ ...@@ -320,23 +317,11 @@
$(function(){ $(function(){
var html=[] var html=[]
html+='<meta name="google-signin-scope" content="profile email">' html+='<meta name="google-signin-scope" content="profile email">'
html+='<meta name="google-signin-client_id" content="534183685500.apps.googleusercontent.com">' html+='<meta name="google-signin-client_id" content="534183685500-5paq0eqq7mkkk1lkfnlv7e6h3b0avpg7.apps.googleusercontent.com">'
$("head").append(html) $("head").append(html)
$(".google-login").attr("src","https://apis.google.com/js/platform.js") $(".google-login").attr("src","https://apis.google.com/js/platform.js")
function handleCredentialResponse(response) {
// decodeJwtResponse() is a custom function defined by you
// to decode the credential response.
const responsePayload = decodeJwtResponse(response.credential);
console.log("ID: " + responsePayload.sub);
console.log('Full Name: ' + responsePayload.name);
console.log('Given Name: ' + responsePayload.given_name);
console.log('Family Name: ' + responsePayload.family_name);
console.log("Image URL: " + responsePayload.picture);
console.log("Email: " + responsePayload.email);
}
loginGo() loginGo()
var scrollOk=true; var scrollOk=true;
......
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