322 lines
6.0 KiB
Vue
322 lines
6.0 KiB
Vue
<template>
|
|
<view class="page-container">
|
|
<!-- 状态栏占位 -->
|
|
<view class="status-bar"></view>
|
|
|
|
<!-- 页面内容 -->
|
|
<view class="content">
|
|
<!-- 空状态 -->
|
|
<view class="empty-state">
|
|
<view class="empty-icon">📦</view>
|
|
<text class="empty-title">项目页面</text>
|
|
<text class="empty-desc">Material Design风格的项目页面开发中</text>
|
|
|
|
<!-- 功能预览 -->
|
|
<view class="feature-preview">
|
|
<view class="feature-card elevation-1">
|
|
<view class="feature-icon">🔍</view>
|
|
<text class="feature-title">项目分类</text>
|
|
<text class="feature-desc">按技术栈分类浏览开源项目</text>
|
|
</view>
|
|
|
|
<view class="feature-card elevation-1">
|
|
<view class="feature-icon">⭐</view>
|
|
<text class="feature-title">热门项目</text>
|
|
<text class="feature-desc">发现最受欢迎的开源项目</text>
|
|
</view>
|
|
|
|
<view class="feature-card elevation-1">
|
|
<view class="feature-icon">🔄</view>
|
|
<text class="feature-title">最新项目</text>
|
|
<text class="feature-desc">获取最新的开源项目更新</text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 开发进度 -->
|
|
<view class="progress-section">
|
|
<text class="progress-title">开发进度</text>
|
|
<view class="progress-bar">
|
|
<view class="progress-fill" :style="{ width: '30%' }"></view>
|
|
</view>
|
|
<text class="progress-text">30% - 基础框架完成</text>
|
|
</view>
|
|
|
|
<!-- 返回按钮 -->
|
|
<view class="action-buttons">
|
|
<view class="btn btn-outline" @click="goBack">
|
|
<text class="btn-text">返回首页</text>
|
|
</view>
|
|
<view class="btn btn-primary" @click="checkUpdate">
|
|
<text class="btn-text">检查更新</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
features: [
|
|
{ icon: '🔍', title: '项目分类', desc: '按技术栈分类浏览开源项目' },
|
|
{ icon: '⭐', title: '热门项目', desc: '发现最受欢迎的开源项目' },
|
|
{ icon: '🔄', title: '最新项目', desc: '获取最新的开源项目更新' }
|
|
]
|
|
}
|
|
},
|
|
|
|
onLoad() {
|
|
console.log('项目页面加载')
|
|
},
|
|
|
|
methods: {
|
|
// 返回首页
|
|
goBack() {
|
|
uni.switchTab({
|
|
url: '/pages/index/index'
|
|
})
|
|
},
|
|
|
|
// 检查更新
|
|
checkUpdate() {
|
|
uni.showToast({
|
|
title: '已是最新版本',
|
|
icon: 'success',
|
|
duration: 2000
|
|
})
|
|
},
|
|
|
|
// 预览功能
|
|
previewFeature(index) {
|
|
const feature = this.features[index]
|
|
uni.showModal({
|
|
title: feature.title,
|
|
content: feature.desc,
|
|
showCancel: false,
|
|
confirmText: '知道了'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page-container {
|
|
min-height: 100vh;
|
|
background: #F5F5F5;
|
|
}
|
|
|
|
.status-bar {
|
|
height: var(--status-bar-height);
|
|
background: #6200EE;
|
|
}
|
|
|
|
.content {
|
|
padding: 32px 24px;
|
|
}
|
|
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.empty-icon {
|
|
font-size: 80px;
|
|
color: #6200EE;
|
|
margin-bottom: 24px;
|
|
animation: bounce 2s infinite;
|
|
}
|
|
|
|
@keyframes bounce {
|
|
0%, 100% {
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
transform: translateY(-10px);
|
|
}
|
|
}
|
|
|
|
.empty-title {
|
|
font-size: 28px;
|
|
font-weight: 500;
|
|
color: #212121;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.empty-desc {
|
|
font-size: 16px;
|
|
color: #757575;
|
|
margin-bottom: 40px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.feature-preview {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.feature-card {
|
|
background: white;
|
|
border-radius: 16px;
|
|
padding: 24px;
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.feature-card:active {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.feature-icon {
|
|
font-size: 40px;
|
|
margin-bottom: 16px;
|
|
color: #6200EE;
|
|
}
|
|
|
|
.feature-title {
|
|
font-size: 18px;
|
|
font-weight: 500;
|
|
color: #212121;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.feature-desc {
|
|
font-size: 14px;
|
|
color: #757575;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.progress-section {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.progress-title {
|
|
display: block;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
color: #212121;
|
|
margin-bottom: 12px;
|
|
text-align: left;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 8px;
|
|
background: #E0E0E0;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: #6200EE;
|
|
border-radius: 4px;
|
|
transition: width 0.3s;
|
|
}
|
|
|
|
.progress-text {
|
|
display: block;
|
|
font-size: 14px;
|
|
color: #757575;
|
|
text-align: left;
|
|
}
|
|
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 16px;
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.btn {
|
|
flex: 1;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #6200EE;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:active {
|
|
background: #3700B3;
|
|
}
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
color: #6200EE;
|
|
border: 2px solid #6200EE;
|
|
}
|
|
|
|
.btn-outline:active {
|
|
background: rgba(98, 0, 238, 0.08);
|
|
}
|
|
|
|
.btn-text {
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 深色模式支持 */
|
|
@media (prefers-color-scheme: dark) {
|
|
.page-container {
|
|
background: #121212;
|
|
}
|
|
|
|
.empty-title {
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.empty-desc {
|
|
color: #B0B0B0;
|
|
}
|
|
|
|
.feature-card {
|
|
background: #1E1E1E;
|
|
}
|
|
|
|
.feature-title {
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.feature-desc {
|
|
color: #B0B0B0;
|
|
}
|
|
|
|
.progress-bar {
|
|
background: #333333;
|
|
}
|
|
|
|
.btn-outline {
|
|
border-color: #BB86FC;
|
|
color: #BB86FC;
|
|
}
|
|
|
|
.btn-outline:active {
|
|
background: rgba(187, 134, 252, 0.08);
|
|
}
|
|
}
|
|
</style> |