feat: 格式化代码

This commit is contained in:
2025-08-27 18:37:50 +08:00
parent 9de068e7fc
commit 0e51fdcd69
21 changed files with 1502 additions and 1522 deletions

View File

@@ -1,43 +1,42 @@
<template>
<view class="container">
<view v-for="item in themeDTOList" :key="item.title">
<RecommendPostsList :recommendTheme="item" />
</view>
</view>
<view class="container">
<view v-for="item in themeDTOList" :key="item.title">
<RecommendPostsList :recommendTheme="item" />
</view>
</view>
</template>
<script setup>
import { ref, nextTick } from 'vue'
import { onMounted } from 'vue'
import { discoveryCradComponent } from '@/request/api/MainPageDataApi'
import RecommendPostsList from '../recommend/RecommendPostsList.vue'
import { SCROLL_TO_BOTTOM } from '@/constant/constant'
import { ref, nextTick } from "vue";
import { onMounted } from "vue";
import { discoveryCradComponent } from "@/request/api/MainPageDataApi";
import RecommendPostsList from "../recommend/RecommendPostsList.vue";
import { SCROLL_TO_BOTTOM } from "@/constant/constant";
const themeDTOList = ref([])
const themeDTOList = ref([]);
const loadDiscoveryCradComponent = async () => {
const res = await discoveryCradComponent()
if(res.code === 0 && res.data) {
themeDTOList.value = res.data.themeDTOList
nextTick(() => {
setTimeout(() => {
uni.$emit(SCROLL_TO_BOTTOM, true)
}, 300)
});
}
}
const loadDiscoveryCradComponent = async () => {
const res = await discoveryCradComponent();
if (res.code === 0 && res.data) {
themeDTOList.value = res.data.themeDTOList;
onMounted(() => {
loadDiscoveryCradComponent()
})
nextTick(() => {
setTimeout(() => {
uni.$emit(SCROLL_TO_BOTTOM, true);
}, 300);
});
}
};
onMounted(() => {
loadDiscoveryCradComponent();
});
</script>
<style scoped lang="scss">
.container {
width: 100%;
flex: 1;
margin-bottom: 12px;
}
</style>
.container {
width: 100%;
flex: 1;
margin-bottom: 12px;
}
</style>