From bc6d1b7a40fda155887b357790ec9d95ce1863f7 Mon Sep 17 00:00:00 2001
From: Jimmy Liow <18777396951@163.com>
Date: Thu, 13 Apr 2023 09:47:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=BF=BB=E8=AF=91=E9=87=8D?=
=?UTF-8?q?=E5=91=BD=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main.jsx | 8 ++++----
src/stores/{Plan.js => Reservation.js} | 8 ++++----
src/stores/Root.js | 6 +++---
src/views/App.jsx | 6 +++---
src/views/{plan => reservation}/Detail.jsx | 2 +-
src/views/{plan => reservation}/Newest.jsx | 8 ++++----
6 files changed, 19 insertions(+), 19 deletions(-)
rename src/stores/{Plan.js => Reservation.js} (86%)
rename src/views/{plan => reservation}/Detail.jsx (92%)
rename src/views/{plan => reservation}/Newest.jsx (85%)
diff --git a/src/main.jsx b/src/main.jsx
index 0b75844..dc195f2 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -13,8 +13,8 @@ import Login from "./views/Login";
import SignOut from "./views/SignOut";
import Index from "./views/index";
import ErrorPage from "./views/error-page";
-import PlanNewest from "./views/plan/Newest";
-import PlanDetail from "./views/plan/Detail";
+import ReservationNewest from "./views/reservation/Newest";
+import ReservationDetail from "./views/reservation/Detail";
configure({
useProxies: "ifavailable",
@@ -32,8 +32,8 @@ const router = createBrowserRouter([
errorElement: ,
children: [
{ index: true, element: },
- { path: "plan/newest", element: },
- { path: "plan/:planId", element: }
+ { path: "reservation/newest", element: },
+ { path: "reservation/:reservationId", element: }
]
},
{
diff --git a/src/stores/Plan.js b/src/stores/Reservation.js
similarity index 86%
rename from src/stores/Plan.js
rename to src/stores/Reservation.js
index 5d83775..b4caacd 100644
--- a/src/stores/Plan.js
+++ b/src/stores/Reservation.js
@@ -2,7 +2,7 @@ import { makeAutoObservable, runInAction } from "mobx";
import * as req from '../utils/request';
import { prepareUrl } from '../utils/commons';
-class Plan {
+class Reservation {
constructor(root) {
makeAutoObservable(this, { rootStore: false });
@@ -11,7 +11,7 @@ class Plan {
fetchRecent() {
runInAction(() => {
- this.planList = [
+ this.reservationList = [
{
key: '1',
name: '中华游111029-N111025076',
@@ -37,7 +37,7 @@ class Plan {
});
}
- planList = [
+ reservationList = [
{
key: '1',
name: '-',
@@ -48,4 +48,4 @@ class Plan {
];
}
-export default Plan;
\ No newline at end of file
+export default Reservation;
\ No newline at end of file
diff --git a/src/stores/Root.js b/src/stores/Root.js
index fb17968..34a34c3 100644
--- a/src/stores/Root.js
+++ b/src/stores/Root.js
@@ -1,11 +1,11 @@
import { makeAutoObservable } from "mobx";
-import Plan from "./Plan";
+import Reservation from "./Reservation";
import Auth from "./Auth";
class Root {
constructor() {
- this.plan = new Plan(this);
- this.auth = new Auth(this);
+ this.reservationStore = new Reservation(this);
+ this.authStore = new Auth(this);
makeAutoObservable(this);
}
}
diff --git a/src/views/App.jsx b/src/views/App.jsx
index 5012f37..909298b 100644
--- a/src/views/App.jsx
+++ b/src/views/App.jsx
@@ -62,9 +62,9 @@ export default function App() {