Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
footseen-large-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
54d2d2d6
authored
2 years ago
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
2e569f9a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
132 additions
and
5 deletions
mTest/css/index.css
mTest/css/index.less
mTest/index.html
mTest/index.js
mTest/lib/default.js
mTest/lib/login.js
mTest/room/css/liveRoom.css
mTest/room/css/liveRoom.less
room/images/layer-ios.png → mTest/room/images/layer-ios.png
mTest/room/liveRoom.html
mTest/css/index.css
View file @
54d2d2d6
...
@@ -5,6 +5,21 @@
...
@@ -5,6 +5,21 @@
overflow
:
hidden
;
overflow
:
hidden
;
transform
:
translate3d
(
0
,
0
,
0
);
transform
:
translate3d
(
0
,
0
,
0
);
}
}
.layer-ios
{
display
:
none
;
width
:
7.3rem
;
height
:
12.24rem
;
background
:
url(../room/images/layer-ios.png)
no-repeat
;
background-size
:
100%
100%
;
position
:
relative
;
}
.layer-ios
.layer-ios-close
{
width
:
0.8rem
;
height
:
0.8rem
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.top-nav
{
.top-nav
{
width
:
10.8rem
;
width
:
10.8rem
;
height
:
3.25rem
;
height
:
3.25rem
;
...
...
This diff is collapsed.
Click to expand it.
mTest/css/index.less
View file @
54d2d2d6
...
@@ -6,6 +6,21 @@
...
@@ -6,6 +6,21 @@
// min-height: 100vh;
// min-height: 100vh;
transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.layer-ios{
display: none;
width: 7.3rem;
height: 12.24rem;
background: url(../room/images/layer-ios.png)no-repeat;
background-size: 100% 100%;
position: relative;
.layer-ios-close{
width: 0.8rem;
height: 0.8rem;
position: absolute;
right: 0;
top: 0;
}
}
.top-nav{
.top-nav{
width: 10.8rem;
width: 10.8rem;
height: 3.25rem;
height: 3.25rem;
...
...
This diff is collapsed.
Click to expand it.
mTest/index.html
View file @
54d2d2d6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<link
rel=
"apple-touch-icon-precomposed"
href=
"icon/fox-icon.png"
>
<link
rel=
"apple-touch-icon-precomposed"
href=
"icon/fox-icon.png"
>
<script
src=
"lib/jquery-3.1.1.min.js"
></script>
<script
src=
"lib/jquery-3.1.1.min.js"
></script>
<script
src=
"lib/default.js?v=202211240
1
"
></script>
<script
src=
"lib/default.js?v=202211240
2
"
></script>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
<meta
content=
"telephone=no"
name=
"format-detection"
>
<meta
content=
"telephone=no"
name=
"format-detection"
>
...
@@ -68,6 +68,9 @@
...
@@ -68,6 +68,9 @@
</style>
</style>
</head>
</head>
<body
style=
"background: #d9d9d9"
>
<body
style=
"background: #d9d9d9"
>
<div
class=
"layer-ios"
>
<div
class=
"layer-ios-close"
></div>
</div>
<button
class=
"add-button"
>
<button
class=
"add-button"
>
<div
class=
"add-button-close"
></div>
<div
class=
"add-button-close"
></div>
</button>
</button>
...
...
This diff is collapsed.
Click to expand it.
mTest/index.js
View file @
54d2d2d6
...
@@ -9,7 +9,7 @@ if ('serviceWorker' in navigator) {
...
@@ -9,7 +9,7 @@ if ('serviceWorker' in navigator) {
}
}
// Code to handle install prompt on desktop
// Code to handle install prompt on desktop
var
pwaT
=
null
let
deferredPrompt
;
let
deferredPrompt
;
const
addBtn
=
document
.
querySelector
(
'.add-button'
);
const
addBtn
=
document
.
querySelector
(
'.add-button'
);
addBtn
.
style
.
display
=
'none'
;
addBtn
.
style
.
display
=
'none'
;
...
@@ -66,6 +66,31 @@ window.addEventListener('beforeinstallprompt', (e) => {
...
@@ -66,6 +66,31 @@ window.addEventListener('beforeinstallprompt', (e) => {
},
20000
);
},
20000
);
}
}
//安卓首次登陆
pwaT
=
setInterval
(
function
(){
if
(
sessionStorage
.
oneLogin
==
1
){
clearInterval
(
pwaT
)
sessionStorage
.
oneLogin
=
0
e
.
preventDefault
();
deferredPrompt
=
e
;
addBtn
.
style
.
display
=
'block'
;
addBtn
.
addEventListener
(
'click'
,
()
=>
{
addBtn
.
style
.
display
=
'none'
;
deferredPrompt
.
prompt
();
deferredPrompt
.
userChoice
.
then
((
choiceResult
)
=>
{
if
(
choiceResult
.
outcome
===
'accepted'
)
{
console
.
log
(
'User accepted the A2HS prompt'
);
}
else
{
console
.
log
(
'User dismissed the A2HS prompt'
);
}
deferredPrompt
=
null
;
});
});
}
},
2000
)
setTimeout
(
function
(){
clearInterval
(
pwaT
)
},
8000
)
}
}
});
});
This diff is collapsed.
Click to expand it.
mTest/lib/default.js
View file @
54d2d2d6
...
@@ -78,6 +78,7 @@ var mySound=data.sound;
...
@@ -78,6 +78,7 @@ var mySound=data.sound;
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
result
=
JSON
.
parse
(
res
);
var
result
=
JSON
.
parse
(
res
);
localStorage
.
canvasCode
=
window
.
navigator
.
userAgent
.
toLowerCase
()
+
'ip:'
+
result
.
ip
;
localStorage
.
canvasCode
=
window
.
navigator
.
userAgent
.
toLowerCase
()
+
'ip:'
+
result
.
ip
;
alert
(
localStorage
.
canvasCode
)
// if (result.code === 1) {
// if (result.code === 1) {
// if (result.checkResult) {
// if (result.checkResult) {
// window.location.hash = "no-back";
// window.location.hash = "no-back";
...
...
This diff is collapsed.
Click to expand it.
mTest/lib/login.js
View file @
54d2d2d6
...
@@ -4,6 +4,24 @@ $(function(){
...
@@ -4,6 +4,24 @@ $(function(){
$
(
".login1"
).
show
()
$
(
".login1"
).
show
()
})
})
})
})
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
sessionStorage
.
oneLogin
==
1
){
if
(
/iphone|ipad|ipod/
.
test
(
ua
))
{
sessionStorage
.
oneLogin
=
0
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
true
,
skin
:
"yourclass5"
,
area
:
[
"7.3rem"
,
"12.24rem"
],
content
:
$
(
".layer-ios"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
}
}
$
(
".area-phone-box"
).
css
(
"height"
,
$
(
document
).
height
())
$
(
".area-phone-box"
).
css
(
"height"
,
$
(
document
).
height
())
var
areaJson
=
{
var
areaJson
=
{
"resources"
:
{
"resources"
:
{
...
@@ -379,6 +397,7 @@ $(".login2 .login-btn").on("click",function(){
...
@@ -379,6 +397,7 @@ $(".login2 .login-btn").on("click",function(){
}
}
localStorage
.
token
=
data
.
token
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
localStorage
.
uid
=
data
.
uid
sessionStorage
.
oneLogin
=
1
layer
.
closeAll
()
layer
.
closeAll
()
setTimeout
(
function
(){
setTimeout
(
function
(){
$
.
ajax
({
$
.
ajax
({
...
@@ -452,6 +471,7 @@ $(".register-change-btn").on("click",function(){
...
@@ -452,6 +471,7 @@ $(".register-change-btn").on("click",function(){
}
}
localStorage
.
token
=
data
.
token
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
localStorage
.
uid
=
data
.
uid
sessionStorage
.
oneLogin
=
1
setTimeout
(
function
(){
setTimeout
(
function
(){
$
.
ajax
({
$
.
ajax
({
url
:
$ip
+
'activeLog/webActive'
,
url
:
$ip
+
'activeLog/webActive'
,
...
@@ -531,6 +551,7 @@ $(".facebook_btn").on("click",function(){
...
@@ -531,6 +551,7 @@ $(".facebook_btn").on("click",function(){
//console.log('Facebook登录',data)
//console.log('Facebook登录',data)
localStorage
.
token
=
data
.
token
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
localStorage
.
uid
=
data
.
uid
sessionStorage
.
oneLogin
=
1
$
.
ajax
({
$
.
ajax
({
url
:
$ip
+
'activeLog/webActive'
,
url
:
$ip
+
'activeLog/webActive'
,
data
:{
data
:{
...
@@ -574,6 +595,7 @@ function handleCredentialResponse(response) {
...
@@ -574,6 +595,7 @@ function handleCredentialResponse(response) {
}
}
localStorage
.
token
=
data
.
token
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
localStorage
.
uid
=
data
.
uid
sessionStorage
.
oneLogin
=
1
$
.
ajax
({
$
.
ajax
({
url
:
$ip
+
'activeLog/webActive'
,
url
:
$ip
+
'activeLog/webActive'
,
data
:{
data
:{
...
@@ -701,6 +723,7 @@ function login_twitter(network) { //登录方法,并将twitter 作为参数
...
@@ -701,6 +723,7 @@ function login_twitter(network) { //登录方法,并将twitter 作为参数
}
}
localStorage
.
token
=
data
.
token
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
localStorage
.
uid
=
data
.
uid
sessionStorage
.
oneLogin
=
1
layer
.
closeAll
()
layer
.
closeAll
()
setTimeout
(
function
(){
setTimeout
(
function
(){
$
.
ajax
({
$
.
ajax
({
...
...
This diff is collapsed.
Click to expand it.
mTest/room/css/liveRoom.css
View file @
54d2d2d6
...
@@ -757,6 +757,21 @@
...
@@ -757,6 +757,21 @@
height
:
99vh
;
height
:
99vh
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.layer-ios
{
display
:
none
;
width
:
7.3rem
;
height
:
12.24rem
;
background
:
url(../images/layer-ios.png)
no-repeat
;
background-size
:
100%
100%
;
position
:
relative
;
}
.layer-ios
.layer-ios-close
{
width
:
0.8rem
;
height
:
0.8rem
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.more-layer
{
.more-layer
{
height
:
4.4rem
;
height
:
4.4rem
;
width
:
10rem
;
width
:
10rem
;
...
...
This diff is collapsed.
Click to expand it.
mTest/room/css/liveRoom.less
View file @
54d2d2d6
...
@@ -782,6 +782,21 @@
...
@@ -782,6 +782,21 @@
overflow: hidden;
overflow: hidden;
// transition: 0.35s all;
// transition: 0.35s all;
}
}
.layer-ios{
display: none;
width: 7.3rem;
height: 12.24rem;
background: url(../images/layer-ios.png)no-repeat;
background-size: 100% 100%;
position: relative;
.layer-ios-close{
width: 0.8rem;
height: 0.8rem;
position: absolute;
right: 0;
top: 0;
}
}
.more-layer{
.more-layer{
height: 4.4rem;
height: 4.4rem;
width: 10rem;
width: 10rem;
...
...
This diff is collapsed.
Click to expand it.
room/images/layer-ios.png
→
mTest/
room/images/layer-ios.png
View file @
54d2d2d6
File moved
This diff is collapsed.
Click to expand it.
mTest/room/liveRoom.html
View file @
54d2d2d6
...
@@ -67,6 +67,9 @@
...
@@ -67,6 +67,9 @@
</style>
</style>
</head>
</head>
<body
style=
"background: rgb(153, 156, 166);overflow: hidden;font-size: 12px;"
>
<body
style=
"background: rgb(153, 156, 166);overflow: hidden;font-size: 12px;"
>
<div
class=
"layer-ios"
>
<div
class=
"layer-ios-close"
></div>
</div>
<button
class=
"add-button"
>
<button
class=
"add-button"
>
<div
class=
"add-button-close"
></div>
<div
class=
"add-button-close"
></div>
</button>
</button>
...
@@ -694,6 +697,7 @@ $(function(){
...
@@ -694,6 +697,7 @@ $(function(){
$(".room-content-loading").show()
$(".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")
$(".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
var loadNum=1
sessionStorage.type!=pwa
if(sessionStorage.lookNum==undefined)sessionStorage.lookNum=1;
if(sessionStorage.lookNum==undefined)sessionStorage.lookNum=1;
else sessionStorage.lookNum=sessionStorage.lookNum+1;
else sessionStorage.lookNum=sessionStorage.lookNum+1;
loadT=setInterval(function(){
loadT=setInterval(function(){
...
@@ -707,7 +711,6 @@ $(function(){
...
@@ -707,7 +711,6 @@ $(function(){
loadOutNum=0
loadOutNum=0
}
}
var soundOk=false
var soundOk=false
var ua = window.navigator.userAgent.toLowerCase();
if (/android/.test(ua)) {
if (/android/.test(ua)) {
if(mySound==1){
if(mySound==1){
history.pushState(null,null,'
liveRoom
.
html
?
roomId
=
'+sessionStorage.roomId+'');
history.pushState(null,null,'
liveRoom
.
html
?
roomId
=
'+sessionStorage.roomId+'');
...
@@ -768,8 +771,20 @@ $(function(){
...
@@ -768,8 +771,20 @@ $(function(){
$
(
"#myVideo"
).
on
(
"canplay"
,
function
(){
$
(
"#myVideo"
).
on
(
"canplay"
,
function
(){
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
/iphone|ipad|ipod/
.
test
(
ua
))
{
if
(
/iphone|ipad|ipod/
.
test
(
ua
))
{
if
(
sessionStorage
.
lookNum
>=
3
){
if
(
sessionStorage
.
lookNum
>=
3
){
sessionStorage
.
lookNum
=
0
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
true
,
skin
:
"yourclass5"
,
area
:
[
"7.3rem"
,
"12.24rem"
],
content
:
$
(
".layer-ios"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
}
}
}
}
clearInterval
(
iosT
)
clearInterval
(
iosT
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment