|
|
@@ -3,13 +3,13 @@
|
|
|
* 显示支付成功信息和后续操作
|
|
|
*/
|
|
|
|
|
|
-import Taro from '@tarojs/taro'
|
|
|
-import { useEffect, useState } from 'react'
|
|
|
+import Taro, { useRouter } from '@tarojs/taro'
|
|
|
import { View, Text } from '@tarojs/components'
|
|
|
import { useQuery } from '@tanstack/react-query'
|
|
|
import { orderClient } from '@/api'
|
|
|
import { Navbar } from '@/components/ui/navbar'
|
|
|
import { Button } from '@/components/ui/button'
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
interface PaymentSuccessParams {
|
|
|
orderId: number
|
|
|
@@ -105,7 +105,12 @@ const PaymentSuccessPage = () => {
|
|
|
</View>
|
|
|
<View className="flex justify-between items-center py-3 border-b border-gray-100">
|
|
|
<Text className="text-sm text-gray-600">支付时间:</Text>
|
|
|
- <Text className="text-sm text-gray-800">{new Date().toLocaleString()}</Text>
|
|
|
+ <Text className="text-sm text-gray-800">
|
|
|
+ {orderDetail?.updatedAt
|
|
|
+ ? dayjs(orderDetail.updatedAt).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ : dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ }
|
|
|
+ </Text>
|
|
|
</View>
|
|
|
<View className="flex justify-between items-center py-3">
|
|
|
<Text className="text-sm text-gray-600">支付方式:</Text>
|