|
|
@ -1,5 +1,6 @@
|
|
|
|
import { isAccountLoggedIn } from "./auth";
|
|
|
|
import { isAccountLoggedIn } from "./auth";
|
|
|
|
import { refreshCookie } from "@/api/auth";
|
|
|
|
import { refreshCookie } from "@/api/auth";
|
|
|
|
|
|
|
|
import { dailySignin } from "@/api/user";
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
import store from "@/store";
|
|
|
|
import store from "@/store";
|
|
|
|
|
|
|
|
|
|
|
@ -79,9 +80,10 @@ export function updateHttps(url) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function dailyTask() {
|
|
|
|
export function dailyTask() {
|
|
|
|
|
|
|
|
let lastDate = store.state.settings.lastRefreshCookieDate;
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
store.state.settings.lastRefreshCookieDate === undefined ||
|
|
|
|
isAccountLoggedIn() &&
|
|
|
|
store.state.settings.lastRefreshCookieDate !== dayjs().date()
|
|
|
|
(lastDate === undefined || lastDate !== dayjs().date())
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
console.log("execute dailyTask");
|
|
|
|
console.log("execute dailyTask");
|
|
|
|
store.commit("updateSettings", {
|
|
|
|
store.commit("updateSettings", {
|
|
|
@ -89,5 +91,7 @@ export function dailyTask() {
|
|
|
|
value: dayjs().date(),
|
|
|
|
value: dayjs().date(),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
refreshCookie();
|
|
|
|
refreshCookie();
|
|
|
|
|
|
|
|
dailySignin(0);
|
|
|
|
|
|
|
|
dailySignin(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|