删除不需要的文件及提交移动端的代码
This commit is contained in:
1 parent
86f65df783
commit
134f711349
751 files changed
+3888
-115501
No files matched your search
+92
-6
@@ -38,9 +38,19 @@
|
||||
<text class="section-title">操作图标</text>
|
||||
<view class="icon-grid">
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-login"></text>
|
||||
<text class="icon-name">登录</text>
|
||||
<text class="icon-code">icon-login</text>
|
||||
<text class="iconfont icon-add"></text>
|
||||
<text class="icon-name">添加</text>
|
||||
<text class="icon-code">icon-add</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-edit"></text>
|
||||
<text class="icon-name">编辑</text>
|
||||
<text class="icon-code">icon-edit</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-delete"></text>
|
||||
<text class="icon-name">删除</text>
|
||||
<text class="icon-code">icon-delete</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-search"></text>
|
||||
@@ -48,9 +58,9 @@
|
||||
<text class="icon-code">icon-search</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-add"></text>
|
||||
<text class="icon-name">添加</text>
|
||||
<text class="icon-code">icon-add</text>
|
||||
<text class="iconfont icon-refresh"></text>
|
||||
<text class="icon-name">刷新</text>
|
||||
<text class="icon-code">icon-refresh</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-close"></text>
|
||||
@@ -60,6 +70,82 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 文件图标 -->
|
||||
<view class="icon-section">
|
||||
<text class="section-title">文件图标</text>
|
||||
<view class="icon-grid">
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-download"></text>
|
||||
<text class="icon-name">下载</text>
|
||||
<text class="icon-code">icon-download</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-upload"></text>
|
||||
<text class="icon-name">上传</text>
|
||||
<text class="icon-code">icon-upload</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 状态图标 -->
|
||||
<view class="icon-section">
|
||||
<text class="section-title">状态图标</text>
|
||||
<view class="icon-grid">
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-success" style="color: #52c41a"></text>
|
||||
<text class="icon-name">成功</text>
|
||||
<text class="icon-code">icon-success</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-warning" style="color: #faad14"></text>
|
||||
<text class="icon-name">警告</text>
|
||||
<text class="icon-code">icon-warning</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-info" style="color: #1890ff"></text>
|
||||
<text class="icon-name">信息</text>
|
||||
<text class="icon-code">icon-info</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-check" style="color: #52c41a"></text>
|
||||
<text class="icon-name">确认</text>
|
||||
<text class="icon-code">icon-check</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 社交图标 -->
|
||||
<view class="icon-section">
|
||||
<text class="section-title">社交图标</text>
|
||||
<view class="icon-grid">
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-star" style="color: #faad14"></text>
|
||||
<text class="icon-name">星星</text>
|
||||
<text class="icon-code">icon-star</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-heart" style="color: #ff4d4f"></text>
|
||||
<text class="icon-name">喜欢</text>
|
||||
<text class="icon-code">icon-heart</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-message"></text>
|
||||
<text class="icon-name">消息</text>
|
||||
<text class="icon-code">icon-message</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-phone"></text>
|
||||
<text class="icon-name">电话</text>
|
||||
<text class="icon-code">icon-phone</text>
|
||||
</view>
|
||||
<view class="icon-item">
|
||||
<text class="iconfont icon-mail"></text>
|
||||
<text class="icon-name">邮件</text>
|
||||
<text class="icon-code">icon-mail</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 导航图标 -->
|
||||
<view class="icon-section">
|
||||
<text class="section-title">导航图标</text>
|
||||
File renamed without changes.
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<view class="test-page">
|
||||
<view class="test-header">
|
||||
<text class="test-title">uview-plus 图标问题分析与解决</text>
|
||||
</view>
|
||||
|
||||
<!-- 问题演示 -->
|
||||
<view class="test-section">
|
||||
<text class="section-title">❌ 问题演示 - uview-plus图标异常</text>
|
||||
<view class="test-items">
|
||||
<view class="test-item">
|
||||
<u-icon name="logout" size="24" color="#ff4d4f"></u-icon>
|
||||
<text class="test-desc">logout图标 (可能显示文字)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<u-icon name="power" size="24" color="#ff4d4f"></u-icon>
|
||||
<text class="test-desc">power图标 (可能显示文字)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<u-icon name="exit" size="24" color="#ff4d4f"></u-icon>
|
||||
<text class="test-desc">exit图标 (可能显示文字)</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 正常工作的uview图标 -->
|
||||
<view class="test-section">
|
||||
<text class="section-title">✅ 正常工作 - uview-plus图标</text>
|
||||
<view class="test-items">
|
||||
<view class="test-item">
|
||||
<u-icon name="account" size="24" color="#52c41a"></u-icon>
|
||||
<text class="test-desc">account图标 (正常)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<u-icon name="home" size="24" color="#52c41a"></u-icon>
|
||||
<text class="test-desc">home图标 (正常)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<u-icon name="setting" size="24" color="#52c41a"></u-icon>
|
||||
<text class="test-desc">setting图标 (正常)</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 解决方案 - 使用iconfont -->
|
||||
<view class="test-section">
|
||||
<text class="section-title">🎯 解决方案 - 使用iconfont自定义图标</text>
|
||||
<view class="test-items">
|
||||
<view class="test-item">
|
||||
<text class="iconfont icon-close solution-icon"></text>
|
||||
<text class="test-desc">关闭图标 (退出登录)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<text class="iconfont icon-user solution-icon"></text>
|
||||
<text class="test-desc">用户图标</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<text class="iconfont icon-setting solution-icon"></text>
|
||||
<text class="test-desc">设置图标</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Unicode字符方案 -->
|
||||
<view class="test-section">
|
||||
<text class="section-title">🔤 备选方案 - Unicode字符</text>
|
||||
<view class="test-items">
|
||||
<view class="test-item">
|
||||
<text class="unicode-icon">⏻</text>
|
||||
<text class="test-desc">电源符号 (退出登录)</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<text class="unicode-icon">❌</text>
|
||||
<text class="test-desc">关闭符号</text>
|
||||
</view>
|
||||
<view class="test-item">
|
||||
<text class="unicode-icon">⚙️</text>
|
||||
<text class="test-desc">设置符号</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 解决方案说明 -->
|
||||
<view class="solution-section">
|
||||
<text class="section-title">💡 解决方案说明</text>
|
||||
<view class="solution-content">
|
||||
<text class="solution-text">
|
||||
1. **根本原因**: uview-plus某些图标名称在当前版本字体文件中不存在
|
||||
</text>
|
||||
<text class="solution-text">
|
||||
2. **推荐方案**: 使用项目中的iconfont自定义图标系统
|
||||
</text>
|
||||
<text class="solution-text">
|
||||
3. **备选方案**: 使用Unicode字符(⏻ ❌ ⚙️),兼容性最好
|
||||
</text>
|
||||
<text class="solution-text">
|
||||
4. **长期方案**: 更新uview-plus字体文件或使用其他图标库
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UviewIconTest',
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-page {
|
||||
min-height: 100vh;
|
||||
background: #f8f9fa;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.test-header {
|
||||
text-align: center;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.test-title {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.test-section {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.test-items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.test-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
background: #fafbfc;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
.test-desc {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.solution-icon {
|
||||
font-size: 24px;
|
||||
color: #1890ff;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.unicode-icon {
|
||||
font-size: 24px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.solution-section {
|
||||
background: #fff7e6;
|
||||
border: 1px solid #ffd591;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.solution-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.solution-text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
+636
-1137
File diff suppressed because it is too large.
Load diff
@@ -19,7 +19,7 @@
|
||||
v-model="username"
|
||||
placeholder="账号"
|
||||
type="text"
|
||||
:border="true"
|
||||
border="true"
|
||||
:custom-style="inputStyle"
|
||||
placeholder-style="color: #999; font-size: 16px"
|
||||
>
|
||||
@@ -34,7 +34,7 @@
|
||||
v-model="password"
|
||||
placeholder="密码"
|
||||
type="password"
|
||||
:border="true"
|
||||
border="true"
|
||||
:custom-style="inputStyle"
|
||||
placeholder-style="color: #999; font-size: 16px"
|
||||
@confirm="onPasswordConfirm"
|
||||
@@ -187,7 +187,7 @@ export default {
|
||||
|
||||
// 调用登录API
|
||||
const loginResult = await api.login(loginData);
|
||||
|
||||
console.log('登录结果:', loginResult);
|
||||
if (loginResult.code === 200) {
|
||||
// 登录成功,先保存Token
|
||||
console.log('✅ 登录成功,先保存Token');
|
||||
|
||||
@@ -1,674 +0,0 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 自定义导航栏 -->
|
||||
<NavBar title="我的" :show-settings="true" @settings="handleSettings" />
|
||||
|
||||
<!-- 主要内容区域 -->
|
||||
<scroll-view class="main-content" scroll-y enhanced :show-scrollbar="false">
|
||||
<!-- 用户信息卡片 -->
|
||||
<view class="profile-card">
|
||||
<view class="profile-info">
|
||||
<view class="profile-avatar">
|
||||
<text class="avatar-icon">👤</text>
|
||||
</view>
|
||||
<view class="profile-details">
|
||||
<text class="user-name">{{ userInfo.name }}</text>
|
||||
<text class="user-major">{{ userInfo.major }} · {{ userInfo.grade }}</text>
|
||||
<text class="user-id">学号:{{ userInfo.studentId }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="profile-stats">
|
||||
<view class="stat-item">
|
||||
<text class="stat-number">{{ userInfo.gpa }}</text>
|
||||
<text class="stat-label">GPA</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-number">{{ userInfo.credits }}</text>
|
||||
<text class="stat-label">学分</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-number">{{ userInfo.grade }}</text>
|
||||
<text class="stat-label">年级</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-number">{{ userInfo.ranking }}</text>
|
||||
<text class="stat-label">排名</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 学习状态 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">📊</text>
|
||||
<text class="card-title">学习状态</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="2" gap="12px">
|
||||
<StatCard
|
||||
v-for="stat in learningStats"
|
||||
:key="stat.label"
|
||||
:number="stat.number"
|
||||
:label="stat.label"
|
||||
@click="handleStatClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 我的服务 -->
|
||||
<view class="menu-section">
|
||||
<view
|
||||
v-for="menu in myServiceMenus"
|
||||
:key="menu.title"
|
||||
class="menu-item touchable"
|
||||
@click="handleMenuClick(menu)"
|
||||
>
|
||||
<view class="menu-icon">
|
||||
<text class="icon">{{ menu.icon }}</text>
|
||||
</view>
|
||||
<view class="menu-content">
|
||||
<text class="menu-title">{{ menu.title }}</text>
|
||||
<text class="menu-desc">{{ menu.description }}</text>
|
||||
</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section-divider"></view>
|
||||
|
||||
<!-- 校园生活 -->
|
||||
<view class="menu-section">
|
||||
<view
|
||||
v-for="menu in campusLifeMenus"
|
||||
:key="menu.title"
|
||||
class="menu-item touchable"
|
||||
@click="handleMenuClick(menu)"
|
||||
>
|
||||
<view class="menu-icon">
|
||||
<text class="icon">{{ menu.icon }}</text>
|
||||
</view>
|
||||
<view class="menu-content">
|
||||
<text class="menu-title">{{ menu.title }}</text>
|
||||
<text class="menu-desc">{{ menu.description }}</text>
|
||||
</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section-divider"></view>
|
||||
|
||||
<!-- 应用设置 -->
|
||||
<view class="menu-section">
|
||||
<view
|
||||
v-for="menu in settingsMenus"
|
||||
:key="menu.title"
|
||||
class="menu-item touchable"
|
||||
@click="handleMenuClick(menu)"
|
||||
>
|
||||
<view class="menu-icon">
|
||||
<text class="icon">{{ menu.icon }}</text>
|
||||
</view>
|
||||
<view class="menu-content">
|
||||
<text class="menu-title">{{ menu.title }}</text>
|
||||
<text class="menu-desc">{{ menu.description }}</text>
|
||||
</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section-divider"></view>
|
||||
|
||||
<!-- 帮助与反馈 -->
|
||||
<view class="menu-section">
|
||||
<view
|
||||
v-for="menu in helpMenus"
|
||||
:key="menu.title"
|
||||
class="menu-item touchable"
|
||||
@click="handleMenuClick(menu)"
|
||||
>
|
||||
<view class="menu-icon">
|
||||
<text class="icon">{{ menu.icon }}</text>
|
||||
</view>
|
||||
<view class="menu-content">
|
||||
<text class="menu-title">{{ menu.title }}</text>
|
||||
<text class="menu-desc">{{ menu.description }}</text>
|
||||
</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<view class="footer-section">
|
||||
<text class="app-version">智慧校园 v2.1.0</text>
|
||||
<text class="copyright">© 2024 University. All rights reserved.</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部间距 -->
|
||||
<view class="bottom-spacer"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue';
|
||||
import Card from '@/components/Card.vue';
|
||||
import StatCard from '@/components/StatCard.vue';
|
||||
import GridLayout from '@/components/GridLayout.vue';
|
||||
import { userStorage } from '@/utils/request';
|
||||
import { userManager, userState } from '@/utils/user';
|
||||
import { checkPageAccess } from '@/utils/route-guard';
|
||||
|
||||
export default {
|
||||
name: 'ProfilePage',
|
||||
components: {
|
||||
NavBar,
|
||||
Card,
|
||||
StatCard,
|
||||
GridLayout,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
name: '用户',
|
||||
major: '未设置',
|
||||
grade: '未设置',
|
||||
studentId: '未设置',
|
||||
gpa: 0,
|
||||
credits: 0,
|
||||
ranking: 0,
|
||||
},
|
||||
learningStats: [
|
||||
{ number: 5, label: '本周课程' },
|
||||
{ number: 3, label: '待提交作业' },
|
||||
{ number: 2, label: '即将考试' },
|
||||
{ number: 8, label: '借阅图书' },
|
||||
],
|
||||
myServiceMenus: [
|
||||
{
|
||||
title: '我的课表',
|
||||
description: '查看本学期课程安排',
|
||||
icon: '🎓',
|
||||
action: 'schedule',
|
||||
},
|
||||
{
|
||||
title: '成绩单',
|
||||
description: '查看历史成绩记录',
|
||||
icon: '📊',
|
||||
action: 'grades',
|
||||
},
|
||||
{
|
||||
title: '我的待办',
|
||||
description: '管理学习任务和事项',
|
||||
icon: '✅',
|
||||
action: 'todos',
|
||||
},
|
||||
{
|
||||
title: '校园卡',
|
||||
description: '余额:¥128.50',
|
||||
icon: '💳',
|
||||
action: 'card',
|
||||
},
|
||||
],
|
||||
campusLifeMenus: [
|
||||
{
|
||||
title: '图书借阅',
|
||||
description: '当前借阅8本,2本即将到期',
|
||||
icon: '📚',
|
||||
action: 'library',
|
||||
},
|
||||
{
|
||||
title: '宿舍信息',
|
||||
description: '1号楼 308室',
|
||||
icon: '🛏️',
|
||||
action: 'dormitory',
|
||||
},
|
||||
{
|
||||
title: '社团活动',
|
||||
description: '计算机协会、摄影社',
|
||||
icon: '👥',
|
||||
action: 'clubs',
|
||||
},
|
||||
{
|
||||
title: '活动报名',
|
||||
description: '查看可参与的活动',
|
||||
icon: '📅',
|
||||
action: 'events',
|
||||
},
|
||||
],
|
||||
settingsMenus: [
|
||||
{
|
||||
title: '个人信息',
|
||||
description: '编辑个人资料',
|
||||
icon: '👤',
|
||||
action: 'profile',
|
||||
},
|
||||
{
|
||||
title: '消息通知',
|
||||
description: '管理通知设置',
|
||||
icon: '🔔',
|
||||
action: 'notifications',
|
||||
},
|
||||
{
|
||||
title: '账号安全',
|
||||
description: '密码、绑定手机等',
|
||||
icon: '🛡️',
|
||||
action: 'security',
|
||||
},
|
||||
{
|
||||
title: '主题设置',
|
||||
description: '切换应用主题',
|
||||
icon: '🎨',
|
||||
action: 'theme',
|
||||
},
|
||||
],
|
||||
helpMenus: [
|
||||
{
|
||||
title: '帮助中心',
|
||||
description: '常见问题解答',
|
||||
icon: '❓',
|
||||
action: 'help',
|
||||
},
|
||||
{
|
||||
title: '意见反馈',
|
||||
description: '提交建议和问题',
|
||||
icon: '💬',
|
||||
action: 'feedback',
|
||||
},
|
||||
{
|
||||
title: '关于应用',
|
||||
description: '版本 v2.1.0',
|
||||
icon: 'ℹ️',
|
||||
action: 'about',
|
||||
},
|
||||
{
|
||||
title: '退出登录',
|
||||
description: '安全退出当前账号',
|
||||
icon: '🚪',
|
||||
action: 'logout',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 检查登录状态
|
||||
checkLoginStatus() {
|
||||
return userState.autoLoginCheck();
|
||||
},
|
||||
|
||||
// 加载用户信息
|
||||
loadUserInfo() {
|
||||
const displayUser = userManager.formatUserForDisplay();
|
||||
if (displayUser) {
|
||||
this.userInfo.name = displayUser.name;
|
||||
this.userInfo.avatar = displayUser.avatar;
|
||||
this.userInfo.department = displayUser.department;
|
||||
this.userInfo.phone = displayUser.phone;
|
||||
this.userInfo.email = displayUser.email;
|
||||
this.userInfo.studentId = userManager.getCurrentUser()?.userId || '未设置';
|
||||
}
|
||||
},
|
||||
|
||||
handleSettings() {
|
||||
uni.showToast({ title: '设置', icon: 'none' });
|
||||
},
|
||||
handleStatClick(stat) {
|
||||
uni.showToast({ title: `查看${stat.label}详情`, icon: 'none' });
|
||||
},
|
||||
handleMenuClick(menu) {
|
||||
uni.vibrateShort();
|
||||
|
||||
switch (menu.action) {
|
||||
case 'schedule':
|
||||
this.openSchedule();
|
||||
break;
|
||||
case 'grades':
|
||||
this.openGrades();
|
||||
break;
|
||||
case 'todos':
|
||||
this.openTodos();
|
||||
break;
|
||||
case 'card':
|
||||
this.openCampusCard();
|
||||
break;
|
||||
case 'library':
|
||||
this.openLibrary();
|
||||
break;
|
||||
case 'logout':
|
||||
this.handleLogout();
|
||||
break;
|
||||
default:
|
||||
uni.showToast({
|
||||
title: `${menu.title}功能开发中`,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
},
|
||||
openSchedule() {
|
||||
uni.showToast({ title: '打开课程表', icon: 'success' });
|
||||
},
|
||||
openGrades() {
|
||||
uni.showToast({ title: '打开成绩单', icon: 'success' });
|
||||
},
|
||||
openTodos() {
|
||||
uni.showToast({ title: '打开待办事项', icon: 'success' });
|
||||
},
|
||||
openCampusCard() {
|
||||
uni.showToast({ title: '打开校园卡', icon: 'success' });
|
||||
},
|
||||
openLibrary() {
|
||||
uni.showToast({ title: '打开图书借阅', icon: 'success' });
|
||||
},
|
||||
handleLogout() {
|
||||
uni.showModal({
|
||||
title: '确认退出',
|
||||
content: '确定要退出登录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({ title: '正在退出...' });
|
||||
|
||||
// 清除登录信息
|
||||
userStorage.clearLoginInfo();
|
||||
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '已退出登录',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
// 跳转到登录页面
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
});
|
||||
}, 500);
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
// 检查页面访问权限
|
||||
if (!checkPageAccess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.checkLoginStatus()) {
|
||||
this.loadUserInfo();
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 页面显示时再次检查权限
|
||||
if (!checkPageAccess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 刷新用户信息
|
||||
this.loadUserInfo();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background-color: $uni-bg-color-grey;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
padding-bottom: calc(50px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 用户信息卡片 */
|
||||
.profile-card {
|
||||
background: linear-gradient(135deg, $uni-color-primary, $uni-color-primary-dark);
|
||||
color: $uni-text-color-inverse;
|
||||
margin: $uni-spacing-col-lg;
|
||||
border-radius: $uni-border-radius-lg;
|
||||
padding: 24px 20px;
|
||||
box-shadow: $uni-shadow;
|
||||
}
|
||||
|
||||
.profile-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: $uni-spacing-col-lg;
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: $uni-border-radius-circle;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: $uni-spacing-row-lg;
|
||||
}
|
||||
|
||||
.avatar-icon {
|
||||
font-size: 24px;
|
||||
color: $uni-text-color-inverse;
|
||||
}
|
||||
|
||||
.profile-details {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: $uni-font-size-xl;
|
||||
font-weight: 600;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.user-major {
|
||||
font-size: $uni-font-size-base;
|
||||
opacity: 0.9;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.user-id {
|
||||
font-size: $uni-font-size-sm;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.profile-stats {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: $uni-spacing-col-lg;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: $uni-font-size-xxl;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: $uni-font-size-sm;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* 分组标题 */
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.section-icon {
|
||||
font-size: $uni-font-size-lg;
|
||||
color: $uni-color-primary;
|
||||
}
|
||||
|
||||
/* 菜单列表 */
|
||||
.menu-section {
|
||||
background: $uni-bg-color;
|
||||
border-radius: $uni-border-radius-lg;
|
||||
margin: $uni-spacing-col-lg;
|
||||
box-shadow: $uni-shadow;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $uni-spacing-col-lg $uni-spacing-row-xl;
|
||||
transition: $uni-transition;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $uni-color-primary-light;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: $uni-color-primary-light;
|
||||
border-radius: $uni-border-radius-circle;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: $uni-spacing-row-lg;
|
||||
|
||||
.icon {
|
||||
font-size: 18px;
|
||||
color: $uni-color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
font-size: $uni-font-size-lg;
|
||||
font-weight: 500;
|
||||
color: $uni-text-color;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.menu-desc {
|
||||
font-size: $uni-font-size-sm;
|
||||
color: $uni-text-color-secondary;
|
||||
}
|
||||
|
||||
.menu-arrow {
|
||||
color: $uni-text-color-grey;
|
||||
font-size: $uni-font-size-xl;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
/* 分隔器 */
|
||||
.section-divider {
|
||||
height: 8px;
|
||||
background: $uni-bg-color-grey;
|
||||
margin: 0 $uni-spacing-row-lg;
|
||||
}
|
||||
|
||||
/* 版权信息 */
|
||||
.footer-section {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
color: $uni-text-color-grey;
|
||||
}
|
||||
|
||||
.app-version {
|
||||
font-size: $uni-font-size-sm;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* 底部间距 */
|
||||
.bottom-spacer {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* 菜单项进入动画 */
|
||||
.menu-item {
|
||||
animation: slideInRight 0.6s ease-out backwards;
|
||||
}
|
||||
|
||||
@keyframes slideInRight {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 页面进入动画 */
|
||||
.page-container {
|
||||
animation: fadeInUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.profile-card,
|
||||
.menu-section {
|
||||
margin: $uni-spacing-col-base;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
padding: $uni-spacing-col-base $uni-spacing-row-lg;
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
|
||||
.avatar-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: $uni-font-size-lg;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: $uni-font-size-xl;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,499 +0,0 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 自定义导航栏 -->
|
||||
<NavBar title="办公中心" :show-search="true" @search="handleSearch" />
|
||||
|
||||
<!-- 主要内容区域 -->
|
||||
<scroll-view class="main-content" scroll-y enhanced :show-scrollbar="false">
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-section">
|
||||
<view class="search-bar" @click="focusSearch">
|
||||
<text class="search-icon">🔍</text>
|
||||
<input
|
||||
class="search-input"
|
||||
placeholder="搜索服务..."
|
||||
v-model="searchQuery"
|
||||
@input="handleSearchInput"
|
||||
@confirm="handleSearchConfirm"
|
||||
:focus="searchFocused"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 热门服务 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">🔥</text>
|
||||
<text class="card-title">热门服务</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="4" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in hotServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
:badge="service.badge"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 学习教务 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">🎓</text>
|
||||
<text class="card-title">学习教务</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in academicServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 生活服务 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">🏠</text>
|
||||
<text class="card-title">生活服务</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in lifeServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 校园资源 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">🏢</text>
|
||||
<text class="card-title">校园资源</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in resourceServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 办事服务 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">📋</text>
|
||||
<text class="card-title">办事服务</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in adminServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 信息查询 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">🔍</text>
|
||||
<text class="card-title">信息查询</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in queryServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 快捷工具 -->
|
||||
<Card>
|
||||
<template #header>
|
||||
<view class="section-header">
|
||||
<text class="section-icon">⚡</text>
|
||||
<text class="card-title">快捷工具</text>
|
||||
</view>
|
||||
</template>
|
||||
<GridLayout :columns="3" gap="12px">
|
||||
<ServiceItem
|
||||
v-for="service in toolServices"
|
||||
:key="service.title"
|
||||
:title="service.title"
|
||||
:icon="service.icon"
|
||||
@click="handleServiceClick"
|
||||
/>
|
||||
</GridLayout>
|
||||
</Card>
|
||||
|
||||
<!-- 底部间距 -->
|
||||
<view class="bottom-spacer"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue';
|
||||
import Card from '@/components/Card.vue';
|
||||
import ServiceItem from '@/components/ServiceItem.vue';
|
||||
import GridLayout from '@/components/GridLayout.vue';
|
||||
import { userStorage } from '@/utils/request';
|
||||
import { checkPageAccess } from '@/utils/route-guard';
|
||||
|
||||
export default {
|
||||
name: 'WorkbenchPage',
|
||||
components: {
|
||||
NavBar,
|
||||
Card,
|
||||
ServiceItem,
|
||||
GridLayout,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchQuery: '',
|
||||
searchFocused: false,
|
||||
hotServices: [
|
||||
{ title: '课程表', icon: '🎓' },
|
||||
{ title: '成绩查询', icon: '📊' },
|
||||
{ title: '校园卡', icon: '💳' },
|
||||
{ title: '图书馆', icon: '📚' },
|
||||
],
|
||||
academicServices: [
|
||||
{ title: '我的课表', icon: '🎓' },
|
||||
{ title: '成绩查询', icon: '📊' },
|
||||
{ title: '选课系统', icon: '👨🎓' },
|
||||
{ title: '考试安排', icon: '📝' },
|
||||
{ title: '课程评教', icon: '📋' },
|
||||
{ title: '学分查询', icon: '🏆' },
|
||||
{ title: '作业提交', icon: '📄' },
|
||||
{ title: '竞赛报名', icon: '🏅' },
|
||||
{ title: '教学评价', icon: '👨🏫' },
|
||||
],
|
||||
lifeServices: [
|
||||
{ title: '食堂菜单', icon: '🍽️' },
|
||||
{ title: '校园卡', icon: '💳' },
|
||||
{ title: '宿舍管理', icon: '🛏️' },
|
||||
{ title: '停车服务', icon: '🚗' },
|
||||
{ title: '校车时刻', icon: '🚌' },
|
||||
{ title: '校园购物', icon: '🛒' },
|
||||
{ title: '医疗服务', icon: '🏥' },
|
||||
{ title: '报修服务', icon: '🔧' },
|
||||
{ title: '空调控制', icon: '🌡️' },
|
||||
],
|
||||
resourceServices: [
|
||||
{ title: '图书馆', icon: '📚' },
|
||||
{ title: '机房预约', icon: '💻' },
|
||||
{ title: '会议室', icon: '🎤' },
|
||||
{ title: '体育馆', icon: '🏃♂️' },
|
||||
{ title: '艺术中心', icon: '🎭' },
|
||||
{ title: '实验室', icon: '🧪' },
|
||||
{ title: '打印服务', icon: '🖨️' },
|
||||
{ title: '网络服务', icon: '📶' },
|
||||
{ title: '设备租借', icon: '🔧' },
|
||||
],
|
||||
adminServices: [
|
||||
{ title: '学费缴费', icon: '💰' },
|
||||
{ title: '证明开具', icon: '📄' },
|
||||
{ title: '学生证', icon: '🆔' },
|
||||
{ title: '学籍管理', icon: '👤' },
|
||||
{ title: '转专业', icon: '🔄' },
|
||||
{ title: '请假申请', icon: '✈️' },
|
||||
{ title: '毕业申请', icon: '🎓' },
|
||||
{ title: '就业指导', icon: '💼' },
|
||||
{ title: '国际交流', icon: '🌍' },
|
||||
],
|
||||
queryServices: [
|
||||
{ title: '校历查询', icon: '📅' },
|
||||
{ title: '校园通讯录', icon: '📞' },
|
||||
{ title: '校园地图', icon: '🗺️' },
|
||||
{ title: '通知公告', icon: '📢' },
|
||||
{ title: '常见问题', icon: '❓' },
|
||||
{ title: '意见反馈', icon: '💬' },
|
||||
{ title: '在线客服', icon: '🎧' },
|
||||
{ title: '数据统计', icon: '📈' },
|
||||
{ title: '校园新闻', icon: '📰' },
|
||||
],
|
||||
toolServices: [
|
||||
{ title: '扫一扫', icon: '📱' },
|
||||
{ title: '计算器', icon: '🧮' },
|
||||
{ title: '作息时间', icon: '⏰' },
|
||||
{ title: '天气查询', icon: '☁️' },
|
||||
{ title: '翻译工具', icon: '🔤' },
|
||||
{ title: '分享', icon: '📤' },
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
this.focusSearch();
|
||||
},
|
||||
focusSearch() {
|
||||
this.searchFocused = true;
|
||||
},
|
||||
handleSearchInput(e) {
|
||||
this.searchQuery = e.detail.value;
|
||||
// 实现搜索建议逻辑
|
||||
this.showSearchSuggestions();
|
||||
},
|
||||
handleSearchConfirm() {
|
||||
if (this.searchQuery.trim()) {
|
||||
this.performSearch(this.searchQuery);
|
||||
}
|
||||
},
|
||||
showSearchSuggestions() {
|
||||
// 根据输入显示搜索建议
|
||||
if (this.searchQuery.length > 0) {
|
||||
// 这里可以实现搜索建议逻辑
|
||||
}
|
||||
},
|
||||
performSearch(query) {
|
||||
uni.showToast({
|
||||
title: `搜索: ${query}`,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
});
|
||||
this.searchFocused = false;
|
||||
},
|
||||
handleServiceClick(service) {
|
||||
uni.vibrateShort();
|
||||
|
||||
// 根据不同服务类型进行路由跳转或功能调用
|
||||
switch (service.title) {
|
||||
case '课程表':
|
||||
case '我的课表':
|
||||
this.openCourseSchedule();
|
||||
break;
|
||||
case '成绩查询':
|
||||
this.openGradeQuery();
|
||||
break;
|
||||
case '校园卡':
|
||||
this.openCampusCard();
|
||||
break;
|
||||
case '图书馆':
|
||||
this.openLibrary();
|
||||
break;
|
||||
case '扫一扫':
|
||||
this.openScanner();
|
||||
break;
|
||||
default:
|
||||
uni.showToast({
|
||||
title: `${service.title}功能开发中`,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
},
|
||||
openCourseSchedule() {
|
||||
uni.showToast({ title: '打开课程表', icon: 'success' });
|
||||
// 这里可以跳转到课程表页面
|
||||
},
|
||||
openGradeQuery() {
|
||||
uni.showToast({ title: '打开成绩查询', icon: 'success' });
|
||||
// 这里可以跳转到成绩查询页面
|
||||
},
|
||||
openCampusCard() {
|
||||
uni.showToast({ title: '打开校园卡', icon: 'success' });
|
||||
// 这里可以跳转到校园卡页面
|
||||
},
|
||||
openLibrary() {
|
||||
uni.showToast({ title: '打开图书馆', icon: 'success' });
|
||||
// 这里可以跳转到图书馆页面
|
||||
},
|
||||
openScanner() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: `扫描结果: ${res.result}`,
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'error',
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 检查登录状态
|
||||
checkLoginStatus() {
|
||||
if (!userStorage.isLoggedIn()) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index',
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
// 检查页面访问权限
|
||||
if (!checkPageAccess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.checkLoginStatus();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 页面显示时再次检查权限
|
||||
if (!checkPageAccess()) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
min-height: 100vh;
|
||||
background-color: $uni-bg-color-grey;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
padding-bottom: calc(50px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 搜索栏 */
|
||||
.search-section {
|
||||
padding: $uni-spacing-col-lg;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
position: relative;
|
||||
background: $uni-bg-color;
|
||||
border-radius: $uni-border-radius-lg;
|
||||
box-shadow: $uni-shadow;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 $uni-spacing-row-lg;
|
||||
transition: $uni-transition;
|
||||
|
||||
&:hover {
|
||||
box-shadow: $uni-shadow-hover;
|
||||
}
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
font-size: 16px;
|
||||
color: $uni-text-color-grey;
|
||||
margin-right: $uni-spacing-row-base;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
padding: $uni-spacing-col-base 0;
|
||||
font-size: $uni-font-size-lg;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: $uni-text-color;
|
||||
|
||||
&::placeholder {
|
||||
color: $uni-text-color-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
/* 分组标题 */
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.section-icon {
|
||||
font-size: $uni-font-size-lg;
|
||||
}
|
||||
|
||||
/* 服务网格动画 */
|
||||
.service-item {
|
||||
animation-delay: calc(var(--item-index, 0) * 0.1s);
|
||||
animation: slideInUp 0.6s ease-out backwards;
|
||||
}
|
||||
|
||||
@keyframes slideInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 搜索焦点效果 */
|
||||
.search-bar:focus-within {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: $uni-shadow-hover;
|
||||
|
||||
.search-icon {
|
||||
color: $uni-color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部间距 */
|
||||
.bottom-spacer {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* 页面进入动画 */
|
||||
.page-container {
|
||||
animation: fadeInUp 0.6s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.search-section {
|
||||
padding: $uni-spacing-col-base;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
padding: 0 $uni-spacing-row-base;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
font-size: $uni-font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user