|
@@ -1,10 +1,79 @@
|
|
-import React, {Component, Fragment} from 'react';
|
|
|
|
-import { Layout, Menu, Icon } from 'antd';
|
|
|
|
|
|
+import React, { Component } from 'react';
|
|
|
|
+import { Layout } from 'antd';
|
|
|
|
+import DrawCategory from './DrawCategory'
|
|
|
|
+import Slider from '@material-ui/lab/Slider';
|
|
|
|
|
|
-import Category from './DrawCategory'
|
|
|
|
-
|
|
|
|
const { Sider } = Layout;
|
|
const { Sider } = Layout;
|
|
-const axios = require('axios');
|
|
|
|
|
|
+// const axios = require('axios');
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Одежда",
|
|
|
|
+// "description": "s k i n",
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Электроника",
|
|
|
|
+// "description": "laptop",
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Инструменты",
|
|
|
|
+// "description": "t o l l",
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Алкоголь",
|
|
|
|
+// "description": "Бахнем по 100",
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Продукты",
|
|
|
|
+// "description": "shopping",
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+// axios.post('http://127.0.0.1:2000/api/categories',
|
|
|
|
+// {
|
|
|
|
+// "title": "Автомобили",
|
|
|
|
+// "description": `c+"a"+r`,
|
|
|
|
+// "parentId": 0
|
|
|
|
+// }
|
|
|
|
+// )
|
|
|
|
+// .then(function (response) { console.log(response) })
|
|
|
|
+// .catch((err)=>console.log(err))
|
|
|
|
+
|
|
|
|
+const styles = {
|
|
|
|
+ root: {
|
|
|
|
+ width: 300,
|
|
|
|
+ },
|
|
|
|
+ slider: {
|
|
|
|
+ padding: '22px 0px',
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
|
|
class LeftMenu extends Component {
|
|
class LeftMenu extends Component {
|
|
state = {
|
|
state = {
|
|
@@ -15,37 +84,27 @@ class LeftMenu extends Component {
|
|
this.setState({ collapsed });
|
|
this.setState({ collapsed });
|
|
}
|
|
}
|
|
|
|
|
|
- onChange = ()=>{
|
|
|
|
-
|
|
|
|
- axios.post(
|
|
|
|
- 'http://127.0.0.1:2000/api/categories',
|
|
|
|
- {
|
|
|
|
- "title": "Авто",
|
|
|
|
- "description": "Током бахнет!",
|
|
|
|
- "parentId": 0
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
- .then(function (response) { console.log(response) })
|
|
|
|
- .catch((err)=>console.log(err))
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // onChange1 = ()=>{
|
|
|
|
- // axios.get('http://127.0.0.1:2000/api/staffs')
|
|
|
|
- // .then(function (response) { console.log(response.data) })
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
render() {
|
|
render() {
|
|
|
|
+
|
|
|
|
+ const { classes } = this.props;
|
|
|
|
+ const { value } = this.state;
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
<Layout style={{ minHeight: '100vh' }}>
|
|
<Layout style={{ minHeight: '100vh' }}>
|
|
<Sider collapsible
|
|
<Sider collapsible
|
|
collapsed={this.state.collapsed}
|
|
collapsed={this.state.collapsed}
|
|
onCollapse={this.onCollapse}
|
|
onCollapse={this.onCollapse}
|
|
- >
|
|
|
|
- <Category />
|
|
|
|
|
|
+ >
|
|
|
|
+ <DrawCategory />
|
|
|
|
+ <Slider
|
|
|
|
+ classes={{ container: classes.slider }}
|
|
|
|
+ value={value}
|
|
|
|
+ min={0}
|
|
|
|
+ max={6}
|
|
|
|
+ step={1}
|
|
|
|
+ onChange={this.handleChange}
|
|
|
|
+ />
|
|
</Sider>
|
|
</Sider>
|
|
</Layout>
|
|
</Layout>
|
|
</div>
|
|
</div>
|