取消miaoFetch中缓存使用

This commit is contained in:
539943419 committed 2024-01-22 03:26:32 +08:00
1 parent fc159016c8
commit 6ec86fb47d
1 file changed
+18 -2
+18 -2
View File
@@ -10,6 +10,14 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
let myAbortController; let myAbortController;
/** @type { AbortSignal | undefined } */ /** @type { AbortSignal | undefined } */
let signal = undefined; let signal = undefined;
var myHeaders = new Headers();
myHeaders.append('pragma', 'no-cache');
myHeaders.append('cache-control', 'no-cache');
var myInit = {
method: 'GET',
headers: myHeaders,
};
if (typeof window.AbortController == "function") { if (typeof window.AbortController == "function") {
if (options.timeout > 0) { if (options.timeout > 0) {
@@ -22,7 +30,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
console.warn("设备不支持AbortController"); console.warn("设备不支持AbortController");
} }
fetch(url, { signal }) fetch(url, myInit)
.then(response => { .then(response => {
if (!response.ok) { if (!response.ok) {
return reject(response); return reject(response);
@@ -653,6 +661,14 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
// } // }
// } // }
if(false||1){
let gameLogBak = game.log
game.logCount = 1
game.log = function(...args){
gameLogBak(game.logCount++,'. ',...args)
}
}
// alert(lib.config.extension_喵喵配件_nodeintroFix) // alert(lib.config.extension_喵喵配件_nodeintroFix)
//四字适配 //四字适配
if (lib.config.extension_喵喵配件_nodeintroFix) { if (lib.config.extension_喵喵配件_nodeintroFix) {
@@ -1902,7 +1918,7 @@ game.import("extension", function (lib, game, ui, get, ai, _status) {
onclick: async function () { onclick: async function () {
// 本地img // 本地img
game.getFileList("extension/喵喵喵喵",(fold,files)=>{ game.getFileList("extension/喵喵喵喵",(fold,files)=>{
img_map = {} var img_map = {}
// 扩展包需求img // 扩展包需求img
for(var i in lib.characterPack['mode_extension_喵喵喵喵']){ for(var i in lib.characterPack['mode_extension_喵喵喵喵']){
var p = lib.characterPack['mode_extension_喵喵喵喵'][i] var p = lib.characterPack['mode_extension_喵喵喵喵'][i]