feat: 添加内容置顶过滤选项,更新内容列表查询功能;添加创作者设置 ID 字段;优化租户信息获取逻辑;更新租户 API 接口

This commit is contained in:
2026-01-05 17:10:25 +08:00
parent 67c6c3cccb
commit 454f6809b0
8 changed files with 110 additions and 67 deletions

View File

@@ -57,7 +57,7 @@
<!-- Footer Link -->
<div class="p-4 border-t border-slate-800">
<router-link to="/t/1"
<router-link :to="'/t/' + (tenantId || '1')"
class="flex items-center gap-2 px-4 py-2 text-sm text-slate-400 hover:text-white transition-colors">
<i class="pi pi-external-link"></i> 预览我的主页
</router-link>
@@ -76,13 +76,27 @@
</template>
<script setup>
import { computed } from 'vue';
import { computed, ref, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import AppFooter from '../components/AppFooter.vue';
import TopNavbar from '../components/TopNavbar.vue';
import { creatorApi } from '../api/creator';
const route = useRoute();
const tenantId = ref('');
const isFullWidth = computed(() => {
return ['creator-content-new', 'creator-content-edit'].includes(route.name);
});
onMounted(async () => {
try {
const res = await creatorApi.getSettings();
if (res && res.id) {
tenantId.value = res.id;
}
} catch (e) {
console.error(e);
}
});
</script>