mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-03-27 17:58:56 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
65808af6a5
@ -51,3 +51,14 @@ export function userLikedSongsIDs(uid) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function dailySignin(type = 0) {
|
||||
//可选参数 : type: 签到类型 , 默认 0, 其中 0 为安卓端签到 ,1 为 web/PC 签到
|
||||
return request({
|
||||
url: "/daily_signin",
|
||||
method: "post",
|
||||
params: {
|
||||
type,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ export default {
|
||||
filter: blur(16px) opacity(0.6);
|
||||
z-index: -1;
|
||||
height: 208px;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.play-button {
|
||||
opacity: 0;
|
||||
|
@ -27,7 +27,7 @@
|
||||
<a
|
||||
href="https://github.com/qier222/YesPlayMusic"
|
||||
target="blank"
|
||||
v-if="settings.showGithubIcon"
|
||||
v-if="settings.showGithubIcon !== false"
|
||||
><svg-icon icon-class="github" class="github"
|
||||
/></a>
|
||||
<div class="search-box">
|
||||
|
@ -24,7 +24,6 @@ Vue.config.productionTip = false;
|
||||
initMediaSession();
|
||||
|
||||
if (process.env.VUE_APP_ENABLE_SENTRY === "true") {
|
||||
console.log("VUE_APP_ENABLE_SENTRY");
|
||||
Sentry.init({
|
||||
dsn:
|
||||
"https://30aaa25152974f48971912a394ab6bc3@o436528.ingest.sentry.io/5477409",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { isAccountLoggedIn } from "./auth";
|
||||
import { refreshCookie } from "@/api/auth";
|
||||
import { dailySignin } from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import store from "@/store";
|
||||
|
||||
@ -79,9 +80,10 @@ export function updateHttps(url) {
|
||||
}
|
||||
|
||||
export function dailyTask() {
|
||||
let lastDate = store.state.settings.lastRefreshCookieDate;
|
||||
if (
|
||||
store.state.settings.lastRefreshCookieDate === undefined ||
|
||||
store.state.settings.lastRefreshCookieDate !== dayjs().date()
|
||||
isAccountLoggedIn() &&
|
||||
(lastDate === undefined || lastDate !== dayjs().date())
|
||||
) {
|
||||
console.log("execute dailyTask");
|
||||
store.commit("updateSettings", {
|
||||
@ -89,5 +91,7 @@ export function dailyTask() {
|
||||
value: dayjs().date(),
|
||||
});
|
||||
refreshCookie();
|
||||
dailySignin(0);
|
||||
dailySignin(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user