浏览代码

路径修改

whj 4 年之前
父节点
当前提交
cbe5f9dd55
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      public/testweb/testdevice.html

+ 9 - 9
public/testweb/testdevice.html

@@ -214,7 +214,7 @@
                 },
                 },
                 btnfun() {
                 btnfun() {
                     if (this.value != "") {
                     if (this.value != "") {
-                        axios.get("http://172.31.31.199/getDevice?id=" + this.value).then(res => {
+                        axios.get("/getDevice?id=" + this.value).then(res => {
                             console.log(res)
                             console.log(res)
                             if (res.data.status == 200) {
                             if (res.data.status == 200) {
                                 this.phone = res.data.data.phone
                                 this.phone = res.data.data.phone
@@ -228,7 +228,7 @@
                 },
                 },
                 shezhi() {
                 shezhi() {
                     if (this.phone != "") {
                     if (this.phone != "") {
-                        axios.get("http://172.31.31.199/updateDevice?id=" + this.value + "&type=" + this.type + "&phone=" + this.phone).then(res => {
+                        axios.get("/updateDevice?id=" + this.value + "&type=" + this.type + "&phone=" + this.phone).then(res => {
                             console.log(res)
                             console.log(res)
                             if (res.data.status == 200) {
                             if (res.data.status == 200) {
                                 this.isbox = true
                                 this.isbox = true
@@ -242,7 +242,7 @@
                 },
                 },
                 startbtn(e) {
                 startbtn(e) {
                     //开始测试
                     //开始测试
-                    axios.get("http://172.31.31.199/send_protocol?id=" + this.value + "&type=" + this.type + "&status" + this.isstatus).then(res => {
+                    axios.get("/send_protocol?id=" + this.value + "&type=" + this.type + "&status" + this.isstatus).then(res => {
                         if (res.data.code == 603) {
                         if (res.data.code == 603) {
                             alert(res.data.msg)
                             alert(res.data.msg)
                         } else if (res.data.code == 604) {
                         } else if (res.data.code == 604) {
@@ -277,7 +277,7 @@
                             this.allbtn = false
                             this.allbtn = false
                         }
                         }
                     }, 1000)
                     }, 1000)
-                    axios.get("http://172.31.31.199/send_protocol?id=" + this.value + "&type=" + this.dingshitype + "&status" + this.isstatus).then(res => {
+                    axios.get("/send_protocol?id=" + this.value + "&type=" + this.dingshitype + "&status" + this.isstatus).then(res => {
                         if (res.data.code == 603) {
                         if (res.data.code == 603) {
                             alert(res.data.msg)
                             alert(res.data.msg)
                         } else if (res.data.code == 604) {
                         } else if (res.data.code == 604) {
@@ -295,7 +295,7 @@
                             }, 20000);
                             }, 20000);
                         }
                         }
                     });
                     });
-                    axios.get("http://172.31.31.199/send_protocol?id=" + this.value + "&type=" + this.alltype + "&box_name=" + e.id + "&status" + this.isstatus).then(res => {
+                    axios.get("/send_protocol?id=" + this.value + "&type=" + this.alltype + "&box_name=" + e.id + "&status" + this.isstatus).then(res => {
                         if (res.data.code == 603) {
                         if (res.data.code == 603) {
                             alert(res.data.msg)
                             alert(res.data.msg)
                         } else if (res.data.code == 604) {
                         } else if (res.data.code == 604) {
@@ -306,7 +306,7 @@
                     })
                     })
                 },
                 },
                 getData: function (id) {
                 getData: function (id) {
-                    axios.get("http://172.31.31.199/get_boxname?id=" + this.value).then(res => {
+                    axios.get("/get_boxname?id=" + this.value).then(res => {
                         console.log(res)
                         console.log(res)
                         if (res.data.code == 200) {
                         if (res.data.code == 200) {
                             let type = res.data.data.device_type
                             let type = res.data.data.device_type
@@ -332,7 +332,7 @@
                                 alert('异常设备请重新输入');
                                 alert('异常设备请重新输入');
                                 return;
                                 return;
                             }
                             }
-                            this.devceImg = 'http://172.31.31.199/' + res.data.data.device_image
+                            this.devceImg = '/' + res.data.data.device_image
                             // this.xiangti = this.arrdata.device_type == "1" ? '四箱' : '五箱'
                             // this.xiangti = this.arrdata.device_type == "1" ? '四箱' : '五箱'
                             this.isshezhi = false
                             this.isshezhi = false
                             this.isstatus = this.arrdata.status
                             this.isstatus = this.arrdata.status
@@ -366,7 +366,7 @@
                     }, 1000);
                     }, 1000);
                 },
                 },
                 getNum() {
                 getNum() {
-                    axios.get("http://172.31.31.199/getDevcielist").then(res => {
+                    axios.get("/getDevcielist").then(res => {
                         this.Numarr = res.data.data
                         this.Numarr = res.data.data
                     })
                     })
 
 
@@ -376,4 +376,4 @@
     </script>
     </script>
 </body>
 </body>
 
 
-</html>
+</html>