更改下发指令逻辑

hn2.0
fanluyan 2 years ago
parent 1c0bec39d8
commit b56114300f

@ -641,7 +641,7 @@ export default {
this.statusTimer = window.setInterval(() => { this.statusTimer = window.setInterval(() => {
this.getTakePicStatus(res.data); this.getTakePicStatus(res.data);
this.statusNum++; this.statusNum++;
}, 2000); }, 3000);
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
@ -706,7 +706,11 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
//res.data 0 1 2 //res.data 0 1 2
if (res.data.cmaStatus == 0 && this.statusNum >= 5) { if (
res.data.cmaStatus == 0 &&
res.data.picStatus == false &&
this.statusNum >= 5
) {
this.statusNum = 0; this.statusNum = 0;
clearInterval(this.statusTimer); clearInterval(this.statusTimer);
this.statusTimer = null; this.statusTimer = null;
@ -718,7 +722,7 @@ export default {
message: "下发指令超时,请重试!", message: "下发指令超时,请重试!",
type: "warning", type: "warning",
}); });
} else if (res.data.cmaStatus == 1) { } else if (res.data.cmaStatus == 1 || res.data.picStatus == true) {
this.statusNum = 0; this.statusNum = 0;
this.btnpicloading = false; this.btnpicloading = false;
this.btnvideoloading = false; this.btnvideoloading = false;

@ -29,7 +29,7 @@ module.exports = defineConfig({
proxy: { proxy: {
"/api": { "/api": {
//表示拦截以/api开头的请求路径 //表示拦截以/api开头的请求路径
// target: "http://47.96.238.157:8093", //阿里云服务器环境 //target: "http://47.96.238.157:8093", //阿里云服务器环境
target: "http://180.166.218.222:40080", //dell target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域 changOrigin: true, //是否开启跨域
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save