myData.html
9.59 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!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">
<title>我的数据</title>
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/layer.css">
<link rel="stylesheet" href="css/myData.css?v=20210616">
<script src="lib/fsize.js"></script>
<style>
.layui-layer-ico {
display: none !important;
}
.layui-layer{
box-shadow: none !important;
}
.yourclass{
background: rgba(0,0,0,0) !important;
border-radius: 0.4rem !important;
}
.layui-layer-page .layui-layer-content{
border-radius: 0.4rem !important;
}
.yourclass2{
border-radius: 0rem !important;
background: rgba(0,0,0,0) !important;
}
.yourclass2 .layui-layer-content{
border-radius: 0rem !important;
}
.face-out{
font-size: 0.3rem;
position: absolute;
right: 0.65rem;
top: 0.4rem;
z-index: 50;
}
</style>
</head>
<body>
<div class="bg-top"></div>
<div class="bg">
<span class="face-out">退出</span>
<div class="face-box">
<!-- <img class="face-img" src="https://zhibocdn.lvdou66.com/comm/user/boy.png?x-oss-process=image/resize,w_80" alt="">
<p class=face-p1>尼莫是条鱼</p>
<p class=face-p2>果冻 ID:256123</p> -->
</div>
<div class="list-btn-box">
<ul class="list-btn-ul">
<li class="list-li-click">本周<div class="list-btn-dian"></div></li>
<li>上周<div class="list-btn-dian"></div></li>
</ul>
<select>
<option value ="1">按周</option>
<option value ="2">按月</option>
</select>
<img class="bottom-arrow" src="images/bottom.png" alt="">
</div>
<div class="list-top-box clearfix">
<!-- <div class="list-top-box1">
<p>20小时+10小时</p>
<p>直播总时长</p>
</div>
<div class="list-top-box2">
<p>5天</p>
<p>总有效天</p>
<div class="rule-left"></div>
<div class="rule-right"></div>
</div>
<div class="list-top-box3">
<p>10000000果券</p>
<p>直播总收益</p>
</div> -->
</div>
<ul class="list-ul">
<!-- <li>
<span class="list-span1">
<p class="list-span1-p1">2021.5.20</p>
<p class="list-span1-p2">3.6小时+2小时</p>
<p class="list-span1-p3">直播时长</p>
</span>
<span class="list-span2">
<p class="list-span2-p1">1天</p>
<p class="list-span2-p2">有效天</p>
</span>
<span class="list-span3">
<p class="list-span3-p1">50000果券</p>
<p class="list-span3-p2">直播收益</p>
</span>
</li> -->
</ul>
<div class="fml-go"><img src="images/fml-btn.png" alt=""></div>
</div>
</body>
<script src="lib/jquery-3.1.1.min.js"></script>
<script src="layer-v3.1.0/layer/layer.js"></script>
<script>
// $ip = 'http://test.api.lvdou66.com/';
$ip = 'https://zhibo.lvdou66.com/';
//$ip = 'https://zhibo.lvdou66.com/87server/'
// $ip = 'https://zhibo.lvdou66.com/';
cdn = 'http://zhibocdn.ishuaji.cn/comm';
var bbb = location.href;
var data = url_get_params(bbb)
var myM=1;
var myW=1
// if (sessionStorage.token == undefined) {
// sessionStorage.token = data.token; //t
// sessionStorage.uid = data.uid; //u
// }
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;
}
if (bbb.indexOf("file:///D") > -1) {
sessionStorage.uid = 23865771;
sessionStorage.token = 'debug'
sessionStorage.roomId=23864554
// sessionStorage.pkg='qiezi'
}
//ajax设置默认参数
$.ajaxSetup({
global: false,
type: 'get',
data: {
uid: localStorage.uid,
token: localStorage.token
},
dataType: "JSON"
})
$(".face-out").on("click",function(){
localStorage.uid='undefined'
localStorage.token='undefined'
window.location.href="login2.html"
})
$(".list-btn-ul li").eq(0).on("click",function(){
myW=1
$(".list-btn-ul li").eq(1).removeClass("list-li-click")
$(".list-btn-ul li").eq(0).addClass("list-li-click")
list(myM,myW)
})
$(".list-btn-ul li").eq(1).on("click",function(){
myW=2
$(".list-btn-ul li").eq(0).removeClass("list-li-click")
$(".list-btn-ul li").eq(1).addClass("list-li-click")
list(myM,myW)
})
$("select").on("change",function(){
if($('select option:selected').val()==1){
myM=1
$(".list-btn-ul li").eq(0).html('本周<div class="list-btn-dian"></div>')
$(".list-btn-ul li").eq(1).html('上周<div class="list-btn-dian"></div>')
list(myM,myW)
}
else if($('select option:selected').val()==2){
myM=2
$(".list-btn-ul li").eq(0).html('本月<div class="list-btn-dian"></div>')
$(".list-btn-ul li").eq(1).html('上月<div class="list-btn-dian"></div>')
list(myM,myW)
}
})
list(myM,myW)
function list(m,w){
$.ajax({
url:'https://openapi.lvdou66.com/data/getMicLiveDetail',
data:{
querytype:m,
timetype:w
},
success:function(data){
console.log('主播直播明细',data)
var html=[];
html+='<img class="face-img" src="https://zhibocdn.lvdou66.com/comm'+data.result.avatar+'?x-oss-process=image/resize,w_80" alt="">';
html+='<p class="face-p1">'+data.result.nickname+'</p>';
html+='<p class="face-p2">果冻 ID:'+data.result.uid+'</p>';
$(".face-box").html(html);
var html=[];
html+='<div class="list-top-box1">';
if(data.result.data.totalEtime>0)html+='<p>'+Math.floor(data.result.data.totalTime/60*10)/10+'小时+'+Math.floor(data.result.data.totalEtime/60*10)+'小时</p>';
else html+='<p>'+Math.floor(data.result.data.totalTime/60*10)/10+'小时</p>';
html+='<p>直播总时长</p>';
html+='</div>';
html+='<div class="list-top-box2">';
html+='<p>'+data.result.data.totalEfday+'天</p>';
html+='<p>总有效天</p>';
html+='<div class="rule-left"></div>';
html+='<div class="rule-right"></div>';
html+='</div>';
html+='<div class="list-top-box3">';
html+='<p>'+data.result.data.totalBonds+'果券</p>';
html+='<p>直播总收益</p>';
html+='</div>';
$(".list-top-box").html(html);
var html=[];
if(data.result.data.detail==undefined){
$(".list-ul").html('');
return;
}
for(var i=0;i<data.result.data.detail.length;i++){
var list=data.result.data.detail[i]
html+='<li>';
html+='<span class="list-span1">';
html+='<p class="list-span1-p1">'+list.statdate+'</p>';
if(list.etime>0)html+='<p class="list-span1-p2">'+Math.floor(list.time/60*10)/10+'小时+'+Math.floor(list.etime/60*10)/10+'小时</p>';
else html+='<p class="list-span1-p2">'+Math.floor(list.time/60*10)/10+'小时</p>';
html+='<p class="list-span1-p3">直播时长</p>';
html+='</span>';
html+='<span class="list-span2">';
html+='<p class="list-span2-p1">'+list.efday+'天</p>';
html+='<p class="list-span2-p2">有效天</p>';
html+='</span>';
html+='<span class="list-span3">';
html+='<p class="list-span3-p1">'+list.livebonds+'果券</p>';
html+='<p class="list-span3-p2">直播收益</p>';
html+='</span>';
html+='</li>';
$(".list-ul").html(html);
}
}
})
}
$.ajax({
url:''+$ip+'weblive/webfamily/isdisplay.html',
type: "get",
data: {
uid:localStorage.uid,
token:localStorage.token,
debug:'debug'
},
success:function(msg){
var data=JSON.parse(msg)
console.log("是否展示",data)
if(data.code==1){
if(data.state==1){
$(".withdraw-btn").css("margin-top","0.8rem")
$(".fml-go").show()
}else{
}
}
}
})
$(".fml-go").on("click",function(){
window.location.href="fml.html"
})
function appCollaboration(msg) {
var ua = window.navigator.userAgent.toLowerCase();
try{
if (/iphone|ipad|ipod/.test(ua)) {
window.webkit.messageHandlers.appCollaboration.postMessage(msg);
}else if(/android/.test(ua)){
window.yazhai.appCollaboration(msg);
}
}catch (e){}
}
$("option").eq(1).on("click",function(){
console.log(22)
})
//客户端回调结果
function appCallback(msg) {
console.log(msg);
}
</script>
</html>