|
- {{ item.title }}
+
+
+
+
+ {{ item.title }}
+
+ |
- {{ item.category }} + {{ item.category.name }} |
@@ -221,26 +506,28 @@ const removeTag = (index) => {
:key="index"
class="px-2 py-1 bg-rose-50 dark:bg-rose-900/20 text-rose-600 dark:text-rose-300 text-xs font-medium rounded-full"
>
- {{ tag }}
+ {{ tag.name }}
|
- ¥ {{ item.price }} + {{ formatPrice(item.price) }} | {{ item.status }} | - {{ item.createdAt }} + {{ formatDate(item.createdAt) }} |
@@ -317,7 +604,7 @@ const removeTag = (index) => {
-
+ {
-
@@ -267,7 +299,7 @@ const swiperOptions = {
+
+
+
+ @@ -347,31 +634,48 @@ const removeTag = (index) => {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -108,10 +140,10 @@ const swiperOptions = {
+
+
+
+
+
+
+
+
@@ -548,4 +1084,95 @@ const removeTag = (index) => {
.backdrop-blur-sm {
backdrop-filter: blur(4px);
}
-
+
+/* 上传组件暗黑模式适配 */
+:deep(.ant-upload-list-picture-card .ant-upload-list-item) {
+ border-color: #4b5563;
+}
+
+:deep(.ant-upload.ant-upload-select-picture-card) {
+ background-color: transparent;
+ border-color: #4b5563;
+}
+
+:deep(.ant-upload-list-picture-card-container) {
+ width: 150px;
+ height: 150px;
+}
+
+:deep(.ant-upload.ant-upload-select-picture-card) {
+ width: 150px;
+ height: 150px;
+}
+
+/* 视频播放器样式 */
+.aspect-w-16 {
+ position: relative;
+ padding- {
+ width: 150px;
+ height: 150px;
+ }
+
+ /* 视频播放器样式 */
+ .aspect-w-16 {
+ position: relative;
+ padding-bottom: 56.25%; /* 16:9 */
+ }
+
+ .aspect-h-9 {
+ position: relative;
+ }
+
+ .aspect-w-16 > *, .aspect-h-9 > * {
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+ /* 模态框动画 */
+ .transform {
+ transition-property: transform, opacity;
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
+ transition-duration: 150ms;
+ }
+
+ /* 表单元素暗黑模式适配 */
+ :deep(.dark input),
+ :deep(.dark select),
+ :deep(.dark textarea) {
+ color-scheme: dark;
+ }
+
+ /* 滚动条美化 */
+ ::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+ }
+
+ ::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ background-color: rgba(156, 163, 175, 0.5);
+ border-radius: 20px;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(156, 163, 175, 0.7);
+ }
+
+ /* 暗黑模式滚动条 */
+ .dark ::-webkit-scrollbar-thumb {
+ background-color: rgba(75, 85, 99, 0.5);
+ }
+
+ .dark ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(75, 85, 99, 0.7);
+ }
+}
+
\ No newline at end of file
diff --git a/src/views/frontend/Detail.vue b/src/views/frontend/Detail.vue
index d2d3913..d70b1fe 100644
--- a/src/views/frontend/Detail.vue
+++ b/src/views/frontend/Detail.vue
@@ -23,14 +23,33 @@ onMounted(() => {
})
})
-const project = {
- id: route.params.id,
+// 分类数据
+const categories = [
+ { id: 1, name: 'Web应用', value: 'Web应用' },
+ { id: 2, name: '移动端', value: '移动端' },
+ { id: 3, name: '小程序', value: '小程序' },
+ { id: 4, name: '企业系统', value: '企业系统' }
+]
+
+// 标签数据
+const allTags = [
+ { id: 1, name: 'Vue3' },
+ { id: 2, name: 'Node.js' },
+ { id: 3, name: 'TypeScript' },
+ { id: 4, name: 'MongoDB' },
+ { id: 5, name: 'Docker' }
+]
+
+const project = ref({
+ id: parseInt(route.params.id),
title: '电商平台',
cover: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280',
- category: 'Web应用',
- tags: ['Vue3', 'Node.js', 'TypeScript', 'MongoDB', 'Docker'],
+ category: categories[0],
+ tags: allTags,
author: '技术团队',
- price: '¥ 29,999',
+ price: 29999,
+ status: '已发布',
+ createdAt: new Date().toISOString(),
description: '基于微服务架构的电商平台,包含商品管理、订单系统、支付对接等模块。采用前后端分离设计,提供完整的API文档和部署方案。系统具有高度可扩展性和定制化能力,适合中小型企业快速搭建自有电商平台。',
features: [
'响应式设计,支持多端访问',
@@ -48,37 +67,50 @@ const project = {
],
video: 'http://d-jy.nailaoyun.cn//storage/video//20250327/2cc1abf9bd69410ce7c69660daf54260.mp4',
wechatQR: '/assets/qr-code.png'
-}
+})
-const relatedProjects = [
+const relatedProjects = ref([
{
id: 1,
title: 'CRM系统',
cover: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280',
- tags: ['Vue3', 'Express'],
- price: '¥ 19,999'
+ tags: [allTags[0], allTags[3]],
+ category: categories[3],
+ price: 19999,
+ status: '已发布',
+ createdAt: new Date().toISOString()
},
{
id: 2,
title: '数据分析平台',
cover: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280',
- tags: ['React', 'Python'],
- price: '¥ 24,999'
+ tags: [allTags[1], allTags[2]],
+ category: categories[0],
+ price: 24999,
+ status: '已发布',
+ createdAt: new Date().toISOString()
},
{
id: 3,
title: '企业官网',
cover: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280',
- tags: ['Nuxt.js', 'Tailwind'],
- price: '¥ 9,999'
+ tags: [allTags[0], allTags[4]],
+ category: categories[0],
+ price: 9999,
+ status: '已发布',
+ createdAt: new Date().toISOString()
}
-]
+])
// 轮播图自动播放配置
const swiperOptions = {
delay: 5000,
disableOnInteraction: false
}
+
+const formatPrice = (price) => {
+ return '¥ ' + price.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
+}
@@ -99,7 +131,7 @@ const swiperOptions = {
- {{ project.category }}
+ {{ project.category.name }}
+
+
+
+
+
- {{ tag }}
+ {{ tag.name }}
价格 -{{ project.price }} +{{ formatPrice(project.price) }}
@@ -291,11 +323,6 @@ const swiperOptions = {
@@ -227,9 +246,11 @@ const getAosEffect = (index) => {
扫码添加微信
-
-
-
-
-
- {{ tag }}
+ {{ tag.name }}
-
@@ -193,10 +210,10 @@ const getAosEffect = (index) => {
{{ related.price }} +{{ formatPrice(related.price) }}
- {{ tag }}
+ {{ tag.name }}
@@ -214,9 +231,11 @@ const getAosEffect = (index) => {
{{ formatDate(project.createdAt) }} |