120 lines
4.2 KiB
Plaintext
120 lines
4.2 KiB
Plaintext
<!--pages/index/index.wxml-->
|
||
<view class="container">
|
||
<!-- 顶部欢迎区 -->
|
||
<view class="header">
|
||
<view class="welcome-section">
|
||
<!-- 已登录状态 -->
|
||
<view class="user-info" wx:if="{{userInfo && userInfo.isLogin}}">
|
||
<image class="user-avatar" src="{{userInfo.avatar}}" mode="aspectFill" />
|
||
<view class="user-content">
|
||
<view class="greeting">
|
||
<text class="greeting-text">你好!</text>
|
||
<text class="greeting-name">{{userInfo.nickname}}</text>
|
||
</view>
|
||
<view class="slogan">知芽小筑,智启未来</view>
|
||
</view>
|
||
<view class="logout-btn" bindtap="onLogout">
|
||
<text class="logout-icon">🚪</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 未登录状态 -->
|
||
<view class="login-section" wx:else>
|
||
<view class="login-card">
|
||
<view class="login-header">
|
||
<text class="header-icon">🎓</text>
|
||
<text class="header-title">知芽小筑</text>
|
||
<text class="header-subtitle">Your Smart Campus Companion</text>
|
||
</view>
|
||
|
||
<view class="login-prompt">
|
||
<text class="prompt-icon">👋</text>
|
||
<view class="prompt-content">
|
||
<text class="prompt-text">Hi,欢迎来到知芽小筑</text>
|
||
<text class="prompt-desc">登录后解锁更多精彩功能</text>
|
||
</view>
|
||
</view>
|
||
|
||
<button class="login-btn" bindtap="onLogin">
|
||
<view class="btn-content">
|
||
<text class="login-icon">🔐</text>
|
||
<view class="btn-text-group">
|
||
<text class="login-text">微信快捷登录</text>
|
||
</view>
|
||
</view>
|
||
<text class="arrow-icon">→</text>
|
||
</button>
|
||
|
||
<view class="login-features">
|
||
<view class="feature-item">
|
||
<text class="feature-icon">✨</text>
|
||
<text class="feature-text">个性化推荐</text>
|
||
</view>
|
||
<view class="feature-item">
|
||
<text class="feature-icon">🔒</text>
|
||
<text class="feature-text">数据安全</text>
|
||
</view>
|
||
<view class="feature-item">
|
||
<text class="feature-icon">⚡</text>
|
||
<text class="feature-text">快速便捷</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="login-tip">
|
||
<text class="tip-icon">ℹ️</text>
|
||
<text class="tip-text">我们承诺保护您的隐私安全</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 公告栏 -->
|
||
<view class="notice-bar">
|
||
<view class="notice-icon">📢</view>
|
||
<swiper class="notice-swiper" vertical="{{true}}" autoplay="{{true}}" circular="{{true}}" interval="3000">
|
||
<swiper-item wx:for="{{notices}}" wx:key="index">
|
||
<text class="notice-text">{{item}}</text>
|
||
</swiper-item>
|
||
</swiper>
|
||
</view>
|
||
|
||
<!-- 功能模块 -->
|
||
<view class="features-section">
|
||
<view class="section-title">
|
||
<text class="title-text">功能中心</text>
|
||
<view class="title-line"></view>
|
||
</view>
|
||
|
||
<view class="features-grid">
|
||
<view
|
||
class="feature-card"
|
||
wx:for="{{features}}"
|
||
wx:key="id"
|
||
data-path="{{item.path}}"
|
||
bindtap="onFeatureClick"
|
||
>
|
||
<view class="card-bg" style="background: linear-gradient(135deg, {{item.color}}15 0%, {{item.color}}05 100%);"></view>
|
||
|
||
<view class="feature-header">
|
||
<view class="feature-icon" style="background: linear-gradient(135deg, {{item.color}} 0%, {{item.color}}CC 100%);">
|
||
<text class="icon-text">{{item.icon}}</text>
|
||
</view>
|
||
<view class="badge" wx:if="{{item.badge}}" style="background-color: {{item.badgeColor || '#FF5252'}};">{{item.badge}}</view>
|
||
</view>
|
||
|
||
<view class="feature-info">
|
||
<view class="feature-name">{{item.name}}</view>
|
||
<view class="feature-desc">{{item.desc}}</view>
|
||
</view>
|
||
|
||
<view class="card-footer">
|
||
<text class="footer-text">立即使用</text>
|
||
<text class="footer-arrow">→</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|