Ver código fonte

二维码扫码

qymljy 1 semana atrás
pai
commit
fa036731f0
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      public/codeToFile.html

+ 4 - 2
public/codeToFile.html

@@ -70,15 +70,17 @@
                 var str = window.location.href;
                 var index = str.indexOf('/');
                 var num = 0;
+                var strNew = ''
                 while(index !== -1) {
                     num++;
                     index = str.indexOf('/',index + 1);
                     if (num++ === 3) {
                         this.url = str.slice(0, index) + '/yosweb/codeToFile.html'
+                        strNew = str.slice(0, index)
                     }
                 }
-                console.log(str.slice(0, index))
-                var urlNew = str.slice(0, index) + '/yos/rest/index'
+                console.log(strNew)
+                var urlNew = strNew + '/yos/rest/index'
                 console.log(urlNew)
                 axios.post(urlNew, param)
                 .then(function (response) {