소스 검색

二维码扫码

qymljy 1 주 전
부모
커밋
b33acb800c
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      public/codeToFile.html

+ 11 - 1
public/codeToFile.html

@@ -67,7 +67,17 @@
                         "code": code
                     },
                 }
-                axios.post('http://61.164.207.46:8000/yos/rest/index', param)
+                var str = window.location.href;
+                var index = str.indexOf('/');
+                var num = 0;
+                while(index !== -1) {
+                    num++;
+                    index = str.indexOf('/',index + 1);
+                    if (num++ === 3) {
+                        this.url = str.slice(0, index) + '/yosweb/codeToFile.html'
+                    }
+                }
+                axios.post(str.slice(0, index) + '/yos/rest/index', param)
                 .then(function (response) {
                     console.log(response)
                     console.log(response.data.data.length)