|
|
@@ -1,9 +1,11 @@
|
|
|
-import React, { useState, useEffect } from 'react';
|
|
|
+import { useState, useEffect } from 'react';
|
|
|
import { View, Text, ScrollView, Button } from '@tarojs/components';
|
|
|
import Taro from '@tarojs/taro';
|
|
|
import { useQuery } from '@tanstack/react-query';
|
|
|
import { orderClient } from '@/api';
|
|
|
-import { OrderStatus } from '@d8d/server/share/order.types';
|
|
|
+import { OrderStatus } from '@/types/order.types';
|
|
|
+import { TabBarLayout } from '@/layouts/tab-bar-layout';
|
|
|
+import { Navbar } from '@/components/ui/navbar';
|
|
|
|
|
|
// 订单状态选项卡
|
|
|
const statusTabs = [
|
|
|
@@ -203,7 +205,12 @@ const OrdersPage = () => {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <View className="min-h-screen bg-background">
|
|
|
+ <TabBarLayout activeKey="orders" className='bg-background'>
|
|
|
+ <Navbar
|
|
|
+ title="我的订单"
|
|
|
+ leftIcon=""
|
|
|
+ rightIcon=""
|
|
|
+ />
|
|
|
{/* 状态选项卡 */}
|
|
|
<View className="bg-white border-b border-border">
|
|
|
<ScrollView
|
|
|
@@ -215,11 +222,10 @@ const OrdersPage = () => {
|
|
|
{statusTabs.map((tab) => (
|
|
|
<View
|
|
|
key={tab.key}
|
|
|
- className={`px-4 py-2 rounded-full mr-3 cursor-pointer transition-colors ${
|
|
|
- currentTab === tab.key
|
|
|
+ className={`px-4 py-2 rounded-full mr-3 cursor-pointer transition-colors ${currentTab === tab.key
|
|
|
? 'bg-primary text-primary-foreground'
|
|
|
: 'bg-muted text-muted-foreground'
|
|
|
- }`}
|
|
|
+ }`}
|
|
|
onClick={() => handleTabChange(tab.key)}
|
|
|
>
|
|
|
<Text className="text-sm font-medium">{tab.label}</Text>
|
|
|
@@ -252,7 +258,7 @@ const OrdersPage = () => {
|
|
|
))
|
|
|
)}
|
|
|
</ScrollView>
|
|
|
- </View>
|
|
|
+ </TabBarLayout>
|
|
|
);
|
|
|
};
|
|
|
|