Commit dfa08682 by libai

测试

parent 2f67c4dd
Showing with 19 additions and 1 deletions
...@@ -305,7 +305,10 @@ ...@@ -305,7 +305,10 @@
<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,6 +323,21 @@ $(function(){ ...@@ -320,6 +323,21 @@ $(function(){
html+='<meta name="google-signin-client_id" content="534183685500.apps.googleusercontent.com">' html+='<meta name="google-signin-client_id" content="534183685500.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;
var pageNumber=1 var pageNumber=1
......
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