huaisianhuang 3 年之前
父節點
當前提交
7f88847617
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      step_question/apis/static/index-line.html

+ 3 - 2
step_question/apis/static/index-line.html

@@ -144,9 +144,10 @@
       }
       showcoffee();
 
+    
     function getUserid() {
-      let temparr = document.location.href.split('');
-      let id = temparr[-1];
+      const urlParams = new URLSearchParams(document.location.href);
+      let id = urlParams.get('userid');
       $('#userid').val = id;
      // console.log(id);
     }