|
|
@@ -23,7 +23,7 @@ import WxCreate from "./wechatService/wxCreate/WxCreate";
|
|
|
|
|
|
import {SHOW_ALL_SCHEMA, SHOW_ALL_WXCONFIG} from "../gql";
|
|
|
import axios from 'axios';
|
|
|
-import {getCookie} from "../cookie";
|
|
|
+import {getCookie, setCookie} from "../cookie";
|
|
|
|
|
|
axios.defaults.withCredentials = true;
|
|
|
|
|
|
@@ -56,6 +56,19 @@ class App extends Component {
|
|
|
this.setState({sideBar: urlList[3]});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ let userID = getCookie('user_id');
|
|
|
+ if (userID === undefined || '') {
|
|
|
+ axios.get(this.state.getIdUrl)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data !== '') {
|
|
|
+ setCookie("user_id", res.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
onCollapse = (collapsed) => {
|