fix: make content api
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user