Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李宁
/
Activity
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3343f60a
authored
Feb 03, 2026
by
李宁
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
dc5e5949
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
751 additions
and
528 deletions
haMgr/web-admin/src/utils/request.ts
huaian/css/demo.css
huaian/demo.html
huaian/js/demo.js
haMgr/web-admin/src/utils/request.ts
View file @
3343f60
import
axios
from
'axios'
import
{
ElMessage
}
from
'element-plus'
const
loginUrl
=
window
.
location
.
href
.
split
(
'#/'
)[
0
]
+
'#/login'
const
service
=
axios
.
create
({
baseURL
:
import
.
meta
.
env
.
VITE_API_URL
||
''
,
// Use proxy
timeout
:
10000
...
...
@@ -41,7 +43,7 @@ service.interceptors.response.use(
// 延迟跳转到登录页
setTimeout
(()
=>
{
window
.
location
.
href
=
'/login'
window
.
location
.
href
=
loginUrl
},
1000
)
return
Promise
.
reject
(
new
Error
(
errorData
.
msg
||
errorData
.
message
||
'登录已失效'
))
...
...
@@ -70,7 +72,7 @@ service.interceptors.response.use(
//延迟跳转到登录页,让用户看到提示信息
setTimeout
(()
=>
{
window
.
location
.
href
=
'/login'
window
.
location
.
href
=
loginUrl
},
1500
)
return
Promise
.
reject
(
new
Error
(
res
.
msg
||
res
.
message
||
'登录已失效'
))
...
...
@@ -94,7 +96,7 @@ service.interceptors.response.use(
// 延迟跳转到登录页
setTimeout
(()
=>
{
window
.
location
.
href
=
'/login'
window
.
location
.
href
=
loginUrl
},
1500
)
}
else
{
ElMessage
.
error
(
error
.
message
||
'请求失败'
)
...
...
huaian/css/demo.css
View file @
3343f60
html
{
font-size
:
calc
(
100vw
/
7.5
)
;
html
{
font-size
:
calc
(
100vw
/
7.5
);
}
html
,
body
{
html
,
body
{
width
:
100%
;
height
:
100%
;
}
*
{
*
{
margin
:
0
;
padding
:
0
;
}
.cameraDiv
{
.cameraDiv
{
width
:
100%
;
height
:
100%
;
position
:
fixed
;
left
:
0
;
top
:
0
;
}
.conDiv
{
.conDiv
{
width
:
100%
;
height
:
100%
;
position
:
fixed
;
...
...
@@ -27,7 +31,8 @@ html,body{
display
:
flex
;
flex-direction
:
column
;
}
.conDiv
.tsDiv
{
.conDiv
.tsDiv
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
...
...
@@ -37,55 +42,66 @@ html,body{
color
:
#FF8814
;
display
:
none
;
}
.conDiv
.tsDiv
.tsleft
,
.conDiv
.tsDiv
.tsright
{
.conDiv
.tsDiv
.tsleft
,
.conDiv
.tsDiv
.tsright
{
display
:
flex
;
align-items
:
center
;
}
.conDiv
.tsDiv
.tsleft
img
{
.conDiv
.tsDiv
.tsleft
img
{
width
:
.32rem
;
height
:
.32rem
;
margin-right
:
.08rem
;
}
.conDiv
.tsDiv
.tsright
{
.conDiv
.tsDiv
.tsright
{
font-weight
:
500
;
}
.conDiv
.tsDiv
.tsright
img
{
.conDiv
.tsDiv
.tsright
img
{
width
:
.28rem
;
height
:
.28rem
;
margin-left
:
.04rem
;
}
.conDiv
.swUp
{
.conDiv
.swUp
{
font-size
:
.32rem
;
padding
:
.24rem
;
background
:
rgb
(
0
,
0
,
0
,
0.8
);
min-height
:
3rem
;
flex-shrink
:
0
;
}
.conDiv
.swUp
.til
{
.conDiv
.swUp
.til
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
.24rem
;
}
.conDiv
.swUp
.til
.left
{
.conDiv
.swUp
.til
.left
{
display
:
flex
;
align-items
:
center
;
color
:
#fff
;
font-weight
:
500
;
}
.conDiv
.swUp
.til
.left
.tx
{
.conDiv
.swUp
.til
.left
.tx
{
width
:
.8rem
;
height
:
.8rem
;
margin-right
:
.16rem
;
}
.conDiv
.swUp
.til
.right
{
.conDiv
.swUp
.til
.right
{
display
:
flex
;
align-items
:
center
;
padding
:
.12rem
.16rem
;
margin-right
:
-.08rem
;
display
:
none
;
}
.conDiv
.swUp
.til
.right
.rli
{
.conDiv
.swUp
.til
.right
.rli
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -93,34 +109,41 @@ html,body{
font-size
:
.2rem
;
position
:
relative
;
}
.conDiv
.swUp
.til
.right
.rli
.rlii
{
.conDiv
.swUp
.til
.right
.rli
.rlii
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.conDiv
.swUp
.til
.right
.rli
.open
{
.conDiv
.swUp
.til
.right
.rli
.open
{
color
:
#FFAE00
;
}
.conDiv
.swUp
.til
.right
.rli
:nth-child
(
1
)
{
.conDiv
.swUp
.til
.right
.rli
:nth-child
(
1
)
{
margin-right
:
.34rem
;
}
.conDiv
.swUp
.til
.right
.rli
.img
{
.conDiv
.swUp
.til
.right
.rli
.img
{
width
:
.4rem
;
height
:
.4rem
;
margin-bottom
:
.08rem
;
}
.conDiv
.swUp
.til
.right
.rli
.ts
{
.conDiv
.swUp
.til
.right
.rli
.ts
{
width
:
3.6rem
;
position
:
absolute
;
top
:
.76rem
;
right
:
-0.8rem
;
display
:
none
;
}
.conDiv
.swUp
.detail
{
.conDiv
.swUp
.detail
{
color
:
#fff
;
line-height
:
.52rem
;
}
.conDiv
.mpTs
{
.conDiv
.mpTs
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
...
...
@@ -129,29 +152,34 @@ html,body{
background
:
rgb
(
0
,
0
,
0
,
0.8
);
display
:
none
;
}
.conDiv
.mpTs
.mpL
{
.conDiv
.mpTs
.mpL
{
color
:
#FFF
;
font-size
:
.32rem
;
}
.conDiv
.mpTs
.mpR
{
.conDiv
.mpTs
.mpR
{
color
:
#C4C4C4
;
font-size
:
.28rem
;
}
.conDiv
.mpTs
.mpR
span
{
.conDiv
.mpTs
.mpR
span
{
color
:
#568FFE
;
text-decoration
:
underline
;
}
.conDiv
.swMiddle
{
.conDiv
.swMiddle
{
display
:
flex
;
justify-content
:
space-between
;
position
:
relative
;
flex-grow
:
1
;
}
.conDiv
.swMiddle
.switchDiv
{
.conDiv
.swMiddle
.switchDiv
{
position
:
absolute
;
right
:
.5rem
;
bottom
:
1.12rem
;
background
:
rgb
(
0
,
0
,
0
,
0.4
);
background
:
rgb
(
0
,
0
,
0
,
0.4
);
border-radius
:
50%
;
width
:
1.28rem
;
height
:
1.28rem
;
...
...
@@ -166,21 +194,25 @@ html,body{
align-items
:
center
;
justify-content
:
center
;
}
.conDiv
.swMiddle
.switchDiv
.reverse
{
.conDiv
.swMiddle
.switchDiv
.reverse
{
width
:
.48rem
;
height
:
.48rem
;
margin-bottom
:
.08rem
;
}
.conDiv
.swMiddle
.center
{
.conDiv
.swMiddle
.center
{
width
:
7rem
;
border
:
3px
solid
;
border-image
:
linear-gradient
(
to
bottom
,
#00F0FD
,
#0075F5
)
1
;
}
.conDiv
.swMiddle
.border
{
.conDiv
.swMiddle
.border
{
background
:
rgb
(
0
,
0
,
0
,
0.8
);
flex-grow
:
1
;
}
.conDiv
.swMiddle
.cts
{
.conDiv
.swMiddle
.cts
{
color
:
#fff
;
font-size
:
.3rem
;
position
:
absolute
;
...
...
@@ -193,12 +225,14 @@ html,body{
padding-top
:
calc
(
.16rem
-
3px
);
display
:
none
;
}
.conDiv
.swMiddle
.cts
span
{
.conDiv
.swMiddle
.cts
span
{
color
:
#FFAE00
;
font-weight
:
500
;
font-size
:
.42rem
;
}
.conDiv
.swMiddle
.butt
{
.conDiv
.swMiddle
.butt
{
display
:
none
;
justify-content
:
space-around
;
align-items
:
center
;
...
...
@@ -211,14 +245,16 @@ html,body{
background
:
rgba
(
255
,
255
,
255
,
0.80
);
width
:
max-content
;
}
.conDiv
.swMiddle
.butt
.text
{
.conDiv
.swMiddle
.butt
.text
{
color
:
#111
;
font-size
:
.3rem
;
font-weight
:
500
;
margin-right
:
.32rem
;
flex-shrink
:
0
;
}
.conDiv
.swMiddle
.butt
.bclick
{
.conDiv
.swMiddle
.butt
.bclick
{
width
:
1.6rem
;
height
:
.48rem
;
display
:
flex
;
...
...
@@ -232,7 +268,7 @@ html,body{
flex-shrink
:
0
;
}
.conDiv
.swDown
{
.conDiv
.swDown
{
color
:
#DCDCDC
;
padding
:
calc
(
.25rem
-
1.5px
);
text-align
:
center
;
...
...
@@ -243,12 +279,14 @@ html,body{
padding-top
:
.32rem
;
padding-bottom
:
.48rem
;
}
.conDiv
.swDown
span
{
.conDiv
.swDown
span
{
color
:
#FF3A3A
;
font-size
:
.36rem
;
font-weight
:
500
;
}
.conDiv
.swDown
.buttDiv
.one
{
.conDiv
.swDown
.buttDiv
.one
{
border-radius
:
4px
;
background
:
#568FFF
;
color
:
#fff
;
...
...
@@ -259,11 +297,13 @@ html,body{
align-items
:
center
;
justify-content
:
center
;
}
.conDiv
.swDown
.buttDiv
.two
{
.conDiv
.swDown
.buttDiv
.two
{
display
:
flex
;
justify-content
:
space-between
;
}
.conDiv
.swDown
.buttDiv
.two
div
{
.conDiv
.swDown
.buttDiv
.two
div
{
width
:
3.4rem
;
height
:
.8rem
;
display
:
flex
;
...
...
@@ -275,11 +315,13 @@ html,body{
border
:
1px
solid
#fff
;
border-radius
:
4px
;
}
.conDiv
.swDown
.buttDiv
.three
{
.conDiv
.swDown
.buttDiv
.three
{
display
:
flex
;
justify-content
:
space-between
;
}
.conDiv
.swDown
.buttDiv
.three
div
{
.conDiv
.swDown
.buttDiv
.three
div
{
width
:
2.23rem
;
height
:
.8rem
;
display
:
flex
;
...
...
@@ -291,15 +333,17 @@ html,body{
border
:
1px
solid
#fff
;
border-radius
:
4px
;
}
.conDiv
.swDown
.buttDiv
div
.blue
{
.conDiv
.swDown
.buttDiv
div
.blue
{
background
:
#568FFF
;
border
:
none
;
}
.conDiv
.swDown
.buttDiv
.none
{
.conDiv
.swDown
.buttDiv
.none
{
display
:
none
;
}
.alertDiv
{
.alertDiv
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
...
...
@@ -309,25 +353,35 @@ html,body{
z-index
:
99999
;
display
:
none
;
}
.alertDiv
.inner
{
.alertDiv
.inner
{
background
:
#fff
;
border-radius
:
.2rem
;
width
:
5.6rem
;
position
:
absolute
;
top
:
calc
(
50%
-
.8rem
);
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
padding
:
.48rem
.32rem
.4rem
.32rem
;
box-sizing
:
border-box
;
}
.alertDiv
.inner
.til
{
.alertDiv
.inner
.til
{
color
:
#333
;
font-size
:
.36rem
;
font-weight
:
bold
;
text-align
:
center
;
margin-bottom
:
.32rem
;
}
.alertDiv
.inner
.input
{
.alertDiv
.inner
.snAlertTs
{
color
:
#333
;
font-size
:
.32rem
;
margin-bottom
:
.32rem
;
display
:
none
;
}
.alertDiv
.inner
.input
{
border
:
1px
solid
#D9D9D9
;
color
:
#333
;
font-size
:
.36rem
;
...
...
@@ -339,36 +393,44 @@ html,body{
resize
:
none
;
border-radius
:
.08rem
;
}
.alertDiv
.inner
.disabled
{
.alertDiv
.inner
.disabled
{
background
:
#D9D9D9
;
border
:
1px
solid
#B2B2B2
;
border-radius
:
.08rem
;
color
:
#B3B3B3
;
}
.alertDiv
.inner
.red
{
.alertDiv
.inner
.red
{
border
:
1px
solid
#F00
;
}
.alertDiv
.inner
.input
::placeholder
{
.alertDiv
.inner
.input
::placeholder
{
color
:
#A5A5A5
;
font-size
:
.3rem
;
}
.alertDiv
.inner
.input
:focus
{
.alertDiv
.inner
.input
:focus
{
outline
:
none
}
.alertDiv
.inner
.errorTs
{
.alertDiv
.inner
.errorTs
{
color
:
#666
;
font-size
:
.26rem
;
margin-top
:
.16rem
;
}
.alertDiv
.inner
.tsRed
{
.alertDiv
.inner
.tsRed
{
color
:
#F00
;
}
.alertDiv
.inner
.bot
{
.alertDiv
.inner
.bot
{
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
.48rem
;
}
.alertDiv
.inner
.bot
button
{
.alertDiv
.inner
.bot
button
{
border-radius
:
4px
;
height
:
.88rem
;
display
:
flex
;
...
...
@@ -378,19 +440,21 @@ html,body{
font-size
:
.32rem
;
font-weight
:
500
;
}
.alertDiv
.inner
.bot
.cancel
{
.alertDiv
.inner
.bot
.cancel
{
background
:
#F6F6F6
;
color
:
#666
;
border
:
none
;
}
.alertDiv
.inner
.bot
.submit
{
.alertDiv
.inner
.bot
.submit
{
background
:
#568FFE
;
color
:
#fff
;
border
:
none
;
}
.waittingDiv
{
.waittingDiv
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
...
...
@@ -400,12 +464,13 @@ html,body{
z-index
:
999
;
display
:
none
;
}
.waittingDiv
.inner
{
.waittingDiv
.inner
{
border-radius
:
.16rem
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
rgba
(
30
,
30
,
30
,
0.75
);
padding
:
.6rem
.4rem
;
display
:
flex
;
...
...
@@ -416,26 +481,31 @@ html,body{
font-size
:
.32rem
;
width
:
max-content
;
}
.waittingDiv
.inner
.imgDiv
{
.waittingDiv
.inner
.imgDiv
{
width
:
1.12rem
;
height
:
1.12rem
;
margin-bottom
:
.48rem
;
position
:
relative
;
}
.waittingDiv
.inner
.imgDiv
img
{
.waittingDiv
.inner
.imgDiv
img
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
}
.waittingDiv
.inner
.imgDiv
#loadImg1
{
.waittingDiv
.inner
.imgDiv
#loadImg1
{
animation
:
spin
1s
linear
infinite
;
}
@keyframes
spin
{
from
{
transform
:
rotate
(
0deg
);
}
to
{
transform
:
rotate
(
360deg
);
}
...
...
@@ -443,7 +513,7 @@ html,body{
.outAlert
{
.outAlert
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
...
...
@@ -454,38 +524,44 @@ html,body{
display
:
none
;
}
.outAlert
.exampleCon
{
.outAlert
.exampleCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
5.6rem
;
}
.outAlert
.exampleCon
.up
{
.outAlert
.exampleCon
.up
{
padding
:
0
.4rem
;
padding-top
:
.48rem
;
;
padding-top
:
.48rem
;
;
}
.outAlert
.exampleCon
.up
.til
{
.outAlert
.exampleCon
.up
.til
{
text-align
:
center
;
padding-bottom
:
.16rem
;
color
:
#333
;
font-size
:
.36rem
;
font-weight
:
bold
;
}
.outAlert
.exampleCon
.up
.text
{
.outAlert
.exampleCon
.up
.text
{
color
:
#333
;
font-size
:
.32rem
;
margin-top
:
.24rem
;
line-height
:
.48rem
;
}
.outAlert
.exampleCon
.up
img
{
.outAlert
.exampleCon
.up
img
{
width
:
100%
;
margin-top
:
.16rem
;
margin-bottom
:
.32rem
;
}
.outAlert
.exampleCon
.butt
{
.outAlert
.exampleCon
.butt
{
padding
:
.32rem
;
color
:
#568FFE
;
font-size
:
.34rem
;
...
...
@@ -494,16 +570,17 @@ html,body{
text-align
:
center
;
}
.outAlert
.alertCon
{
.outAlert
.alertCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
5.6rem
;
}
.outAlert
.alertCon
.info
{
.outAlert
.alertCon
.info
{
color
:
#333
;
font-size
:
.32rem
;
text-align
:
center
;
...
...
@@ -512,41 +589,46 @@ html,body{
border-bottom
:
1px
solid
#F6F6F6
;
line-height
:
1.5
;
}
.outAlert
.alertCon
.butt
{
.outAlert
.alertCon
.butt
{
display
:
flex
;
color
:
#999
;
font-size
:
.34rem
;
}
.outAlert
.alertCon
.butt
div
{
.outAlert
.alertCon
.butt
div
{
width
:
50%
;
height
:
.98rem
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.outAlert
.alertCon
.butt
.right
{
.outAlert
.alertCon
.butt
.right
{
color
:
#568FFE
;
border-left
:
1px
solid
#F6F6F6
;
}
.outAlert
.beginCon
{
.outAlert
.beginCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
6rem
;
font-size
:
.3rem
;
padding
:
0
.4rem
;
}
.beginCon
.topBg
{
.beginCon
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
}
.beginCon
.til
{
.beginCon
.til
{
border-radius
:
.2rem
.4rem
.4rem
0
;
background
:
#568FFE
;
text-align
:
center
;
...
...
@@ -555,50 +637,59 @@ html,body{
margin-top
:
.56rem
;
padding
:
.12rem
.2rem
;
}
.beginCon
.ts
{
.beginCon
.ts
{
color
:
#333
;
font-size
:
.36rem
;
font-weight
:
bold
;
margin-top
:
.24rem
;
}
.beginCon
.one
{
.beginCon
.one
{
color
:
#666
;
font-size
:
.28rem
;
line-height
:
.44rem
;
margin-top
:
.4rem
;
}
.beginCon
.one
span
{
.beginCon
.one
span
{
color
:
#333
;
font-weight
:
500
;
}
.beginCon
.oneImg
{
.beginCon
.oneImg
{
width
:
4rem
;
display
:
block
;
margin
:
auto
;
margin-top
:
.16rem
;
}
.beginCon
.two
{
.beginCon
.two
{
color
:
#666
;
font-size
:
.32rem
;
line-height
:
.44rem
;
margin-top
:
.36rem
;
}
.beginCon
.two
span
{
.beginCon
.two
span
{
color
:
#333
;
font-weight
:
500
;
}
.beginCon
.twoImg
{
.beginCon
.twoImg
{
width
:
100%
;
display
:
block
;
margin
:
auto
;
margin-top
:
.32rem
;
}
.beginCon
.bts
{
.beginCon
.bts
{
color
:
#666
;
font-size
:
.32rem
;
margin-top
:
.32rem
;
}
.beginCon
.butt
{
.beginCon
.butt
{
border-radius
:
.08rem
;
background
:
#568FFE
;
height
:
.88rem
;
...
...
@@ -614,24 +705,26 @@ html,body{
}
.outAlert
.mpCon
{
.outAlert
.mpCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
6rem
;
font-size
:
.3rem
;
padding
:
0
.4rem
;
}
.mpCon
.topBg
{
.mpCon
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
}
.mpCon
.til
{
.mpCon
.til
{
border-radius
:
.2rem
.4rem
.4rem
0
;
background
:
#568FFE
;
text-align
:
center
;
...
...
@@ -640,37 +733,58 @@ html,body{
margin-top
:
.56rem
;
padding
:
.12rem
.2rem
;
}
.mpCon
.bts
{
.mpCon
.bts
{
color
:
#333
;
font-size
:
.32rem
;
margin-top
:
.2rem
;
line-height
:
.4rem
;
}
.mpCon
.small
{
.mpCon
.small
{
font-size
:
.28rem
;
}
.mpCon
.twoImg
{
.mpCon
.twoImg
{
width
:
4rem
;
display
:
block
;
margin
:
.16rem
auto
.32rem
auto
;
}
.mpCon
.pImg
{
.mpCon
.pImg
{
width
:
100%
;
}
.mpCon
.butt
{
.mpCon
.botBut
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
.32rem
;
margin-bottom
:
.48rem
;
}
.mpCon
.botBut
div
{
font-size
:
.32rem
;
font-weight
:
500
;
border-radius
:
.08rem
;
background
:
#568FFE
;
background
:
#eeecec
;
color
:
#666
;
height
:
.88rem
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#FFF
;
font-size
:
.34rem
;
font-weight
:
500
;
margin-bottom
:
.32rem
;
width
:
2.52rem
;
}
.snCon
.stil
{
.mpCon
.botBut
.right
{
color
:
#fff
;
background
:
#568FFE
;
}
.mpCon
.botBut
.graySn
{
opacity
:
0.4
;
}
.snCon
.stil
{
color
:
#333
;
font-size
:
.36rem
;
font-weight
:
bold
;
...
...
@@ -678,27 +792,30 @@ html,body{
line-height
:
.36rem
;
padding-top
:
.48rem
;
}
.snCon
.twoImg
{
.snCon
.twoImg
{
width
:
100%
;
}
.pickAlert
{
.pickAlert
{
display
:
flex
;
align-items
:
flex-end
;
}
.pickAlert
.van-picker
{
.pickAlert
.van-picker
{
width
:
100%
;
}
.pickAlert
.van-picker__title
{
.pickAlert
.van-picker__title
{
line-height
:
44px
;
}
.noShootCon
{
.noShootCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
6rem
;
...
...
@@ -706,13 +823,15 @@ html,body{
padding
:
0
.4rem
;
box-sizing
:
border-box
;
}
.noShootCon
.topBg
{
.noShootCon
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
}
.noShootCon
.til
{
.noShootCon
.til
{
border-radius
:
.2rem
.4rem
.4rem
0
;
background
:
#568FFE
;
text-align
:
center
;
...
...
@@ -721,28 +840,33 @@ html,body{
margin-top
:
.56rem
;
padding
:
.12rem
.2rem
;
}
.noShootCon
.dtil
{
.noShootCon
.dtil
{
color
:
#333
;
font-size
:
.28rem
;
font-weight
:
500
;
margin-top
:
.24rem
;
line-height
:
.4rem
;
;
line-height
:
.4rem
;
;
}
.noShootCon
.dimg
{
.noShootCon
.dimg
{
width
:
100%
;
margin-top
:
.16rem
;
}
.noShootCon
.botBut
{
.noShootCon
.botBut
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
.32rem
;
margin-bottom
:
.48rem
;
}
.noShootCon
.botBut
div
{
.noShootCon
.botBut
div
{
font-size
:
.32rem
;
font-weight
:
500
;
border-radius
:
.08rem
;
background
:
#
F6F6F6
;
background
:
#
eeecec
;
color
:
#666
;
height
:
.88rem
;
display
:
flex
;
...
...
@@ -750,48 +874,59 @@ html,body{
justify-content
:
center
;
width
:
2.52rem
;
}
.noShootCon
.botBut
.right
{
.noShootCon
.botBut
.right
{
color
:
#fff
;
background
:
#568FFE
;
}
.paiZhaoCon
{
.noShootCon
.botBut
.grayNoShoot
{
opacity
:
0.4
;
}
.paiZhaoCon
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background
:
#fff
;
border-radius
:
.2rem
;
width
:
6.4rem
;
padding
:
.48rem
;
box-sizing
:
border-box
;
}
.paiZhaoCon
.til
{
.paiZhaoCon
.til
{
color
:
#333
;
text-align
:
center
;
font-size
:
.36rem
;
font-weight
:
bold
;
margin-bottom
:
.2rem
;
}
.paiZhaoCon
.ts
{
.paiZhaoCon
.ts
{
color
:
#333
;
font-size
:
.32rem
;
line-height
:
.52rem
;
margin-bottom
:
.2rem
;
}
.paiZhaoCon
img
{
.paiZhaoCon
img
{
/* width: 3.76rem;
height: 6.68rem; */
width
:
100%
;
display
:
block
;
margin
:
auto
;
}
.paiZhaoCon
.botBut
{
.paiZhaoCon
.botBut
{
display
:
flex
;
justify-content
:
space-between
;
margin-top
:
.32rem
;
}
.paiZhaoCon
.botBut
div
{
.paiZhaoCon
.botBut
div
{
font-size
:
.32rem
;
font-weight
:
500
;
border-radius
:
.08rem
;
...
...
@@ -803,21 +938,23 @@ html,body{
align-items
:
center
;
width
:
2.64rem
;
}
.paiZhaoCon
.botBut
.right
{
.paiZhaoCon
.botBut
.right
{
color
:
#fff
;
background
:
#568FFE
;
}
.outAlert
.noTestCon
{
.outAlert
.noTestCon
{
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
width
:
6.4rem
;
padding-bottom
:
.4rem
;
}
.noTestCon
.til
{
.noTestCon
.til
{
padding
:
0
.4rem
;
color
:
#333
;
font-size
:
.36rem
;
...
...
@@ -826,25 +963,29 @@ html,body{
margin-bottom
:
.4rem
;
text-align
:
center
;
}
.noTestCon
.topTs
{
.noTestCon
.topTs
{
color
:
#333
;
font-size
:
.32rem
;
line-height
:
.52rem
;
margin-bottom
:
.48rem
;
padding
:
0
.48rem
;
}
.noTestCon
.cli
{
.noTestCon
.cli
{
padding
:
0
.48rem
;
margin-bottom
:
.48rem
;
}
.noTestCon
.cli
.ctil
{
.noTestCon
.cli
.ctil
{
display
:
flex
;
align-items
:
center
;
color
:
#666
;
font-size
:
.28rem
;
margin-bottom
:
.16rem
;
}
.noTestCon
.cli
textarea
{
.noTestCon
.cli
textarea
{
width
:
100%
;
padding
:
.24rem
.32rem
;
border-radius
:
.08rem
;
...
...
@@ -854,10 +995,12 @@ html,body{
outline
:
none
;
font-size
:
.32rem
;
}
.noTestCon
.cli
textarea
::placeholder
{
.noTestCon
.cli
textarea
::placeholder
{
color
:
#999
;
}
.noTestCon
.know
{
.noTestCon
.know
{
color
:
#fff
;
background
:
#568FFE
;
width
:
5.44rem
;
...
...
@@ -870,7 +1013,8 @@ html,body{
margin
:
auto
;
border-radius
:
.08rem
;
}
.noTestCon
.close
{
.noTestCon
.close
{
position
:
absolute
;
bottom
:
-1.28rem
;
width
:
.8rem
;
...
...
@@ -878,11 +1022,13 @@ html,body{
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.noTestCon
.cli
.ctil
img
{
.noTestCon
.cli
.ctil
img
{
width
:
.14rem
;
margin-right
:
.08rem
;
}
.noTestCon
.botTs
{
.noTestCon
.botTs
{
color
:
#666
;
font-size
:
.26rem
;
line-height
:
.36rem
;
...
...
@@ -891,45 +1037,34 @@ html,body{
text-align
:
center
;
}
.outAlert
.warningCon
{
.outAlert
.warningCon
{
position
:
relative
;
padding
:
.24rem
;
border-radius
:
.32rem
;
background
:
linear-gradient
(
180deg
,
#
FFD7D7
0%
,
#FFF4F4
100%
);
background
:
linear-gradient
(
180deg
,
#
fad5b2
,
#FFFFFF
);
box-shadow
:
0
4px
20px
0
rgba
(
0
,
0
,
0
,
0.12
);
box-sizing
:
border-box
;
}
.warningCon
.icon
{
.warningCon
.icon
{
position
:
absolute
;
width
:
2.4
8rem
;
height
:
2.4
8rem
;
top
:
-0.
8
4rem
;
width
:
1.6
8rem
;
height
:
1.6
8rem
;
top
:
-0.
6
4rem
;
left
:
50%
;
transform
:
translateX
(
-50%
);
z-index
:
99
;
}
.warningCon
.detail
{
.warningCon
.detail
{
font-size
:
.32rem
;
color
:
#333
;
font-weight
:
500
;
position
:
relative
;
padding
:
.
8
8rem
.32rem
.5rem
.32rem
;
padding
:
.
7
8rem
.32rem
.5rem
.32rem
;
}
.warningCon
.detail
.bg
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
}
.warningCon
.detail
.close
{
width
:
.24rem
;
height
:
.24rem
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.warningCon
.detail
.til
{
.warningCon
.detail
.til
{
color
:
#D90012
;
font-size
:
.44rem
;
text-align
:
center
;
...
...
@@ -937,47 +1072,55 @@ html,body{
margin-bottom
:
.32rem
;
margin-top
:
.2rem
;
}
.warningCon
.detail
.des
{
.warningCon
.detail
.des
{
line-height
:
.6rem
;
text-align
:
justify
;
text-indent
:
2em
;
font-size
:
.32rem
;
color
:
#333
;
}
.warningCon
.detail
.dess
{
display
:
none
;
}
.warningCon
.detail
.des
span
{
color
:
#D90012
;
font-size
:
.4rem
;
.warningCon
.detail
.des
span
{
color
:
#EF6A25
;
font-weight
:
bold
;
}
.warningCon
.detail
.quit
{
width
:
2.56rem
;
height
:
.8rem
;
.warningCon
.detail
.quit
{
width
:
4.6rem
;
height
:
.88rem
;
text-align
:
center
;
border-radius
:
1rem
;
background
:
linear-gradient
(
81deg
,
#B60817
14.44%
,
#F71E30
104.74%
);
border-radius
:
.08rem
;
background
:
linear-gradient
(
86deg
,
#FF7E00
5.61%
,
#FF8814
95.58%
);
box-shadow
:
0
4px
12px
0
rgba
(
248
,
65
,
61
,
0.23
);
color
:
#fff
;
font-size
:
.32rem
;
line-height
:
.8rem
;
line-height
:
.88rem
;
font-weight
:
500
;
margin
:
auto
;
margin-top
:
.24rem
;
display
:
none
;
margin-top
:
.6rem
;
position
:
relative
;
}
div
{
.warningCon
.detail
.gray
{
background
:
#E7E7E7
;
color
:
#C5BFBF
;
box-shadow
:
none
;
}
div
{
font-family
:
-apple-system
,
BlinkMacSystemFont
,
sans-serif
;
}
#local-player
video
{
#local-player
video
{
object-fit
:
cover
;
width
:
100%
!important
;
height
:
100%
!important
;
width
:
100%
!important
;
height
:
100%
!important
;
position
:
absolute
;
left
:
0px
;
top
:
0px
;
}
em
{
em
{
font-style
:
normal
;
}
\ No newline at end of file
huaian/demo.html
View file @
3343f60
...
...
@@ -6,8 +6,8 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
江苏移动
</title>
<link
rel=
"stylesheet"
href=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/css/vant.css"
/>
<link
rel=
"stylesheet"
href=
"css/demo.css?6763332736999
"
>
<link
rel=
"stylesheet"
href=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/css/vant.css"
/>
<link
rel=
"stylesheet"
href=
"css/demo.css?1111
"
>
</head>
<body>
...
...
@@ -40,10 +40,12 @@
<div
class=
"right"
id=
"toolDiv"
>
<div
class=
"rli"
id=
"lightOutDiv"
>
<div
class=
"rlii"
id=
"lightDiv"
>
<img
id=
"lightImg"
class=
"img"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png"
>
<img
id=
"lightImg"
class=
"img"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png"
>
<div>
手电筒
</div>
</div>
<img
id=
"lightShowTs"
class=
"ts"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightTs.png"
>
<img
id=
"lightShowTs"
class=
"ts"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightTs.png"
>
</div>
<div
class=
"rli"
id=
"cameraDiv"
>
<img
class=
"img"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/camera.png?123"
>
...
...
@@ -131,6 +133,7 @@
<div
class=
"alertDiv"
id=
"snAlertDiv"
>
<div
class=
"inner"
>
<div
class=
"til"
id=
"snAlertTile"
>
请确认设备串号
</div>
<div
class=
"snAlertTs"
id=
"snAlertTsShow"
>
为确保服务流程的完整与真实性,修改后的数据会记录在管理平台, 后续会进行重点稽核。
</div>
<textarea
id=
"snValue"
class=
"input snInput"
rows=
"1"
type=
"text"
placeholder=
"请输入设备串号"
></textarea>
<div
class=
"errorTs"
id=
"snErrorTs"
>
如识别错误你可重新进行拍摄或直接修改
</div>
<div
class=
"bot"
>
...
...
@@ -144,7 +147,8 @@
<div
class=
"inner"
>
<div
class=
"imgDiv"
>
<img
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/back.png"
alt=
""
style=
"display: block;"
>
<img
class=
"loadImg"
id=
"loadImg1"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/1.png"
alt=
""
>
<img
class=
"loadImg"
id=
"loadImg1"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/1.png"
alt=
""
>
</div>
<div
style=
"line-height: 1;"
id=
"waitText"
>
记录中,请稍后...
</div>
</div>
...
...
@@ -252,14 +256,8 @@
<div
id=
"pageDiv"
>
<div
class=
"outAlert pickAlert"
v-if=
"reasonPickData.isShow"
>
<van-picker
show-toolbar
:title=
"reasonPickData.title"
:columns=
"reasonPickData.arr"
:default-index=
"reasonPickData.index"
@
cancel=
"reasonCancel"
@
confirm=
"reasonConfirm"
/>
<van-picker
show-toolbar
:title=
"reasonPickData.title"
:columns=
"reasonPickData.arr"
:default-index=
"reasonPickData.index"
@
cancel=
"reasonCancel"
@
confirm=
"reasonConfirm"
/>
</div>
</div>
...
...
@@ -270,11 +268,15 @@
<div
class=
"til"
>
串号无法识别? 请进行以下尝试
</div>
</div>
<div
class=
"bts small"
id=
"snErrorText"
>
1、请将摄像头近距离正面聚焦在 STBID/SN 码上,确保整串字符完整清晰。
</div>
<img
class=
"twoImg pImg"
id=
"snErrorImg"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/jdhSnSbError.png"
alt=
""
>
<img
class=
"twoImg pImg"
id=
"snErrorImg"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/jdhSnSbError.png"
alt=
""
>
<div
class=
"bts small"
>
2、使用页面右上方镜头包功能尝试切换摄像头再进行识别。
</div>
<img
class=
"twoImg pImg"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/cameraSwitchGuide.png"
alt=
""
>
<div
class=
"butt"
id=
"hideSnErrorAlert"
>
我知道了
</div>
<div
class=
"botBut"
>
<div
class=
"left graySn"
id=
"snTimeOut"
>
手动输入(3s)
</div>
<div
class=
"right"
id=
"hideSnErrorAlert"
>
重新拍摄
</div>
</div>
</div>
</div>
...
...
@@ -294,8 +296,8 @@
<div
class=
"dtil"
>
方法3:点击【无法拍摄】跳过此环节。
</div>
<div
class=
"botBut"
>
<div
class=
"clickButt left
"
key=
"bunengpai
"
>
无法拍摄
</div>
<div
class=
"right"
id=
"hideNoShootAlert"
>
我知道了
</div>
<div
class=
"clickButt left
grayNoShoot"
key=
"bunengpai"
id=
"noShootTime
"
>
无法拍摄
</div>
<div
class=
"right"
id=
"hideNoShootAlert"
>
重新拍摄
</div>
</div>
</div>
</div>
...
...
@@ -316,7 +318,7 @@
<div
class=
"alertCon noTestCon"
>
<div
class=
"til"
>
我要反馈
</div>
<div
class=
"topTs"
>
如
你出现无法拍摄的情况,比如反复拍摄无法识别,安装环境无法正常拍摄,你可填写原因和情况说明跳过此环节
。
</div>
<div
class=
"topTs"
>
如
遇反复识别失败、现场环境不允许拍摄等特殊情况,您可在此处填写具体原因和说明
。
</div>
<div
class=
"cli"
>
<div
class=
"ctil"
>
...
...
@@ -326,9 +328,9 @@
<textarea
id=
"noShootReason"
placeholder=
"请填写具体情况"
></textarea>
</div>
<div
class=
"know"
id=
"noShootSave"
>
保存
</div>
<div
class=
"know"
id=
"noShootSave"
>
提交
</div>
<div
class=
"botTs"
>
提交后管理员会重点检查,并且您无法再次对该环节进行质检
</div>
<div
class=
"botTs"
>
为确保服务流程的完整与真实性,修改后的数据会记录在管理平台, 后续会进行重点稽核
</div>
<img
class=
"close"
id=
"noShootClose"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/close.png"
>
</div>
...
...
@@ -346,16 +348,13 @@
<div
class=
"outAlert"
id=
"warningTsAlert"
>
<div
class=
"alertCon warningCon"
>
<img
class=
"icon"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/cheatWarn.png"
alt=
""
>
<img
class=
"icon"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/cheatWarn
2
.png"
alt=
""
>
<div
class=
"detail"
>
<img
class=
"bg"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/cheatBg.png"
alt=
""
>
<img
class=
"close"
id=
"cheatClose"
src=
"https://xpo.oss-cn-beijing.aliyuncs.com/huaian/cheatClose.png"
alt=
""
>
<div
class=
"til"
>
环境异常警告
</div>
<div
class=
"des"
>
为保障服务质量与数据真实性,质检过程需在标准装维场景下进行。系统识别到当前环境不符合规范,已
<span>
记
<em
id=
"cheatNum"
>
1
</em>
次“疑似作弊”
</span>
。
</div>
<div
class=
"des dess"
id=
"allowProcess"
>
若再出现类似违规操作,该工单将自动标记为
<span>
“作弊工单”
</span>
,同时暂停
<span>
暂停质检并通报考核
</span>
。
</div>
<div
class=
"des dess"
id=
"forbidProcess"
>
该工单已自动标记为
<span>
“作弊工单”
</span>
,
<span>
无法继续质检
</span>
,如存在误判情况可及时
<span>
联系管理员或平台运营人员
</span>
解除异常。
</div>
<div
class=
"til"
>
检测环境异常
</div>
<div
class=
"des"
>
系统识别到当前检测环境
<span>
不符合标准规范,
</span>
请您移步至标准场景完成质检工单。
</div>
<div
class=
"des"
>
系统会
<span>
自动记录本次异常操作并通知管理员核实
</span>
。
</div>
<div
class=
"quit
pageClose"
id=
"cheatQuitBut"
>
退出质检
</div>
<div
class=
"quit
gray"
id=
"cheatClose"
>
重新拍摄(10s)
</div>
</div>
</div>
</div>
...
...
@@ -375,7 +374,7 @@
<script
src=
"js/vue.min.js"
></script>
<script
src=
"js/vant.min.js"
></script>
<script
src=
"js/demo.js?
909111109
"
></script>
<script
src=
"js/demo.js?
sdd333
"
></script>
</body>
</html>
\ No newline at end of file
huaian/js/demo.js
View file @
3343f60
...
...
@@ -15,16 +15,16 @@ var remoteUsers = {};
var
options
=
{
appid
:
'bb627d3728164785b13e182757b15f0b'
,
}
if
(
window
.
location
.
origin
.
includes
(
'hazj.lgyzpt.com'
))
{
if
(
window
.
location
.
origin
.
includes
(
'hazj.lgyzpt.com'
))
{
options
.
appid
=
'4f143573c56744c698820b1ef45ec064'
}
let
param
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'huaiAnAppParam'
)
||
'{}'
)
let
param
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'huaiAnAppParam'
)
||
'{}'
)
var
applyId
=
param
.
applyId
if
(
param
.
processType
==
'complaint'
)
{
if
(
param
.
processType
==
'complaint'
)
{
$
(
"#beginTs"
).
html
(
'拍摄着装环节时,请手持工牌,并将工服上的logo置于屏幕中央,如图所示:'
)
$
(
"#beginImg"
).
attr
(
'src'
,
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/gongfu.png'
)
$
(
"#beginImg"
).
css
(
'width'
,
'70%'
)
$
(
"#beginImg"
).
css
(
'width'
,
'70%'
)
}
AgoraRTC
.
onAutoplayFailed
=
()
=>
{
...
...
@@ -103,7 +103,7 @@ async function leave() {
}
}
remoteUsers
=
{};
if
(
!
client
)
{
if
(
!
client
)
{
return
}
await
client
.
leave
();
...
...
@@ -138,12 +138,24 @@ var noShootNum
var
accountInputNum
var
voiceUrl
=
''
var
aliyunQueryFlag
=
false
var
cheatClickFlag
=
false
var
gbBoxClick
=
false
var
cheatNumRecord
=
0
function
getProcess
(){
if
(
!
window
.
location
.
href
.
includes
(
'demo.html'
)){
//作弊倒计时字段
var
cheatTimeNum
=
10
var
cheatTimeStr
=
''
//无法拍摄倒计时字段
var
noShootTimeNum
=
5
var
noShootTimeArr
=
[
5
,
15
,
40
,
60
]
var
noShootTimeIndex
=
0
var
noShootTimeStr
=
''
//串号倒计时字段
var
snTimeNum
=
3
var
snTimeStr
=
''
function
getProcess
()
{
if
(
!
window
.
location
.
href
.
includes
(
'demo.html'
))
{
return
}
...
...
@@ -153,17 +165,17 @@ function getProcess(){
callId
:
callId
,
applyId
:
applyId
,
}
}).
then
(
async
res
=>
{
if
(
res
.
code
==
200
)
{
}).
then
(
async
res
=>
{
if
(
res
.
code
==
200
)
{
res
=
res
.
data
if
(
res
.
close
==
'1'
)
{
if
(
res
.
close
==
'1'
)
{
free
()
$
(
"#confirmFlag"
).
show
()
return
}
if
(
res
.
checkStatus
&&
res
.
checkStatus
==
1
)
{
if
(
res
.
checkStatus
&&
res
.
checkStatus
==
1
)
{
$
(
'#waitting'
).
show
()
$
(
"#mp3Source"
)[
0
].
pause
()
...
...
@@ -173,56 +185,46 @@ function getProcess(){
$
(
'#pictureShowAlert'
).
hide
()
return
}
else
{
}
else
{
$
(
'#waitting'
).
hide
()
}
//作弊弹窗的显示逻辑
if
(
cheatNumRecord
!=
res
.
findCheatNum
){
cheatClickFlag
=
false
}
if
(
res
.
findCheat
==
2
||
(
res
.
findCheat
==
1
&&
!
cheatClickFlag
)){
$
(
'#cheatNum'
).
text
(
res
.
findCheatNum
)
cheatNumRecord
=
res
.
findCheatNum
if
(
res
.
findCheat
==
2
){
$
(
'#cheatQuitBut'
).
show
()
$
(
'#forbidProcess'
).
show
()
$
(
'#cheatClose'
).
hide
()
$
(
'#allowProcess'
).
hide
()
}
else
{
$
(
'#allowProcess'
).
show
()
if
(
res
.
findCheatNum
&&
res
.
findCheatNum
>=
1
)
{
cheatTimeNum
=
10
if
(
cheatTimeStr
)
{
clearTimeout
(
cheatTimeStr
)
}
cheatShowMethod
()
$
(
'#warningTsAlert'
).
show
()
}
//主光猫是否在箱子的弹窗显示逻辑
if
(
res
.
zgmInbox
==
1
&&
!
gbBoxClick
)
{
if
(
res
.
zgmInbox
==
1
&&
!
gbBoxClick
)
{
$
(
'#gmBoxTsAlert'
).
show
()
}
if
(
res
.
voiceCode
&&
(
res
.
voiceCode
.
includes
(
'SN'
)
||
res
.
voiceCode
.
startsWith
(
'account_'
))
&&
!
aliyunQueryFlag
)
{
if
(
res
.
voiceCode
&&
(
res
.
voiceCode
.
includes
(
'SN'
)
||
res
.
voiceCode
.
startsWith
(
'account_'
))
&&
!
aliyunQueryFlag
)
{
aliyunQueryFlag
=
true
queryAliyunToken
(
res
.
voiceCode
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
queryAliyunToken
()
},
600000
)
},
600000
)
}
if
(
!
res
.
voiceCode
||
((
res
.
voiceCode
+
''
+
res
.
tryNum
)
==
(
stepId
+
''
+
tryNum
)))
{
if
(
!
res
.
voiceCode
||
((
res
.
voiceCode
+
''
+
res
.
tryNum
)
==
(
stepId
+
''
+
tryNum
)))
{
//确认sn串号弹窗
if
(
res
.
contentSN
&&
!
snConfirmFlag
&&
!
ifClickHide
)
{
if
(
res
.
contentSN
&&
!
snConfirmFlag
&&
!
ifClickHide
)
{
$
(
'#snAlertTile'
).
text
(
'请确认设备串号'
)
$
(
'#snErrorTs'
).
text
(
'如识别错误你可重新进行拍摄'
+
(
res
.
tryNum
>=
snInputNum
?
'或直接修改'
:
''
))
$
(
'#snErrorTs'
).
text
(
'如识别错误你可重新进行拍摄'
+
(
res
.
tryNum
>=
snInputNum
?
'或直接修改'
:
''
))
$
(
'#snErrorTs'
).
removeClass
(
'tsRed'
)
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
if
(
res
.
tryNum
<
snInputNum
)
{
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
if
(
res
.
tryNum
<
snInputNum
)
{
$
(
'#snValue'
).
prop
(
'readonly'
,
true
);
$
(
'#snValue'
).
addClass
(
'disabled'
)
}
else
{
}
else
{
$
(
'#snValue'
).
prop
(
'readonly'
,
false
);
$
(
'#snValue'
).
removeClass
(
'disabled'
)
}
...
...
@@ -241,17 +243,17 @@ function getProcess(){
stepId
=
res
.
voiceCode
$
(
"#contextDiv"
).
html
(
res
.
context
)
if
(
!
ifListener
)
{
$
(
"#mp3Source"
)[
0
].
addEventListener
(
'play'
,
function
()
{
if
(
!
ifListener
)
{
$
(
"#mp3Source"
)[
0
].
addEventListener
(
'play'
,
function
()
{
audioStart
()
});
$
(
"#mp3Source"
)[
0
].
addEventListener
(
'ended'
,
function
()
{
$
(
"#mp3Source"
)[
0
].
addEventListener
(
'ended'
,
function
()
{
audioEnd
()
});
$
(
"#mp3Source"
)[
0
].
addEventListener
(
'error'
,
e
=>
{
if
(
voiceUrl
)
{
if
(
voiceUrl
)
{
(
"#mp3Source"
)[
0
].
muted
=
false
$
(
"#mp3Source"
).
attr
(
'src'
,
voiceUrl
)
$
(
"#mp3Source"
)[
0
].
play
()
...
...
@@ -260,53 +262,49 @@ function getProcess(){
}
ifListener
=
true
if
(
res
.
voiceUrlMp3
)
{
if
(
res
.
voiceUrlMp3
)
{
$
(
"#mp3Source"
)[
0
].
pause
()
$
(
"#mp3Source"
)[
0
].
muted
=
false
voiceUrl
=
res
.
voiceUrlMp3
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
"#mp3Source"
).
attr
(
'src'
,
voiceUrl
)
$
(
"#mp3Source"
)[
0
].
play
()
},
350
)
},
350
)
}
audioSet
(
false
)
if
(
stepId
.
includes
(
'SN'
)
&&
!
res
.
contentSN
)
{
if
(
stepId
.
includes
(
'SN'
)
&&
!
res
.
contentSN
)
{
if
(
tryNum
>=
snInputNum
&&
ifSnSubmitPicture
)
{
if
(
tryNum
>=
snInputNum
&&
ifSnSubmitPicture
)
{
//sn多次未识别到的弹窗
if
(
!
snConfirmFlag
&&
!
ifClickHide
){
$
(
'#snAlertTile'
).
text
(
'请输入设备串号'
)
$
(
'#snErrorTs'
).
text
(
'串号多次未通过,你可手动输入设备串号'
)
$
(
'#snErrorTs'
).
addClass
(
'tsRed'
)
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
$
(
"#snValue"
).
val
(
''
)
$
(
"#snValue"
).
removeClass
(
'red'
)
$
(
'#snValue'
).
prop
(
'readonly'
,
false
);
$
(
'#snValue'
).
removeClass
(
'disabled'
)
$
(
"#snAlertDiv"
).
show
()
addSnInputEvent
()
snConfirmFlag
=
true
if
(
!
snConfirmFlag
&&
!
ifClickHide
)
{
snInputShow
()
return
}
}
else
{
}
else
{
//串号环节的错误示例弹窗
let
param
=
getSnErrorInfo
(
stepId
)
if
(
param
.
pageText
&&
tryNum
>=
1
&&
!
snErrorAlertClickHide
)
{
if
(
param
.
pageText
&&
tryNum
>=
1
&&
!
snErrorAlertClickHide
)
{
$
(
"#snErrorText"
).
html
(
param
.
pageText
)
$
(
"#snErrorImg"
).
attr
(
'src'
,
param
.
imgUrl
)
snTimeNum
=
3
if
(
snTimeStr
)
{
clearTimeout
(
snTimeStr
)
}
snShowMethod
()
$
(
"#snErrorAlert"
).
show
()
}
}
}
//示例弹窗
if
(
stepId
.
startsWith
(
'complain'
))
{
if
(
stepId
.
startsWith
(
'complain'
))
{
let
param
=
getSnInfo
(
stepId
)
if
(
!
sessionStorage
.
getItem
(
param
.
cacheId
))
{
if
(
!
sessionStorage
.
getItem
(
param
.
cacheId
))
{
$
(
"#snExampleText"
).
html
(
param
.
pageText
)
$
(
"#snExampleImg"
).
attr
(
'src'
,
param
.
imgUrl
)
...
...
@@ -316,46 +314,52 @@ function getProcess(){
//无法拍摄弹窗
let
pa
=
getNoShootInfo
(
stepId
)
if
(
pa
.
pageText
&&
tryNum
>=
noShootNum
&&
!
noShootClick
&&
res
.
checkStatus
!=
1
)
{
if
(
pa
.
pageText
&&
tryNum
>=
noShootNum
&&
!
noShootClick
&&
res
.
checkStatus
!=
1
)
{
$
(
'#noShootTextShow'
).
text
(
pa
.
pageText
)
$
(
'#noShootImgShow'
).
attr
(
'src'
,
pa
.
imgUrl
)
noShootTimeIndex
=
noShootTimeIndex
>=
3
?
3
:
noShootTimeIndex
noShootTimeNum
=
noShootTimeArr
[
noShootTimeIndex
]
noShootTimeIndex
+=
1
$
(
'#noShootShowAlert'
).
show
()
noShootShowMethod
()
}
//工服工牌示例弹窗
if
(
stepId
.
includes
(
'gongFu_'
)
&&
!
sessionStorage
.
getItem
(
'gongfuExampleAlert'
))
{
if
(
stepId
.
includes
(
'gongFu_'
)
&&
!
sessionStorage
.
getItem
(
'gongfuExampleAlert'
))
{
$
(
"#gongfuExampleAlert"
).
show
()
}
else
{
}
else
{
$
(
"#gongfuExampleAlert"
).
hide
()
}
if
(
stepId
.
includes
(
'gongPai_'
)
&&
!
sessionStorage
.
getItem
(
'gongpaiExampleAlert'
))
{
if
(
stepId
.
includes
(
'gongPai_'
)
&&
!
sessionStorage
.
getItem
(
'gongpaiExampleAlert'
))
{
$
(
"#gongpaiExampleAlert"
).
show
()
}
else
{
}
else
{
$
(
"#gongpaiExampleAlert"
).
hide
()
}
//用户回访(已无)
if
(
stepId
.
startsWith
(
'us'
)
&&
stepId
.
includes
(
'_4'
))
{
if
(
stepId
.
startsWith
(
'us'
)
&&
stepId
.
includes
(
'_4'
))
{
$
(
'#nextQuestion'
).
show
()
}
else
{
}
else
{
$
(
'#nextQuestion'
).
hide
()
}
//账号识别困难提示
if
(
stepId
.
startsWith
(
'account_'
)
&&
tryNum
>=
accountInputNum
)
{
if
(
stepId
.
startsWith
(
'account_'
)
&&
tryNum
>=
accountInputNum
)
{
$
(
"#inputAccountTs"
).
css
(
'display'
,
'flex'
)
}
else
{
}
else
{
$
(
"#inputAccountTs"
).
css
(
'display'
,
'none'
)
}
if
(
res
.
tipCode
==
'tip2'
)
{
if
(
res
.
tipCode
==
'tip2'
)
{
$
(
'.timeTs'
).
show
()
}
else
{
}
else
{
$
(
'.timeTs'
).
hide
()
}
if
(
stepId
.
startsWith
(
'end'
))
{
$
(
"#contextDiv"
).
css
(
'font-size'
,
'.28rem'
)
if
(
stepId
.
startsWith
(
'end'
))
{
$
(
"#contextDiv"
).
css
(
'font-size'
,
'.28rem'
)
}
setStepButt
()
...
...
@@ -363,7 +367,79 @@ function getProcess(){
})
}
function
audioStart
(){
function
snInputShow
()
{
$
(
'#snAlertTile'
).
text
(
'请输入设备串号'
)
$
(
'#snAlertTsShow'
).
show
()
$
(
'#snErrorTs'
).
text
(
'串号多次未通过,你可手动输入设备串号'
)
$
(
'#snErrorTs'
).
addClass
(
'tsRed'
)
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
$
(
"#snValue"
).
val
(
''
)
$
(
"#snValue"
).
removeClass
(
'red'
)
$
(
'#snValue'
).
prop
(
'readonly'
,
false
);
$
(
'#snValue'
).
removeClass
(
'disabled'
)
$
(
"#snAlertDiv"
).
show
()
addSnInputEvent
()
snConfirmFlag
=
true
}
$
(
'#snTimeOut'
).
click
(
function
()
{
if
(
snTimeNum
>
0
)
{
return
}
$
(
"#snErrorAlert"
).
hide
()
snInputShow
()
})
function
cheatShowMethod
()
{
$
(
'#cheatClose'
).
addClass
(
'gray'
)
cheatTimeStr
=
setTimeout
(()
=>
{
cheatTimeNum
-=
1
if
(
cheatTimeNum
<
1
)
{
$
(
'#cheatClose'
).
text
(
'重新拍摄'
)
$
(
'#cheatClose'
).
removeClass
(
'gray'
)
}
else
{
$
(
'#cheatClose'
).
text
(
'重新拍摄('
+
cheatTimeNum
+
's)'
)
cheatShowMethod
()
}
},
1000
)
}
function
noShootShowMethod
()
{
$
(
'#noShootTime'
).
addClass
(
'grayNoShoot'
)
$
(
'#noShootTime'
).
removeClass
(
'clickButt'
)
if
(
!
noShootTimeStr
)
{
$
(
'#noShootTime'
).
text
(
'无法拍摄('
+
noShootTimeNum
+
's)'
)
}
noShootTimeStr
=
setTimeout
(()
=>
{
noShootTimeNum
-=
1
if
(
noShootTimeNum
<
1
)
{
$
(
'#noShootTime'
).
text
(
'无法拍摄'
)
$
(
'#noShootTime'
).
removeClass
(
'grayNoShoot'
)
$
(
'#noShootTime'
).
addClass
(
'clickButt'
)
}
else
{
$
(
'#noShootTime'
).
text
(
'无法拍摄('
+
noShootTimeNum
+
's)'
)
noShootShowMethod
()
}
},
1000
)
}
function
snShowMethod
()
{
$
(
'#snTimeOut'
).
addClass
(
'graySn'
)
snTimeStr
=
setTimeout
(()
=>
{
snTimeNum
-=
1
if
(
snTimeNum
<
1
)
{
$
(
'#snTimeOut'
).
text
(
'手动输入'
)
$
(
'#snTimeOut'
).
removeClass
(
'graySn'
)
}
else
{
$
(
'#snTimeOut'
).
text
(
'手动输入('
+
snTimeNum
+
's)'
)
snShowMethod
()
}
},
1000
)
}
function
audioStart
()
{
util
.
httpRequest
({
url
:
'/startOrEnd'
,
data
:
{
...
...
@@ -374,7 +450,7 @@ function audioStart(){
}
})
}
function
audioEnd
(){
function
audioEnd
()
{
util
.
httpRequest
({
url
:
'/startOrEnd'
,
data
:
{
...
...
@@ -385,18 +461,18 @@ function audioEnd(){
}
})
if
(
stepId
.
includes
(
'end'
))
{
if
(
stepId
.
includes
(
'end'
))
{
free
()
window
.
location
.
replace
(
'result.html?time='
+
new
Date
().
getTime
())
window
.
location
.
replace
(
'result.html?time='
+
new
Date
().
getTime
())
}
}
function
audioSet
(
flag
){
if
(
isHuaweiPhone
())
{
if
(
flag
)
{
function
audioSet
(
flag
)
{
if
(
isHuaweiPhone
())
{
if
(
flag
)
{
setEnabled
(
"audio"
,
true
)
}
else
{
}
else
{
if
(
localTrackState
.
audioTrackEnabled
)
{
setEnabled
(
"audio"
,
false
)
}
...
...
@@ -404,172 +480,172 @@ function audioSet(flag){
}
}
function
getSnErrorInfo
(
code
){
function
getSnErrorInfo
(
code
)
{
let
key
=
code
||
stepId
let
pageText
=
''
let
id
=
''
if
(
key
.
startsWith
(
'gm'
))
{
if
(
key
.
startsWith
(
'gm'
))
{
pageText
=
'请拍摄光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'gm'
}
else
if
(
key
.
startsWith
(
'zgm'
))
{
}
else
if
(
key
.
startsWith
(
'zgm'
))
{
pageText
=
'请拍摄FTTR主光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'zgm'
}
else
if
(
key
.
startsWith
(
'cgm'
))
{
}
else
if
(
key
.
startsWith
(
'cgm'
))
{
pageText
=
'请拍摄FTTR从光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'cgm'
}
else
if
(
key
.
startsWith
(
'jdh'
))
{
}
else
if
(
key
.
startsWith
(
'jdh'
))
{
pageText
=
'请将机顶盒翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'jdh'
}
else
if
(
key
.
startsWith
(
'lyq'
))
{
}
else
if
(
key
.
startsWith
(
'lyq'
))
{
pageText
=
'请将路由器翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'lyq'
}
else
if
(
key
.
startsWith
(
'iptv'
))
{
}
else
if
(
key
.
startsWith
(
'iptv'
))
{
pageText
=
'将摄像头对准电视软终端要识别的号码,如图所示:'
id
=
'iptv'
}
else
if
(
key
.
startsWith
(
'cloudPc'
))
{
}
else
if
(
key
.
startsWith
(
'cloudPc'
))
{
pageText
=
'请将终端盒翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'cloudPc'
}
else
if
(
key
.
startsWith
(
'insf'
))
{
}
else
if
(
key
.
startsWith
(
'insf'
))
{
pageText
=
'请查看摄像头底座的铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'insf'
}
else
if
(
key
.
startsWith
(
'poeSwitch'
))
{
}
else
if
(
key
.
startsWith
(
'poeSwitch'
))
{
pageText
=
'请拍摄POE交换机铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'poeSwitch'
}
return
{
pageText
,
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/snError/'
+
id
+
'.png'
)
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/snError/'
+
id
+
'.png'
)
}
}
function
getSnInfo
(
code
){
function
getSnInfo
(
code
)
{
let
key
=
code
||
stepId
let
pageText
=
''
let
id
=
''
if
(
key
.
startsWith
(
'gm'
))
{
if
(
key
.
startsWith
(
'gm'
))
{
pageText
=
'请拍摄光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'gm'
}
else
if
(
key
.
startsWith
(
'zgm'
))
{
}
else
if
(
key
.
startsWith
(
'zgm'
))
{
pageText
=
'请拍摄FTTR主光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'zgm'
}
else
if
(
key
.
startsWith
(
'cgm'
))
{
}
else
if
(
key
.
startsWith
(
'cgm'
))
{
pageText
=
'请拍摄FTTR从光猫铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'cgm'
}
else
if
(
key
.
startsWith
(
'jdh'
))
{
}
else
if
(
key
.
startsWith
(
'jdh'
))
{
pageText
=
'请将机顶盒翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'jdh'
}
else
if
(
key
.
startsWith
(
'lyq'
))
{
}
else
if
(
key
.
startsWith
(
'lyq'
))
{
pageText
=
'请将路由器翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'lyq'
}
else
if
(
key
.
startsWith
(
'iptv'
))
{
}
else
if
(
key
.
startsWith
(
'iptv'
))
{
pageText
=
'将摄像头对准电视软终端要识别的号码,如图所示:'
id
=
'iptv'
}
else
if
(
key
.
startsWith
(
'cloudPc'
))
{
}
else
if
(
key
.
startsWith
(
'cloudPc'
))
{
pageText
=
'请将终端盒翻转至背面,将镜头对准要识别的号码,如图所示:'
id
=
'cloudPc'
}
else
if
(
key
.
startsWith
(
'insf'
))
{
}
else
if
(
key
.
startsWith
(
'insf'
))
{
pageText
=
'请查看摄像头底座的铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'insf'
}
else
if
(
key
.
startsWith
(
'complainG'
))
{
}
else
if
(
key
.
startsWith
(
'complainG'
))
{
pageText
=
'请拍摄光猫的指示灯,将镜头对准指示灯的亮灯情况,如图所示:'
id
=
'complainG'
}
else
if
(
key
.
startsWith
(
'complainZ'
))
{
}
else
if
(
key
.
startsWith
(
'complainZ'
))
{
pageText
=
'请拍摄主光猫的指示灯,将镜头对准指示灯的亮灯情况,如图所示:'
id
=
'complainZ'
}
else
if
(
key
.
startsWith
(
'poeSwitch'
))
{
}
else
if
(
key
.
startsWith
(
'poeSwitch'
))
{
pageText
=
'请拍摄POE交换机铭牌,将镜头对准要识别的号码,如图所示:'
id
=
'poeSwitch'
}
return
{
pageText
,
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/'
+
id
+
'Example.png'
),
cacheId
:
id
+
'SnExampleAlert'
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/'
+
id
+
'Example.png'
),
cacheId
:
id
+
'SnExampleAlert'
}
}
function
getNoShootInfo
(
code
){
function
getNoShootInfo
(
code
)
{
let
key
=
code
||
stepId
let
pageText
=
''
let
id
=
''
if
(
key
.
startsWith
(
'Ogm'
))
{
if
(
key
.
startsWith
(
'Ogm'
))
{
pageText
=
'方法1:近距离聚焦拍摄光猫正面,露出移动的标识。'
id
=
'Ogm'
}
else
if
(
key
.
startsWith
(
'Ozgm'
))
{
}
else
if
(
key
.
startsWith
(
'Ozgm'
))
{
pageText
=
'方法1:近距离聚焦拍摄FTTR主光猫的正面,露出移动的标识。'
id
=
'Ozgm'
}
else
if
(
key
.
startsWith
(
'Ocgm'
))
{
}
else
if
(
key
.
startsWith
(
'Ocgm'
))
{
pageText
=
'方法1:近距离聚焦拍摄FTTR子光猫的正面,露出移动的标识。'
id
=
'Ocgm'
}
else
if
(
key
.
startsWith
(
'Ojdh'
))
{
}
else
if
(
key
.
startsWith
(
'Ojdh'
))
{
pageText
=
'方法1:近距离聚焦拍摄机顶盒的正面,露出移动的标识。'
id
=
'Ojdh'
}
else
if
(
key
.
startsWith
(
'Olyq'
))
{
}
else
if
(
key
.
startsWith
(
'Olyq'
))
{
pageText
=
'方法1:近距离聚焦拍摄路由器的正面,露出移动的标识。'
id
=
'Olyq'
}
else
if
(
key
.
startsWith
(
'Oinsf'
))
{
}
else
if
(
key
.
startsWith
(
'Oinsf'
))
{
pageText
=
'方法1:近距离聚焦拍摄室内摄像头的正面,露出移动的标识。'
id
=
'Oinsf'
}
else
if
(
key
.
startsWith
(
'cloudPcScreen'
))
{
}
else
if
(
key
.
startsWith
(
'cloudPcScreen'
))
{
pageText
=
'方法1:近距离聚焦拍摄云电脑显示器的正面,露出移动的标识。'
id
=
'cloudPcScreen'
}
else
if
(
key
.
startsWith
(
'cloudPcTer'
))
{
}
else
if
(
key
.
startsWith
(
'cloudPcTer'
))
{
pageText
=
'方法1:近距离聚焦拍摄云电脑终端的正面,露出移动的标识。'
id
=
'cloudPcTer'
}
else
if
(
key
.
startsWith
(
'Owsf'
))
{
}
else
if
(
key
.
startsWith
(
'Owsf'
))
{
pageText
=
'方法1:近距离聚焦拍摄室外安防的正面,露出移动的标识。'
id
=
'Owsf'
}
else
if
(
key
.
startsWith
(
'gongFu'
))
{
}
else
if
(
key
.
startsWith
(
'gongFu'
))
{
pageText
=
'方法1:拍摄时请手持工牌,并将工服上的logo置于屏幕中央。'
id
=
'gongfu'
}
else
if
(
key
.
startsWith
(
'gongPai'
))
{
}
else
if
(
key
.
startsWith
(
'gongPai'
))
{
pageText
=
'方法1:拍摄时请手持工牌,将摄像头聚焦到工牌上。'
id
=
'gongpai'
}
else
if
(
key
.
startsWith
(
'account'
))
{
}
else
if
(
key
.
startsWith
(
'account'
))
{
pageText
=
'方法1:拍摄时请保持垂直拍摄,避免出现反光、画面不清晰、画面抖动的情况。'
id
=
'account'
}
else
if
(
key
.
startsWith
(
'Otv'
))
{
}
else
if
(
key
.
startsWith
(
'Otv'
))
{
pageText
=
'方法1:拍摄时请将开机状态的电视机置于屏幕中央。'
id
=
'Otv'
}
else
if
(
key
.
startsWith
(
'Ogjtv'
))
{
}
else
if
(
key
.
startsWith
(
'Ogjtv'
))
{
pageText
=
'方法1:拍摄时请将关机状态的电视机置于屏幕中央。'
id
=
'Ogjtv'
}
else
if
(
key
.
startsWith
(
'poePanel'
))
{
}
else
if
(
key
.
startsWith
(
'poePanel'
))
{
pageText
=
'方法1:近距离聚焦拍摄POE面板的正面,露出移动的标识。'
id
=
'poePanel'
}
else
if
(
key
.
startsWith
(
'poeSwitchboard'
))
{
}
else
if
(
key
.
startsWith
(
'poeSwitchboard'
))
{
pageText
=
'方法1:近距离聚焦拍摄POE交换机的正面,露出移动的标识。'
id
=
'poeSwitchboard'
}
return
{
pageText
,
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/noShoot/'
+
id
+
'.png'
)
imgUrl
:
(
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/noShoot/'
+
id
+
'.png'
)
}
}
function
free
(){
function
free
()
{
leave
()
if
(
intervalStr
)
{
if
(
intervalStr
)
{
clearInterval
(
intervalStr
)
}
release
()
}
function
release
(){
if
(
!
callId
&&
!
sessionStorage
.
getItem
(
'haCallId'
))
{
function
release
()
{
if
(
!
callId
&&
!
sessionStorage
.
getItem
(
'haCallId'
))
{
return
}
util
.
httpRequest
({
url
:
'/releaseConn'
,
data
:
{
callId
:
callId
||
sessionStorage
.
getItem
(
'haCallId'
)
||
''
,
callId
:
callId
||
sessionStorage
.
getItem
(
'haCallId'
)
||
''
,
applyId
:
applyId
}
})
...
...
@@ -579,7 +655,7 @@ function detailTime(num) {
if
(
!
num
)
{
return
''
;
}
else
{
num
=
isNaN
(
Number
(
num
))
?
num
:
Number
(
num
);
num
=
isNaN
(
Number
(
num
))
?
num
:
Number
(
num
);
let
d
=
new
Date
(
num
);
let
year
=
d
.
getFullYear
();
let
month
=
d
.
getMonth
()
+
1
;
...
...
@@ -597,19 +673,19 @@ function detailTime(num) {
}
}
$
(
"#videoSwitch"
).
click
(
async
function
(
e
)
{
$
(
"#videoSwitch"
).
click
(
async
function
(
e
)
{
console
.
log
(
cams
)
if
(
cams
.
length
<=
1
)
{
if
(
cams
.
length
<=
1
)
{
util
.
toast
(
'暂不支持'
)
}
else
{
if
(
!
camsId
)
{
if
(
cams
.
length
==
2
)
{
}
else
{
if
(
!
camsId
)
{
if
(
cams
.
length
==
2
)
{
camsId
=
cams
[
1
].
deviceId
}
else
{
}
else
{
let
arr
=
cams
if
(
!
isHuaweiPhone
())
{
arr
=
cams
.
filter
(
item
=>
{
if
(
!
isHuaweiPhone
())
{
arr
=
cams
.
filter
(
item
=>
{
return
item
.
label
.
includes
(
'back'
)
||
item
.
label
.
includes
(
'后置'
)
})
}
...
...
@@ -618,24 +694,24 @@ $("#videoSwitch").click(async function(e){
// arr = arr.slice(0,-1)
// }
camsId
=
arr
[
arr
.
length
-
1
].
deviceId
camsId
=
arr
[
arr
.
length
-
1
].
deviceId
}
if
(
rtcType
==
1
)
{
if
(
rtcType
==
1
)
{
await
localTracks
.
videoTrack
.
setDevice
(
camsId
);
}
else
{
}
else
{
await
room
.
switchActiveDevice
(
'videoinput'
,
camsId
);
}
}
else
{
if
(
rtcType
==
1
)
{
}
else
{
if
(
rtcType
==
1
)
{
await
localTracks
.
videoTrack
.
setDevice
(
cams
[
0
].
deviceId
);
// const ok = await safeSwitchCam(camsId);
// if (!ok) {
// util.toast('摄像头切换失败,请重试');
// }
}
else
{
}
else
{
await
room
.
switchActiveDevice
(
'videoinput'
,
cams
[
0
].
deviceId
);
}
camsId
=
''
...
...
@@ -643,29 +719,29 @@ $("#videoSwitch").click(async function(e){
}
})
function
setStepButt
(){
function
setStepButt
()
{
$
(
'.none'
).
hide
()
if
(
stepId
.
startsWith
(
"start_"
))
{
$
(
"#readButt"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"start_"
))
{
$
(
"#readButt"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"account_"
)
||
stepId
.
includes
(
"SN"
)
||
stepId
.
startsWith
(
"complain"
))
{
if
(
stepId
.
startsWith
(
"account_"
))
{
if
(
stepId
.
startsWith
(
"account_"
)
||
stepId
.
includes
(
"SN"
)
||
stepId
.
startsWith
(
"complain"
))
{
if
(
stepId
.
startsWith
(
"account_"
))
{
$
(
"#exampleTsText"
).
html
(
'请正面拍摄书写规范的账号'
)
}
else
if
(
stepId
.
startsWith
(
"complain"
))
{
}
else
if
(
stepId
.
startsWith
(
"complain"
))
{
$
(
"#exampleTsText"
).
html
(
'请将摄像头对焦到设备指示灯上'
)
}
else
{
}
else
{
$
(
"#exampleTsText"
).
html
(
'请将摄像头对焦到设备铭牌信息上'
)
}
$
(
"#exampleTsDiv"
).
css
(
'display'
,
'flex'
)
}
else
{
$
(
"#exampleTsDiv"
).
css
(
'display'
,
'flex'
)
}
else
{
$
(
"#exampleTsDiv"
).
hide
()
}
let
fn
=
function
(
str
,
farr
)
{
for
(
let
i
=
0
,
j
=
farr
.
length
;
i
<
j
;
i
++
)
{
if
(
str
.
includes
(
farr
[
i
]))
{
let
fn
=
function
(
str
,
farr
)
{
for
(
let
i
=
0
,
j
=
farr
.
length
;
i
<
j
;
i
++
)
{
if
(
str
.
includes
(
farr
[
i
]))
{
return
true
}
}
...
...
@@ -673,48 +749,48 @@ function setStepButt(){
return
false
}
let
nArr
=
[
"Ojdh"
,
"Olyq"
,
"Oinsf"
,
"Owsf"
,
"Otv"
,
"Ogjtv"
]
if
(
fn
(
stepId
,
nArr
))
{
if
(
'3208'
.
includes
(
param
.
areaType
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
}
else
{
$
(
"#shootButt2"
).
css
(
'display'
,
'flex'
)
let
nArr
=
[
"Ojdh"
,
"Olyq"
,
"Oinsf"
,
"Owsf"
,
"Otv"
,
"Ogjtv"
]
if
(
fn
(
stepId
,
nArr
))
{
if
(
'3208'
.
includes
(
param
.
areaType
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
}
else
{
$
(
"#shootButt2"
).
css
(
'display'
,
'flex'
)
}
}
let
sArr
=
[
"gongFu_"
,
"gongPai_"
,
"account_"
,
"env_"
,
"Ogm_"
,
"Ozgm_"
,
"Ocgm"
,
"lineSta_"
,,
"cloudPcTer"
,
"cloudPcScreen"
,
'poePanel'
,
'poeSwitchboard'
]
if
(
fn
(
stepId
,
sArr
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
let
sArr
=
[
"gongFu_"
,
"gongPai_"
,
"account_"
,
"env_"
,
"Ogm_"
,
"Ozgm_"
,
"Ocgm"
,
"lineSta_"
,
,
"cloudPcTer"
,
"cloudPcScreen"
,
'poePanel'
,
'poeSwitchboard'
]
if
(
fn
(
stepId
,
sArr
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
includes
(
'SN'
)
||
stepId
.
startsWith
(
'complain'
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
includes
(
'SN'
)
||
stepId
.
startsWith
(
'complain'
))
{
$
(
"#shootButt"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"jdhAccType_"
))
{
$
(
"#qiaoOrZhi"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"jdhAccType_"
))
{
$
(
"#qiaoOrZhi"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"accEvn_"
))
{
$
(
"#wangXian"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"accEvn_"
))
{
$
(
"#wangXian"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"lineType_"
))
{
$
(
"#guangLan"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"lineType_"
))
{
$
(
"#guangLan"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"lyqModel_"
)
||
stepId
.
startsWith
(
"lyqbz_"
))
{
$
(
"#shiFou"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"lyqModel_"
)
||
stepId
.
startsWith
(
"lyqbz_"
))
{
$
(
"#shiFou"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"hjq_"
)
||
stepId
.
startsWith
(
"zt_"
))
{
$
(
"#donwLOad"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"hjq_"
)
||
stepId
.
startsWith
(
"zt_"
))
{
$
(
"#donwLOad"
).
css
(
'display'
,
'flex'
)
}
if
(
stepId
.
startsWith
(
"visit_"
))
{
$
(
"#joinFlag"
).
css
(
'display'
,
'flex'
)
if
(
stepId
.
startsWith
(
"visit_"
))
{
$
(
"#joinFlag"
).
css
(
'display'
,
'flex'
)
}
}
$
(
'.snAgain'
).
click
((
e
)
=>
{
$
(
'.snAgain'
).
click
((
e
)
=>
{
let
key
=
$
(
e
.
target
).
attr
(
'key'
)
if
(
key
==
'photo'
)
{
if
(
key
==
'photo'
)
{
$
(
'#pictureShowAlert'
).
hide
()
}
else
{
}
else
{
util
.
httpRequest
({
url
:
'/retakeForButton'
,
data
:
{
...
...
@@ -722,7 +798,7 @@ $('.snAgain').click((e)=>{
callId
:
callId
,
voiceCode
:
stepId
}
}).
then
(
res
=>
{
})
}).
then
(
res
=>
{
})
$
(
'#snAlertDiv'
).
hide
()
$
(
'#snErrorTs'
).
text
(
''
)
...
...
@@ -733,22 +809,22 @@ $('.snAgain').click((e)=>{
ifSnSubmitPicture
=
false
ifClickHide
=
true
setTimeout
(()
=>
{
setTimeout
(()
=>
{
ifClickHide
=
false
},
2000
)
},
2000
)
})
let
clickButtFlag
=
false
$
(
'.clickButt'
).
click
(
async
(
e
)
=>
{
if
(
clickButtFlag
)
{
$
(
'.clickButt'
).
click
(
async
(
e
)
=>
{
if
(
clickButtFlag
)
{
return
}
clickButtFlag
=
true
setTimeout
(()
=>
{
setTimeout
(()
=>
{
clickButtFlag
=
false
},
1000
)
},
1000
)
if
(
!
stepId
.
startsWith
(
'gongFu'
)
&&
!
stepId
.
startsWith
(
'gongPai'
)
&&
!
dartTsShow
&&
ifDark
())
{
if
(
!
stepId
.
startsWith
(
'gongFu'
)
&&
!
stepId
.
startsWith
(
'gongPai'
)
&&
!
dartTsShow
&&
ifDark
())
{
dartTsShow
=
true
$
(
'#lightShowTs'
).
show
()
}
...
...
@@ -758,12 +834,12 @@ $('.clickButt').click(async (e)=>{
let
key
=
$
(
e
.
target
).
attr
(
'key'
)
if
(
key
==
'yiwancheng'
&&
(
stepId
.
includes
(
'SN'
)
||
stepId
.
includes
(
'account'
)))
{
if
(
key
==
'yiwancheng'
&&
(
stepId
.
includes
(
'SN'
)
||
stepId
.
includes
(
'account'
)))
{
paiZhao
()
if
(
stepId
.
includes
(
'account'
))
{
if
(
stepId
.
includes
(
'account'
))
{
$
(
'#picshowText'
).
text
(
'为确保准确识别用户账号,请拍清照片并确认用户账号清晰可见后,再提交。'
)
}
else
{
}
else
{
$
(
'#picshowText'
).
text
(
'为确保准确识别串号,请拍清照片并确认串号清晰可见后,再提交。'
)
}
...
...
@@ -772,7 +848,7 @@ $('.clickButt').click(async (e)=>{
return
}
if
(
key
==
'bunengpai'
)
{
if
(
key
==
'bunengpai'
)
{
$
(
'#noShootReasonAlert'
).
show
()
return
...
...
@@ -786,20 +862,20 @@ $('.clickButt').click(async (e)=>{
voiceCode
:
stepId
,
button_name
:
key
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
noShootClick
=
false
})
})
$
(
'#noShootSave'
).
click
(()
=>
{
$
(
'#noShootSave'
).
click
(()
=>
{
let
reason
=
$
(
"#noShootReason"
).
val
()
if
(
!
reason
)
{
if
(
!
reason
)
{
util
.
toast
(
'请输入情况说明'
)
return
}
if
(
reason
.
replace
(
/
[^\u
4e00-
\u
9fa5
]
/g
,
''
).
length
<
5
)
{
if
(
reason
.
replace
(
/
[^\u
4e00-
\u
9fa5
]
/g
,
''
).
length
<
5
)
{
util
.
toast
(
'请至少输入5个汉字'
)
return
}
...
...
@@ -818,16 +894,16 @@ $('#noShootSave').click(()=>{
button_name
:
'bunengpai'
,
noShowReason
:
reason
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
noShootClick
=
false
})
})
$
(
'#noShootClose'
).
click
(()
=>
{
$
(
'#noShootClose'
).
click
(()
=>
{
$
(
'#noShootReasonAlert'
).
hide
()
})
var
ifSnSubmitPicture
=
false
$
(
'#submitPicture'
).
click
(
async
()
=>
{
$
(
'#submitPicture'
).
click
(
async
()
=>
{
$
(
'#loadingText'
).
text
(
'上传中,请稍候...'
)
$
(
'#loading'
).
show
()
...
...
@@ -839,7 +915,7 @@ $('#submitPicture').click(async ()=>{
fileFormData
.
append
(
'button_name'
,
'yiwancheng'
)
let
url
=
await
queryImgUrl
()
if
(
!
url
)
{
if
(
!
url
)
{
$
(
'#loading'
).
hide
()
util
.
toast
(
'网络慢,请切换网络后重试'
)
return
...
...
@@ -850,25 +926,25 @@ $('#submitPicture').click(async ()=>{
url
:
'/takePhotoUrl '
,
time
:
20000
,
data
:
fileFormData
}).
then
(
res
=>
{
}).
then
(
res
=>
{
submitPictureSucc
()
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
$
(
'#pictureShowAlert'
).
hide
()
if
(
stepId
.
startsWith
(
'account_'
))
{
if
(
stepId
.
startsWith
(
'account_'
))
{
noShootClick
=
false
}
}
else
{
}
else
{
util
.
toast
(
res
.
msg
)
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
$
(
'#loading'
).
hide
()
util
.
toast
(
'网络拥堵,请切换网络重新提交'
)
})
})
function
submitPictureSucc
(){
function
submitPictureSucc
()
{
$
(
'#loading'
).
hide
()
ifSnSubmitPicture
=
true
...
...
@@ -878,23 +954,23 @@ function submitPictureSucc(){
}
//账号和设备串号的弹窗逻辑
$
(
"#accountAlertShow"
).
click
(()
=>
{
$
(
"#accountAlertShow"
).
click
(()
=>
{
$
(
"#accountValue"
).
val
(
''
)
$
(
"#accountAlertDiv"
).
show
()
})
function
inputCancel
(){
function
inputCancel
()
{
$
(
"#accountValue"
).
val
(
''
)
$
(
"#accountAlertDiv"
).
hide
()
}
function
accountInputSubmit
(){
function
accountInputSubmit
()
{
let
acc
=
$
(
"#accountValue"
).
val
()
if
(
!
acc
)
{
if
(
!
acc
)
{
util
.
toast
(
'请输入账号'
)
return
}
if
(
!
/^1
\d{10}
$/
.
test
(
acc
)
&&
!
acc
.
startsWith
(
'80'
))
{
if
(
!
/^1
\d{10}
$/
.
test
(
acc
)
&&
!
acc
.
startsWith
(
'80'
))
{
util
.
toast
(
'格式错误,输入用户账号(业务号码)'
)
return
}
...
...
@@ -907,22 +983,22 @@ function accountInputSubmit(){
voiceCode
:
stepId
,
account
:
acc
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
$
(
"#accountValue"
).
val
(
''
)
$
(
"#accountAlertDiv"
).
hide
()
}
else
{
}
else
{
util
.
toast
(
res
.
msg
)
}
})
}
function
snInputSubmit
(){
if
(
!
$
(
"#snValue"
).
val
())
{
function
snInputSubmit
()
{
if
(
!
$
(
"#snValue"
).
val
())
{
util
.
toast
(
'请输入设备串号'
)
return
}
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'0'
)
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'0'
)
util
.
httpRequest
({
url
:
'/snConfirmButton'
,
data
:
{
...
...
@@ -931,23 +1007,23 @@ function snInputSubmit(){
voiceCode
:
stepId
,
textSN
:
$
(
"#snValue"
).
val
()
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
||
res
.
code
==
5004
)
{
}).
then
(
res
=>
{
if
(
res
.
code
==
200
||
res
.
code
==
5004
)
{
$
(
"#snValue"
).
val
(
''
)
$
(
"#snAlertDiv"
).
hide
()
snConfirmFlag
=
false
}
else
if
(
res
.
code
==
5001
)
{
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
}
else
if
(
res
.
code
==
5001
)
{
$
(
'#snErrorTs'
).
css
(
'opacity'
,
'1'
)
$
(
"#snErrorTs"
).
text
(
res
.
msg
)
$
(
'#snErrorTs'
).
addClass
(
'tsRed'
)
$
(
"#snValue"
).
addClass
(
'red'
)
}
else
{
}
else
{
util
.
toast
(
'系统处理中,请稍后'
)
}
})
}
$
(
'#gmBoxButt div'
).
click
((
e
)
=>
{
$
(
'#gmBoxButt div'
).
click
((
e
)
=>
{
let
key
=
$
(
e
.
target
).
attr
(
'key'
)
util
.
httpRequest
({
...
...
@@ -958,17 +1034,17 @@ $('#gmBoxButt div').click((e)=>{
voiceCode
:
stepId
,
buttonText
:
key
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
gbBoxClick
=
true
$
(
'#gmBoxTsAlert'
).
hide
()
}
else
{
}
else
{
util
.
toast
(
res
.
msg
)
}
})
})
function
addSnInputEvent
(){
function
addSnInputEvent
()
{
document
.
querySelectorAll
(
'.snInput'
).
forEach
(
textarea
=>
{
function
adjustHeight
()
{
textarea
.
style
.
height
=
'auto'
;
...
...
@@ -984,7 +1060,7 @@ var localTrackState = {
audioTrackEnabled
:
true
,
};
$
(
"#audioClose"
).
click
(
function
(
e
)
{
if
(
isHuaweiPhone
())
{
if
(
isHuaweiPhone
())
{
util
.
toast
(
'暂不支持'
)
return
}
...
...
@@ -1019,13 +1095,13 @@ async function setEnabled(type, state) {
}
//声网的入会逻辑
async
function
initSw
(
data
){
async
function
initSw
(
data
)
{
createClient
()
options
.
channel
=
data
.
data
.
data
.
channel
options
.
uid
=
data
.
data
.
data
.
uid
options
.
token
=
data
.
data
.
data
.
token
let
flag
=
await
join
()
if
(
!
flag
)
{
if
(
!
flag
)
{
$
(
'#loading'
).
hide
()
util
.
toast
(
'加入频道失败'
)
return
...
...
@@ -1035,7 +1111,7 @@ async function initSw(data){
await
createTrackAndPublish
()
}
//livekit的入会逻辑
async
function
initLk
(
data
){
async
function
initLk
(
data
)
{
// 创建房间实例,启用自适应流和动态发布
room
=
new
LivekitClient
.
Room
({
adaptiveStream
:
true
,
...
...
@@ -1096,32 +1172,32 @@ function handleLocalTrackPublished(publication, participant) {
var
room
=
null
var
rtcType
=
''
var
startZjFlag
=
true
async
function
init
(){
snInputNum
=
window
.
snInputNum
||
5
noShootNum
=
window
.
noShootNum
||
3
accountInputNum
=
window
.
accountInputNum
||
5
async
function
init
()
{
snInputNum
=
window
.
snInputNum
||
5
noShootNum
=
window
.
noShootNum
||
3
accountInputNum
=
window
.
accountInputNum
||
5
let
data
=
await
util
.
httpRequest
({
url
:
'/createRoom'
,
data
:
{
applyId
:
applyId
,
rtcType
:
isHuaweiPhone
()
?
'1'
:
''
rtcType
:
isHuaweiPhone
()
?
'1'
:
''
}
})
if
(
data
.
code
!=
'200'
)
{
if
(
data
.
code
!=
'200'
)
{
$
(
'#loading'
).
hide
()
util
.
toast
(
data
.
msg
)
return
}
callId
=
data
.
data
.
data
.
callId
sessionStorage
.
setItem
(
'haCallId'
,
callId
)
sessionStorage
.
setItem
(
'haCallId'
,
callId
)
rtcType
=
data
.
data
.
data
.
rtcType
if
(
rtcType
==
1
)
{
if
(
rtcType
==
1
)
{
await
initSw
(
data
)
}
else
{
}
else
{
await
initLk
(
data
)
}
...
...
@@ -1129,7 +1205,7 @@ async function init(){
startZjFlag
=
false
$
(
"#videoSwitch"
).
css
(
'display'
,
'flex'
)
if
(
isHuaweiPhone
())
{
if
(
isHuaweiPhone
())
{
$
(
'#lightOutDiv'
).
hide
()
}
$
(
"#toolDiv"
).
css
(
'display'
,
'flex'
)
...
...
@@ -1137,9 +1213,9 @@ async function init(){
getProcess
()
},
1000
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
$
(
'#livekit-dummy-audio-el'
).
remove
();
},
1000
)
},
1000
)
}
function
isHuaweiPhone
()
{
...
...
@@ -1177,22 +1253,25 @@ function isHarmonyOs() {
function
isIos
()
{
let
userAgent
=
navigator
.
userAgent
.
toLowerCase
()
return
userAgent
.
includes
(
'iphone'
)
?
'1'
:
'0'
return
userAgent
.
includes
(
'iphone'
)
?
'1'
:
'0'
}
$
(
'.pageClose'
).
click
(()
=>
{
$
(
'.pageClose'
).
click
(()
=>
{
window
.
history
.
go
(
-
1
)
})
$
(
'.continueTest'
).
click
(()
=>
{
$
(
'.continueTest'
).
click
(()
=>
{
window
.
location
.
reload
()
})
$
(
'#cheatClose'
).
click
(()
=>
{
cheatClickFlag
=
true
$
(
'#cheatClose'
).
click
(()
=>
{
if
(
cheatTimeNum
>=
1
)
{
return
}
$
(
'#warningTsAlert'
).
hide
()
})
$
(
'#videoBegin'
).
click
(
async
()
=>
{
if
(
!
AgoraRTC
.
checkSystemRequirements
())
{
$
(
'#videoBegin'
).
click
(
async
()
=>
{
if
(
!
AgoraRTC
.
checkSystemRequirements
())
{
util
.
toast
(
'暂不支持'
)
return
}
...
...
@@ -1200,12 +1279,12 @@ $('#videoBegin').click(async ()=>{
$
(
'#beginAlert'
).
hide
()
$
(
'#loadingText'
).
text
(
'开启中,请稍候...'
)
$
(
'#loading'
).
show
()
setTimeout
(()
=>
{
if
(
startZjFlag
)
{
setTimeout
(()
=>
{
if
(
startZjFlag
)
{
$
(
'#loading'
).
hide
()
$
(
'#beginFail'
).
show
()
}
},
20000
)
},
20000
)
$
(
"#mp3Source"
).
attr
(
'src'
,
'https://zjaudio.eos-wuxi-5.cmecloud.cn/sdbZfYen.mp3'
)
$
(
"#mp3Source"
)[
0
].
autoplay
=
true
...
...
@@ -1214,53 +1293,53 @@ $('#videoBegin').click(async ()=>{
init
()
})
$
(
"#hideGongpaiAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
'gongpaiExampleAlert'
,
'true'
)
$
(
"#hideGongpaiAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
'gongpaiExampleAlert'
,
'true'
)
$
(
"#gongpaiExampleAlert"
).
hide
()
})
$
(
"#hideGongfuAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
'gongfuExampleAlert'
,
'true'
)
$
(
"#hideGongfuAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
'gongfuExampleAlert'
,
'true'
)
$
(
"#gongfuExampleAlert"
).
hide
()
})
$
(
"#hidesnExampleAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
getSnInfo
().
cacheId
,
'true'
)
$
(
"#hidesnExampleAlert"
).
click
(()
=>
{
sessionStorage
.
setItem
(
getSnInfo
().
cacheId
,
'true'
)
$
(
"#snExampleAlert"
).
hide
()
})
$
(
"#hideSnErrorAlert"
).
click
(()
=>
{
$
(
"#hideSnErrorAlert"
).
click
(()
=>
{
$
(
"#snErrorAlert"
).
hide
()
snErrorAlertClickHide
=
true
})
$
(
"#hideNoShootAlert"
).
click
(()
=>
{
$
(
"#hideNoShootAlert"
).
click
(()
=>
{
$
(
"#noShootShowAlert"
).
hide
()
noShootClick
=
true
})
$
(
"#takePhotoAgain"
).
click
(()
=>
{
$
(
"#takePhotoAgain"
).
click
(()
=>
{
$
(
"#pictureShowAlert"
).
hide
()
})
$
(
"#lookExample"
).
click
(()
=>
{
if
(
stepId
.
includes
(
'SN'
)
||
stepId
.
startsWith
(
'complain'
))
{
$
(
"#lookExample"
).
click
(()
=>
{
if
(
stepId
.
includes
(
'SN'
)
||
stepId
.
startsWith
(
'complain'
))
{
let
param
=
getSnInfo
()
$
(
"#snExampleText"
).
html
(
param
.
pageText
)
$
(
"#snExampleImg"
).
attr
(
'src'
,
param
.
imgUrl
)
$
(
'#snExampleAlert'
).
show
()
}
else
{
}
else
{
$
(
"#accountExampleAlert"
).
show
()
}
})
$
(
"#hideAccountExample"
).
click
(()
=>
{
$
(
"#hideAccountExample"
).
click
(()
=>
{
$
(
"#accountExampleAlert"
).
hide
()
})
$
(
"#cameraDiv"
).
click
(
async
()
=>
{
$
(
"#cameraDiv"
).
click
(
async
()
=>
{
let
camArr
=
[]
cams
.
forEach
((
item
,
index
)
=>
{
camArr
[
camArr
.
length
]
=
'镜头'
+
(
index
+
1
)
cams
.
forEach
((
item
,
index
)
=>
{
camArr
[
camArr
.
length
]
=
'镜头'
+
(
index
+
1
)
})
vm
.
reasonPickData
.
arr
=
camArr
...
...
@@ -1269,18 +1348,18 @@ $("#cameraDiv").click(async ()=>{
})
var
lightIfOpen
=
false
$
(
'#lightDiv'
).
click
(()
=>
{
if
(
!
lightIfOpen
)
{
$
(
'#lightDiv'
).
click
(()
=>
{
if
(
!
lightIfOpen
)
{
openLight
()
}
else
{
}
else
{
closeLight
()
$
(
'#lightImg'
).
attr
(
'src'
,
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png'
)
$
(
'#lightImg'
).
attr
(
'src'
,
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png'
)
$
(
'#lightDiv div'
).
removeClass
(
'open'
)
lightIfOpen
=
false
}
})
$
(
'#lightShowTs'
).
click
(()
=>
{
$
(
'#lightShowTs'
).
click
(()
=>
{
$
(
'#lightShowTs'
).
hide
()
})
...
...
@@ -1292,22 +1371,22 @@ var vm = new Vue({
isShow
:
false
,
title
:
'摄像头选择'
,
arr
:[],
arr
:
[],
index
:
0
},
},
methods
:
{
reasonCancel
(){
reasonCancel
()
{
this
.
reasonPickData
.
isShow
=
false
},
reasonConfirm
(
value
,
index
){
reasonConfirm
(
value
,
index
)
{
this
.
reasonPickData
.
reason
=
value
this
.
reasonPickData
.
index
=
index
camsId
=
cams
[
index
].
deviceId
if
(
rtcType
==
1
)
{
if
(
rtcType
==
1
)
{
localTracks
.
videoTrack
.
setDevice
(
camsId
);
}
else
{
}
else
{
room
.
switchActiveDevice
(
'videoinput'
,
camsId
);
}
...
...
@@ -1317,17 +1396,17 @@ var vm = new Vue({
})
window
.
addEventListener
(
'popstate'
,
()
=>
{
if
(
intervalStr
)
{
if
(
intervalStr
)
{
clearInterval
(
intervalStr
)
}
});
window
.
addEventListener
(
'beforeunload'
,
()
=>
{
if
(
intervalStr
)
{
if
(
intervalStr
)
{
clearInterval
(
intervalStr
)
}
});
window
.
stopMedia
=
function
()
{
window
.
stopMedia
=
function
()
{
const
audio
=
document
.
querySelector
(
'audio'
);
const
video
=
document
.
querySelector
(
'video'
);
if
(
audio
)
{
...
...
@@ -1340,9 +1419,9 @@ window.stopMedia = function(){
}
}
$
(
window
).
on
(
'load'
,
function
()
{
$
(
window
).
on
(
'load'
,
function
()
{
$
(
'#loading'
).
hide
()
$
(
'#beginAlert'
).
css
(
'display'
,
'block'
)
$
(
'#beginAlert'
).
css
(
'display'
,
'block'
)
release
()
});
...
...
@@ -1354,18 +1433,18 @@ var cavasCtx
var
fileBlob
var
picCode
=
''
async
function
paiZhao
(){
async
function
paiZhao
()
{
let
videoTest
=
$
(
'#local-player video'
)[
0
]
if
(
!
cavasCtx
)
{
if
(
!
cavasCtx
)
{
// 设置canvas尺寸与视频相同
canvas
.
width
=
videoTest
.
videoWidth
;
canvas
.
height
=
(
videoTest
.
videoHeight
*
1.2
)
/
3
;
canvas
.
height
=
(
videoTest
.
videoHeight
*
1.2
)
/
3
;
// 在canvas上绘制视频帧
cavasCtx
=
canvas
.
getContext
(
'2d'
);
}
cavasCtx
.
drawImage
(
videoTest
,
0
,
videoTest
.
getBoundingClientRect
().
height
*
2.2
/
3
,
canvas
.
width
,
canvas
.
height
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
cavasCtx
.
drawImage
(
videoTest
,
0
,
videoTest
.
getBoundingClientRect
().
height
*
2.2
/
3
,
canvas
.
width
,
canvas
.
height
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
canvas
.
toBlob
(
async
(
blob
)
=>
{
fileBlob
=
blob
...
...
@@ -1377,19 +1456,19 @@ async function paiZhao(){
picCode
=
data
}
//判断当前拍照的光线强弱
function
ifDark
(){
function
ifDark
()
{
let
videoTest
=
$
(
'#local-player video'
)[
0
]
if
(
!
cavasCtx
)
{
if
(
!
cavasCtx
)
{
// 设置canvas尺寸与视频相同
canvas
.
width
=
videoTest
.
videoWidth
;
canvas
.
height
=
(
videoTest
.
videoHeight
*
1.2
)
/
3
;
canvas
.
height
=
(
videoTest
.
videoHeight
*
1.2
)
/
3
;
// 在canvas上绘制视频帧
cavasCtx
=
canvas
.
getContext
(
'2d'
);
}
cavasCtx
.
drawImage
(
videoTest
,
0
,
videoTest
.
getBoundingClientRect
().
height
*
2.2
/
3
,
canvas
.
width
,
canvas
.
height
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
cavasCtx
.
drawImage
(
videoTest
,
0
,
videoTest
.
getBoundingClientRect
().
height
*
2.2
/
3
,
canvas
.
width
,
canvas
.
height
,
0
,
0
,
canvas
.
width
,
canvas
.
height
);
let
imgData
=
cavasCtx
.
getImageData
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
let
data
=
imgData
.
data
;
// RGBA 连续数组
...
...
@@ -1406,7 +1485,7 @@ function ifDark(){
var
linghtStream
var
linghtTrack
async
function
openLight
(){
async
function
openLight
()
{
linghtStream
=
await
navigator
.
mediaDevices
.
getUserMedia
({
video
:
{
facingMode
:
{
exact
:
"environment"
},
...
...
@@ -1420,14 +1499,14 @@ async function openLight(){
linghtTrack
=
linghtStream
.
getVideoTracks
()[
0
];
let
hasTorch
=
false
try
{
try
{
let
capabilities
=
linghtTrack
.
getCapabilities
()
hasTorch
=
'torch'
in
capabilities
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
}
if
(
!
hasTorch
)
{
if
(
!
hasTorch
)
{
util
.
toast
(
'设备不支持手电筒功能!'
)
linghtTrack
.
stop
();
// 停止摄像头和闪光灯
...
...
@@ -1445,11 +1524,11 @@ async function openLight(){
frameRate
:
{
ideal
:
5
}
});
$
(
'#lightImg'
).
attr
(
'src'
,
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightOpen.png'
)
$
(
'#lightImg'
).
attr
(
'src'
,
'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightOpen.png'
)
$
(
'#lightDiv div'
).
addClass
(
'open'
)
lightIfOpen
=
true
}
function
closeLight
(){
function
closeLight
()
{
linghtTrack
.
applyConstraints
({
advanced
:
[{
torch
:
false
}]
});
...
...
@@ -1466,7 +1545,7 @@ document.head.appendChild(script);
var
clientOss
function
queryAliyunToken
(
code
){
function
queryAliyunToken
(
code
)
{
util
.
httpRequest
({
url
:
'/getAliyunToken'
,
data
:
{
...
...
@@ -1474,8 +1553,8 @@ function queryAliyunToken(code){
applyId
:
applyId
,
voiceCode
:
code
||
stepId
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
accessKeyId
=
res
.
data
.
accessKeyId
accessKeySecret
=
res
.
data
.
accessKeySecret
securityToken
=
res
.
data
.
securityToken
...
...
@@ -1500,7 +1579,7 @@ function queryAliyunToken(code){
}
async
function
queryImgUrl
()
{
try
{
let
fn
=
function
()
{
let
fn
=
function
()
{
// 获取当前日期和时间
let
now
=
new
Date
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment