本地js的src增加timestamp

This commit is contained in:
CounterFire2023 2023-09-13 19:23:27 +08:00
parent aee73b2b42
commit 9d3238db2e
2 changed files with 15 additions and 1 deletions

View File

@ -386,6 +386,19 @@ if (jc.wallet.platform !== 'web') {
} }
// begin of token mall // begin of token mall
function stakeNfts(...args) {
args.unshift('stakeNfts');
callProxyMethod.apply(this, args);
}
function redeemNfts(...args) {
args.unshift('redeemNfts');
callProxyMethod.apply(this, args);
}
function nftStakeInfo(...args) {
args.unshift('nftStakeInfo');
callProxyMethod.apply(this, args);
}
// begin of in-app pay // begin of in-app pay
function queryGoogleProducts(...args) { function queryGoogleProducts(...args) {
args.unshift('queryGoogleProducts'); args.unshift('queryGoogleProducts');

View File

@ -54,7 +54,7 @@
var s = document.createElement('script'); var s = document.createElement('script');
s.async = true; s.async = true;
if (sub[1] == 1)s.type = 'module'; if (sub[1] == 1)s.type = 'module';
//s.src = src + (src.indexOf("?") == -1 ? "?" : "&") + "t=" + Date.now(); // s.src = src + (src.indexOf("?") == -1 ? "?" : "&") + "t=" + Date.now();
s.src =src; s.src =src;
s.addEventListener('load', function () { s.addEventListener('load', function () {
console.log(`<< finish load script: ${src}`); console.log(`<< finish load script: ${src}`);
@ -78,6 +78,7 @@
var loaded = 0; var loaded = 0;
var loadNext = function () { var loadNext = function () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
list[loaded][0] = list[loaded][0] + (list[loaded][0].indexOf("?") == -1 ? "?" : "&") + "t=" + Date.now();
loadSingleScript(list[loaded]).then(() => { loadSingleScript(list[loaded]).then(() => {
loaded++; loaded++;
if (loaded >= list.length) { if (loaded >= list.length) {