myGuardian.html
3.54 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
119
120
<!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="../../layer-v3.1.0/layer/mobile/need/layer.css" />
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/guard.css?v=202006091444">
<script src="../../lib/fsize.js"></script>
<title></title>
</head>
<body>
<div class="main">
<div class="mList"></div>
</div>
</body>
<script src="../../lib/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="../../layer-v3.1.0/layer/layer.js"></script>
<script src="../../lib/langchange.js?v=201910181705"></script>
<script type="text/javascript">
if(langType == 2){
$('body').addClass('L_Ar');
}
var next = false;
var more = true;
var Mpage = 1;
var interval = null;
var params = getRequest();
sessionStorage.token = params.token;//token
sessionStorage.uid = params.uid; //uid
getData(Mpage);
function getData(Mpage){
$.ajax({
url: $ip + '/guard/getGuarders.html',
type: "post",
dataType: "JSON",
data:{
os: 'WEB',
cid: 'web_gw',
lang: sessionStorage.lang,
uid: sessionStorage.uid,
token: sessionStorage.token,
type:2,
index:Mpage,
pageSize:50
},
success:function(res){
clearInterval(interval);
var result = res.result;
if(result.length>0){
var str = '';
for(var i=0;i<result.length;i++){
str += '<div class="mDetail" onclick="goRoom('+result[i].uid+')">';
if(result[i].face== '/user/boy.png' || result[i].face== '/user/girl.png' ){
str += ' <img class="mDetailImg" src="http://app.ixiulive.com/static/images/head2.png?x-oss-process=image/resize,w_80"/>';
} else {
str += ' <img class="mDetailImg" src="'+cdn+result[i].face+'?x-oss-process=image/resize,w_80"/>';
}
if(result[i].isLive == 1){
str += '<img src="images/live/0.png" class="liveCheck"/>';
}
str += ' <span class="mName ellipsis">'+result[i].nickname+'</span>';
str += ' <span class="mDay ellipsis">'+langList[langType].gurad46+'<font>'+result[i].expireDays+'</font>'+langList[langType].gurad47+'</span>';
str += '</div>';
}
$('.mList').append(str);
var i=0;
interval = setInterval(function(){
i++;
$('.liveCheck').attr('src','images/live/'+i+'.png');
if(i==11){
i=0;
}
},100);
Mpage++;
next = true;
if (result[50] == null) {
more = false;
}
} else {
var str = ''
str += '<div class="notCon">';
str += ' <img class="notImg" src="images/not.png"/>';
str += ' <p class="notTitlt notTitlt1">'+langList[langType].gurad5+'</p>';
str += ' <p class="notTitlt notTitlt2">'+langList[langType].gurad6+'</p>';
str += '</div>';
$('.mList').html(str);
}
}
});
}
var end = 1;
$(window).bind("scroll", function () {
if ($(document).scrollTop() + $(window).height() > $(document).height() - 1 && end != 0 && next)// 接近底部100px
{
next == false;
if (more == true) {
getData(Mpage)
}
}
});
function goRoom(uid){
window.location.href = 'http://yazhai://_'+uid+'_zone';
}
</script>
</html>