index.html
15 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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!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>
<script src="lib/fsize.js"></script>
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/layer.css">
<link rel="stylesheet" href="css/daily.css">
<link rel="stylesheet" href="css/index.css?v=2024080101">
<link rel="stylesheet" href="css/liMarquee.css">
<style>
.layui-layer-shade {
opacity: 0.7 !important;
}
.yourclass5 {
border-radius: 0rem !important;
background: rgba(0, 0, 0, 0) !important;
}
.yourclass5 .layui-layer-content {
border-radius: 0rem !important;
}
</style>
</head>
<body style="background:rgba(0,0,0,0)">
<div class="box-right">
<div class="box-right-left">
<div class="room-bg1">
<div class="room-bg-top">人氣</div>
<!-- <div class="room-targe">目標:</div> -->
<div class="room-num">3000</div>
<div class="room-bar-box">
<div class="room-bar">
<div></div>
<span></span>
</div>
</div>
</div>
<div class="room-bg2">
<div class="room-bg-top">互動</div>`
<!-- <div class="room-targe">目標:</div> -->
<div class="room-num">3000</div>
<div class="room-bar-box">
<div class="room-bar">
<div></div>
<span></span>
</div>
</div>
</div>
<div class="room-bg3">
<div class="room-bg-top">禮物</div>
<!-- <div class="room-targe">目標:</div> -->
<div class="room-num">3000</div>
<div class="room-bar-box">
<div class="room-bar">
<div></div>
<span></span>
</div>
</div>
</div>
</div>
</div>
<div class="act-room-bg">
<div class="act-title"></div>
<p class="act-room-p1">主播積分:</p>
<p class="act-room-p2">--</p>
<p class="act-room-p3">目標積分:</p>
<p class="act-room-p4">--</p>
</div>
</body>
<script src="lib/jquery-3.1.1.min.js"></script>
<script src="layer-v3.1.0/layer/layer.js"></script>
<script src="lib/default.js?v='2024061702'"></script>
<script type="text/javascript" src="https://app.ixiulive.com/static/js/socket.io.js"></script>
<script>
$(function(){
if(sessionStorage.lang!=2){
$("body").addClass("bg-en")
$(".act-room-p1").text("score:")
$(".act-room-p3").text("goal:")
}
var wsTimer=null
var socketOk=null
//活動
var obj = {
"cid": 43,
"reqCode": new Date().getTime(),
"data": {
"type":1,
// "width":314,
"width":360,
"height":75,
'unit':2,
"position":1
}
}
var obj2 = JSON.stringify(obj);
appCollaboration(obj2); //活動
if(sessionStorage.lang!=2){
$("body").addClass("bg-en")
}
if(sessionStorage.lang==2)var titleName=['','新秀出道','閃亮新星','星光熠熠','璀璨佳人','風華絕代','傾國傾城']
else var titleName=['','Lv.1','Lv.2','Lv.3','Lv.4','Lv.5','Lv.6']
function actView(){
$.ajax({
url:$ip+'/actStarSearchTour/getRoomPartData.html',
success:function(data){
console.log('圖標數據',data)
$(".act-title").text(titleName[data.result.roomData.level])
$(".act-room-p2").text(data.result.roomData.score)
$(".act-room-p4").text(data.result.roomData.levelScore)
}
})
}
actView()
setInterval(function(){
actView()
},60000)
function getData() {
var opts = {
reconnectionDelay: 5000,
query: {
'uid': sessionStorage.uid,
'token': sessionStorage.token,
'room': sessionStorage.roomId
}
}
socket = io.connect(_url3 + '/default', opts);
socket.on('connect', function () {
clearInterval(socketOk)
console.log("连接成功");
});
socket.on('RaisingBeautifulGril', function (msg) {
var data=JSON.parse(msg)
if(data.rank>0){
console.log(data)
$(".act-room-bg1").show()
$(".room-title").text(titleArr[data.extra.stage])
$(".room-bg-p1 span").text(data.score)
var barWidth=Math.floor(data.score/data.extra.stageScore*100)
$(".room-bg-p2 span").text(barWidth+'%')
$(".room-bg-p3 span").text(data.rank)
}else{
$(".act-room-bg1").hide()
}
});
socket.on('disconnect', function () {
clearInterval(socketOk)
socketOk=setInterval(function(){
getData()
},3000)
console.log("已下线!");
});
socket.on('connect_error', function (error) {
console.log("链接失败!");
});
}
$(".act-room-bg").on("click",function(){
var obj = {
"cid": 31,
"reqCode": new Date().getTime(),
"data": {
"popupType":2,
// "width":314,
"url":''+$url+'activeFt/newMan/index.html',
"heightR":140,
"clickBlank":1,
"bottom":'0',
}
}
var obj2 = JSON.stringify(obj);
appCollaboration(obj2);
})
if(sessionStorage.uid==sessionStorage.roomId){
$(".room-bg1,.room-bg3").show()
view()
setInterval(function () {
view()
}, 10000)
if(sessionStorage.lang == 1) {
$(".room-bg-top").css("font-size", "1.6vw").css("top", "2.8vw").css("left", "1.5vw")
$(".room-bg1 .room-bg-top").text('Pop Index')
$(".room-bg2 .room-bg-top").text('Interactive')
$(".room-bg3 .room-bg-top").text('income')
// $(".room-targe").css("top","41vw").css("right","9vw")
}
if (sessionStorage.lang == 8) {
$(".room-bg-top").css("font-size", "1.6vw").css("top", "2.8vw").css("left", "1.5vw")
// $(".room-bg-top").css("font-size","10.5vw").css("top","12.5vw")
$(".room-bg1 .room-bg-top").html('nhạc pop')
$(".room-bg2 .room-bg-top").html('tương tác')
$(".room-bg3 .room-bg-top").text('thu nhập')
// $(".room-targe").css("top","41vw").css("right","9vw")
}
}
function view() {
$.ajax({
url: $ip + '/actPopularInteractIndex/queryUserIndexPartInfo.html',
data: {
roomId: sessionStorage.roomId,
},
success: function (data) {
// console.log('互動信息',data)
//礼物
if (data.result.statusData.bondsStatus != 2) {
$(".room-bg3").show()
if (sessionStorage.lang != 2) $(".room-bg3 .room-num").text('' + data.result.bondsData.bondsTarget1 + '')
else $(".room-bg3 .room-num").text('' + data.result.bondsData.bondsTarget1 + '')
var widthNum = Math.floor(data.result.bondsData.bonds / data.result.bondsData.bondsTarget1 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg3 .room-bar span").text(widthNum + '%')
$(".room-bg3 .room-bar div").css("width", widthNum + "%")
}
//人氣
if (data.result.popualrData.popualr < data.result.popualrData.popularTarget1 && data.result.statusData.popularStatus2 == 0) {
if (sessionStorage.lang != 2) $(".room-bg1 .room-num").text('' + data.result.popualrData.popularTarget1 + '')
else $(".room-bg1 .room-num").text('' + data.result.popualrData.popularTarget1 + '')
var widthNum = Math.floor(data.result.popualrData.popualr / data.result.popualrData.popularTarget1 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg1 .room-bar span").text(widthNum + '%')
$(".room-bg1 .room-bar div").css("width", widthNum + "%")
} else {
if (sessionStorage.lang != 2) $(".room-bg1 .room-num").text('' + data.result.popualrData.popularTarget2 + '')
else $(".room-bg1 .room-num").text('' + data.result.popualrData.popularTarget2 + '')
var widthNum = Math.floor(data.result.popualrData.popualr / data.result.popualrData.popularTarget2 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg1 .room-bar span").text(widthNum + '%')
$(".room-bg1 .room-bar div").css("width", widthNum + "%")
}
//完成后关闭
if (data.result.statusData.bondsStatus == 2) {
$(".room-bg3").hide()
if (data.result.statusData.interactStatus2 != 2) {
$(".room-bg2").show()
//互動
if (data.result.interactData.interact < data.result.interactData.interactTarget1 && data.result.statusData.interactStatus2 == 0) {
if (sessionStorage.lang != 2) $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget1 + '')
else $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget1 + '')
var widthNum = Math.floor(data.result.interactData.interact / data.result.interactData.interactTarget1 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg2 .room-bar span").text(widthNum + '%')
$(".room-bg2 .room-bar div").css("width", widthNum + "%")
} else {
if (sessionStorage.lang != 2) $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget2 + '')
else $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget2 + '')
var widthNum = Math.floor(data.result.interactData.interact / data.result.interactData.interactTarget2 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg2 .room-bar span").text(widthNum + '%')
$(".room-bg2 .room-bar div").css("width", widthNum + "%")
}
}
}
if (data.result.statusData.popularStatus2 == 2) {
$(".room-bg1").hide()
if (data.result.statusData.interactStatus2 != 2) {
$(".room-bg2").show()
//互動
if (data.result.interactData.interact < data.result.interactData.interactTarget1 && data.result.statusData.interactStatus2 == 0) {
if (sessionStorage.lang != 2) $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget1 + '')
else $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget1 + '')
var widthNum = Math.floor(data.result.interactData.interact / data.result.interactData.interactTarget1 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg2 .room-bar span").text(widthNum + '%')
$(".room-bg2 .room-bar div").css("width", widthNum + "%")
} else {
if (sessionStorage.lang != 2) $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget2 + '')
else $(".room-bg2 .room-num").text('' + data.result.interactData.interactTarget2 + '')
var widthNum = Math.floor(data.result.interactData.interact / data.result.interactData.interactTarget2 * 100)
if (widthNum > 100) widthNum = 100
$(".room-bg2 .room-bar span").text(widthNum + '%')
$(".room-bg2 .room-bar div").css("width", widthNum + "%")
}
}
}
if (data.result.statusData.interactStatus2 == 2) {
$(".room-bg2").hide()
}
}
})
}
if (localStorage.liveData == undefined || localStorage.liveData == 'undefined') {
// localStorage.liveData=1
// var obj = {
// "cid": 31,
// "data": {
// popupType: 2,
// heightR: 112,
// widthR: 100,
// clickBlank: 1,
// url: $url+'activeFt/liveData/tips2.html?'+window.location.href.split("?")[1]+'&popType=1',
// top: 0,
// left: 0,
// bottom: 0,
// right: 0,
// isThrough: 0,
// afterReady: 0,
// needMounted: 0
// }
// }
// var obj=JSON.stringify(obj);
// appCollaboration(obj)
}
$(".room-bg1,.room-bg2,.room-bg3").on("click", function () {
var obj = {
"cid": 12,
"reqCode": new Date().getTime(),
"data": {
"msg": '跳转集合功能',
"jumptype": 3,
"url": $url + 'activeFt/liveData/index.html?uid=' + sessionStorage.uid + '&token=' + sessionStorage.token + '&roomid=' + sessionStorage.roomId + '',
}
}
var obj2 = JSON.stringify(obj);
appCollaboration(obj2);
})
function popUp(url,height){
$.ajax({
url:$ip+'/actHeartbeatAnchor/openPopup.html',
data:{
popupUrl:url,
widthR:100,
heightR:height
},
success:function(data){
console.log('主动调起半屏页面',data)
}
})
}
})
</script>
</html>