Commit 0fee8ed5 by libai

测试

parent a4a0a4c0
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</style> </style>
</head> </head>
<body style="background: #F3F3F3"> <body style="background: #d9d9d9">
<div class="bottom-nav"> <div class="bottom-nav">
<div><div class="bottom-nav-img1 bottom-nav-img1-click"></div></div> <div><div class="bottom-nav-img1 bottom-nav-img1-click"></div></div>
<div><div class="bottom-nav-img2"></div></div> <div><div class="bottom-nav-img2"></div></div>
...@@ -631,7 +631,7 @@ $(function(){ ...@@ -631,7 +631,7 @@ $(function(){
html+='<a href="room/liveRoom.html?roomId='+list.roomId+'"><li>'; html+='<a href="room/liveRoom.html?roomId='+list.roomId+'"><li>';
if(list.liveScope==3&&list.selfLock==1)html+='<img class="secret" src="images/secret-ok.png" alt="">'; if(list.liveScope==3&&list.selfLock==1)html+='<img class="secret" src="images/secret-ok.png" alt="">';
else if(list.liveScope==3&&list.selfLock==0)html+='<img class="secret" src="images/secret-no.png" alt="">'; else if(list.liveScope==3&&list.selfLock==0)html+='<img class="secret" src="images/secret-no.png" alt="">';
html+='<div class="hot-num-box"><img src="images/hot.png"><span>'+list.hotnum+'</span></div>'; html+='<div class="hot-num-box"><img src="images/hot.png"><span>'+list.onlinenum+'</span></div>';
html+='<img class="live-li-face" src="https://zhibocdn.yabolive.net/comm'+list.face.split("?")[0]+'?x-oss-process=image/resize,w_180" alt="">'; html+='<img class="live-li-face" src="https://zhibocdn.yabolive.net/comm'+list.face.split("?")[0]+'?x-oss-process=image/resize,w_180" alt="">';
html+='<div class="live-shadow"></div>'; html+='<div class="live-shadow"></div>';
html+='<div class="live-bottom-box">'; html+='<div class="live-bottom-box">';
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
navigator.serviceWorker navigator.serviceWorker
.register('/active2022/footseenH5/sw.js') .register('/active2022/abc/sw.js?V=20221115')
.then(() => { console.log('Service Worker Registered'); }); .then(() => { console.log('Service Worker Registered'); });
} }
...@@ -13,27 +13,28 @@ if ('serviceWorker' in navigator) { ...@@ -13,27 +13,28 @@ if ('serviceWorker' in navigator) {
let deferredPrompt; let deferredPrompt;
const addBtn = document.querySelector('.add-button'); const addBtn = document.querySelector('.add-button');
addBtn.style.display = 'none'; addBtn.style.display = 'none';
window.addEventListener('beforeinstallprompt', (e) => { window.addEventListener('beforeinstallprompt', (e) => {
// 防止 Chrome 67 及更早版本自动显示安装提示 // Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault(); e.preventDefault();
// 稍后再触发此事件 // Stash the event so it can be triggered later.
deferredPrompt = e; deferredPrompt = e;
// 更新 UI 以提醒用户可以将 App 安装到桌面 // Update UI to notify the user they can add to home screen
addBtn.style.display = 'block'; addBtn.style.display = 'block';
addBtn.addEventListener('click', (e) => { addBtn.addEventListener('click', () => {
// 隐藏显示 A2HS 按钮的界面 // hide our user interface that shows our A2HS button
addBtn.style.display = 'none'; addBtn.style.display = 'none';
// 显示安装提示 // Show the prompt
deferredPrompt.prompt(); deferredPrompt.prompt();
// 等待用户反馈 // Wait for the user to respond to the prompt
deferredPrompt.userChoice.then((choiceResult) => { deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === 'accepted') { if (choiceResult.outcome === 'accepted') {
console.log('User accepted the A2HS prompt'); console.log('User accepted the A2HS prompt');
} else { } else {
console.log('User dismissed the A2HS prompt'); console.log('User dismissed the A2HS prompt');
} }
deferredPrompt = null; deferredPrompt = null;
}); });
}); });
}); });
\ No newline at end of file
...@@ -985,10 +985,10 @@ ...@@ -985,10 +985,10 @@
} }
.gift-bar-box { .gift-bar-box {
height: 1rem; height: 1rem;
width: 6.35rem; width: 8rem;
position: relative; position: relative;
margin-left: 0.25rem; margin-left: 0.25rem;
background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)); background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
border-radius: 1rem 0 0 1rem; border-radius: 1rem 0 0 1rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
margin-top: 0.1rem; margin-top: 0.1rem;
...@@ -1596,3 +1596,33 @@ ...@@ -1596,3 +1596,33 @@
filter: blur(0.2rem); filter: blur(0.2rem);
opacity: 0.8; opacity: 0.8;
} }
.room-content-loading {
display: none;
width: 10rem;
height: 100vh;
position: fixed;
z-index: 0;
background: rgba(0, 0, 0, 0.3);
top: 0;
left: 0;
}
.room-content-loading .loading-icon {
position: absolute;
width: 2.66rem;
top: 47%;
left: 50%;
margin-left: -1.33rem;
margin-top: -1.33rem;
}
.loading-face {
position: absolute;
display: none;
width: 15rem;
height: 15rem;
z-index: -1;
left: -2.5rem;
top: 50%;
margin-top: -7.5rem;
opacity: 0.7;
filter: blur(0.3rem);
}
...@@ -1015,10 +1015,10 @@ ...@@ -1015,10 +1015,10 @@
} }
.gift-bar-box{ .gift-bar-box{
height: 1rem; height: 1rem;
width: 6.35rem; width: 8rem;
position: relative; position: relative;
margin-left: 0.25rem; margin-left: 0.25rem;
background:linear-gradient(to right,rgba(0,0,0,0.3),rgba(0,0,0,0.2),rgba(0,0,0,0)); background:linear-gradient(to right,rgba(0,0,0,0.3),rgba(0,0,0,0.2),rgba(0,0,0,0),rgba(0,0,0,0));
border-radius: 1rem 0 0 1rem; border-radius: 1rem 0 0 1rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
margin-top: 0.1rem; margin-top: 0.1rem;
...@@ -1647,3 +1647,34 @@ ...@@ -1647,3 +1647,34 @@
filter: blur(0.2rem); filter: blur(0.2rem);
opacity: 0.8; opacity: 0.8;
} }
.room-content-loading{
display: none;
width: 10rem;
height: 100vh;
position: fixed;
z-index: 0;
background: rgba(0,0,0,0.3);
top: 0;
left: 0;
.loading-icon{
position: absolute;
width: 2.66rem;
top: 47%;
left: 50%;
margin-left: -1.33rem;
margin-top: -1.33rem;
}
}
.loading-face{
position: absolute;
display: none;
width: 15rem;
height: 15rem;
z-index: -1;
left: -2.5rem;
top: 50%;
margin-top: -7.5rem;
opacity: 0.7;
filter: blur(0.3rem);
}
\ No newline at end of file
...@@ -161,8 +161,12 @@ ...@@ -161,8 +161,12 @@
<div class="secret-btn">付費進入直播間</div> <div class="secret-btn">付費進入直播間</div>
<p class="secret-tips">主播10分鐘內下播,寶石退回</p> <p class="secret-tips">主播10分鐘內下播,寶石退回</p>
</div> </div>
<div class="room-content"> <div class="room-content">
<div class="room-content-loading">
<img class="loading-icon" src="images/loading/loading (1).png" alt="">
</div>
<img class="loading-face" src="" alt="">
<div class="room-top"> <div class="room-top">
<div class="room-mc-box"> <div class="room-mc-box">
<!-- <img class="room-mc-face" src="https://zhibocdn.yabolive.net/comm/stscli/prod/4106446166423916818508c02555a3a647828c50948d55f57692.jpg?x-oss-process=image/resize,w_80" alt=""> <!-- <img class="room-mc-face" src="https://zhibocdn.yabolive.net/comm/stscli/prod/4106446166423916818508c02555a3a647828c50948d55f57692.jpg?x-oss-process=image/resize,w_80" alt="">
...@@ -571,9 +575,11 @@ $(function(){ ...@@ -571,9 +575,11 @@ $(function(){
var BottomRoomId var BottomRoomId
localStorage.canvasCode="phone" localStorage.canvasCode="phone"
var giftMd5=null; var giftMd5=null;
var loadT=null;
$(".room-bg").css("height",$(document).height()) $(".room-bg").css("height",$(document).height())
// hotList() // hotList()
liveList(1) liveList(1)
//进入直播间 //进入直播间
$.ajax({ $.ajax({
url:$ip+'room/enterRoom', url:$ip+'room/enterRoom',
...@@ -666,10 +672,21 @@ $(function(){ ...@@ -666,10 +672,21 @@ $(function(){
moreMc() moreMc()
return; return;
} }
$(".room-content-loading").show()
$(".loading-face").show().attr("src","https://zhibocdn.yabolive.net/comm"+data.room.face.split('?')[0]+"?x-oss-process=image/resize,w_350")
var loadNum=1
loadT=setInterval(function(){
$(".loading-icon").attr("src","images/loading/loading ("+loadNum+").png")
loadNum++
if(loadNum>21)loadNum=1
},70)
var soundOk=false var soundOk=false
html+='<video muted id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src="'+data.pullFlowUrlHLS+'"></video>' html+='<video muted id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src="'+data.pullFlowUrlHLS+'"></video>'
$(".video-box").html(html) $(".video-box").html(html)
$("#myVideo").on("canplay",function(){ $("#myVideo").on("canplay",function(){
clearInterval(loadT)
$(".room-content-loading").hide()
$(".loading-face").hide()
$(".sound-btn").unbind("click").on("click",function(){ $(".sound-btn").unbind("click").on("click",function(){
var _self=$(this) var _self=$(this)
if(_self.attr("data-type")==1){ if(_self.attr("data-type")==1){
...@@ -1643,6 +1660,13 @@ $(function(){ ...@@ -1643,6 +1660,13 @@ $(function(){
if(localStorage.uid==list.content.uid){ if(localStorage.uid==list.content.uid){
myMsg=true myMsg=true
} }
$(".user-msg-name,.user-name").unbind("click").on("click",function(){
var _self=$(this)
if(_self.attr("data-type")<0){
return;
}
cardUp(_self.attr("data-type"))
})
// var richLv=0 // var richLv=0
// //vip開通特效 // //vip開通特效
// if(list.content.vipInfo.isVip==true){ // if(list.content.vipInfo.isVip==true){
......
html {
height: 100%;
background: black;
}
body {
height: inherit;
margin: 0;
}
img {
display: block;
width: 100%;
}
.add-button {
position: absolute;
top: 1px;
left: 1px;
}
@media (orientation: landscape) {
img {
height: 100%;
object-fit: cover;
}
}
\ No newline at end of file
self.addEventListener('install', (e) => { self.addEventListener('install', (e) => {
console.log(1212333)
e.waitUntil( e.waitUntil(
caches.open('fox-store').then((cache) => cache.addAll([ caches.open('footseen').then((cache) => cache.addAll([
'/active2022/footseenH5/', '/active2022/abc/',
'/active2022/footseenH5/index.html', '/active2022/abc/index.html',
'/active2022/footseenH5/index.js', '/active2022/abc/index.js',
'/active2022/footseenH5/css/index.css', '/active2022/abc/style.css',
'/active2022/footseenH5/images/', '/active2022/abc/images/fox1.jpg',
'/active2022/abc/images/fox2.jpg',
'/active2022/abc/images/fox3.jpg',
'/active2022/abc/images/fox4.jpg',
])), ])),
); );
}); });
console.log(1212)
self.addEventListener('fetch', (e) => { self.addEventListener('fetch', (e) => {
console.log(e.request.url); console.log(e.request.url);
e.respondWith( e.respondWith(
......
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