This commit is contained in:
tamaina 2021-02-14 23:10:09 +09:00
parent e6411857ad
commit b822228b00
1 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { instance } from '@/instance'; import { instance } from '@/instance';
import { $i } from '@/account'; import { $i } from '@/account';
import { api } from '@/os'; import { api, post } from '@/os';
import { lang } from '@/config'; import { lang } from '@/config';
import { SwMessage } from '@/sw/types'; import { SwMessage } from '@/sw/types';
@ -54,7 +54,12 @@ navigator.serviceWorker.addEventListener('message', ev => {
const data = ev.data as SwMessage; const data = ev.data as SwMessage;
if (data.type !== 'order') return; if (data.type !== 'order') return;
data.order switch (data.order) {
case 'post':
return post(data.options);
default:
return;
}
}); });
/** /**