|
@@ -5,6 +5,7 @@ import './App.css';
|
|
|
import My from './page/home/My';
|
|
import My from './page/home/My';
|
|
|
import Display from './page/display/Display';
|
|
import Display from './page/display/Display';
|
|
|
import Manage from "./page/manage/Manage";
|
|
import Manage from "./page/manage/Manage";
|
|
|
|
|
+import {getCookie} from "./cookie";
|
|
|
|
|
|
|
|
class App extends Component {
|
|
class App extends Component {
|
|
|
constructor(props) {
|
|
constructor(props) {
|
|
@@ -16,6 +17,15 @@ class App extends Component {
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ componentWillMount(){
|
|
|
|
|
+ // setCookie("openid","o2fcFv8x3wy5WtcP116S5GzzkgDQ");
|
|
|
|
|
+ let openid = getCookie("openid");
|
|
|
|
|
+ console.log('openid',openid);
|
|
|
|
|
+ if (!openid) {
|
|
|
|
|
+ window.location.href = "/subscribe";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
render() {
|
|
render() {
|
|
|
let {userID} = this.state;
|
|
let {userID} = this.state;
|
|
|
return (
|
|
return (
|