-
![]()
+
{{ i.name }} 所属:{{ i.belong }}
{{ i.introduce }}
@@ -38,10 +39,6 @@ onBeforeMount(async () => {
next.value = TSAvatarBirth.getNextAvatarBirth();
});
-async function toPost() {
- await router.push("/news/2");
-}
-
function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
let dateStr;
if (type === true) {
@@ -52,6 +49,14 @@ function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
} else {
dateStr = type.role_birthday;
}
+ if (type != true) {
+ router.push({ name: "留影叙佳期", params: { date: dateStr } });
+ return;
+ }
+ if (cur.value.length > 0 && !cur.value[0].is_subscribe) {
+ router.push("/news/2/news");
+ return;
+ }
router.push({ name: "留影叙佳期", params: { date: dateStr } });
}
@@ -87,6 +92,14 @@ function toBirth(type: TGApp.Archive.Birth.RoleItem | true) {
cursor: pointer;
}
+.tcb-top-active img.tcb-cur {
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ margin-left: 5px;
+ background: var(--common-shadow-1);
+}
+
.tcb-item {
position: relative;
display: flex;
diff --git a/src/pages/common/News.vue b/src/pages/common/News.vue
index 891488d2..1a2381b6 100644
--- a/src/pages/common/News.vue
+++ b/src/pages/common/News.vue
@@ -79,7 +79,7 @@ type RawData = {
// 路由
const router = useRouter();
const gid = useRoute().params.gid;
-
+let type = useRoute().params.type;
// loading
const loading = ref(true);
const loadingTitle = ref("正在加载");
@@ -120,6 +120,9 @@ const rawData = ref({
onMounted(async () => {
await TGLogger.Info(`[News][${gid}][onMounted] 打开咨讯页面`);
const typeList = ["notice", "activity", "news"];
+ if (type != undefined) {
+ appStore.recentNewsType = type;
+ }
const curType = appStore.recentNewsType;
if (typeList.includes(curType)) {
tab.value = curType;
diff --git a/src/plugins/Sqlite/modules/avatarBirth.ts b/src/plugins/Sqlite/modules/avatarBirth.ts
index 9888d992..0aaa5371 100644
--- a/src/plugins/Sqlite/modules/avatarBirth.ts
+++ b/src/plugins/Sqlite/modules/avatarBirth.ts
@@ -4,7 +4,7 @@
* @since Beta v0.4.6
*/
-import { ArcBirCalendar, ArcBirRole } from "../../../data";
+import { AppCharacterData, ArcBirCalendar, ArcBirRole } from "../../../data";
/**
* @description 判断今天是不是角色生日
@@ -16,7 +16,19 @@ function isAvatarBirth(): TGApp.Archive.Birth.CalendarItem[] {
const month = date.getMonth() + 1;
const day = date.getDate();
const days = ArcBirCalendar[month];
- return days.filter((i) => i.role_birthday === `${month}/${day}`);
+ const find = days.filter((i) => i.role_birthday === `${month}/${day}`);
+ if (find.length > 0) return find.map((i) => (i.is_subscribe = true));
+ const find2 = AppCharacterData.filter((i) => i.birthday.toString() === [month, day].toString());
+ return find2.map(
+ (i) =>
+ {
+ role_id: i.id,
+ name: i.name,
+ role_birthday: `${month}/${day}`,
+ head_icon: `/WIKI/character/${i.id}.webp`,
+ is_subscribe: false,
+ },
+ );
}
/**