index.vue
8.4 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<template>
<view class="relative w-full min-h-screen bg-[#F9FAFB] pb-[200rpx]">
<NavHeader title="帮助中心" />
<!-- Content Section -->
<view class="px-[32rpx] mt-[32rpx]">
<!-- Search Bar -->
<view class="flex items-center w-full h-[88rpx] bg-white rounded-full px-[32rpx] mb-[32rpx] shadow-sm">
<IconFont name="search" class="text-gray-400 mr-[16rpx]" size="18" />
<input type="text" placeholder="搜索问题或关键词" placeholder-class="text-gray-400 text-[28rpx]"
class="flex-1 text-[28rpx] text-gray-800 h-full" />
</view>
<!-- Contact Service -->
<view
class="flex items-center justify-between w-full bg-white rounded-[24rpx] p-[32rpx] mb-[40rpx] shadow-sm relative overflow-hidden"
@tap="showContactPopup = true"
>
<view class="flex items-center z-10">
<view class="w-[80rpx] h-[80rpx] rounded-[16rpx] bg-blue-50 flex items-center justify-center mr-[24rpx]">
<IconFont name="service" size="24" color="#2563EB" />
</view>
<text class="text-[32rpx] text-gray-900 font-medium">联系客服</text>
</view>
<view class="z-10">
<IconFont name="rectRight" class="text-gray-400" size="16" />
</view>
</view>
<!-- Important Questions -->
<view>
<text class="block text-[32rpx] text-gray-900 font-bold mb-[24rpx]">重点问题</text>
<view class="bg-white rounded-[24rpx] shadow-sm overflow-hidden">
<view v-for="(item, index) in questions" :key="index"
class="flex items-center justify-between p-[32rpx] border-b border-gray-100 last:border-b-0 active:bg-gray-50 transition-colors"
@tap="handleQuestionClick(item)">
<view class="flex items-center">
<view class="w-[12rpx] h-[12rpx] rounded-full bg-blue-600 mr-[24rpx]"></view>
<text class="text-[28rpx] text-gray-800">{{ item.title }}</text>
</view>
<IconFont name="rectRight" class="text-gray-400" size="16" />
</view>
</view>
</view>
</view>
<!-- Contact Service Popup -->
<nut-popup
v-model:visible="showContactPopup"
position="bottom"
round
:style="{ height: 'auto', paddingBottom: '40rpx' }"
>
<view class="p-[40rpx]">
<!-- Header -->
<view class="flex items-center justify-between mb-[48rpx]">
<view>
<text class="block text-[40rpx] font-bold text-gray-900 mb-[8rpx]">联系我们</text>
<text class="text-[24rpx] text-gray-500">遇到问题?请通过以下方式联系我们</text>
</view>
<view class="w-[64rpx] h-[64rpx] bg-gray-100 rounded-full flex items-center justify-center" @tap="showContactPopup = false">
<IconFont name="close" size="18" color="#6B7280" />
</view>
</view>
<!-- Contact Methods List -->
<view class="flex flex-col gap-[24rpx]">
<view
v-for="(item, index) in contactMethods"
:key="index"
class="flex items-center p-[32rpx] bg-white border border-gray-100 rounded-[24rpx] shadow-sm active:bg-gray-50 transition-colors"
>
<view
class="w-[88rpx] h-[88rpx] rounded-full flex items-center justify-center mr-[24rpx] flex-shrink-0"
:style="{ backgroundColor: `${item.color}15` }"
>
<IconFont :name="item.icon" size="24" :color="item.color" />
</view>
<view class="flex-1">
<view class="flex items-center justify-between mb-[8rpx]">
<text class="text-[28rpx] text-gray-500">{{ item.label }}</text>
</view>
<text class="block text-[32rpx] font-bold text-gray-900 mb-[4rpx]">{{ item.value }}</text>
<text class="text-[22rpx] text-gray-400">{{ item.desc }}</text>
</view>
</view>
</view>
</view>
</nut-popup>
<!-- Question Detail Popup -->
<nut-popup
v-model:visible="showQuestionPopup"
position="bottom"
:style="{ width: '100%', height: '90vh' }"
>
<view class="h-full flex flex-col bg-white">
<!-- Header -->
<view class="flex-shrink-0 px-[32rpx] py-[20rpx] bg-white border-b border-gray-100 flex items-center">
<view class="w-[64rpx] h-[64rpx] flex items-center justify-center -ml-[16rpx]" @tap="showQuestionPopup = false">
<IconFont name="close" size="20" color="#374151" />
</view>
<text class="flex-1 text-[34rpx] font-bold text-gray-900 text-center pr-[48rpx] truncate">{{ currentQuestion?.title }}</text>
</view>
<!-- Content -->
<scroll-view scroll-y class="flex-1 w-full">
<view class="p-[40rpx]">
<view class="rich-text-container text-[30rpx] leading-[1.8] text-gray-800" v-html="currentQuestion?.content"></view>
</view>
</scroll-view>
</view>
</nut-popup>
<!-- <TabBar current="me" /> -->
</view>
</template>
<script setup>
import { ref } from 'vue'
import NavHeader from '@/components/NavHeader.vue'
import TabBar from '@/components/TabBar.vue'
import IconFont from '@/components/IconFont.vue'
// Popup 状态
const showContactPopup = ref(false)
const showQuestionPopup = ref(false)
const currentQuestion = ref(null)
// Contact methods data
const contactMethods = [
{
icon: 'location',
label: '客服热线',
value: '400-888-9999',
desc: '工作时间:周一至周五 9:00-18:00',
color: '#2563EB' // blue-600
},
{
icon: 'service',
label: '微信公众号',
value: '美乐爱觉',
desc: '搜索"美乐爱觉"关注我们',
color: '#16A34A' // green-600
},
{
icon: 'edit',
label: '邮箱',
value: 'service@manulife.com',
desc: '我们会在24小时内回复您的邮件',
color: '#EA580C' // orange-600
}
]
// Mock Rich Text Content
const mockRichText = `
<div class="rich-text-content">
<h3 style="font-size: 16px; font-weight: bold; color: #1F2937; margin-bottom: 12px;">操作步骤:</h3>
<div style="margin-bottom: 8px; color: #374151;">
<span style="color: #EF4444; font-weight: 500;">步骤 1:</span>
<span>登录系统后,点击左侧菜单的"计划书管理"</span>
</div>
<div style="margin-bottom: 8px; color: #374151;">
<span style="color: #EF4444; font-weight: 500;">步骤 2:</span>
<span>点击右上角"新建计划书"按钮</span>
</div>
<div style="margin-bottom: 8px; color: #374151;">
<span style="color: #EF4444; font-weight: 500;">步骤 3:</span>
<span>填写客户信息、保障方案等详细内容</span>
</div>
<div style="margin-bottom: 12px; color: #374151;">
<span style="color: #EF4444; font-weight: 500;">步骤 4:</span>
<span>点击"生成"按钮,系统将自动生成专业的计划书文档</span>
</div>
<div style="background-color: #FEFCE8; border-left: 4px solid #FACC15; padding: 12px; margin: 16px 0; border-radius: 4px;">
<span style="font-size: 12px; color: #854D0E;">💡 小提示:生成后的计划书可以随时在"我的计划书"中查看和管理。</span>
</div>
<h3 style="font-size: 16px; font-weight: bold; color: #1F2937; margin: 16px 0 12px;">常见问题:</h3>
<div style="margin-bottom: 12px;">
<div style="font-weight: 500; color: #374151; margin-bottom: 4px;">Q:如何修改已生成的计划书?</div>
<div style="color: #4B5563;">A:在"我的计划书"列表中,找到对应的计划书,点击"编辑"按钮即可修改内容。</div>
</div>
<div style="margin-bottom: 12px;">
<div style="font-weight: 500; color: #374151; margin-bottom: 4px;">Q:可以导出为PDF吗?</div>
<div style="color: #4B5563;">A:可以的。在计划书详情页,点击"下载PDF"按钮即可导出高清PDF文件。</div>
</div>
</div>
`
const questions = ref([
{
title: '如何创建新的计划书?',
id: 1,
content: mockRichText
},
{
title: 'AI答疑如何使用?',
id: 2,
content: mockRichText
},
{
title: '如何修改个人信息?',
id: 3,
content: mockRichText
},
{
title: '数据如何同步到云端?',
id: 4,
content: mockRichText
},
{
title: '忘记密码怎么办?',
id: 5,
content: mockRichText
}
])
const handleQuestionClick = (item) => {
currentQuestion.value = item
showQuestionPopup.value = true
}
</script>