fix: make content api

This commit is contained in:
zzc
2026-02-06 09:42:56 +08:00
parent 99aa89a5c2
commit cee6ef9f91
6 changed files with 18 additions and 13 deletions

View File

@@ -100,12 +100,13 @@
</template>
<script setup>
import { ref, onMounted } from "vue";
import { ref } from "vue";
import {
onPullDownRefresh,
onShareAppMessage,
onReachBottom,
onLoad,
onShow,
} from "@dcloudio/uni-app";
import { getBavBarHeight } from "@/utils/system";
import { getRecommendList, getRandomGreeting } from "@/api/system";
@@ -148,16 +149,19 @@ const updateCountdown = () => {
const todayDate = ref("");
const dailyGreeting = ref("");
onShow(() => {
updateCountdown();
const date = new Date();
todayDate.value = `${date.getMonth() + 1}${date.getDate()}`;
});
onLoad((options) => {
if (options.shareToken) saveViewRequest(options.shareToken, "index");
updateCountdown();
// updateCountdown();
getRandomGreetingText();
fetchRecommendList();
const date = new Date();
todayDate.value = `${date.getMonth() + 1}${date.getDate()}`;
// Daily Inspiration Logic
// const startOfYear = new Date(date.getFullYear(), 0, 0);
// const diff = date - startOfYear;