Commit 3343f60a by 李宁

1

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