feat: update

This commit is contained in:
yanghao05
2025-04-25 11:43:34 +08:00
parent b8c2c245f2
commit 11bea6b8c9

View File

@@ -1,6 +1,5 @@
<script setup> <script setup>
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import { AiOutlineLeft } from 'vue-icons-plus/ai'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { postApi } from '../api/postApi' import { postApi } from '../api/postApi'
@@ -61,27 +60,19 @@ onMounted(async () => {
</script> </script>
<template> <template>
<div class="min-h-screen bg-gray-50 pb-20"> <div class="min-h-screen bg-gray-50">
<header class="fixed top-0 left-0 right-0 h-14 bg-white border-b border-gray-200 flex items-center px-4 z-50"> <div v-if="article">
<button @click="router.back()" <video controls :poster="article.head_images[0]" class="w-full aspect-video object-cover">
class="flex items-center justify-center w-10 h-10 mr-2 rounded-full hover:bg-gray-100 active:bg-gray-200 transition-colors"> Your browser does not support the video tag.
<AiOutlineLeft class="h-5 w-5" /> </video>
</button> <div class="p-4">
<h2 class="text-lg font-medium">{{ article?.title || '文章详情' }}</h2> <h1 class="text-2xl my-1.5">{{ article.title }}</h1>
</header>
<main class="pt-14">
<div v-if="article" class="px-4 pt-4">
<video controls :poster="article.head_images[0]"
class="w-full rounded aspect-video object-cover border border-gray-200">
Your browser does not support the video tag.
</video>
</div> </div>
</div>
<div v-else class="flex justify-center items-center py-8"> <div v-else class="flex justify-center items-center py-8">
<div class="animate-spin rounded-full h-8 w-8 border-4 border-gray-200 border-t-blue-600"></div> <div class="animate-spin rounded-full h-8 w-8 border-4 border-gray-200 border-t-blue-600"></div>
</div> </div>
</main>
<div v-if="article && !article.purchased" <div v-if="article && !article.purchased"
class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-4"> class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-4">