Commit 058223be by libai

测试

parent 0e20611d
...@@ -523,7 +523,7 @@ ...@@ -523,7 +523,7 @@
margin-top: 8px; margin-top: 8px;
} }
.neck-nav-ul { .neck-nav-ul {
width: 498px; width: 581px;
height: 60px; height: 60px;
margin-left: 235px; margin-left: 235px;
} }
......
...@@ -543,7 +543,7 @@ ...@@ -543,7 +543,7 @@
margin-top: 8px; margin-top: 8px;
} }
.neck-nav-ul{ .neck-nav-ul{
width: 498px; width: 581px;
height: 60px; height: 60px;
margin-left: 235px; margin-left: 235px;
li{ li{
......
...@@ -125,100 +125,6 @@ function loginGo(){ ...@@ -125,100 +125,6 @@ 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 handleCredentialResponse(response) {
console.log("Encoded JWT ID token: " + response.credential);
$.ajax({
url:$ip+'third/login',
data:{
opentype:4,
authToken:response.credential,
},
type:"post",
success:function(data){
console.log('google登錄',data)
if(data.code!=1){
layer.msg(data.msg)
return;
}
localStorage.token=data.token
localStorage.uid=data.uid
window.location.reload()
}
})
setTimeout(function() {
google.accounts.id.disableAutoSelect();
}, 1000);
// 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);
}
$('.twitter_btn').on('click', function () {
login_twitter('twitter');
})
$(".line_btn").on("click",function(){
lineLog()
setInterval(function(){
if(localStorage.uid!=undefined){
window.location.reload()
}
},1000)
})
$('.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(info)
console.log(response)
$.ajax({
url:$ip+'third/login',
data:{
openid:info.id,
opentype:6,
authToken:response.authResponse.accessToken,
authSecret:'02f716c256cb1aab9299145ede73c13f',
nickname:info.name,
// facepath:p.thumbnail
},
success:function(data){
console.log('Facebook登录',data)
localStorage.token=data.token
localStorage.uid=data.uid
window.location.reload()
}
})
// 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({
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.renderButton(
document.getElementById("buttonDiv1"),
{ theme: "outline", size: "large",type:'icon' } // customization attributes
);
// google.accounts.id.prompt(); // also display the One Tap dialog
}
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">';
...@@ -239,6 +145,7 @@ function loginGo(){ ...@@ -239,6 +145,7 @@ function loginGo(){
html+='</div>'; html+='</div>';
html+='</div>'; html+='</div>';
$(".nav-login-big-box").html(html); $(".nav-login-big-box").html(html);
if(typeof(indexOk)=="undefined"){ if(typeof(indexOk)=="undefined"){
var html=[]; var html=[];
html+='<ul class="neck-nav-ul">'; html+='<ul class="neck-nav-ul">';
...@@ -248,6 +155,7 @@ function loginGo(){ ...@@ -248,6 +155,7 @@ function loginGo(){
html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=4"><li data-type="4"><span>影片</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>'; html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=4"><li data-type="4"><span>影片</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>';
html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=5"><li data-type="5"><span>圖檔</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>'; html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=5"><li data-type="5"><span>圖檔</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>';
html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=6"><li data-type="6"><span>約會</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>'; html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/pc.html?jump=6"><li data-type="6"><span>約會</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>';
html+='<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/reg/index.html"><li data-type="7"><span>儲值</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>';
html+='</ul>'; html+='</ul>';
$(".neck-nav-content").append(html) $(".neck-nav-content").append(html)
} }
...@@ -326,6 +234,99 @@ function loginGo(){ ...@@ -326,6 +234,99 @@ function loginGo(){
googleLogin() googleLogin()
}) })
function handleCredentialResponse(response) {
console.log("Encoded JWT ID token: " + response.credential);
$.ajax({
url:$ip+'third/login',
data:{
opentype:4,
authToken:response.credential,
},
type:"post",
success:function(data){
console.log('google登錄',data)
if(data.code!=1){
layer.msg(data.msg)
return;
}
localStorage.token=data.token
localStorage.uid=data.uid
window.location.reload()
}
})
setTimeout(function() {
google.accounts.id.disableAutoSelect();
}, 1000);
// 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);
}
$('.twitter_btn').on('click', function () {
login_twitter('twitter');
})
$(".line_btn").on("click",function(){
lineLog()
setInterval(function(){
if(localStorage.uid!=undefined){
window.location.reload()
}
},1000)
})
$('.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(info)
console.log(response)
$.ajax({
url:$ip+'third/login',
data:{
openid:info.id,
opentype:6,
authToken:response.authResponse.accessToken,
authSecret:'02f716c256cb1aab9299145ede73c13f',
nickname:info.name,
// facepath:p.thumbnail
},
success:function(data){
console.log('Facebook登录',data)
localStorage.token=data.token
localStorage.uid=data.uid
window.location.reload()
}
})
// 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({
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.renderButton(
document.getElementById("buttonDiv1"),
{ theme: "outline", size: "large",type:'icon' } // customization attributes
);
// google.accounts.id.prompt(); // also display the One Tap dialog
}
var jsSrc =(navigator.language || navigator.browserLanguage).toLowerCase(); var jsSrc =(navigator.language || navigator.browserLanguage).toLowerCase();
if(jsSrc.indexOf('zh-cn')!=-1){ if(jsSrc.indexOf('zh-cn')!=-1){
var areaName="中国" var areaName="中国"
...@@ -1120,7 +1121,7 @@ function login_twitter(network) { //登录方法,并将twitter 作为参数 ...@@ -1120,7 +1121,7 @@ function login_twitter(network) { //登录方法,并将twitter 作为参数
//facebook //facebook
var info; var info;
function statusChangeCallback(response) { // Called with the results from FB.getLoginStatus(). function statusChangeCallback(response) { // Called with the results from FB.getLoginStatus().
console.log('statusChangeCallback'); // console.log('statusChangeCallback');
// console.log(response); // The current login status of the person. // console.log(response); // The current login status of the person.
if (response.status === 'connected') { // Logged into your webpage and Facebook. if (response.status === 'connected') { // Logged into your webpage and Facebook.
info = response info = response
...@@ -1157,7 +1158,7 @@ function testAPI() { // Testing Graph API after login. See ...@@ -1157,7 +1158,7 @@ function testAPI() { // Testing Graph API after login. See
console.log('Welcome! Fetching your information.... '); console.log('Welcome! Fetching your information.... ');
FB.api('/me', function (response) { FB.api('/me', function (response) {
console.log('Successful login for: ' + response.name); // console.log('Successful login for: ' + response.name);
// document.getElementById('status').innerHTML = // document.getElementById('status').innerHTML =
// 'Thanks for logging in, ' + response.name + '!'; // 'Thanks for logging in, ' + response.name + '!';
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<li data-type="4"><span>影片</span> <img src="images/front/nack-icon.png" alt=""></li> <li data-type="4"><span>影片</span> <img src="images/front/nack-icon.png" alt=""></li>
<li data-type="5"><span>圖檔</span> <img src="images/front/nack-icon.png" alt=""></li> <li data-type="5"><span>圖檔</span> <img src="images/front/nack-icon.png" alt=""></li>
<li data-type="6"><span>約會</span> <img src="images/front/nack-icon.png" alt=""></li> <li data-type="6"><span>約會</span> <img src="images/front/nack-icon.png" alt=""></li>
<a target="_blank" href="https://www.footseen.xyz/yazhaiTest/reg/index.html"><li data-type="7"><span>儲值</span> <img src="https://www.footseen.xyz/yazhaiTest/images/front/nack-icon.png" alt=""></li></a>
</ul> </ul>
<a href="https://www.footseen.xyz/yazhaiTest/pc.html"><img class="logo" src="images/logo.png" alt=""></a> <a href="https://www.footseen.xyz/yazhaiTest/pc.html"><img class="logo" src="images/logo.png" alt=""></a>
<div class="nav-login-big-box"> <div class="nav-login-big-box">
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
<div class="neck-nav-content"> <div class="neck-nav-content">
<a href="https://www.footseen.xyz/yazhaiTest/pc.html"><img class="logo" src="../images/logo.png" alt=""></a> <a href="https://www.footseen.xyz/yazhaiTest/pc.html"><img class="logo" src="../images/logo.png" alt=""></a>
<div class="nav-login-big-box"></div> <div class="nav-login-big-box"></div>
</div> </div>
</div> </div>
<div class="live-m"> <div class="live-m">
...@@ -219,7 +218,7 @@ ...@@ -219,7 +218,7 @@
<div class="big-gift-bottom-box"> <div class="big-gift-bottom-box">
<span class="big-gift-diamond"><img src="images/diamond.png" alt=""><span>--</span></span> <span class="big-gift-diamond"><img src="images/diamond.png" alt=""><span>--</span></span>
<span class="big-gift-dew"><img src="images/dew.png" alt=""><span>--</span></span> <span class="big-gift-dew"><img src="images/dew.png" alt=""><span>--</span></span>
<span class="big-gift-reg">儲值></span> <!-- <span class="big-gift-reg">儲值></span> -->
<div class="gift-num-box"> <div class="gift-num-box">
<ul class="gift-num-list"> <ul class="gift-num-list">
<li>1</li> <li>1</li>
...@@ -462,7 +461,7 @@ ...@@ -462,7 +461,7 @@
</div> </div>
</div> </div>
<div class="login-content"></div> <div class="login-content"></div>
<div class="left-big-gift-more2" > <div class="left-big-gift-more2">
<div class="left-gift-more"> <div class="left-gift-more">
<div class="gift-more-icon"> <div class="gift-more-icon">
<img src="https://zhibocdn.yabolive.net/comm/gift/3178eb7d8f5a4b0fb550a4043081ce22.png?x-oss-process=image/resize,w_52"> <img src="https://zhibocdn.yabolive.net/comm/gift/3178eb7d8f5a4b0fb550a4043081ce22.png?x-oss-process=image/resize,w_52">
...@@ -515,9 +514,7 @@ $(function () { ...@@ -515,9 +514,7 @@ $(function () {
loginLayer() loginLayer()
}) })
} }
$(".big-gift-reg").on("click",function(){
window.location.href="../reg/index.html"
})
$(".big-gift-content-top div").on("click",function(){ $(".big-gift-content-top div").on("click",function(){
if(localStorage.uid==undefined){ if(localStorage.uid==undefined){
loginLayer() loginLayer()
...@@ -530,17 +527,9 @@ $(function () { ...@@ -530,17 +527,9 @@ $(function () {
if(_self.attr("data-type")==3){ if(_self.attr("data-type")==3){
$(".big-gift-diamond").hide() $(".big-gift-diamond").hide()
$(".big-gift-dew").show() $(".big-gift-dew").show()
$(".big-gift-reg").text("兌換露水>")
$(".big-gift-reg").unbind("click").on("click",function(){
window.location.href="../dewExc/index.html"
})
}else{ }else{
$(".big-gift-dew").hide() $(".big-gift-dew").hide()
$(".big-gift-diamond").show() $(".big-gift-diamond").show()
$(".big-gift-reg").text("儲值>")
$(".big-gift-reg").unbind("click").on("click",function(){
window.location.href="../reg/index.html"
})
} }
if(_self.attr("data-type")==4){ if(_self.attr("data-type")==4){
......
.m-box {
width: 1440px;
margin: 0 auto;
position: relative;
}
.search-top-box {
height: 80px;
line-height: 80px;
font-size: 0;
width: 1440px;
border-bottom: 1px solid #E5E5E5;
position: relative;
}
.search-top-box div {
font-size: 16px;
width: 80px;
height: 30px;
color: #AAAAAA;
float: left;
text-align: center;
line-height: 30px;
margin-top: 25px;
cursor: pointer;
}
.search-top-box .search-top-click {
background: #E53985;
color: #fff;
border-radius: 50px;
}
.m-box{
width: 1440px;
margin: 0 auto;
position: relative;
}
.search-top-box{
height: 80px;
line-height: 80px;
font-size: 0;
width: 1440px;
border-bottom: 1px solid #E5E5E5;
position: relative;
div{
font-size: 16px;
width: 80px;
height: 30px;
color: #AAAAAA;
float: left;
text-align: center;
line-height: 30px;
margin-top: 25px;
cursor: pointer;
}
.search-top-click{
background: #E53985;
color: #fff;
border-radius: 50px;
}
}
...@@ -25,6 +25,17 @@ ...@@ -25,6 +25,17 @@
<div class="nav-login-big-box"></div> <div class="nav-login-big-box"></div>
</div> </div>
</div> </div>
<div style="height: 60px;"></div>
<div class="m-box">
<div class="search-top-box">
<div class="search-top-click">綜合</div>
<div>用戶</div>
<div>影片</div>
<div>圖檔</div>
</div>
<div class="">用戶</div>
</div>
<div class="login-content"></div>
</body> </body>
<script src="../lib/jquery-3.1.1.min.js"></script> <script src="../lib/jquery-3.1.1.min.js"></script>
<script src="../layer-v3.1.0/layer/layer.js"></script> <script src="../layer-v3.1.0/layer/layer.js"></script>
...@@ -33,7 +44,7 @@ ...@@ -33,7 +44,7 @@
<script src="../lib/qrcode.min.js"></script> <script src="../lib/qrcode.min.js"></script>
<script> <script>
$(function(){ $(function(){
loginGo()
}) })
</script> </script>
</html> </html>
\ No newline at end of file
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