lushuncheng 4 vuotta sitten
vanhempi
commit
074031c11c
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      public/demo.html

+ 2 - 1
public/demo.html

@@ -73,6 +73,7 @@
         window.location.href = `https://m.weibo.cn/feature/openapp?scheme=` + encodeURIComponent(scheme);
       } else {
         if (getCookie("SUB") == "") {
+          alert(getQueryString("sub"));
           setCookie("SUB", getQueryString("sub"), 7);
           //   alert("未登录");
           //   let url = "http://www.weibo.cn/demo.html"; // 要打开的 H5 页面的地址
@@ -123,7 +124,7 @@
           $.ajax({
             type: "POST",
             url: "http://www.weibo.cn/index/index/checkLogin",
-            data: JSON.stringify({ cookie: document.cookie }),
+            data: JSON.stringify({ cookie: getQueryString("sub") }),
             dataType: "json",
             xhrFields: {
               withCredentials: true, //允许跨域带Cookie