diff --git a/js/common.js b/js/common.js index fabcd8b..39446a0 100644 --- a/js/common.js +++ b/js/common.js @@ -49,9 +49,11 @@ function $ajaxget(url, data) { emulateJSON: true, withCredentials: true, headers: { + "Cache-Control": "max-age=3600", + // 'cache-control': 'no-cache', // 'Pragma': 'no-cache' - } + }, }) .then((res) => { var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data; @@ -139,7 +141,7 @@ function getBaseData() { // return // } // https://api.gter.net/v1/program/details program/basicData - location.host.indexOf("demo.gter.net") > -1 + location.host.indexOf("demo.gter.net") > -1; let url = location.host.indexOf("demo.gter.net") == -1 ? "/api/home/basicData" : "/v1/program/basicData"; $ajaxget(url).then((res) => { if (res.code != 200) return;