mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Remove deprecated item
This commit is contained in:
parent
67b720ed62
commit
a92863ec8c
@ -1,6 +1,6 @@
|
||||
import { postTextWithCredentials, getJsonWithCredentials } from '@/core/ajax'
|
||||
import { postTextWithCredentials } from '@/core/ajax'
|
||||
import { Toast } from '@/core/toast'
|
||||
import { formData, getCsrf } from '@/core/utils'
|
||||
import { getCsrf } from '@/core/utils'
|
||||
import { registerAndGetData } from '@/plugins/data'
|
||||
|
||||
export interface CheckInItem {
|
||||
@ -19,7 +19,7 @@ const builtInItems: CheckInItem[] = [
|
||||
const seedsToCoinsApi = 'https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin'
|
||||
const text = await postTextWithCredentials(
|
||||
seedsToCoinsApi,
|
||||
formData({
|
||||
new URLSearchParams({
|
||||
csrf: getCsrf(),
|
||||
csrf_token: getCsrf(),
|
||||
}),
|
||||
@ -40,31 +40,5 @@ const builtInItems: CheckInItem[] = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'live-check-in',
|
||||
displayName: '直播间签到',
|
||||
icon: 'mdi-calendar-check',
|
||||
action: async () => {
|
||||
const liveCheckInApi = 'https://api.live.bilibili.com/xlive/web-ucenter/v1/sign/DoSign'
|
||||
const json = (await getJsonWithCredentials(liveCheckInApi)) as {
|
||||
code: number
|
||||
message: string
|
||||
data: {
|
||||
text: string
|
||||
specialText: string
|
||||
allDays: number
|
||||
hadSignDays: number
|
||||
isBonusDay: number
|
||||
}
|
||||
}
|
||||
if (json.code !== 0) {
|
||||
Toast.info(json.message, '直播间签到', 3000)
|
||||
} else {
|
||||
const { text, specialText, allDays, hadSignDays } = json.data
|
||||
const message = `签到成功, 获得了${text} ${specialText}\n本月进度: ${hadSignDays} / ${allDays}`
|
||||
Toast.success(message, '直播间签到', 3000)
|
||||
}
|
||||
},
|
||||
},
|
||||
]
|
||||
export const [checkInItems] = registerAndGetData('checkInCenter.items', builtInItems)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user