Commit a64a420e by 李宁

1

1 parent 9bd90ea0
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<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">
<title>添加工单</title> <title>江苏移动</title>
<link rel="stylesheet" href="css/vant.css"/> <link rel="stylesheet" href="css/vant.css"/>
<link rel="stylesheet" href="css/addOrder.css"> <link rel="stylesheet" href="css/addOrder.css?123123">
</head> </head>
<body> <body>
<div id="pageDiv" class="pageDiv"> <div id="pageDiv" class="pageDiv">
......
...@@ -123,8 +123,9 @@ div{ ...@@ -123,8 +123,9 @@ div{
position: fixed; position: fixed;
width: 7.02rem; width: 7.02rem;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
color: #fff; color: #fff;
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
...@@ -171,9 +172,10 @@ div{ ...@@ -171,9 +172,10 @@ div{
} }
.outAlert .alertCon .butt div{ .outAlert .alertCon .butt div{
width: 50%; width: 50%;
text-align: center;
height: .98rem; height: .98rem;
line-height: .98rem; display: flex;
justify-content: center;
align-items: center;
} }
.outAlert .alertCon .butt .right{ .outAlert .alertCon .butt .right{
color: #568FFE; color: #568FFE;
......
...@@ -82,19 +82,39 @@ html,body{ ...@@ -82,19 +82,39 @@ html,body{
display: flex; display: flex;
align-items: center; align-items: center;
padding: .12rem .16rem; padding: .12rem .16rem;
border-radius: .4rem 0px 0px .4rem; margin-right: -.08rem;
background: rgba(54, 54, 54, 0.90); display: none;
margin-right: -.24rem;
}
.conDiv .swUp .til .right img{
width: .32rem;
height: .32rem;
margin-right: .08rem;
} }
.conDiv .swUp .til .right div{ .conDiv .swUp .til .right .rli{
display: flex;
flex-direction: column;
align-items: center;
color: #fff; color: #fff;
font-size: .26rem; font-size: .2rem;
font-weight: 500; position: relative;
}
.conDiv .swUp .til .right .rli .rlii{
display: flex;
flex-direction: column;
align-items: center;
}
.conDiv .swUp .til .right .rli .open{
color: #FFAE00;
}
.conDiv .swUp .til .right .rli:nth-child(1){
margin-right: .34rem;
}
.conDiv .swUp .til .right .rli .img{
width: .4rem;
height: .4rem;
margin-bottom: .08rem;
}
.conDiv .swUp .til .right .rli .ts{
width: 3.6rem;
position: absolute;
top: .76rem;
right: -0.8rem;
display: none;
} }
.conDiv .swUp .detail{ .conDiv .swUp .detail{
color: #fff; color: #fff;
...@@ -201,8 +221,9 @@ html,body{ ...@@ -201,8 +221,9 @@ html,body{
.conDiv .swMiddle .butt .bclick{ .conDiv .swMiddle .butt .bclick{
width: 1.6rem; width: 1.6rem;
height: .48rem; height: .48rem;
line-height: .48rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
border-radius: .24rem; border-radius: .24rem;
color: #fff; color: #fff;
font-size: .28rem; font-size: .28rem;
...@@ -234,7 +255,9 @@ html,body{ ...@@ -234,7 +255,9 @@ html,body{
font-size: .32rem; font-size: .32rem;
font-weight: 500; font-weight: 500;
height: .8rem; height: .8rem;
line-height: .8rem; display: flex;
align-items: center;
justify-content: center;
} }
.conDiv .swDown .buttDiv .two{ .conDiv .swDown .buttDiv .two{
display: flex; display: flex;
...@@ -243,7 +266,9 @@ html,body{ ...@@ -243,7 +266,9 @@ html,body{
.conDiv .swDown .buttDiv .two div{ .conDiv .swDown .buttDiv .two div{
width: 3.4rem; width: 3.4rem;
height: .8rem; height: .8rem;
line-height: .8rem; display: flex;
align-items: center;
justify-content: center;
color: #fff; color: #fff;
font-size: .32rem; font-size: .32rem;
font-weight: 500; font-weight: 500;
...@@ -257,7 +282,9 @@ html,body{ ...@@ -257,7 +282,9 @@ html,body{
.conDiv .swDown .buttDiv .three div{ .conDiv .swDown .buttDiv .three div{
width: 2.23rem; width: 2.23rem;
height: .8rem; height: .8rem;
line-height: .8rem; display: flex;
align-items: center;
justify-content: center;
color: #fff; color: #fff;
font-size: .32rem; font-size: .32rem;
font-weight: 500; font-weight: 500;
...@@ -344,9 +371,10 @@ html,body{ ...@@ -344,9 +371,10 @@ html,body{
.alertDiv .inner .bot button{ .alertDiv .inner .bot button{
border-radius: 4px; border-radius: 4px;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
justify-content: center;
align-items: center;
width: 2.4rem; width: 2.4rem;
text-align: center;
font-size: .32rem; font-size: .32rem;
font-weight: 500; font-weight: 500;
} }
...@@ -491,9 +519,10 @@ html,body{ ...@@ -491,9 +519,10 @@ html,body{
} }
.outAlert .alertCon .butt div{ .outAlert .alertCon .butt div{
width: 50%; width: 50%;
text-align: center;
height: .98rem; height: .98rem;
line-height: .98rem; display: flex;
justify-content: center;
align-items: center;
} }
.outAlert .alertCon .butt .right{ .outAlert .alertCon .butt .right{
color: #568FFE; color: #568FFE;
...@@ -573,13 +602,15 @@ html,body{ ...@@ -573,13 +602,15 @@ html,body{
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
height: .88rem; height: .88rem;
line-height: .88rem;
text-align: center;
color: #FFF; color: #FFF;
font-size: .34rem; font-size: .34rem;
font-weight: 500; font-weight: 500;
margin-top: .4rem; margin-top: .4rem;
margin-bottom: .32rem; margin-bottom: .32rem;
display: flex;
align-items: center;
justify-content: center;
} }
...@@ -630,8 +661,9 @@ html,body{ ...@@ -630,8 +661,9 @@ html,body{
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; align-items: center;
justify-content: center;
color: #FFF; color: #FFF;
font-size: .34rem; font-size: .34rem;
font-weight: 500; font-weight: 500;
...@@ -713,8 +745,9 @@ html,body{ ...@@ -713,8 +745,9 @@ html,body{
background: #F6F6F6; background: #F6F6F6;
color: #666; color: #666;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; align-items: center;
justify-content: center;
width: 2.52rem; width: 2.52rem;
} }
.noShootCon .botBut .right{ .noShootCon .botBut .right{
...@@ -765,11 +798,101 @@ html,body{ ...@@ -765,11 +798,101 @@ html,body{
background: #F6F6F6; background: #F6F6F6;
color: #666; color: #666;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: 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{
display: flex;
justify-content: center;
flex-direction: column;
width: 6.4rem;
padding-bottom: .4rem;
}
.noTestCon .til{
padding: 0 .4rem;
color: #333;
font-size: .36rem;
font-weight: bold;
margin-top: .48rem;
margin-bottom: .4rem;
text-align: center;
}
.noTestCon .topTs{
color: #333;
font-size: .32rem;
line-height: .52rem;
margin-bottom: .48rem;
padding: 0 .48rem;
}
.noTestCon .cli{
padding: 0 .48rem;
margin-bottom: .48rem;
}
.noTestCon .cli .ctil{
display: flex;
align-items: center;
color: #666;
font-size: .28rem;
margin-bottom: .16rem;
}
.noTestCon .cli textarea{
width: 100%;
padding: .24rem .32rem;
border-radius: .08rem;
min-height: 1.6rem;
box-sizing: border-box;
border: 1px solid #d9d9d9;
outline: none;
font-size: .32rem;
}
.noTestCon .cli textarea::placeholder{
color: #999;
}
.noTestCon .know{
color: #fff;
background: #568FFE;
width: 5.44rem;
height: .88rem;
display: flex;
justify-content: center;
align-items: center;
font-size: .34rem;
font-weight: 500;
margin: auto;
border-radius: .08rem;
}
.noTestCon .close{
position: absolute;
bottom: -1.28rem;
width: .8rem;
height: .8rem;
left: 50%;
transform: translateX(-50%);
}
.noTestCon .cli .ctil img{
width: .14rem;
margin-right: .08rem;
}
.noTestCon .botTs{
color: #666;
font-size: .26rem;
line-height: .36rem;
margin-top: .2rem;
padding: 0 .48rem;
text-align: center;
}
div{
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
\ No newline at end of file \ No newline at end of file
...@@ -188,14 +188,26 @@ div{ ...@@ -188,14 +188,26 @@ div{
border-bottom: 1px solid #F6F6F6; border-bottom: 1px solid #F6F6F6;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
}
.orderList .orderli .ortil .gdid{
flex-grow: 1;
word-break: break-all;
line-height: 1.3;
margin-right: 0.2rem;
} }
.orderList .orderli .ortil .icon{ .orderList .orderli .ortil .icon{
padding: .1rem;
border-radius: .04rem; border-radius: .04rem;
background: rgba(86, 143, 254, 0.10); background: rgba(86, 143, 254, 0.10);
color: #568FFE; color: #568FFE;
font-size: .3rem; font-size: .3rem;
font-weight: 400; font-weight: 400;
height: .5rem;
width: 1.4rem;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
} }
.orderList .orderli .orcon{ .orderList .orderli .orcon{
padding: 0 .16rem; padding: 0 .16rem;
...@@ -226,8 +238,9 @@ div{ ...@@ -226,8 +238,9 @@ div{
border: 1px solid #DCDEE0; border: 1px solid #DCDEE0;
width: 1.44rem; width: 1.44rem;
height: .64rem; height: .64rem;
text-align: center; display: flex;
line-height: .64rem; justify-content: center;
align-items: center;
color: #333; color: #333;
font-size: .32rem; font-size: .32rem;
} }
...@@ -260,8 +273,9 @@ div{ ...@@ -260,8 +273,9 @@ div{
} }
.botButt div{ .botButt div{
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
color: #fff; color: #fff;
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
...@@ -379,8 +393,9 @@ div{ ...@@ -379,8 +393,9 @@ div{
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
color: #fff; color: #fff;
font-size: .34rem; font-size: .34rem;
font-weight: 500; font-weight: 500;
...@@ -423,8 +438,9 @@ div{ ...@@ -423,8 +438,9 @@ div{
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
color: #fff; color: #fff;
font-size: .34rem; font-size: .34rem;
font-weight: 500; font-weight: 500;
...@@ -532,12 +548,13 @@ div{ ...@@ -532,12 +548,13 @@ div{
background: #568FFE; background: #568FFE;
width: 5.44rem; width: 5.44rem;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
justify-content: center;
align-items: center;
font-size: .34rem; font-size: .34rem;
font-weight: 500; font-weight: 500;
margin: auto; margin: auto;
border-radius: .08rem; border-radius: .08rem;
text-align: center;
} }
.modifyAddreCon .close{ .modifyAddreCon .close{
position: absolute; position: absolute;
...@@ -597,9 +614,10 @@ div{ ...@@ -597,9 +614,10 @@ div{
} }
.feedbackConfirmCon .butt div{ .feedbackConfirmCon .butt div{
width: 50%; width: 50%;
text-align: center;
height: .98rem; height: .98rem;
line-height: .98rem; display: flex;
justify-content: center;
align-items: center;
} }
.feedbackConfirmCon .butt .right{ .feedbackConfirmCon .butt .right{
color: #568FFE; color: #568FFE;
......
...@@ -67,8 +67,9 @@ div{ ...@@ -67,8 +67,9 @@ div{
.botButt{ .botButt{
width: 3.38rem; width: 3.38rem;
height: .88rem; height: .88rem;
line-height: .88rem; display: flex;
text-align: center; justify-content: center;
align-items: center;
color: #fff; color: #fff;
border-radius: .08rem; border-radius: .08rem;
background: #568FFE; background: #568FFE;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<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?3333"> <link rel="stylesheet" href="css/demo.css?0909019011131">
</head> </head>
<body> <body>
...@@ -33,11 +33,20 @@ ...@@ -33,11 +33,20 @@
<div>江苏移动</div> <div>江苏移动</div>
</div> </div>
<div class="right" id="cameraDiv"> <div class="right" id="toolDiv">
<img src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/camera.png"> <div class="rli" id="lightOutDiv">
<div class="rlii" id="lightDiv">
<img id="lightImg" class="img" src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png">
<div>手电筒</div>
</div>
<img id="lightShowTs" class="ts" src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightTs.png">
</div>
<div class="rli" id="cameraDiv">
<img class="img" src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/camera.png?123">
<div>镜头包</div> <div>镜头包</div>
</div> </div>
</div> </div>
</div>
<div class="detail" id="contextDiv"></div> <div class="detail" id="contextDiv"></div>
</div> </div>
<div class="mpTs" id="menPaiDiv"> <div class="mpTs" id="menPaiDiv">
...@@ -157,8 +166,18 @@ ...@@ -157,8 +166,18 @@
<div class="alertCon"> <div class="alertCon">
<div class="info">因长时间未收到有效视频信息,质检流程暂时关闭。</div> <div class="info">因长时间未收到有效视频信息,质检流程暂时关闭。</div>
<div class="butt"> <div class="butt">
<div class="left" id="pageClose">关闭</div> <div class="left pageClose">关闭</div>
<div class="right" id="continueTest">继续质检</div> <div class="right continueTest">继续质检</div>
</div>
</div>
</div>
<div class="outAlert" id="beginFail">
<div class="alertCon">
<div class="info">启动失败,请刷新重试</div>
<div class="butt">
<div class="left pageClose">关闭</div>
<div class="right continueTest">刷新</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -295,7 +314,7 @@ ...@@ -295,7 +314,7 @@
<div class="outAlert" id="pictureShowAlert"> <div class="outAlert" id="pictureShowAlert">
<div class="paiZhaoCon"> <div class="paiZhaoCon">
<div class="til">温馨提示</div> <div class="til">温馨提示</div>
<div class="ts">为确保准确识别串号,请拍清照片并确认串号清晰可见后,再提交。</div> <div class="ts" id="picshowText">为确保准确识别串号,请拍清照片并确认串号清晰可见后,再提交。</div>
<img id="photoImg" src="http://xpo.oss-cn-beijing.aliyuncs.com/huaian/cameraSwitchGuide.png"> <img id="photoImg" src="http://xpo.oss-cn-beijing.aliyuncs.com/huaian/cameraSwitchGuide.png">
<div class="botBut"> <div class="botBut">
<div class="left snAgain" key="photo">重新拍摄</div> <div class="left snAgain" key="photo">重新拍摄</div>
...@@ -304,6 +323,28 @@ ...@@ -304,6 +323,28 @@
</div> </div>
</div> </div>
<div class="outAlert" id="noShootReasonAlert">
<div class="alertCon noTestCon">
<div class="til">我要反馈</div>
<div class="topTs">如你出现无法拍摄的情况,比如反复拍摄无法识别,安装环境无法正常拍摄,你可填写原因和情况说明跳过此环节。</div>
<div class="cli">
<div class="ctil">
<img src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/xing.png" alt="">
<div>情况说明</div>
</div>
<textarea id="noShootReason" placeholder="请填写具体情况"></textarea>
</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">
</div>
</div>
<!-- <script type="text/javascript" charset="utf-8" src="js/vconsole.min.js"></script> <!-- <script type="text/javascript" charset="utf-8" src="js/vconsole.min.js"></script>
<script> <script>
var vConsole = new VConsole(); var vConsole = new VConsole();
...@@ -313,11 +354,10 @@ ...@@ -313,11 +354,10 @@
<script src="js/jquery-3.4.1.min.js"></script> <script src="js/jquery-3.4.1.min.js"></script>
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/AgoraRTC_N.js"></script> <script src="js/AgoraRTC_N.js"></script>
<script src="js/util.js?999999"></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?126466499"></script> <script src="js/demo.js?063347090"></script>
</script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1745820752112" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2173" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M515.5 979.9c-19.33 0-35-15.67-35-35V782.8c0-19.33 15.67-35 35-35s35 15.67 35 35v162.1c0 19.33-15.67 35-35 35zM515.5 294c-19.33 0-35-15.67-35-35V96.9c0-19.33 15.67-35 35-35s35 15.67 35 35V259c0 19.33-15.67 35-35 35zM815.31 855.71c-8.96 0-17.91-3.42-24.75-10.25L675.94 730.84c-13.67-13.67-13.67-35.83 0-49.5 13.67-13.67 35.83-13.67 49.5 0l114.62 114.62c13.67 13.67 13.67 35.83 0 49.5a34.915 34.915 0 0 1-24.75 10.25zM330.31 370.71c-8.96 0-17.91-3.42-24.75-10.25L190.94 245.84c-13.67-13.67-13.67-35.83 0-49.5 13.67-13.67 35.83-13.67 49.5 0l114.62 114.62c13.67 13.67 13.67 35.83 0 49.5a34.915 34.915 0 0 1-24.75 10.25zM939.5 555.9H777.4c-19.33 0-35-15.67-35-35s15.67-35 35-35h162.1c19.33 0 35 15.67 35 35s-15.67 35-35 35zM253.6 555.9H91.5c-19.33 0-35-15.67-35-35s15.67-35 35-35h162.1c19.33 0 35 15.67 35 35s-15.67 35-35 35zM700.69 370.71c-8.96 0-17.91-3.42-24.75-10.25-13.67-13.67-13.67-35.83 0-49.5l114.62-114.62c13.67-13.67 35.83-13.67 49.5 0 13.67 13.67 13.67 35.83 0 49.5L725.44 360.46c-6.83 6.83-15.79 10.25-24.75 10.25zM215.69 855.71c-8.96 0-17.91-3.42-24.75-10.25-13.67-13.67-13.67-35.83 0-49.5l114.62-114.62c13.67-13.67 35.83-13.67 49.5 0s13.67 35.83 0 49.5L240.44 845.46a34.915 34.915 0 0 1-24.75 10.25z" p-id="2174" fill="#bfbfbf"></path></svg>
\ No newline at end of file \ No newline at end of file
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<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">
<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/index.css?14444"> <link rel="stylesheet" href="css/index.css?90909090">
</head> </head>
<body> <body>
<!-- <script> <!-- <script>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div class="orderli" v-for="(item,index) in detail.devicessList <div class="orderli" v-for="(item,index) in detail.devicessList
"> ">
<div class="ortil"> <div class="ortil">
<div>工单{{index+1}}:{{item.orderCode}}</div> <div class="gdid">工单{{index+1}}:{{item.orderCode}}</div>
<div class="icon" v-show="item.isLocal==1">手动录入</div> <div class="icon" v-show="item.isLocal==1">手动录入</div>
</div> </div>
<div class="orcon"> <div class="orcon">
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</div> </div>
<div class="noData" v-if="noDataFlag"> <div class="noData" v-if="noDataFlag">
<img src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/noData.png" alt=""> <img src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/noData.png?0909090" alt="">
</div> </div>
</div> </div>
...@@ -259,6 +259,6 @@ ...@@ -259,6 +259,6 @@
<script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/vue.min.js"></script> <script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/vue.min.js"></script>
<script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/vant.min.js"></script> <script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/vant.min.js"></script>
<script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/util.js?11111"></script> <script src="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/js/util.js?11111"></script>
<script src="js/index.js?23111232388"></script> <script src="js/index.js?999399"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -135,8 +135,10 @@ var noShootClick = false ...@@ -135,8 +135,10 @@ var noShootClick = false
var jdhEaxmpleShow = false var jdhEaxmpleShow = false
var cgmExampleShow = false var cgmExampleShow = false
var zgmExampleShow = false var zgmExampleShow = false
var dartTsShow = false
var snInputNum var snInputNum
var noShootNum var noShootNum
var voiceUrl = ''
function getProcess(){ function getProcess(){
if(!window.location.href.includes('demo.html')){ if(!window.location.href.includes('demo.html')){
...@@ -158,6 +160,7 @@ function getProcess(){ ...@@ -158,6 +160,7 @@ function getProcess(){
$("#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()
...@@ -232,13 +235,28 @@ function getProcess(){ ...@@ -232,13 +235,28 @@ function getProcess(){
window.location.replace('result.html?time='+ new Date().getTime()) window.location.replace('result.html?time='+ new Date().getTime())
} }
}); });
$("#mp3Source")[0].addEventListener('error', e => {
if(voiceUrl){
("#mp3Source")[0].muted = false
$("#mp3Source").attr('src', voiceUrl)
$("#mp3Source")[0].play()
}
console.warn('解码失败', e.target.error);
});
} }
ifListener = true ifListener = true
$("#mp3Source")[0].muted = res.voiceUrlMp3?false:true if(res.voiceUrlMp3){
$("#mp3Source").attr('src', res.voiceUrlMp3) $("#mp3Source")[0].pause()
$("#mp3Source")[0].autoplay = true
$("#mp3Source")[0].muted = false
voiceUrl = res.voiceUrlMp3
setTimeout(()=>{
$("#mp3Source").attr('src', voiceUrl)
$("#mp3Source")[0].play() $("#mp3Source")[0].play()
},350)
}
audioSet(false) audioSet(false)
if(stepId.includes('SN') && !res.contentSN){ if(stepId.includes('SN') && !res.contentSN){
...@@ -351,6 +369,28 @@ function audioSet(flag){ ...@@ -351,6 +369,28 @@ function audioSet(flag){
} }
} }
function getSnErrorInfo(code){
let key = code || stepId
let pageText = ''
let id = ''
if(key.startsWith('cgm')){
pageText = '1、请将摄像头近距离正面聚焦在 CMEI码上,确保整串字符完整清晰。'
id = 'cgm'
}else if(key.startsWith('jdh')){
pageText = '1、请将摄像头近距离正面聚焦在 STBID/SN 码上,确保整串字符完整清晰。'
id = 'jdh'
}else if(key.startsWith('poeSwitch')){
pageText = '1、请将摄像头近距离正面聚焦在 CMEI 码上,确保整串字符完整清晰。'
id = 'poeSwitch'
}
return {
pageText,
imgUrl: ('https://xpo.oss-cn-beijing.aliyuncs.com/huaian/'+id+'SnSbError.png'),
}
}
function getSnInfo(code){ function getSnInfo(code){
let key = code || stepId let key = code || stepId
let pageText = '' let pageText = ''
...@@ -386,6 +426,9 @@ function getSnInfo(code){ ...@@ -386,6 +426,9 @@ function getSnInfo(code){
}else if(key.startsWith('complainZ')){ }else if(key.startsWith('complainZ')){
pageText = '请拍摄主光猫的指示灯,将镜头对准指示灯的亮灯情况,如图所示:' pageText = '请拍摄主光猫的指示灯,将镜头对准指示灯的亮灯情况,如图所示:'
id = 'complainZ' id = 'complainZ'
}else if(key.startsWith('poeSwitch')){
pageText = '请拍摄POE交换机铭牌,将镜头对准要识别的号码,如图所示:'
id = 'poeSwitch'
} }
return { return {
...@@ -438,6 +481,12 @@ function getNoShootInfo(code){ ...@@ -438,6 +481,12 @@ function getNoShootInfo(code){
}else if(key.startsWith('Otv')){ }else if(key.startsWith('Otv')){
pageText = '方法1:拍摄时请将正常播放画面的电视机置于屏幕中央。' pageText = '方法1:拍摄时请将正常播放画面的电视机置于屏幕中央。'
id = 'Otv' id = 'Otv'
}else if(key.startsWith('poePanel')){
pageText = '方法1:近距离聚焦拍摄POE面板的正面,露出移动的标识。'
id = 'poePanel'
}else if(key.startsWith('poeSwitchboard')){
pageText = '方法1:近距离聚焦拍摄POE交换机的正面,露出移动的标识。'
id = 'poeSwitchboard'
} }
return { return {
...@@ -494,7 +543,7 @@ function detailTime(num) { ...@@ -494,7 +543,7 @@ function detailTime(num) {
$("#videoSwitch").click(async function(e){ $("#videoSwitch").click(async function(e){
if(cams.length<=1){ if(cams.length<=1){
toast('暂不支持') util.toast('暂不支持')
}else{ }else{
if(!camsId){ if(!camsId){
if(cams.length == 2){ if(cams.length == 2){
...@@ -526,7 +575,7 @@ $("#videoSwitch").click(async function(e){ ...@@ -526,7 +575,7 @@ $("#videoSwitch").click(async function(e){
function setStepButt(){ function setStepButt(){
$('.none').hide() $('.none').hide()
if(stepId.startsWith("start_")){ if(stepId.startsWith("start_")){
$("#readButt").show() $("#readButt").css('display','flex')
} }
if(stepId.startsWith("account_") || stepId.includes("SN") || stepId.startsWith("complain")){ if(stepId.startsWith("account_") || stepId.includes("SN") || stepId.startsWith("complain")){
...@@ -553,16 +602,16 @@ function setStepButt(){ ...@@ -553,16 +602,16 @@ function setStepButt(){
return false return false
} }
let nArr = ["Ojdh","Olyq","Oinsf","Owsf"] let nArr = ["Ojdh","Olyq","Oinsf","Owsf","Otv"]
if(fn(stepId,nArr)){ if(fn(stepId,nArr)){
$("#shootButt2").css('display','flex') $("#shootButt2").css('display','flex')
} }
let sArr = ["gongFu_","gongPai_","account_","env_","Ogm_","Ozgm_","Ocgm","Otv","lineSta_",,"cloudPcTer","cloudPcScreen"] let sArr = ["gongFu_","gongPai_","account_","env_","Ogm_","Ozgm_","Ocgm","lineSta_",,"cloudPcTer","cloudPcScreen",'poePanel','poeSwitchboard']
if(fn(stepId,sArr)){ if(fn(stepId,sArr)){
$("#shootButt").show() $("#shootButt").css('display','flex')
} }
if(stepId.includes('SN') || stepId.startsWith('complain')){ if(stepId.includes('SN') || stepId.startsWith('complain')){
$("#shootButt").show() $("#shootButt").css('display','flex')
} }
if(stepId.startsWith("jdhAccType_")){ if(stepId.startsWith("jdhAccType_")){
...@@ -618,7 +667,7 @@ $('.quit').click(()=>{ ...@@ -618,7 +667,7 @@ $('.quit').click(()=>{
}) })
let clickButtFlag = false let clickButtFlag = false
$('.clickButt').click((e)=>{ $('.clickButt').click(async (e)=>{
if(clickButtFlag){ if(clickButtFlag){
return return
} }
...@@ -627,20 +676,36 @@ $('.clickButt').click((e)=>{ ...@@ -627,20 +676,36 @@ $('.clickButt').click((e)=>{
clickButtFlag = false clickButtFlag = false
},1000) },1000)
if(!stepId.startsWith('gongFu') && !stepId.startsWith('gongPai') && !dartTsShow && ifDark()){
dartTsShow = true
$('#lightShowTs').show()
}
$('#errorAlert').hide() $('#errorAlert').hide()
$('#noShootShowAlert').hide()
noShootClick = true
$('#pictureShowAlert').hide() $('#pictureShowAlert').hide()
let key = $(e.target).attr('key') let key = $(e.target).attr('key')
if(key=='yiwancheng' && stepId.includes('SN')){ if(key=='yiwancheng' && (stepId.includes('SN') || stepId.includes('account'))){
paiZhao() paiZhao()
if(stepId.includes('account')){
$('#picshowText').text('为确保准确识别用户账号,请拍清照片并确认用户账号清晰可见后,再提交。')
}else{
$('#picshowText').text('为确保准确识别串号,请拍清照片并确认串号清晰可见后,再提交。')
}
$('#pictureShowAlert').show() $('#pictureShowAlert').show()
return return
} }
if(key == 'bunengpai'){
$('#noShootReasonAlert').show()
return
}
util.httpRequest({ util.httpRequest({
url: '/button', url: '/button',
data: { data: {
...@@ -654,32 +719,68 @@ $('.clickButt').click((e)=>{ ...@@ -654,32 +719,68 @@ $('.clickButt').click((e)=>{
}) })
}) })
$('#noShootSave').click(()=>{
let reason = $("#noShootReason").val()
if(!reason){
util.toast('请输入情况说明')
return
}
if(reason.replace(/[^\u4e00-\u9fa5]/g, '').length < 5){
util.toast('请至少输入5个汉字')
return
}
noShootClick = true
$('#noShootShowAlert').hide()
$('#noShootReasonAlert').hide()
$("#noShootReason").val('')
util.httpRequest({
url: '/button',
data: {
applyId: applyId,
callId: callId,
voiceCode: stepId,
button_name: 'bunengpai',
noShowReason: reason
}
}).then(res=>{
noShootClick = false
})
})
$('#noShootClose').click(()=>{
$('#noShootReasonAlert').hide()
})
var ifSnSubmitPicture = false var ifSnSubmitPicture = false
$('#submitPicture').click(()=>{ $('#submitPicture').click(()=>{
$('#loadingText').text('上传中,请稍候...') $('#loadingText').text('上传中,请稍候...')
$('#loading').show() $('#loading').show()
let fileFormData = new FormData()
fileFormData.append('imageFile', fileBlob, 'img.png')
fileFormData.append('applyId', applyId)
fileFormData.append('callId', callId)
fileFormData.append('voiceCode', stepId)
fileFormData.append('button_name', 'yiwancheng')
util.httpRequest({ util.httpRequest({
url: '/takePhoto ', url: '/takePhoto ',
time: 20000, time: 20000,
data: { data: fileFormData
applyId: applyId,
callId: callId,
voiceCode: stepId,
button_name: 'yiwancheng',
picData: picCode
}
}).then(res=>{ }).then(res=>{
submitPictureSucc() submitPictureSucc()
if(res.code == 200){ if(res.code == 200){
$('#pictureShowAlert').hide() $('#pictureShowAlert').hide()
}else{ }else{
toast(res.msg) util.toast(res.msg)
} }
}).catch(e=>{ }).catch(e=>{
$('#loading').hide() $('#loading').hide()
toast('网络拥堵,请切换网络重新提交') util.toast('网络拥堵,请切换网络重新提交')
}) })
}) })
...@@ -703,28 +804,38 @@ function inputCancel(){ ...@@ -703,28 +804,38 @@ function inputCancel(){
$("#accountAlertDiv").hide() $("#accountAlertDiv").hide()
} }
function accountInputSubmit(){ function accountInputSubmit(){
if(!$("#accountValue").val()){ let acc = $("#accountValue").val()
toast('请输入账号')
if(!acc){
util.toast('请输入账号')
return
}
if(!/^1\d{10}$/.test(acc) && !acc.startsWith('80')){
util.toast('格式错误,输入用户账号(业务号码)')
return return
} }
util.httpRequest({ util.httpRequest({
url: '/button', url: '/snConfirmButton',
data: { data: {
applyId: applyId, applyId: applyId,
callId: callId, callId: callId,
voiceCode: stepId, voiceCode: stepId,
button_name: 'accounttijiao', account: acc
account: $("#accountValue").val()
} }
}).then(res=>{}) }).then(res=>{
if(res.code == 200){
$("#accountValue").val('') $("#accountValue").val('')
$("#accountAlertDiv").hide() $("#accountAlertDiv").hide()
}else {
util.toast(res.msg)
}
})
} }
function snInputSubmit(){ function snInputSubmit(){
if(!$("#snValue").val()){ if(!$("#snValue").val()){
toast('请输入设备串号') util.toast('请输入设备串号')
return return
} }
...@@ -738,7 +849,7 @@ function snInputSubmit(){ ...@@ -738,7 +849,7 @@ function snInputSubmit(){
textSN: $("#snValue").val() textSN: $("#snValue").val()
} }
}).then(res=>{ }).then(res=>{
if(res.code == 200){ if(res.code == 200 || res.code == 5004){
$("#snValue").val('') $("#snValue").val('')
$("#snAlertDiv").hide() $("#snAlertDiv").hide()
...@@ -749,7 +860,7 @@ function snInputSubmit(){ ...@@ -749,7 +860,7 @@ function snInputSubmit(){
$('#snErrorTs').addClass('tsRed') $('#snErrorTs').addClass('tsRed')
$("#snValue").addClass('red') $("#snValue").addClass('red')
}else { }else {
toast('网络异常,请重新提交') util.toast('网络异常,请重新提交')
} }
}) })
} }
...@@ -766,46 +877,12 @@ function addSnInputEvent(){ ...@@ -766,46 +877,12 @@ function addSnInputEvent(){
}); });
} }
var blackId = ''
function toast(str){
if (document.getElementById("blackDiv")) {
document.getElementById("blackSpan").innerHTML = str;
} else {
var blackDiv = document.createElement("div");
blackDiv.id = "blackDiv";
blackDiv.className = "blackts";
blackDiv.style.position = "fixed";
blackDiv.style.left = "0";
blackDiv.style.bottom = "20%";
blackDiv.style.width = "100%";
blackDiv.style.textAlign = "center";
blackDiv.style.zIndex = "999999";
var html = '<span id="blackSpan" style="background: rgba(42,45,50,.94);color: white;';
html += 'border-radius: .1rem;font-size: 0.32rem;padding: .2rem .6rem;">';
html += str + '</span>';
blackDiv.innerHTML = html;
document.getElementsByTagName("body")[0].appendChild(blackDiv);
}
if (blackId && blackId != "") {
clearTimeout(blackId);
}
blackId = setTimeout(function () {
if (document.getElementById("blackDiv")) {
document.getElementsByTagName("body")[0].removeChild(document.getElementById("blackDiv"));
}
}, 2000);
}
var localTrackState = { var localTrackState = {
audioTrackEnabled: true, audioTrackEnabled: true,
}; };
$("#audioClose").click(function (e) { $("#audioClose").click(function (e) {
if(isHuaweiPhone() == '1'){ if(isHuaweiPhone() == '1'){
toast('暂不支持') util.toast('暂不支持')
return return
} }
...@@ -838,7 +915,17 @@ async function setEnabled(type, state) { ...@@ -838,7 +915,17 @@ async function setEnabled(type, state) {
} }
} }
var startZjFlag = true
async function init(){ async function init(){
$('#loadingText').text('开启中,请稍候...')
$('#loading').show()
setTimeout(()=>{
if(startZjFlag){
$('#loading').hide()
$('#beginFail').show()
}
},20000)
snInputNum = window.snInputNum||5 snInputNum = window.snInputNum||5
noShootNum = window.noShootNum||5 noShootNum = window.noShootNum||5
...@@ -856,7 +943,8 @@ async function init(){ ...@@ -856,7 +943,8 @@ async function init(){
}) })
if(data.code != '200'){ if(data.code != '200'){
toast(data.msg) $('#loading').hide()
util.toast(data.msg)
return return
} }
...@@ -866,7 +954,8 @@ async function init(){ ...@@ -866,7 +954,8 @@ async function init(){
let flag = await join() let flag = await join()
if(!flag){ if(!flag){
toast('加入频道失败') $('#loading').hide()
util.toast('加入频道失败')
return return
} }
...@@ -875,7 +964,14 @@ async function init(){ ...@@ -875,7 +964,14 @@ async function init(){
await createTrackAndPublish() await createTrackAndPublish()
$('#loading').hide()
startZjFlag = false
$("#videoSwitch").css('display', 'flex') $("#videoSwitch").css('display', 'flex')
if(isHuaweiPhone() == '1'){
$('#lightOutDiv').hide()
}
$("#toolDiv").css('display', 'flex')
intervalStr = setInterval(() => { intervalStr = setInterval(() => {
getProcess() getProcess()
}, 1000); }, 1000);
...@@ -893,10 +989,10 @@ function isIos() { ...@@ -893,10 +989,10 @@ function isIos() {
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()
}) })
...@@ -904,7 +1000,7 @@ release() ...@@ -904,7 +1000,7 @@ release()
$('#videoBegin').click(()=>{ $('#videoBegin').click(()=>{
if(!AgoraRTC.checkSystemRequirements()){ if(!AgoraRTC.checkSystemRequirements()){
toast('暂不支持') util.toast('暂不支持')
return return
} }
...@@ -934,6 +1030,7 @@ $("#hidesnExampleAlert").click(()=>{ ...@@ -934,6 +1030,7 @@ $("#hidesnExampleAlert").click(()=>{
} }
$("#snExampleAlert").hide() $("#snExampleAlert").hide()
}) })
$("#hideJdhSnSbErrorAlert").click(()=>{ $("#hideJdhSnSbErrorAlert").click(()=>{
$("#jdhSnSbErrorAlert").hide() $("#jdhSnSbErrorAlert").hide()
jdhAndCgmClickHide = true jdhAndCgmClickHide = true
...@@ -979,6 +1076,22 @@ $("#cameraDiv").click(()=>{ ...@@ -979,6 +1076,22 @@ $("#cameraDiv").click(()=>{
vm.reasonPickData.isShow = true vm.reasonPickData.isShow = true
}) })
var lightIfOpen = false
$('#lightDiv').click(()=>{
if(!lightIfOpen){
openLight()
}else{
closeLight()
$('#lightImg').attr('src','https://xpo.oss-cn-beijing.aliyuncs.com/huaian/light.png')
$('#lightDiv div').removeClass('open')
lightIfOpen = false
}
})
$('#lightShowTs').click(()=>{
$('#lightShowTs').hide()
})
var vm = new Vue({ var vm = new Vue({
el: '#pageDiv', el: '#pageDiv',
...@@ -1039,100 +1152,119 @@ $(window).on('load', function() { ...@@ -1039,100 +1152,119 @@ $(window).on('load', function() {
const canvas = document.getElementById('canvas'); const canvas = document.getElementById('canvas');
const photo = document.getElementById('photoImg'); const photo = document.getElementById('photoImg');
const viewfinder = document.getElementById('cameraArea'); const viewfinder = document.getElementById('cameraArea');
var cavasCtx
var fileBlob
var picCode = '' var picCode = ''
function paiZhao(){ async function paiZhao(){
let videoTest = $('#local-player video')[0] let videoTest = $('#local-player video')[0]
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上绘制视频帧
const context = canvas.getContext('2d'); cavasCtx = canvas.getContext('2d');
context.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((blob) => {
// let sizeKB = (blob.size / 1024).toFixed(2);
// console.log(sizeKB) canvas.toBlob(async (blob) => {
// }, 'image/png', 0.92); fileBlob = blob
}, 'image/png', 0.92);
// 将照片转换为数据URL并显示 // 将照片转换为数据URL并显示
const data = canvas.toDataURL('image/png'); const data = canvas.toDataURL('image/png');
photo.setAttribute('src', data); photo.setAttribute('src', data);
picCode = data picCode = data
$('#phone').css('height','100%')
$('#phone').css('top','0')
} }
function paiZhao2(){ //判断当前拍照的光线强弱
function ifDark(){
let videoTest = $('#local-player video')[0] let videoTest = $('#local-player video')[0]
// 设置canvas尺寸为取景框大小 if(!cavasCtx){
canvas.width = viewfinder.offsetWidth // 设置canvas尺寸与视频相同
canvas.height = viewfinder.offsetHeight canvas.width = videoTest.videoWidth;
canvas.height = (videoTest.videoHeight*1.2)/3;
// 计算取景框在视频中的位置
const videoWidth = videoTest.videoWidth;
const videoHeight = videoTest.videoHeight;
const videoAspectRatio = videoWidth / videoHeight;
const containerWidth = videoTest.offsetWidth; // 在canvas上绘制视频帧
const containerHeight = videoTest.offsetHeight; cavasCtx = canvas.getContext('2d');
}
// 计算视频在容器中的实际显示尺寸 cavasCtx.drawImage(videoTest, 0, videoTest.getBoundingClientRect().height*2.2/3, canvas.width, canvas.height,0,0,canvas.width,canvas.height);
let drawWidth, drawHeight, offsetX, offsetY;
if (containerWidth / containerHeight > videoAspectRatio) { let imgData = cavasCtx.getImageData(0, 0, canvas.width, canvas.height);
// 视频高度占满容器 let data = imgData.data; // RGBA 连续数组
drawHeight = containerHeight; let sum = 0;
drawWidth = drawHeight * videoAspectRatio; for (let i = 0; i < data.length; i += 4) {
offsetX = (containerWidth - drawWidth) / 2; // 把 RGB 转成灰度(人眼对绿色更敏感)
offsetY = 0; const gray = 0.299 * data[i] + 0.587 * data[i + 1] + 0.114 * data[i + 2];
} else { sum += gray;
// 视频宽度占满容器
drawWidth = containerWidth;
drawHeight = drawWidth / videoAspectRatio;
offsetX = 0;
offsetY = (containerHeight - drawHeight) / 2;
} }
let avg = sum / (data.length / 4);
// 计算取景框在视频中的位置和尺寸(以视频实际像素为单位) return avg < 60
const viewfinderRect = viewfinder.getBoundingClientRect();
const videoRect = videoTest.getBoundingClientRect();
const scaleX = videoWidth / drawWidth; if (avg < 60) return avg + '-dark';
const scaleY = videoHeight / drawHeight; if (avg > 195) return avg + '-bright';
const captureX = (viewfinderRect.left - videoRect.left - offsetX) * scaleX; return avg + '-normal';
const captureY = (viewfinderRect.top - videoRect.top - offsetY) * scaleY; }
const captureWidth = viewfinderRect.width * scaleX;
const captureHeight = viewfinderRect.height * scaleY;
// 在canvas上绘制视频帧 var linghtStream
const context = canvas.getContext('2d'); var linghtTrack
// context.drawImage( async function openLight(){
// videoTest, linghtStream = await navigator.mediaDevices.getUserMedia({
// captureX, captureY, captureWidth, captureHeight,0, 0, canvas.width, canvas.height); video: {
context.drawImage( facingMode: { exact: "environment" },
videoTest, width: { ideal: 160 }, // 极低分辨率
0, captureY, videoWidth, captureHeight,0, 0, canvas.width, canvas.height); height: { ideal: 120 },
frameRate: { ideal: 5 }, // 低帧率
advanced: [{ torch: true }]
},
audio: false
});
linghtTrack = linghtStream.getVideoTracks()[0];
let hasTorch = false
try{
let capabilities = linghtTrack.getCapabilities()
hasTorch = 'torch' in capabilities
}catch(e){
console.log(e)
}
canvas.toBlob((blob) => { if(!hasTorch){
let sizeKB = (blob.size / 1024).toFixed(2); util.toast('设备不支持手电筒功能!')
alert(sizeKB) linghtTrack.stop(); // 停止摄像头和闪光灯
}, 'image/png', 0.92); linghtStream.getTracks().forEach(t => t.stop());
// 将照片转换为数据URL并显示 linghtTrack = null
const data = canvas.toDataURL('image/png'); linghtStream = null
photo.setAttribute('src', data); return
picCode = data }
await linghtTrack.applyConstraints({
advanced: [{ torch: true }],
width: { ideal: 160 },
height: { ideal: 120 },
frameRate: { ideal: 5 }
});
$('#lightImg').attr('src','https://xpo.oss-cn-beijing.aliyuncs.com/huaian/lightOpen.png')
$('#lightDiv div').addClass('open')
lightIfOpen = true
}
function closeLight(){
linghtTrack.applyConstraints({
advanced: [{ torch: false }]
});
linghtTrack.stop(); // 停止摄像头和闪光灯
linghtStream.getTracks().forEach(t => t.stop());
$('#phone').css('height','100%') linghtTrack = null
$('#phone').css('top','0') linghtStream = null
} }
const script = document.createElement('script'); const script = document.createElement('script');
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
if (document.getElementById("blackDiv")) { if (document.getElementById("blackDiv")) {
document.getElementsByTagName("body")[0].removeChild(document.getElementById("blackDiv")); document.getElementsByTagName("body")[0].removeChild(document.getElementById("blackDiv"));
} }
}, 2000); }, 3000);
}, },
/** /**
* zhijian/ha * zhijian/ha
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<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">
<title>添加工单</title> <title>江苏移动</title>
<link rel="stylesheet" href="css/result.css?123123213"> <link rel="stylesheet" href="css/result.css?123123213455">
</head> </head>
<body> <body>
<div id="pageDiv" class="pageDiv"> <div id="pageDiv" class="pageDiv">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!