app/js/index-5dfc77d5.js

382 lines
14 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {
_ as e,
a as t,
j as a,
c as l,
aC as s,
e as n,
v as i,
f as o,
y as u,
t as c,
F as r,
r as d,
az as v,
aW as f,
G as g,
o as p,
n as x,
i as y,
A as b,
B as h,
} from "./index-476be0bb.js";
import { c as _, d as m } from "./api.mine-40f950d7.js";
const k = (e) => (b("data-v-9ae0d32f"), (e = e()), h(), e),
$ = k(() => o("div", { class: "relative pt-15" }, null, -1)),
w = { class: "px-10 pb-20 bg-#5A55E6" },
M = { class: "bg-white rounded-5 pb-30 shadow-lg" },
D = {
class: "border-b border-b-solid border-b-#eeecec p-10 font-600 text-15",
},
j = ["innerHTML"],
C = ["innerHTML"],
T = { class: "calendar" },
A = { class: "month-year text-16 text-center" },
F = { class: "grid gap-10 px-10" },
H = ["onClick"],
L = { class: "relative" },
E = k(() =>
o(
"img",
{ class: "w-30", src: "/png/name-ad7bf4cb.png", alt: "" },
null,
-1
)
),
Y = { class: "absolute left-1/2 top-1/2 -translate-1/2 text-white text-14" },
B = { class: "text-8 w-full text-center py-4 rounded-4 mt-4" },
z = { key: 0, class: "text-12 text-#ff0000 font-600" },
G = { key: 0, class: "text-10" },
I = { key: 1, class: "text-12" },
J = { class: "bg-white p-14 mt-15 rounded-4 shadow-lg" },
O = { class: "mb-4 font-600" },
W = { class: "pt-8 lh-20 text-14" },
q = { class: "pt-8 lh-20 text-14" },
K = { class: "pt-8 lh-20 text-14" },
N = { class: "pt-8 lh-20 text-14" },
P = e(
{
__name: "index",
setup(e) {
const { t: b } = t(),
h = a(new Date()),
k = l(() => {
const e = h.value.getFullYear(),
t = h.value.getMonth() + 1;
return "".concat(e, ".").concat(t);
}),
P = l(() => [
b("一"),
b("二"),
b("三"),
b("四"),
b("五"),
b("六"),
b("日"),
]),
Q = l(() => h.value.getMonth()),
R = l(() => h.value.getDate()),
S = l(() => {
const e = h.value.getFullYear(),
t = h.value.getMonth(),
a = new Date(e, t, 1).getDay(),
l = new Date(e, t + 1, 0).getDate(),
s = [];
for (let n = 0; n < (a + 6) % 7; n++) s.push("");
for (let n = 1; n <= l; n++) s.push(n);
return s;
}),
U = a({}),
V = () => {
_().then((e) => {
U.value = e.data;
});
};
V();
const X = async () => {
if (1 == +U.value.today_sign) return;
v({ duration: 0, forbidClick: !0 });
const e = await m();
V(), f(), 1 == e.code && g(b("签到成功"));
};
return (e, t) => {
const a = s("normal-layout");
return (
p(),
n(
r,
null,
[
i(
a,
{
flex: "",
title: e.$t("签到"),
"bg-color": "#5A55E6",
backType: 0,
"nav-bg-color": "#fff",
"text-color": "#000",
},
null,
8,
["title"]
),
$,
o("div", w, [
o("div", M, [
o("div", D, [
o(
"span",
{
innerHTML: e.$t("已连续签到{0}天", [
U.value.sign_days,
]),
},
null,
8,
j
),
u(""),
o(
"span",
{
innerHTML: e.$t("再连签{0}天领{1}积分", [
U.value.next_days,
U.value.next_score,
]),
},
null,
8,
C
),
]),
o("div", T, [
o("header", null, [
o("h2", A, c(e.$t("签到日历")) + " " + c(k.value), 1),
]),
o("div", F, [
(p(!0),
n(
r,
null,
d(
P.value,
(e, t) => (
p(),
n(
"div",
{
class:
"day pb-6 text-14 !text-#86898c text-center",
key: t,
},
c(e),
1
)
)
),
128
)),
(p(!0),
n(
r,
null,
d(S.value, (t, a) => {
var l;
return (
p(),
n(
"div",
{
class: x([
"date flex flex-col justify-center items-center rounded-4 pt-6",
{
today: t === R.value,
"bg-#f9f9fa": "" !== t,
"opacity-50":
U.value.sign_info &&
0 == +U.value.sign_info[t] &&
t < R.value,
},
]),
key: "" === t ? "empty-" + a : t,
onClick: (e) =>
((e) => {
e &&
new Date(
h.value.getFullYear(),
Q.value,
e
);
})(t),
},
[
"" !== t
? (p(),
n(
r,
{ key: 0 },
[
o("div", L, [
E,
o(
"div",
Y,
c(
null != (l = U.value.day_score)
? l
: "--"
),
1
),
]),
o("div", B, [
t >= R.value
? (p(),
n(
r,
{ key: 0 },
[
t == R.value
? (p(),
n("div", z, [
U.value.sign_info &&
1 ==
+U.value.sign_info[
t
]
? (p(),
n(
"span",
G,
c(
e.$t("已签到")
),
1
))
: (p(),
n(
r,
{ key: 1 },
[
u(
c(
e.$t(
"今天"
)
),
1
),
],
64
)),
]))
: (p(),
n("div", I, c(t), 1)),
],
64
))
: U.value.sign_info &&
0 == +U.value.sign_info[t]
? (p(),
n(
r,
{ key: 1 },
[u(c(e.$t("未签到")), 1)],
64
))
: U.value.sign_info &&
1 == +U.value.sign_info[t]
? (p(),
n(
r,
{ key: 2 },
[u(c(e.$t("已签到")), 1)],
64
))
: y("", !0),
]),
],
64
))
: y("", !0),
],
10,
H
)
);
}),
128
)),
]),
]),
o(
"div",
{
class:
"flex items-center justify-center h-45 mt-30 w-80% mx-auto bg-#5A55E6 rounded-full text-white",
onClick: X,
},
[
1 == +U.value.today_sign
? (p(),
n(r, { key: 0 }, [u(c(e.$t("今日已签到")), 1)], 64))
: (p(),
n(
r,
{ key: 1 },
[u(c(e.$t("立即签到!")), 1)],
64
)),
]
),
]),
o("div", J, [
o("div", O, c(e.$t("规则")) + "", 1),
o(
"div",
W,
c(e.$t("1.每位成员每天只能领取一次签到奖励。")),
1
),
o(
"div",
q,
c(
e.$t(
"2.成员必须在当天完成签到,才能继续参加第二天的签到活动。"
)
),
1
),
o(
"div",
K,
c(
e.$t("3.如果成员未能按时签到成员可以在24小时内补签。")
),
1
),
o(
"div",
N,
c(
e.$t(
"4.22 JOB 保留随时解释本活动规则及修改或更改规则、奖励或参与条款的权利,恕不另行通知"
)
) + "。 ",
1
),
]),
]),
],
64
)
);
};
},
},
[["__scopeId", "data-v-9ae0d32f"]]
);
export { P as default };