From 0d240ba775efbb3e414ce2d9c30a902c1392bb09 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 七月 2021 09:15:18 +0800 Subject: [PATCH] 2021-07-20 --- src/views/interface/workspace/request/index.jsx | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/interface/workspace/request/index.jsx b/src/views/interface/workspace/request/index.jsx index 9e74b51..33a114d 100644 --- a/src/views/interface/workspace/request/index.jsx +++ b/src/views/interface/workspace/request/index.jsx @@ -202,12 +202,18 @@ let keys = Object.keys(param).sort() let values = '' keys.forEach(key => { - if (key.toLowerCase() === 'rduri' || key.toLowerCase() === 't') return - if (param[key] === undefined) { + if (key.toLowerCase() === 'rduri') return + if (key.toLowerCase() === 't' || key.toLowerCase() === 'sign' || param[key] === undefined) { delete param[key] - } else if (typeof(param[key]) === 'object') { + return + } + + if (typeof(param[key]) === 'object') { values += key + JSON.stringify(param[key]) } else { + if (param[key] && /: =$/.test(param[key])) { + param[key] = param[key].replace(/: =$/, '==') + } values += key + param[key] } }) @@ -256,7 +262,7 @@ <Button type="primary" onClick={this.send}>Send</Button> <Button onClick={this.save}>Save</Button> </div> - <Tabs animated={false}> + <Tabs animated={false} defaultActiveKey={hasBody ? 'Body' : 'Params'}> <Tabs.TabPane forceRender={true} tab={<span className={hasParam ? 'active' : ''}>Params</span>} key="Params"> <EditTable data={config.params} onChange={this.changeParams}/> </Tabs.TabPane> @@ -285,7 +291,7 @@ <div className="response"> {response ? <div className="header"> {body ? 'Body' : 'Response'} - {status ? <span className="status">Status: <span className={status === '200OK' ? 'green' : ''}>{status}</span></span> : null} + {status ? <span className="status">Status: <span className={status === '200OK' ? 'green' : 'yellow'}>{status}</span></span> : null} </div> : <div className="header"> Response <span className="empty">Hit the Send button to get a response.</span> -- Gitblit v1.8.0