This commit is contained in:
2026-02-12 20:50:01 +08:00
parent d049f682f5
commit 414d3334fd
82 changed files with 1835 additions and 422 deletions

View File

@@ -1,77 +1,142 @@
.forum-page {
min-height: 100vh;
background-color: #000;
padding-bottom: 40px;
background-color: #121212; /* Darker background for modern feel */
padding-bottom: 80px;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
/* Global Animations */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 185, 107, 0.4); }
50% { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0, 185, 107, 0.6); }
100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 185, 107, 0.4); }
}
.hero-section {
padding: 40px 20px 20px;
padding: 60px 20px 30px;
text-align: center;
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,185,107,0.1) 100%);
background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,185,107,0.15) 100%);
position: relative;
overflow: hidden;
/* Subtle pattern overlay if desired */
&::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background-image: radial-gradient(#333 1px, transparent 1px);
background-size: 20px 20px;
opacity: 0.1;
z-index: 0;
}
.title {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
position: relative;
font-size: 36px; /* Increased from 32px */
font-weight: 800;
margin-bottom: 12px;
color: #fff;
letter-spacing: -0.5px;
text-shadow: 0 2px 10px rgba(0,0,0,0.5);
z-index: 1;
.highlight {
color: #00b96b;
background: linear-gradient(45deg, #00b96b, #00ff9d);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.subtitle {
color: #888;
font-size: 14px;
margin-bottom: 20px;
position: relative;
color: #aaa;
font-size: 17px; /* Increased from 16px */
margin-bottom: 30px;
font-weight: 500;
z-index: 1;
}
.search-box {
position: relative;
display: flex;
gap: 10px;
margin-bottom: 20px;
gap: 12px;
margin-bottom: 24px;
z-index: 2;
.at-search-bar {
flex: 1;
background-color: transparent;
padding: 0;
&::after {
border-bottom: none;
}
&::after { border-bottom: none; }
.at-search-bar__input-cnt {
background-color: rgba(255, 255, 255, 0.1);
border: 1px solid #333;
border-radius: 8px;
background-color: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 26px; /* More rounded */
transition: all 0.3s ease;
height: 48px; /* Taller touch target (from 44px) */
display: flex;
align-items: center;
&:focus-within {
background-color: rgba(255, 255, 255, 0.12);
border-color: #00b96b;
box-shadow: 0 0 0 2px rgba(0, 185, 107, 0.2);
}
}
.at-search-bar__input {
color: #fff;
font-size: 17px; /* Larger input text (from 16px) */
}
.at-search-bar__placeholder {
font-size: 16px;
}
}
.create-btn {
background-color: #00b96b;
background: linear-gradient(135deg, #00b96b 0%, #009456 100%);
color: #fff;
border: none;
border-radius: 8px;
padding: 0 16px;
font-size: 14px;
border-radius: 26px;
padding: 0 24px;
font-size: 16px; /* Larger button text */
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 185, 107, 0.3);
transition: transform 0.2s;
&:active {
transform: scale(0.95);
}
}
}
}
.section-container {
margin: 0 10px 15px;
background: #141414; /* Darker card background */
border-radius: 12px;
margin: 0 16px 20px;
background: #1e1e1e; /* Card background */
border-radius: 16px;
padding: 16px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
animation: fadeInUp 0.6s ease-out forwards;
.section-header {
display: flex;
@@ -83,8 +148,9 @@
.section-title {
font-size: 16px;
font-weight: bold;
font-weight: 700;
color: #fff;
letter-spacing: 0.5px;
}
}
@@ -95,13 +161,14 @@
height: 40px;
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.05);
background: rgba(255, 255, 255, 0.03);
padding: 0 12px;
border-radius: 6px;
border-radius: 8px;
border-left: 3px solid #ff4d4f;
.item-text {
font-size: 14px;
color: #ccc;
color: #ddd;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -112,17 +179,23 @@
.star-users-scroll {
white-space: nowrap;
width: 100%;
padding-bottom: 5px; /* Scrollbar space if visible */
.star-user-card {
display: inline-flex;
flex-direction: column;
align-items: center;
margin-right: 20px;
margin-right: 16px;
width: 80px;
background: rgba(255, 255, 255, 0.05);
background: rgba(255, 255, 255, 0.03);
padding: 12px 8px;
border-radius: 8px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.05);
transition: transform 0.2s;
&:active {
transform: translateY(2px);
}
.user-avatar {
width: 48px;
@@ -130,12 +203,13 @@
border-radius: 50%;
border: 2px solid #ffd700;
margin-bottom: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.user-name {
font-size: 12px;
font-weight: bold;
color: #fff;
font-weight: 600;
color: #eee;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
@@ -146,14 +220,19 @@
.user-title {
font-size: 10px;
color: #888;
background: rgba(255, 215, 0, 0.1);
color: #ffd700;
padding: 2px 6px;
border-radius: 4px;
}
}
}
}
.tabs-wrapper {
background-color: #000;
background-color: transparent; /* Changed from black */
margin-bottom: 10px;
padding: 0 10px;
/* Override Taro UI default white background */
.at-tabs {
@@ -163,94 +242,124 @@
.at-tabs__header {
background-color: transparent;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: none; /* Removed border */
text-align: left;
}
.at-tabs__item {
color: #888;
font-size: 14px;
padding: 12px 24px;
font-size: 17px; /* Increased from 16px */
padding: 14px 20px; /* Larger touch target */
transition: all 0.3s;
&--active {
color: #00b96b;
font-weight: bold;
font-size: 16px;
color: #fff; /* White active text */
font-weight: 700;
font-size: 20px; /* Increased from 19px */
text-shadow: 0 0 10px rgba(0, 185, 107, 0.4);
}
}
.at-tabs__item-underline {
background-color: #00b96b;
bottom: 0;
height: 4px; /* Slightly thicker */
border-radius: 2px;
bottom: 5px;
width: 28px !important; /* Short underline style */
margin-left: calc(50% - 14px); /* Center specific width underline */
}
}
.topic-list {
padding: 10px;
padding: 10px 16px;
.topic-card {
background: rgba(20,20,20,0.6);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 8px;
padding: 16px;
margin-bottom: 12px;
background: #1e1e1e;
border: 1px solid rgba(255,255,255,0.05);
border-radius: 16px;
padding: 24px; /* Increased from 20px */
margin-bottom: 24px; /* Increased spacing */
position: relative;
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
transition: transform 0.2s, box-shadow 0.2s;
animation: fadeInUp 0.5s ease-out backwards; /* Apply animation */
&:active {
transform: scale(0.98);
background: #252525;
}
&.pinned {
border-color: rgba(0, 185, 107, 0.4);
box-shadow: 0 0 10px rgba(0, 185, 107, 0.1);
border-color: rgba(0, 185, 107, 0.3);
background: linear-gradient(180deg, rgba(0, 185, 107, 0.05) 0%, #1e1e1e 100%);
box-shadow: 0 8px 20px rgba(0, 185, 107, 0.1);
}
/* Animation delay for staggered effect - simplistic approach (nth-child logic is better in CSS-in-JS or fixed list) */
&:nth-child(1) { animation-delay: 0.1s; }
&:nth-child(2) { animation-delay: 0.2s; }
&:nth-child(3) { animation-delay: 0.3s; }
&:nth-child(4) { animation-delay: 0.4s; }
&:nth-child(5) { animation-delay: 0.5s; }
.card-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 8px;
gap: 10px;
margin-bottom: 14px;
.tag {
font-size: 10px;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid #444;
font-size: 12px; /* Slightly larger */
padding: 4px 10px;
border-radius: 6px;
font-weight: 600;
background: rgba(255,255,255,0.1);
color: #aaa;
&.pinned-tag {
border-color: #ff4d4f;
background: rgba(255, 77, 79, 0.15);
color: #ff4d4f;
border: 1px solid rgba(255, 77, 79, 0.3);
}
&.verified-tag {
border-color: #00b96b;
background: rgba(0, 185, 107, 0.15);
color: #00b96b;
border: 1px solid rgba(0, 185, 107, 0.3);
}
}
.card-title {
font-size: 16px;
font-weight: bold;
font-size: 22px; /* Increased from 19px */
font-weight: 700;
color: #fff;
flex: 1;
line-height: 1.4;
}
}
.card-content {
font-size: 14px;
color: #aaa;
margin-bottom: 12px;
font-size: 17px; /* Increased from 15px */
color: #ccc; /* Slightly brighter for better contrast */
margin-bottom: 20px;
line-height: 1.7;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
-webkit-line-clamp: 3; /* Show 3 lines */
overflow: hidden;
}
.card-image {
margin-bottom: 12px;
margin-bottom: 20px;
border-radius: 12px;
overflow: hidden;
image {
width: 100%;
max-height: 150px;
border-radius: 8px;
max-height: 220px; /* Taller image preview */
object-fit: cover;
display: block; /* Remove inline spacing */
}
}
@@ -258,36 +367,47 @@
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: #666;
font-size: 14px; /* Increased from 13px */
color: #888;
padding-top: 16px;
border-top: 1px solid rgba(255,255,255,0.05);
.author-info {
display: flex;
align-items: center;
gap: 6px;
gap: 10px;
.avatar {
width: 20px;
height: 20px;
width: 40px; /* Larger avatar */
height: 40px;
border-radius: 50%;
border: 1px solid rgba(255,255,255,0.1);
}
.nickname {
color: #ccc;
font-weight: 500;
&.star {
color: #ffd700;
font-weight: bold;
font-weight: 700;
}
}
}
.stats {
display: flex;
gap: 12px;
gap: 20px;
.stat-item {
display: flex;
align-items: center;
gap: 4px;
gap: 6px;
.at-icon {
font-size: 18px;
margin-right: 0;
}
}
}
}
@@ -296,26 +416,42 @@
.empty-state {
text-align: center;
padding: 40px;
padding: 60px 20px;
color: #666;
font-size: 14px;
&::before {
content: '📭'; /* Simple icon */
display: block;
font-size: 40px;
margin-bottom: 10px;
opacity: 0.5;
}
}
.fab {
position: fixed;
right: 20px;
bottom: 40px;
width: 50px;
height: 50px;
background-color: #00b96b;
right: 24px;
bottom: 50px;
width: 56px;
height: 56px;
background: linear-gradient(135deg, #00b96b 0%, #009456 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 185, 107, 0.4);
box-shadow: 0 4px 20px rgba(0, 185, 107, 0.5);
z-index: 100;
animation: pulse 3s infinite;
transition: transform 0.2s;
&:active {
transform: scale(0.9);
animation: none;
}
.at-icon {
font-size: 24px;
font-size: 28px;
color: #fff;
}
}

View File

@@ -181,12 +181,12 @@ const ForumList = () => {
placeholder='搜索感兴趣的话题...'
/>
<View className='create-btn' onClick={navigateToCreate}>
<AtIcon value='add' size='16' color='#fff' />
<Text style={{marginLeft: '4px'}}></Text>
<AtIcon value='add' size='20' color='#fff' />
<Text style={{marginLeft: '6px'}}></Text>
</View>
<View className='create-btn' onClick={navigateToActivity} style={{marginLeft: '10px', background: 'rgba(255,255,255,0.2)'}}>
<AtIcon value='calendar' size='16' color='#fff' />
<Text style={{marginLeft: '4px'}}></Text>
<View className='create-btn' onClick={navigateToActivity} style={{marginLeft: '10px', background: 'linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%)', backdropFilter: 'blur(5px)'}}>
<AtIcon value='calendar' size='20' color='#fff' />
<Text style={{marginLeft: '6px'}}></Text>
</View>
</View>
</View>
@@ -273,13 +273,17 @@ const ForumList = () => {
<Text className={`nickname ${item.author_info?.is_star ? 'star' : ''}`}>
{item.author_info?.nickname || '匿名'}
</Text>
<Text style={{color: '#555', fontSize: '10px'}}></Text>
<Text style={{color: '#666', fontSize: '11px'}}>{new Date(item.created_at).toLocaleDateString()}</Text>
</View>
<View className='stats'>
<View className='stat-item'>
<Text>👁 {item.view_count || 0}</Text>
<AtIcon value='eye' size='14' color='#777' />
<Text>{item.view_count || 0}</Text>
</View>
<View className='stat-item'>
<Text>💬 {item.replies?.length || 0}</Text>
<AtIcon value='message' size='14' color='#777' />
<Text>{item.replies?.length || 0}</Text>
</View>
</View>
</View>

View File

@@ -115,6 +115,188 @@
50% { transform: translateY(-10px); }
}
// News Ticker Styles
.news-section {
padding: 0 32px 40px;
position: relative;
z-index: 10;
.news-inner {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.1);
height: 80px;
display: flex;
align-items: center;
padding: 0 20px;
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.news-icon-box {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
.news-icon {
font-size: 32px;
animation: pulse-icon 2s infinite;
}
}
.news-swiper {
flex: 1;
height: 100%;
}
.news-item {
height: 100%;
display: flex;
align-items: center;
width: 100%;
}
.news-tag {
font-size: 20px;
font-weight: 800;
color: #000;
background: var(--primary-cyan);
padding: 4px 12px;
border-radius: 8px;
margin-right: 16px;
flex-shrink: 0;
}
.news-title {
font-size: 26px;
color: #fff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
}
@keyframes pulse-icon {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.8; }
100% { transform: scale(1); opacity: 1; }
}
// Activity Banner Styles
.activity-section {
padding-bottom: 60px;
.section-header {
padding: 0 32px;
margin-bottom: 30px;
display: flex;
justify-content: space-between;
align-items: flex-end;
.section-title {
font-size: 36px;
font-weight: 800;
color: #fff;
text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.more-btn {
display: flex;
align-items: center;
font-size: 24px;
color: var(--text-secondary);
.arrow {
margin-left: 8px;
transition: transform 0.3s;
}
&:active .arrow {
transform: translateX(5px);
}
}
}
.activity-swiper {
height: 360px;
}
.activity-swiper-item {
padding: 0 12px;
box-sizing: border-box;
}
.activity-card {
width: 100%;
height: 100%;
border-radius: 24px;
overflow: hidden;
position: relative;
background: #111;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
border: 1px solid rgba(255,255,255,0.1);
.activity-img {
width: 100%;
height: 100%;
object-fit: cover;
}
.activity-overlay {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 24px;
box-sizing: border-box;
}
.activity-info {
transform: translateY(0);
transition: transform 0.3s;
}
.activity-status {
display: inline-block;
font-size: 20px;
color: #fff;
background: var(--primary-purple);
padding: 4px 12px;
border-radius: 8px;
margin-bottom: 12px;
align-self: flex-start;
box-shadow: 0 0 10px rgba(189, 0, 255, 0.4);
}
.activity-title {
font-size: 32px;
font-weight: 700;
color: #fff;
margin-bottom: 8px;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.activity-time {
font-size: 24px;
color: rgba(255,255,255,0.7);
}
}
}
.product-grid {
padding: 0 32px;
display: flex;

View File

@@ -1,19 +1,21 @@
import { View, Text, Image, ScrollView, Button } from '@tarojs/components'
import { View, Text, Image, ScrollView, Button, Swiper, SwiperItem } from '@tarojs/components'
import Taro, { useLoad } from '@tarojs/taro'
import { useState, useEffect } from 'react'
import { getConfigs } from '../../api'
import { getConfigs, getAnnouncements, getActivities } from '../../api'
import ParticleBackground from '../../components/ParticleBackground'
import './index.scss'
export default function Index() {
const [products, setProducts] = useState<any[]>([])
const [announcements, setAnnouncements] = useState<any[]>([])
const [activities, setActivities] = useState<any[]>([])
const [typedText, setTypedText] = useState('')
const [loading, setLoading] = useState(true)
const [error, setError] = useState('')
const fullText = "未来已来 AI 核心驱动"
useLoad(() => {
fetchProducts()
fetchData()
})
useEffect(() => {
@@ -26,13 +28,48 @@ export default function Index() {
return () => clearInterval(interval)
}, [])
const fetchProducts = async () => {
const fetchData = async () => {
setLoading(true)
setError('')
try {
const res: any = await getConfigs()
const list = Array.isArray(res) ? res : (res.results || res.data || [])
setProducts(list)
// Parallel fetch for better performance
const [productsRes, announcementsRes, activitiesRes] = await Promise.all([
getConfigs().catch(() => ({ results: [] })),
getAnnouncements().catch(() => ({ results: [] })),
getActivities().catch(() => ({ results: [] }))
])
const productList = Array.isArray(productsRes) ? productsRes : (productsRes?.results || productsRes?.data || [])
setProducts(productList)
const announcementList = Array.isArray(announcementsRes) ? announcementsRes : (announcementsRes?.results || announcementsRes?.data || [])
// Mock data for demo if empty
if (announcementList.length === 0) {
announcementList.push(
{ id: 101, title: 'Quant Speed AI 开发者大会即将开启报名' },
{ id: 102, title: '新品发布AI小智 V2 性能提升300%' },
{ id: 103, title: '社区活动:分享你的边缘计算项目赢大奖' }
)
}
setAnnouncements(announcementList)
const activityList = Array.isArray(activitiesRes) ? activitiesRes : (activitiesRes?.results || activitiesRes?.data || [])
// Mock data for demo if empty
if (activityList.length === 0) {
activityList.push({
id: 201,
title: '2025 AI 硬件黑客马拉松',
start_time: '2025-05-20T10:00:00',
cover_image: 'https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop'
}, {
id: 202,
title: '边缘计算实战训练营',
start_time: '2025-06-15T09:00:00',
cover_image: 'https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=2070&auto=format&fit=crop'
})
}
setActivities(activityList)
} catch (err: any) {
console.error(err)
setError(err.errMsg || '加载失败,请检查网络')
@@ -45,6 +82,19 @@ export default function Index() {
Taro.navigateTo({ url: `/pages/goods/detail?id=${id}` })
}
const goToAnnouncement = (id: number) => {
// Assuming generic topic detail or specific announcement page
Taro.navigateTo({ url: `/subpackages/forum/detail/detail?id=${id}` })
}
const goToActivity = (id: number) => {
Taro.navigateTo({ url: `/subpackages/forum/activity/detail?id=${id}` })
}
const goToActivityList = () => {
Taro.navigateTo({ url: `/subpackages/forum/activity/index` })
}
return (
<View className='page-container'>
<ParticleBackground />
@@ -64,6 +114,75 @@ export default function Index() {
<Text className='subtitle'> AI </Text>
</View>
{/* News Ticker */}
{!loading && announcements.length > 0 && (
<View className='news-section fade-in-up'>
<View className='news-inner'>
<View className='news-icon-box'>
<Text className='news-icon'></Text>
</View>
<Swiper
className='news-swiper'
vertical
circular
autoplay
interval={4000}
duration={600}
>
{announcements.map(item => (
<SwiperItem key={item.id} onClick={() => goToAnnouncement(item.id)}>
<View className='news-item'>
<Text className='news-tag'>NEWS</Text>
<Text className='news-title'>{item.title}</Text>
</View>
</SwiperItem>
))}
</Swiper>
</View>
</View>
)}
{/* Activity Banner */}
{!loading && activities.length > 0 && (
<View className='activity-section fade-in-up' style={{ animationDelay: '0.1s' }}>
<View className='section-header'>
<Text className='section-title'> / EVENTS</Text>
<View className='more-btn' onClick={goToActivityList}>
<Text>MORE</Text>
<Text className='arrow'></Text>
</View>
</View>
<Swiper
className='activity-swiper'
circular
autoplay
interval={5000}
duration={600}
previousMargin='30px'
nextMargin='30px'
>
{activities.map(item => (
<SwiperItem key={item.id} className='activity-swiper-item' onClick={() => goToActivity(item.id)}>
<View className='activity-card'>
<Image
src={item.display_banner_url || item.banner_url || item.cover_image || 'https://via.placeholder.com/600x300'}
mode='aspectFill'
className='activity-img'
/>
<View className='activity-overlay'>
<View className='activity-info'>
<Text className='activity-status'></Text>
<Text className='activity-title'>{item.title}</Text>
<Text className='activity-time'>{item.start_time ? item.start_time.split('T')[0] : 'TBD'}</Text>
</View>
</View>
</View>
</SwiperItem>
))}
</Swiper>
</View>
)}
{loading ? (
<View className='skeleton-wrapper'>
{[1, 2, 3].map(i => (
@@ -73,7 +192,7 @@ export default function Index() {
) : error ? (
<View className='status-box'>
<Text className='error-text'>{error}</Text>
<Button className='btn-retry' onClick={fetchProducts}></Button>
<Button className='btn-retry' onClick={fetchData}></Button>
</View>
) : (
<View className='product-grid'>
@@ -81,7 +200,7 @@ export default function Index() {
<View
key={item.id}
className='card fade-in-up'
style={{ animationDelay: `${index * 0.1}s` }}
style={{ animationDelay: `${0.2 + index * 0.1}s` }}
onClick={() => goToDetail(item.id)}
>
<View className='card-cover'>

View File

@@ -28,26 +28,87 @@
line-height: 1.5;
}
.nav-btn-wrapper {
margin-top: 30px;
.vc-promo-container {
margin-top: 40px;
display: flex;
justify-content: center;
align-items: center;
gap: 30px;
flex-wrap: wrap;
.vc-info-card {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 20px;
padding: 20px 30px;
display: flex;
align-items: center;
max-width: 400px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
transform: translateX(-100%);
transition: 0.5s;
}
&:active {
transform: scale(0.98);
&::before {
transform: translateX(100%);
}
}
.info-icon {
font-size: 40px;
margin-right: 20px;
filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.3));
}
.info-content {
text-align: left;
.info-title {
color: #fff;
font-size: 30px;
font-weight: bold;
display: block;
margin-bottom: 8px;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.info-desc {
color: #ccc;
font-size: 24px;
line-height: 1.4;
}
}
}
.nav-btn {
background: linear-gradient(90deg, #00b96b, #00f0ff);
color: #000;
font-weight: bold;
font-size: 28px;
padding: 0 40px;
height: 80px;
line-height: 80px;
border-radius: 40px;
padding: 0 50px;
height: 90px;
line-height: 90px;
border-radius: 45px;
border: none;
box-shadow: 0 0 20px rgba(0, 185, 107, 0.4);
display: flex;
align-items: center;
gap: 10px;
transition: all 0.3s ease;
margin: 0;
&:active {
transform: scale(0.95);

View File

@@ -37,12 +37,20 @@ export default function ServicesIndex() {
<Text className='title'>AI <Text className='highlight'></Text></Text>
<Text className='subtitle'> AI </Text>
<View className='nav-btn-wrapper'>
<View className='vc-promo-container'>
<View className='vc-info-card' onClick={() => Taro.navigateTo({ url: '/pages/courses/index' })}>
<View className='info-icon'>💡</View>
<View className='info-content'>
<Text className='info-title'>AI + VC </Text>
<Text className='info-desc'> AI </Text>
</View>
</View>
<Button
className='nav-btn'
onClick={() => Taro.navigateTo({ url: '/pages/courses/index' })}
>
VB
VC
<Text className='arrow'></Text>
</Button>
</View>

View File

@@ -19,6 +19,8 @@ export default function UserIndex() {
const goInvite = () => Taro.navigateTo({ url: '/subpackages/distributor/invite' })
const goWithdraw = () => Taro.navigateTo({ url: '/subpackages/distributor/withdraw' })
const goActivityList = (tab = 'all') => Taro.navigateTo({ url: `/subpackages/forum/activity/index?tab=${tab}` })
const handleAddress = async () => {
try {
const res = await Taro.chooseAddress()
@@ -240,8 +242,8 @@ export default function UserIndex() {
title: '基础服务',
items: [
{ title: '我的订单', icon: '📦', action: goOrders },
{ title: '地址管理', icon: '📍', action: handleAddress },
{ title: '新增地址', icon: '📝', action: handleAddress },
{ title: '地址管理', icon: '📝', action: handleAddress },
{ title: '活动管理', icon: '⌚️', action: () => goActivityList('mine') },
]
},
{