禁用赛马接口缓存
This commit is contained in:
@@ -427,9 +427,15 @@
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
async requestJson(url, options = {}) {
|
||||
const response = await fetch(url, {
|
||||
const requestUrl = new URL(url, window.location.origin);
|
||||
requestUrl.searchParams.set('_ts', Date.now().toString());
|
||||
|
||||
const response = await fetch(requestUrl.toString(), {
|
||||
cache: 'no-store',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Cache-Control': 'no-cache',
|
||||
'Pragma': 'no-cache',
|
||||
...(options.headers || {}),
|
||||
},
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user