feat: 修复用户手动取消订单的状态显示、修复支付过程中订单支付按钮一直展示的问题

This commit is contained in:
2025-10-19 18:40:58 +08:00
parent a3c3087e46
commit 2772e7f1df
7 changed files with 92 additions and 28 deletions

16
src/store/orderStore.ts Normal file
View File

@@ -0,0 +1,16 @@
import { create } from "zustand";
export interface OrderStore {
paying: boolean;
setPaying: (paying: boolean) => void;
}
export const useOrderStore = create<OrderStore>()((set) => ({
paying: false,
setPaying: (paying: boolean) => set({ paying }),
}));
export const useOrder = () => useOrderStore(({ paying, setPaying }) => ({
paying,
setPaying,
}))