index.html
4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<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-status-bar-style" content="black-translucent">
<meta content="telephone=no" name="format-detection">
<meta name="wap-font-scale" content="no">
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/index.css">
<script src="lib/fsize.js"></script>
<title>老賬戶找回引導</title>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1872500852972587',
cookie : true, // enable cookies to allow the server to access
// the session
xfbml : true, // parse social plugins on this page
version : 'v2.8' // use graph api version 2.8
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
15}(document, 'script', 'facebook-jssdk'));
</script>
</head>
<body>
<div class="bg">
<img class="title" src="images/title.png" alt="">
<div class="back-content">
<p style="width: 8.1rem;">1.老賬戶替換新賬戶后,新賬戶將無法再次登入;</p>
<p>2.替換后新賬戶的收穫螢火、寶石餘額、榜單排名、富豪等級、時長等級等數據將不會遷移或合併到老賬戶上;</p>
<p>3.老賬戶將保留在用戶上次登入的數據,如對老賬戶的數據有任何異議請咨詢客服了解詳情;</p>
<p>確認以上信息后,點擊“下一步”按鈕即可進行老賬戶找回操作。</p>
</div>
<button style="bottom: 2.6rem;z-index: 555;" class="back-btn">下一步</button>
<fb:login-button scope="public_profile,email" data-size="large" data-button-type="continue_with" onlogin="checkLoginState();"></fb:login-button>
<!--<div class="fb-login-button" data-max-rows="1" data-size="large" data-button-type="continue_with" data-show-faces="false" data-auto-logout-link="false" data-use-continue-as="false"></div>-->
</div>
<script src="lib/jquery-3.1.1.min.js"></script>
<!--<div class="fb-login-button" data-width="650" data-max-rows="1" data-size="large" data-button-type="continue_with" data-show-faces="false" data-auto-logout-link="false" data-use-continue-as="false"></div>-->
<script>
var fbToken;
function checkLoginState(){
FB.getLoginStatus(function(response) {
statusChangeCallback(response);
});
}
function statusChangeCallback(response) {
if (response.status === 'connected') { //登陆状态已连接
fbToken = response.authResponse.accessToken;
getUserInfo();
} else if (response.status === 'not_authorized') { //未经授权
console.log('facebook未经授权');
} else {
console.log('不是登陆到Facebook;不知道是否授权');
}
}
//获取用户信息
function getUserInfo() {
FB.api('/me', function(response) {
//response.id / response.name
console.log('Successful login for: ' + response.name);
//把用户token信息交给后台
sessionStorage.fid=response.id;
window.location.href="replace.html";
});
}
</script>
</body>
<script>
var bbb = location.href;
var data = url_get_params(bbb)
sessionStorage.NewOpenId = data.OpenId; //t
// sessionStorage.surroun=data.istest;
// if(sessionStorage.surroun==0){
// sessionStorage.$ip='http://ceshi.yabolive.tv/web';
// }
// else if(sessionStorage.surroun==1){
// sessionStorage.$ip="https://webserver.yabolive.net";
// }
function url_get_params(url_path) {
var url = url_path;
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
// $(".back-btn").on("click", function () {
// facebookReplace()
// })
</script>
</html>