diff --git a/src/store/action.ts b/src/store/action.ts index 36ef716..d12e983 100644 --- a/src/store/action.ts +++ b/src/store/action.ts @@ -1,5 +1,5 @@ import { initialWeapon, initialArmor, initialNeck, initialRing, i18n, archive_name } from '@/config'; -import { conisOfsell, getAssets } from '@/tool'; +import { conisOfsell } from '@/tool'; import { Base64 } from 'js-base64'; const backgound = new Audio('/audio/backgound.mp3'); diff --git a/src/tool/assets.ts b/src/tool/assets.ts deleted file mode 100644 index 36a5109..0000000 --- a/src/tool/assets.ts +++ /dev/null @@ -1,24 +0,0 @@ -const data: any = {}; -export const getAssets = (url) => { - return new Promise((resolve, reject) => { - if (data[url]) { - resolve(data[url]); - } else { - const xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = 'blob'; - xhr.onload = function () { - const blob = xhr.response; - const file = new File([blob!], url, { type: blob!.type }); - console.log(file); - data[url] = URL.createObjectURL(file); - console.log(data[url]); - resolve(data[url]); - // } else { - // resolve(null); - // } - }; - xhr.send(); - } - }); -}; diff --git a/src/tool/index.ts b/src/tool/index.ts index 00e52a7..5808013 100644 --- a/src/tool/index.ts +++ b/src/tool/index.ts @@ -2,7 +2,6 @@ export * from './caller'; export * from './formatter'; export * from './random'; export * from './mixins'; -export * from './assets'; export const getArrayEmptyIdx = (array) => { for (let i = 0; i < array.length; i++) {