update at 2026-02-09 16:09:44

This commit is contained in:
douboer
2026-02-09 16:09:44 +08:00
parent ffb7367d3a
commit 917f210dae
20 changed files with 790 additions and 184 deletions

View File

@@ -86,9 +86,12 @@ async function renderPngByApi(payload) {
? Number(app.globalData.apiTimeoutMs)
: 30000
const baseApiUrl = buildApiUrl()
const apiUrl = /\/api\/render-svg$/.test(baseApiUrl)
? baseApiUrl.replace(/\/api\/render-svg$/, '/api/render-png')
: `${baseApiUrl.replace(/\/$/, '')}/render-png`
const configuredPngApiUrl = app && app.globalData ? app.globalData.pngRenderApiUrl : ''
const apiUrl = configuredPngApiUrl || (
/\/api\/render-svg$/.test(baseApiUrl)
? baseApiUrl.replace(/\/api\/render-svg$/, '/api/render-png')
: `${baseApiUrl.replace(/\/$/, '')}/render-png`
)
const response = await request({
url: apiUrl,