HelpPage.vue
3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!--
* @Date: 2025-03-24 13:04:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-24 13:04:23
* @FilePath: /mlaj/src/views/profile/HelpPage.vue
* @Description: 文件描述
-->
<template>
<AppLayout>
<div class="bg-gradient-to-br from-green-50 via-green-100/30 to-blue-50/30 min-h-screen">
<div class="px-4 py-6">
<FrostedGlass class="rounded-xl overflow-hidden">
<div class="divide-y divide-gray-100">
<div
v-for="item in helpItems"
:key="item.id"
class="p-4 flex items-center cursor-pointer hover:bg-gray-50/50"
@click="handleItemClick(item)"
>
<div class="flex-1">
<h3 class="text-base font-medium text-gray-900 mb-1">{{ item.title }}</h3>
<p class="text-sm text-gray-500">{{ item.description }}</p>
</div>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5 text-gray-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
/>
</svg>
</div>
</div>
</FrostedGlass>
</div>
</div>
</AppLayout>
</template>
<script setup>
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import AppLayout from '@/components/layout/AppLayout.vue';
import FrostedGlass from '@/components/ui/FrostedGlass.vue';
import { useTitle } from '@vueuse/core';
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const router = useRouter();
const helpItems = ref([
{
id: 1,
title: '如何开始学习课程?',
description: '了解如何选择和开始学习课程的详细指南',
content: '1. 浏览课程列表\n2. 选择感兴趣的课程\n3. 点击课程进入详情页\n4. 点击开始学习按钮\n5. 按照课程章节顺序学习'
},
{
id: 2,
title: '如何参与打卡活动?',
description: '学习打卡功能使用说明和注意事项',
content: '1. 在首页或个人中心点击打卡按钮\n2. 选择打卡类型(阅读、运动、学习、写作)\n3. 填写打卡内容\n4. 上传相关图片(可选)\n5. 提交打卡'
},
{
id: 3,
title: '如何参加线下活动?',
description: '线下活动报名流程和参与方式说明',
content: '1. 进入活动页面\n2. 查看活动详情和时间地点\n3. 点击报名按钮\n4. 填写报名信息\n5. 确认提交\n6. 等待审核通过\n7. 按时参加活动'
},
{
id: 4,
title: '订单和支付说明',
description: '了解订单流程和支付方式的详细说明',
content: '1. 选择要购买的课程或服务\n2. 点击购买按钮\n3. 确认订单信息\n4. 选择支付方式(微信支付/支付宝)\n5. 完成支付\n6. 查看订单状态'
},
{
id: 5,
title: '常见问题解答',
description: '解答用户最常遇到的问题和疑难',
content: '1. 账号相关问题\n - 如何修改密码\n - 如何绑定手机号\n - 如何更新个人信息\n\n2. 课程相关问题\n - 课程有效期说明\n - 如何获取课程证书\n - 课程退款规则\n\n3. 技术支持\n - 视频无法播放解决方案\n - 系统使用要求\n - 如何清除缓存'
}
]);
const handleItemClick = (item) => {
// 将帮助项数据存储到本地存储
localStorage.setItem(`help_item_${item.id}`, JSON.stringify(item));
router.push({
path: `/profile/help/${item.id}`
});
};
</script>