fix issue

This commit is contained in:
liangping 2022-01-29 12:41:38 +08:00
parent b4b2833298
commit 529bf57274

View File

@ -257,8 +257,8 @@ export default class ChainFetch {
this.getSelectedConfig() this.getSelectedConfig()
} }
host = (config ? config.api : this.config.api) host = (config ? config.api : this.config.api)
let finalurl = (Array.isArray(host) ? host[this.getApiIndex(config)] : host) + url const finalurl = (Array.isArray(host) ? host[this.getApiIndex(config)] : host) + url
finalurl = finalurl.replaceAll('v1beta1', this.getEndpointVersion()) // finalurl = finalurl.replaceAll('v1beta1', this.getEndpointVersion())
const ret = await fetch(finalurl).then(response => response.json()) const ret = await fetch(finalurl).then(response => response.json())
return ret return ret
} }