fix: defaultHttpUrl
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s

This commit is contained in:
手瓜一十雪 committed 2025-01-25 20:00:24 +08:00
1 parent 26525a0ff9
commit 1b874a0264
1 file changed
+4 -1
@@ -28,7 +28,10 @@ export interface OneBotApiDebugProps {
const OneBotApiDebug: React.FC<OneBotApiDebugProps> = (props) => {
const { path, data } = props
const url = new URL(window.location.origin).href
const defaultHttpUrl = url.replace(':6099', ':3000')
let defaultHttpUrl = url.replace(':6099', ':3000')
if (defaultHttpUrl.endsWith('/')) {
defaultHttpUrl = defaultHttpUrl.slice(0, -1)
}
const [httpConfig, setHttpConfig] = useState({
url: defaultHttpUrl,
token: ''