- 新增地址类型定义,增强前端地址数据结构 - 新增地址编辑页面,支持地址智能识别和定位选点功能 - 地址编辑支持省市区选择及默认地址设置 - 新增地址列表页面,支持地址展示、删除、编辑和选择功能 - 实现售后申请页面,支持选择售后类型和退款原因 - 售后申请支持商品选择、退款金额计算和凭证上传 - 新增售后详情页面,支持售后状态展示及申请取消 - 优化页面加载和用户交互体验,增加错误提示和权限处理
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import React, { useEffect, useState } from 'react'
|
|
import { View, Text, ScrollView } from '@tarojs/components'
|
|
import Taro, { useRouter } from '@tarojs/taro'
|
|
|
|
definePageConfig({
|
|
navigationBarTitleText: '问题详情',
|
|
})
|
|
|
|
const HelpDetailPage: React.FC = () => {
|
|
const router = useRouter()
|
|
const [title, setTitle] = useState('')
|
|
const [content, setContent] = useState('')
|
|
|
|
useEffect(() => {
|
|
const { title: t, content: c } = router.params
|
|
if (t) setTitle(decodeURIComponent(t))
|
|
if (c) setContent(decodeURIComponent(c))
|
|
}, [router.params])
|
|
|
|
return (
|
|
<View className='min-h-screen bg-gray-50'>
|
|
<ScrollView scrollY className='h-screen'>
|
|
<View className='p-4'>
|
|
<View className='bg-white rounded-lg p-4'>
|
|
<Text className='text-lg font-medium text-gray-800 block mb-4'>
|
|
{title}
|
|
</Text>
|
|
<View className='border-t border-gray-100 pt-4'>
|
|
<Text className='text-sm text-gray-600 leading-7'>
|
|
{content}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
|
|
{/* 相关问题推荐(预留) */}
|
|
<View className='mt-4 bg-white rounded-lg p-4'>
|
|
<Text className='text-base font-medium text-gray-800 mb-3 block'>
|
|
相关问题
|
|
</Text>
|
|
<Text className='text-sm text-gray-400'>
|
|
暂无相关问题
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
</ScrollView>
|
|
</View>
|
|
)
|
|
}
|
|
|
|
export default HelpDetailPage
|