This commit is contained in:
Silent YANG 2024-08-07 23:52:20 +08:00
parent ad8b65511f
commit c9efb272cb
8 changed files with 37 additions and 37 deletions

View file

@ -136,7 +136,7 @@
}); });
const onLogin = async () => { const onLogin = async () => {
const resp : any = await axios.post("https://k6.vicicode.cn/wsapi/login", { const resp : any = await axios.post("https://k5.vicicode.cn/wsapi/login", {
'username': formData.account, 'username': formData.account,
'password': formData.password 'password': formData.password
}) })
@ -164,7 +164,7 @@
}); });
return; return;
} }
const resp : any = await axios.post("https://k6.vicicode.cn/wsapi/register", { const resp : any = await axios.post("https://k5.vicicode.cn/wsapi/register", {
'username': formData.account, 'username': formData.account,
'password': formData.password 'password': formData.password
}) })

View file

@ -29,8 +29,8 @@
</a-list-item-meta> </a-list-item-meta>
<template #actions> <template #actions>
<a-link @click="onStar(item.id)">👍</a-link> <a-link @click="onStar(item.id)">👍</a-link>
<a-link @click="iDownload('https://k6.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link> <a-link @click="iDownload('https://k5.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link>
<a-link @click="useFirmware('https://k6.vicicode.cn/wsapi/download?id=' + item.id)">{{$t('global.use')}}</a-link> <a-link @click="useFirmware('https://k5.vicicode.cn/wsapi/download?id=' + item.id)">{{$t('global.use')}}</a-link>
</template> </template>
</a-list-item> </a-list-item>
</a-list> </a-list>
@ -77,7 +77,7 @@
<t-form-item label="信道文件" name="firmware" label-align="top"> <t-form-item label="信道文件" name="firmware" label-align="top">
<t-upload <t-upload
v-model="formData.firmware" v-model="formData.firmware"
action="https://k6.vicicode.cn/wsapi/base64" action="https://k5.vicicode.cn/wsapi/base64"
:abridge-name="[8, 6]" :abridge-name="[8, 6]"
theme="file-input" theme="file-input"
placeholder="未选择文件" placeholder="未选择文件"
@ -138,7 +138,7 @@
const loadit = async (page: any) => { const loadit = async (page: any) => {
state.page = page.current state.page = page.current
const resp : any = await axios.get("https://k6.vicicode.cn/wsapi/list?type=2&limit=12&page=" + page.current + "&t=" + Date.now()) const resp : any = await axios.get("https://k5.vicicode.cn/wsapi/list?type=2&limit=12&page=" + page.current + "&t=" + Date.now())
state.total = resp.total state.total = resp.total
state.nowpage = resp.data state.nowpage = resp.data
} }
@ -146,7 +146,7 @@
const showPanel = async () => { const showPanel = async () => {
state.refLoading = true; state.refLoading = true;
state.showPanel = true state.showPanel = true
const resp : any = await axios.post("https://k6.vicicode.cn/wsapi/my_list", { const resp : any = await axios.post("https://k5.vicicode.cn/wsapi/my_list", {
'type': 2, 'type': 2,
'token': userStore.accountId 'token': userStore.accountId
}) })
@ -169,7 +169,7 @@
}); });
return; return;
} }
await axios.post("https://k6.vicicode.cn/wsapi/upload", { await axios.post("https://k5.vicicode.cn/wsapi/upload", {
'type': 2, 'type': 2,
'token': userStore.accountId, 'token': userStore.accountId,
'title': formData.title, 'title': formData.title,
@ -181,7 +181,7 @@
} }
const onDT = async (id: any) => { const onDT = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/delete", { await axios.post("https://k5.vicicode.cn/wsapi/delete", {
'id': id, 'id': id,
'token': userStore.accountId, 'token': userStore.accountId,
}) })
@ -189,7 +189,7 @@
} }
const onStar = async (id: any) => { const onStar = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/star", { await axios.post("https://k5.vicicode.cn/wsapi/star", {
'id': id 'id': id
}) })
Message.success({ Message.success({

View file

@ -29,8 +29,8 @@
</a-list-item-meta> </a-list-item-meta>
<template #actions> <template #actions>
<a-link @click="onStar(item.id)">👍</a-link> <a-link @click="onStar(item.id)">👍</a-link>
<a-link @click="iDownload('https://k6.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link> <a-link @click="iDownload('https://k5.vicicode.cn/wsapi/download?id=' + item.id, item.title)">{{$t('global.download')}}</a-link>
<a-link @click="useFirmware('https://k6.vicicode.cn/wsapi/download?id=' + item.id + '&n=/' + item.title)">{{$t('global.use')}}</a-link> <a-link @click="useFirmware('https://k5.vicicode.cn/wsapi/download?id=' + item.id + '&n=/' + item.title)">{{$t('global.use')}}</a-link>
</template> </template>
</a-list-item> </a-list-item>
</a-list> </a-list>
@ -77,7 +77,7 @@
<t-form-item label="固件文件" name="firmware" label-align="top"> <t-form-item label="固件文件" name="firmware" label-align="top">
<t-upload <t-upload
v-model="formData.firmware" v-model="formData.firmware"
action="https://k6.vicicode.cn/wsapi/base64" action="https://k5.vicicode.cn/wsapi/base64"
:abridge-name="[8, 6]" :abridge-name="[8, 6]"
theme="file-input" theme="file-input"
placeholder="未选择文件" placeholder="未选择文件"
@ -138,7 +138,7 @@
const loadit = async (page: any) => { const loadit = async (page: any) => {
state.page = page.current state.page = page.current
const resp : any = await axios.get("https://k6.vicicode.cn/wsapi/list?type=0&limit=12&page=" + page.current + "&t=" + Date.now()) const resp : any = await axios.get("https://k5.vicicode.cn/wsapi/list?type=0&limit=12&page=" + page.current + "&t=" + Date.now())
state.total = resp.total state.total = resp.total
state.nowpage = resp.data state.nowpage = resp.data
} }
@ -146,7 +146,7 @@
const showPanel = async () => { const showPanel = async () => {
state.refLoading = true; state.refLoading = true;
state.showPanel = true state.showPanel = true
const resp : any = await axios.post("https://k6.vicicode.cn/wsapi/my_list", { const resp : any = await axios.post("https://k5.vicicode.cn/wsapi/my_list", {
'type': 0, 'type': 0,
'token': userStore.accountId 'token': userStore.accountId
}) })
@ -169,7 +169,7 @@
}); });
return; return;
} }
await axios.post("https://k6.vicicode.cn/wsapi/upload", { await axios.post("https://k5.vicicode.cn/wsapi/upload", {
'type': 0, 'type': 0,
'token': userStore.accountId, 'token': userStore.accountId,
'title': formData.title, 'title': formData.title,
@ -181,7 +181,7 @@
} }
const onDT = async (id: any) => { const onDT = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/delete", { await axios.post("https://k5.vicicode.cn/wsapi/delete", {
'id': id, 'id': id,
'token': userStore.accountId, 'token': userStore.accountId,
}) })
@ -189,7 +189,7 @@
} }
const onStar = async (id: any) => { const onStar = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/star", { await axios.post("https://k5.vicicode.cn/wsapi/star", {
'id': id 'id': id
}) })
Message.success({ Message.success({

View file

@ -22,7 +22,7 @@
<a-col :span="4" v-for="i in state.nowpage"> <a-col :span="4" v-for="i in state.nowpage">
<t-card :style="{ width: '100%', marginBottom: '10px' }"> <t-card :style="{ width: '100%', marginBottom: '10px' }">
<template #cover> <template #cover>
<img style="height: 6.75vw;" :title="i.title + ' [' + i.upload + ']'" :src="'https://k6.vicicode.cn/wsapi/download?id=' + i.id + '&n=' + i.title + '.jpg'"> <img style="height: 6.75vw;" :title="i.title + ' [' + i.upload + ']'" :src="'https://k5.vicicode.cn/wsapi/download?id=' + i.id + '&n=' + i.title + '.jpg'">
</template> </template>
<template #footer> <template #footer>
<t-row :align="'middle'" justify="center" style="gap: 24px"> <t-row :align="'middle'" justify="center" style="gap: 24px">
@ -32,7 +32,7 @@
</t-button> </t-button>
</t-col> </t-col>
<t-col flex="auto" style="display: inline-flex; justify-content: center"> <t-col flex="auto" style="display: inline-flex; justify-content: center">
<t-button variant="text" shape="square" @click="useImg('https://k6.vicicode.cn/wsapi/download?id=' + i.id + '&n=' + i.title + '.jpg')"> <t-button variant="text" shape="square" @click="useImg('https://k5.vicicode.cn/wsapi/download?id=' + i.id + '&n=' + i.title + '.jpg')">
<check-double-icon /> <check-double-icon />
</t-button> </t-button>
</t-col> </t-col>
@ -84,7 +84,7 @@
<t-form-item label="图片文件" name="firmware" label-align="top"> <t-form-item label="图片文件" name="firmware" label-align="top">
<t-upload <t-upload
v-model="formData.firmware" v-model="formData.firmware"
action="https://k6.vicicode.cn/wsapi/base64" action="https://k5.vicicode.cn/wsapi/base64"
:abridge-name="[8, 6]" :abridge-name="[8, 6]"
theme="file-input" theme="file-input"
placeholder="未选择文件" placeholder="未选择文件"
@ -165,7 +165,7 @@
state.dropzoneActive = false; state.dropzoneActive = false;
const files = event.dataTransfer.files; const files = event.dataTransfer.files;
for(let i=0;i<files.length;i++){ for(let i=0;i<files.length;i++){
await axios.post("https://k6.vicicode.cn/wsapi/upload", { await axios.post("https://k5.vicicode.cn/wsapi/upload", {
'type': 1, 'type': 1,
'token': userStore.accountId, 'token': userStore.accountId,
'title': files[i].name, 'title': files[i].name,
@ -188,7 +188,7 @@
const loadit = async (page: any) => { const loadit = async (page: any) => {
state.page = page.current state.page = page.current
const resp : any = await axios.get("https://k6.vicicode.cn/wsapi/list?type=1&limit=24&page=" + page.current + "&t=" + Date.now()) const resp : any = await axios.get("https://k5.vicicode.cn/wsapi/list?type=1&limit=24&page=" + page.current + "&t=" + Date.now())
state.total = resp.total state.total = resp.total
state.nowpage = resp.data state.nowpage = resp.data
} }
@ -196,7 +196,7 @@
const showPanel = async () => { const showPanel = async () => {
state.refLoading = true; state.refLoading = true;
state.showPanel = true state.showPanel = true
const resp : any = await axios.post("https://k6.vicicode.cn/wsapi/my_list", { const resp : any = await axios.post("https://k5.vicicode.cn/wsapi/my_list", {
'type': 1, 'type': 1,
'token': userStore.accountId 'token': userStore.accountId
}) })
@ -219,7 +219,7 @@
}); });
return; return;
} }
await axios.post("https://k6.vicicode.cn/wsapi/upload", { await axios.post("https://k5.vicicode.cn/wsapi/upload", {
'type': 1, 'type': 1,
'token': userStore.accountId, 'token': userStore.accountId,
'title': formData.title, 'title': formData.title,
@ -231,7 +231,7 @@
} }
const onDT = async (id: any) => { const onDT = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/delete", { await axios.post("https://k5.vicicode.cn/wsapi/delete", {
'id': id, 'id': id,
'token': userStore.accountId, 'token': userStore.accountId,
}) })
@ -239,7 +239,7 @@
} }
const onStar = async (id: any) => { const onStar = async (id: any) => {
await axios.post("https://k6.vicicode.cn/wsapi/star", { await axios.post("https://k5.vicicode.cn/wsapi/star", {
'id': id 'id': id
}) })
Message.success({ Message.success({

View file

@ -34,13 +34,13 @@ const useFirmware = () => {
router.push({ router.push({
path: '/tool/flash', path: '/tool/flash',
query: { query: {
url: 'https://k6.vicicode.cn/diyapi/LOSEHU' + state.flag.join('') + '.bin?v=' + (new Date()).getTime() url: 'https://k5.vicicode.cn/diyapi/LOSEHU' + state.flag.join('') + '.bin?v=' + (new Date()).getTime()
} }
}); });
} }
const iDownload = () => { const iDownload = () => {
fetch('https://k6.vicicode.cn/diyapi/LOSEHU' + state.flag.join('') + '.bin?v=' + (new Date()).getTime()).then(e=>e.blob()).then(blob=>{ fetch('https://k5.vicicode.cn/diyapi/LOSEHU' + state.flag.join('') + '.bin?v=' + (new Date()).getTime()).then(e=>e.blob()).then(blob=>{
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
const a = document.createElement('a'); const a = document.createElement('a');
a.href = url; a.href = url;
@ -83,7 +83,7 @@ const { loading, setLoading } = useLoading(true);
onMounted(async () => { onMounted(async () => {
setLoading(true) setLoading(true)
let functions = await (await fetch('https://k6.vicicode.cn/diyapi/function.json?v=' + (new Date()).getTime())).text() let functions = await (await fetch('https://k5.vicicode.cn/diyapi/function.json?v=' + (new Date()).getTime())).text()
functions = JSON.parse(functions) functions = JSON.parse(functions)
let _newfunc: any = [] let _newfunc: any = []
let _showSort: any = [] let _showSort: any = []
@ -112,7 +112,7 @@ onMounted(async () => {
state.disName = disName state.disName = disName
state.disMatrix = disMatrix state.disMatrix = disMatrix
state.showSort = _showSort state.showSort = _showSort
const versions = await (await fetch('https://k6.vicicode.cn/diyapi/version.json?v=' + (new Date()).getTime())).text() const versions = await (await fetch('https://k5.vicicode.cn/diyapi/version.json?v=' + (new Date()).getTime())).text()
state.versions = JSON.parse(versions) state.versions = JSON.parse(versions)
updateMatrix() updateMatrix()
setLoading(false) setLoading(false)

View file

@ -126,9 +126,9 @@
}) })
const loadBL = async() => { const loadBL = async() => {
const latestVersion = JSON.parse(await (await fetch('https://k6.vicicode.cn/diyapi/bl.json')).text())!.latest; const latestVersion = JSON.parse(await (await fetch('https://k5.vicicode.cn/diyapi/bl.json')).text())!.latest;
state.blName = latestVersion; state.blName = latestVersion;
const fontPacket = await fetch('https://k6.vicicode.cn/diyapi/' + latestVersion); const fontPacket = await fetch('https://k5.vicicode.cn/diyapi/' + latestVersion);
if(fontPacket.body){ if(fontPacket.body){
const reader = fontPacket.body.getReader(); const reader = fontPacket.body.getReader();
const chunks = []; const chunks = [];

View file

@ -292,7 +292,7 @@ const scanLocation = async () => {
} }
const handleOk = async () => { const handleOk = async () => {
const lol = await (await fetch('https://k6.vicicode.cn/api/lol', { const lol = await (await fetch('https://k5.vicicode.cn/api/lol', {
method: "POST", method: "POST",
mode: "cors", mode: "cors",
headers: { headers: {
@ -327,7 +327,7 @@ const restoreRange = async (start: any = 0, uint8Array: any) => {
const getPass = async () => { const getPass = async () => {
if (!state.sat) { alert('请选择卫星!'); return; }; if (!state.sat) { alert('请选择卫星!'); return; };
setLoading(true) setLoading(true)
const res = await (await fetch('https://k6.vicicode.cn/api/pass', { const res = await (await fetch('https://k5.vicicode.cn/api/pass', {
method: "POST", method: "POST",
mode: "cors", mode: "cors",
headers: { headers: {
@ -375,7 +375,7 @@ const writeIt = async () => {
} }
if (!state.pass) { alert('请选择过境时间!'); return; }; if (!state.pass) { alert('请选择过境时间!'); return; };
setLoading(true) setLoading(true)
const res = await (await fetch('https://k6.vicicode.cn/api/doppler', { const res = await (await fetch('https://k5.vicicode.cn/api/doppler', {
method: "POST", method: "POST",
mode: "cors", mode: "cors",
headers: { headers: {

View file

@ -57,7 +57,7 @@ onMounted(()=>{
}) })
const upload = async () => { const upload = async () => {
await fetch('https://k6.vicicode.cn/api/lol', { await fetch('https://k5.vicicode.cn/api/lol', {
method: "POST", method: "POST",
mode: "cors", mode: "cors",
headers: { headers: {