Merge branch 'master' into master

master
qier222 4 years ago committed by GitHub
commit 65808af6a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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); filter: blur(16px) opacity(0.6);
z-index: -1; z-index: -1;
height: 208px; height: 208px;
transform: scale(0.98);
} }
.play-button { .play-button {
opacity: 0; opacity: 0;

@ -27,7 +27,7 @@
<a <a
href="https://github.com/qier222/YesPlayMusic" href="https://github.com/qier222/YesPlayMusic"
target="blank" target="blank"
v-if="settings.showGithubIcon" v-if="settings.showGithubIcon !== false"
><svg-icon icon-class="github" class="github" ><svg-icon icon-class="github" class="github"
/></a> /></a>
<div class="search-box"> <div class="search-box">

@ -24,7 +24,6 @@ Vue.config.productionTip = false;
initMediaSession(); initMediaSession();
if (process.env.VUE_APP_ENABLE_SENTRY === "true") { if (process.env.VUE_APP_ENABLE_SENTRY === "true") {
console.log("VUE_APP_ENABLE_SENTRY");
Sentry.init({ Sentry.init({
dsn: dsn:
"https://30aaa25152974f48971912a394ab6bc3@o436528.ingest.sentry.io/5477409", "https://30aaa25152974f48971912a394ab6bc3@o436528.ingest.sentry.io/5477409",

@ -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);
} }
} }

Loading…
Cancel
Save