kulley 7 lat temu
rodzic
commit
6df8aefa07
2 zmienionych plików z 9 dodań i 9 usunięć
  1. 7 7
      src/App.js
  2. 2 2
      src/config.js

+ 7 - 7
src/App.js

@@ -22,19 +22,19 @@ class App extends Component {
     componentWillMount() {
         // 本地开发
         // 管理员
-        setCookie('openid', 'o2fcFvxE5nCQSb4BBHaB4kXcikSE');
+        // setCookie('openid', 'o2fcFvxE5nCQSb4BBHaB4kXcikSE');
         // 我
         // setCookie('openid', 'o2fcFv6Rh2-4rCh3d5_1uCWCT5Yc');
         // 用户
         // setCookie('openid', 'o2fcFv-h_CFKkNdEYgNkNp0Jt5TA');
 
         // 微信版
-        // let openid = getCookie("openid");
-        // console.log('get openid', openid);
-        //
-        // if (!openid) {
-        //     window.location.href = "/subscribe";
-        // }
+        let openid = getCookie("openid");
+        console.log('get openid', openid);
+
+        if (!openid) {
+            window.location.href = "/subscribe";
+        }
     }
 
     render() {

+ 2 - 2
src/config.js

@@ -1,4 +1,4 @@
-// const graphqlFC = window.location.origin+'/graphql';
-const graphqlFC = 'http://demo.ioobot.cn/graphql';
+const graphqlFC = window.location.origin + '/graphql';
+// const graphqlFC = 'http://demo.ioobot.cn/graphql';
 
 export {graphqlFC}