- 将获取 STS Token 的接口地址由 paopao-api 改为 guilixu-api - 更新图片上传接口地址为新的 guilixu-api 域名 - 修改用户推广页面中邀请码链接和二维码接口的域名 - 更改注册页微信登录接口请求的域名为 guilixu-api
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
|