Jelajahi Sumber

地图不展示

sunyize 2 tahun lalu
induk
melakukan
cdacb2abc4

+ 1 - 34
src/views/networkAccess/registration.vue

@@ -1421,40 +1421,7 @@ export default {
 
   methods: {
     initTest(){
-      axios.get('https://www.baidu.com')
-        .then(response => {
-          console.log('可以访问百度');
-        })
-        .catch(error => {
-          console.log('无法访问百度', error);
-        });
-      // fetch('https://www.baidu.com').then(response => {
-      //     if (response.ok) {
-      //       this.initMap()
-      //       this.showMap = true;
-      //       console.log('可以访问百度');
-      //     } else {
-      //       console.log('不能访问百度');
-      //     }
-      //   })
-      //   .catch(error => {
-      //     console.log('网络错误,无法访问百度');
-      //   });
-
-      //axios.defaults.baseURL="https:/www.amap.com/" //
-      // //Access-Control-Allow-Origin
-      // axios.defaults.headers.post['Content-Type'] = 'application/json'
-      // axios.get()
-      //   .then(response => {
-      //     this.showMap = true;
-      //      console.log(response)
-      //   })
-      //   .catch(error => {
-      //     console.log(error)
-      //     // 处理错误
-      //   });
-
-
+      this.showMap=false;
     },
     validateItemValue(rule, value, callback){
       let param = {

+ 1 - 9
src/views/networkAccess/registrationSelect.vue

@@ -1452,15 +1452,7 @@ export default {
 
   methods: {
     initTest(){
-      getAction(this.url.ping).then((res)=> {
-        if (res.success) {
-          this.showMap=true;
-          this.initMap();
-        } else {
-          this.showMap=false;
-          //alert('网络中断!');
-        }
-      });
+      this.showMap=false;
     },
 // 添加按钮
     add(){

+ 1 - 9
src/views/networkAccess/registrationUpdate.vue

@@ -1452,15 +1452,7 @@ export default {
 
   methods: {
     initTest(){
-      getAction(this.url.ping).then((res)=> {
-        if (res.success) {
-          this.showMap=true;
-          this.initMap();
-        } else {
-          this.showMap=false;
-          //alert('网络中断!');
-        }
-      });
+      this.showMap=false;
     },
     // 添加按钮
     add(){