|
|
@@ -9,8 +9,6 @@ class TencentResult extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
- url: '1111',
|
|
|
- checked: true
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -26,7 +24,7 @@ class TencentResult extends Component {
|
|
|
if (error) {
|
|
|
return 'error!';
|
|
|
}
|
|
|
- console.log(data);
|
|
|
+ // console.log(data);
|
|
|
let group = data.project_by_id.apiGWGroup_id || {};
|
|
|
return (
|
|
|
<div>
|
|
|
@@ -63,9 +61,7 @@ class TencentResult extends Component {
|
|
|
</Col>
|
|
|
<Col span={3}>
|
|
|
<span className={'schema-table-content'}>
|
|
|
- <Switch defaultChecked onChange={(checked) => {
|
|
|
- this.setState({checked})
|
|
|
- }}/>
|
|
|
+ <SwitchStatus />
|
|
|
</span>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
@@ -74,13 +70,11 @@ class TencentResult extends Component {
|
|
|
<div className={'schema-name'}>API 管理</div>
|
|
|
<APIGWPathResult groupID={group.id}/>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
:
|
|
|
'尚未部署'
|
|
|
}
|
|
|
</div>
|
|
|
-
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
@@ -91,6 +85,25 @@ class TencentResult extends Component {
|
|
|
|
|
|
export default TencentResult;
|
|
|
|
|
|
+class SwitchStatus extends Component {
|
|
|
+ constructor(props) {
|
|
|
+ super(props);
|
|
|
+ this.state = {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Switch defaultChecked onChange={(checked) => {
|
|
|
+ this.setState({checked})
|
|
|
+ }}/>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class APIGWPathResult extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|