解决登录显示、首页显示bug
This commit is contained in:
@@ -50,11 +50,6 @@
|
||||
|
||||
<HomeServiceContent
|
||||
v-else
|
||||
:active-category="activeCategory"
|
||||
:categories="serviceCategories"
|
||||
:entries="serviceEntries"
|
||||
@change-category="handleHeaderCategoryChange"
|
||||
@select-entry="handleServiceEntrySelect"
|
||||
></HomeServiceContent>
|
||||
|
||||
<view class="safe-area" :style="{ height: bottomSafeArea + 88 + 'px' }"></view>
|
||||
@@ -118,49 +113,13 @@ type HeaderModuleItem = {
|
||||
label: string
|
||||
}
|
||||
|
||||
type ServiceHomeCategoryItem = {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
type ServiceEntryItem = {
|
||||
id: string
|
||||
title: string
|
||||
desc: string
|
||||
icon: string
|
||||
tone: string
|
||||
category: string
|
||||
linkText: string
|
||||
route: string
|
||||
}
|
||||
|
||||
const topModules: Array<HeaderModuleItem> = [
|
||||
{ key: 'home', label: '首页' },
|
||||
{ key: 'service', label: '服务' }
|
||||
]
|
||||
|
||||
const serviceCategories: Array<ServiceHomeCategoryItem> = [
|
||||
{ id: 'all', name: '推荐' },
|
||||
{ id: 'nursing', name: '居家护理' },
|
||||
{ id: 'rehab', name: '康复照护' },
|
||||
{ id: 'assist', name: '适老用品' },
|
||||
{ id: 'health', name: '健康管理' },
|
||||
{ id: 'life', name: '生活服务' }
|
||||
]
|
||||
|
||||
const serviceEntries: Array<ServiceEntryItem> = [
|
||||
{ id: 'apply', title: '服务申请', desc: '快速发起上门护理与健康随访申请。', icon: '📝', tone: 'red', category: 'nursing', linkText: '立即申请', route: '/pages/mall/consumer/home-service/apply' },
|
||||
{ id: 'service-home', title: '服务大厅', desc: '查看服务项目、适用对象与预约说明。', icon: '🏠', tone: 'blue', category: 'all', linkText: '查看大厅', route: '/pages/mall/consumer/home-service/index' },
|
||||
{ id: 'progress', title: '服务进度', desc: '追踪评估、方案、执行和验收节点。', icon: '📍', tone: 'green', category: 'health', linkText: '查看工单', route: '/pages/mall/consumer/home-service/order-detail?id=case-001' },
|
||||
{ id: 'assessment', title: '上门评估', desc: '了解评估前准备事项和风险核对重点。', icon: '🩺', tone: 'blue', category: 'rehab', linkText: '查看说明', route: '/pages/mall/consumer/home-service/assessment?id=case-001' },
|
||||
{ id: 'plan', title: '服务方案', desc: '查看护理频次、服务周期和执行建议。', icon: '📋', tone: 'green', category: 'rehab', linkText: '方案说明', route: '/pages/mall/consumer/home-service/service-plan?id=case-001' },
|
||||
{ id: 'execution', title: '上门执行', desc: '同步执行记录、签到留痕与异常处理。', icon: '🚪', tone: 'orange', category: 'life', linkText: '查看进展', route: '/pages/mall/consumer/home-service/order-detail?id=case-002' },
|
||||
{ id: 'feedback', title: '验收反馈', desc: '服务完成后提交验收意见和满意度反馈。', icon: '✅', tone: 'red', category: 'nursing', linkText: '去反馈', route: '/pages/mall/consumer/home-service/feedback?id=case-001' },
|
||||
{ id: 'settlement', title: '结算归档', desc: '查看归档说明、账单结果和服务闭环。', icon: '🗂️', tone: 'green', category: 'assist', linkText: '查看说明', route: '/pages/mall/consumer/home-service/settlement-archive?id=case-001' }
|
||||
]
|
||||
|
||||
const headerCategories = computed((): Array<ServiceHomeCategoryItem | CategoryItem> => {
|
||||
return activeTopModule.value == 'home' ? categoryList.value : serviceCategories
|
||||
const headerCategories = computed((): Array<CategoryItem> => {
|
||||
return categoryList.value
|
||||
})
|
||||
|
||||
const headerSearchPlaceholder = computed((): string => {
|
||||
@@ -337,7 +296,7 @@ function handleTopModuleChange(moduleKey: string) {
|
||||
if (moduleKey == 'home') {
|
||||
activeCategory.value = currentCategory.value
|
||||
} else {
|
||||
activeCategory.value = serviceCategories.length > 0 ? serviceCategories[0].id : 'all'
|
||||
activeCategory.value = 'all'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,14 +310,6 @@ function handleHeaderCategoryChange(categoryId: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleServiceEntrySelect(entry: ServiceEntryItem) {
|
||||
if (entry.route == '') {
|
||||
uni.showToast({ title: '该入口下一步补页面', icon: 'none' })
|
||||
return
|
||||
}
|
||||
uni.navigateTo({ url: entry.route })
|
||||
}
|
||||
|
||||
function handleMainScrollToLower() {
|
||||
if (activeTopModule.value == 'home') {
|
||||
void loadMore()
|
||||
@@ -1208,7 +1159,7 @@ const searchByKeyword = (keyword: string): void => {
|
||||
// 初始化数据
|
||||
const initData = async () => {
|
||||
logSupaConfig()
|
||||
console.log('[IndexInit] 准备加载首页数据,确认当前请求将使用上述 SUPA_URL')
|
||||
console.log('[consumer-db] 首页开始加载数据')
|
||||
// 首先确保用户资料已加载
|
||||
try {
|
||||
await getCurrentUser()
|
||||
|
||||
Reference in New Issue
Block a user