From 2be62c993855ec3bc04439ab03193ab9db4c48ec Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 4 Mar 2024 14:09:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=9C=89=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/OrderStore.js | 2 +- src/views/AuthApp.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stores/OrderStore.js b/src/stores/OrderStore.js index 855d318..6911e81 100644 --- a/src/stores/OrderStore.js +++ b/src/stores/OrderStore.js @@ -52,7 +52,7 @@ const useOrderStore = create((set, get) => ({ if (json.errcode === 0) { set(() => ({ orderList: json.result.map((order) => { return { ...order, key: order.COLI_ID } }), - })) + })) } else { throw new Error(json?.errmsg + ': ' + json.errcode) } diff --git a/src/views/AuthApp.jsx b/src/views/AuthApp.jsx index 370b371..5eda539 100644 --- a/src/views/AuthApp.jsx +++ b/src/views/AuthApp.jsx @@ -49,11 +49,13 @@ function AuthApp() { }, []) - let defaultPath = 'follow' + let defaultPath = '/order/follow' if (href !== '/') { const splitPath = href.split('/') - defaultPath = href + if (splitPath.length > 2) { + defaultPath = '/' + splitPath[1] + '/' + splitPath[2] + } } const {