去掉 username
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-24 22:14:14 +08:00
parent f428291698
commit 0b28dbeef8
5 changed files with 12 additions and 34 deletions

View File

@@ -5,7 +5,6 @@ import { getCSRFToken } from "~/utils/functions"
export const useAIStore = defineStore("ai", () => {
const duration = ref("months:6")
const username = ref("")
const weeklyData = ref<WeeklyData[]>([])
const detailsData = reactive<DetailsData>({
start: "",
@@ -26,17 +25,14 @@ export const useAIStore = defineStore("ai", () => {
const mdContent = ref("")
const theFirstPerson = computed(() => {
return !!username.value ? username.value : "你"
})
const theFirstPerson = "你"
async function fetchDetailsData(
start: string,
end: string,
username?: string,
) {
loading.details = true
const res = await getAIDetailData(start, end, username)
const res = await getAIDetailData(start, end)
detailsData.start = res.data.start
detailsData.end = res.data.end
detailsData.solved = res.data.solved
@@ -51,10 +47,9 @@ export const useAIStore = defineStore("ai", () => {
async function fetchWeeklyData(
end: string,
duration: string,
username?: string,
) {
loading.weekly = true
const res = await getAIWeeklyData(end, duration, username)
const res = await getAIWeeklyData(end, duration)
weeklyData.value = res.data
loading.weekly = false
}
@@ -145,7 +140,6 @@ export const useAIStore = defineStore("ai", () => {
weeklyData,
detailsData,
duration,
username,
theFirstPerson,
loading,
mdContent,