Skip to content

Commit

Permalink
feat: 接口显示环境
Browse files Browse the repository at this point in the history
  • Loading branch information
gozeon committed Mar 6, 2024
1 parent b287578 commit 4bb7e2e
Show file tree
Hide file tree
Showing 27 changed files with 213,304 additions and 17,816 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
"import"
],
rules: {
"no-unused-vars": ["off"],
"indent": ["off", 2],
"react/display-name": ["off"],
"react/jsx-indent": ["error", 2],
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ FROM node:12-alpine3.14

RUN apk add binutils-gold g++ gcc gnupg libgcc linux-headers make python2

WORKDIR /app
COPY . /app
RUN npm install --production
CMD ['node', 'server/app.js']
EXPOSE 4000
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ npm start
```bash
npm run install-server
```

## develop client

```bash
docker build -t yappi
docker run --rm -it -p 4000:4000 -v $PWD:/app -w /app yappi /bin/sh

```
9 changes: 1 addition & 8 deletions client/components/Notify/Notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ export default class Notify extends Component {
}

componentDidMount() {
const versions = 'https://www.fastmock.site/mock/1529fa78fa4c4880ad153d115084a940/yapi/versions';
axios.get(versions).then(req => {
if (req.status === 200) {
this.setState({ newVersion: req.data.data[0] });
} else {
message.error('无法获取新版本信息!');
}
});

}

render() {
Expand Down
9 changes: 9 additions & 0 deletions client/containers/Project/Interface/InterfaceList/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,15 @@ class View extends Component {
</Row>
)}
</div>
{this.props.currProject.env.length && (<h2 className="interface-title">环境</h2>)}
{this.props.currProject.env.length && (this.props.currProject.env.map(i => (<Row className='row'>
<Col span={4} className="colKey">
{i.name}
</Col>
<Col span={8} className="colName">
<span title={i.domain}>{i.domain}</span>
</Col></Row>))
)}
{this.props.curData.desc && <h2 className="interface-title">备注</h2>}
{this.props.curData.desc && (
<div
Expand Down
Loading

0 comments on commit 4bb7e2e

Please sign in to comment.