管理员即可展示API调试界面,移除DEV模式限制
This commit is contained in:
@@ -42,12 +42,8 @@ export default function MainLayout() {
|
|||||||
items.push(
|
items.push(
|
||||||
{ key: '/platform-merchants', icon: <ShopOutlined />, label: '商户管理' },
|
{ key: '/platform-merchants', icon: <ShopOutlined />, label: '商户管理' },
|
||||||
{ key: '/open-api', icon: <ApiOutlined />, label: '开放接口' },
|
{ key: '/open-api', icon: <ApiOutlined />, label: '开放接口' },
|
||||||
|
{ key: '/api-debug', icon: <BugOutlined />, label: 'API 调试' },
|
||||||
)
|
)
|
||||||
if (import.meta.env.DEV) {
|
|
||||||
items.push(
|
|
||||||
{ key: '/api-debug', icon: <BugOutlined />, label: 'API 调试' },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return items
|
return items
|
||||||
}, [isAdmin])
|
}, [isAdmin])
|
||||||
|
|||||||
@@ -239,16 +239,7 @@ export default function ApiDebugger() {
|
|||||||
</Title>
|
</Title>
|
||||||
<Paragraph type="secondary">
|
<Paragraph type="secondary">
|
||||||
填写商户 API 客户端的 AppKey 与 Secret,选择接口并发送请求。签名在浏览器端使用 Web Crypto API 计算。
|
填写商户 API 客户端的 AppKey 与 Secret,选择接口并发送请求。签名在浏览器端使用 Web Crypto API 计算。
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
|
|
||||||
{!import.meta.env.DEV && (
|
|
||||||
<Alert
|
|
||||||
type="warning"
|
|
||||||
showIcon
|
|
||||||
message="当前为生产构建,调试工具仅开发模式可用。"
|
|
||||||
style={{ marginBottom: 16 }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Card
|
<Card
|
||||||
title="凭证"
|
title="凭证"
|
||||||
|
|||||||
Reference in New Issue
Block a user