From 78017195223e16f35da0fff0855ad64b7e98d7de Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 3 Jul 2024 11:40:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=E8=B7=AF=E7=94=B1403=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B4=A6=E5=8F=B7=E5=92=8C=E6=9D=83=E9=99=90=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RequireAuth.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/RequireAuth.jsx b/src/components/RequireAuth.jsx index cabef0b..8b06d3b 100644 --- a/src/components/RequireAuth.jsx +++ b/src/components/RequireAuth.jsx @@ -4,7 +4,7 @@ import useAuthStore from '@/stores/Auth' export default function RequireAuth({ children, ...props }) { - const isPermitted = useAuthStore((state) => state.isPermitted) + const [isPermitted, currentUser] = useAuthStore(state => [state.isPermitted, state.currentUser]) const { userId } = usingStorage() if (isPermitted(props.subject)) { @@ -15,7 +15,7 @@ export default function RequireAuth({ children, ...props }) { ) } From e3038e0a9d2dc1b94d87aa484a9ab1ac9738cab1 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 3 Jul 2024 14:37:35 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix=EF=BC=9A=E8=A7=A3=E5=86=B3=20Forget=20t?= =?UTF-8?q?o=20pass=20form=20prop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/Management.jsx | 12 +++++------- src/views/account/RoleList.jsx | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/views/account/Management.jsx b/src/views/account/Management.jsx index 08cb0b1..bb00571 100644 --- a/src/views/account/Management.jsx +++ b/src/views/account/Management.jsx @@ -224,17 +224,15 @@ function Management() { }} title={t('account:detail')} open={isAccountModalOpen} onOk={() => setAccountModalOpen(false)} onCancel={() => setAccountModalOpen(false)} - destroyOnClose={true} - clearOnDestroy={true} + destroyOnClose + forceRender modalRender={(dom) => (
- + {t('account:accountList')} { handelAccountSearch() diff --git a/src/views/account/RoleList.jsx b/src/views/account/RoleList.jsx index b4f9f92..cbaf23b 100644 --- a/src/views/account/RoleList.jsx +++ b/src/views/account/RoleList.jsx @@ -161,8 +161,8 @@ function RoleList() { }} title={t('account:detail')} open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)} - destroyOnClose={true} - clearOnDestroy={true} + destroyOnClose + forceRender modalRender={(dom) => ( Date: Wed, 3 Jul 2024 14:45:00 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20=E4=BB=B7=E6=A0=BC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E5=8A=A0=E8=B7=AF=E7=94=B1=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 +- src/views/account/RoleList.jsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.jsx b/src/main.jsx index 126a393..0beac8c 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -69,7 +69,7 @@ const initRouter = async () => { { path: 'airticket/plan/:coli_sn',element:}, { path: "products",element: }, { path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:}, - { path: "products/:travel_agency_id/:use_year/:audit_state/edit",element:}, + { path: "products/:travel_agency_id/:use_year/:audit_state/edit",element:}, ] }, { diff --git a/src/views/account/RoleList.jsx b/src/views/account/RoleList.jsx index cbaf23b..e5a9d1f 100644 --- a/src/views/account/RoleList.jsx +++ b/src/views/account/RoleList.jsx @@ -212,12 +212,10 @@ function RoleList() { treeCheckable={true} showCheckedStrategy={TreeSelect.SHOW_CHILD} placeholder={'Please select'} - style={{ - width: '100%', - }} /> + className='w-full' /> - + {t('account:roleList')} From 81397e7a68141344c035a74f2b02e26a620fc060 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 3 Jul 2024 14:45:47 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=B8=B8=E9=87=8F?= =?UTF-8?q?=E6=9C=AA=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.jsx b/src/main.jsx index 0beac8c..cb1f8f5 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -37,7 +37,7 @@ import { isNotEmpty } from '@/utils/commons' import ProductsManage from '@/views/products/Manage'; import ProductsDetail from '@/views/products/Detail'; import ProductsAudit from '@/views/products/Audit'; -import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT } from '@/config' +import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT, PERM_PRODUCTS_OFFER_PUT } from '@/config' import './i18n' From 3f4fcc378986ffb9191cd2d821b15888b6b2877f Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Wed, 3 Jul 2024 15:27:24 +0800 Subject: [PATCH 5/8] =?UTF-8?q?feat:=20=E6=8A=8A=20style=20=E8=BD=AC?= =?UTF-8?q?=E4=B8=BA=20Tailwind=20CSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 4 +++- src/views/App.jsx | 3 +-- src/views/Login.jsx | 8 +++----- src/views/Standlone.jsx | 15 +++------------ src/views/account/ChangePassword.jsx | 6 ++---- src/views/account/RoleList.jsx | 9 ++------- src/views/reservation/Detail.jsx | 4 ++-- 7 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/main.jsx b/src/main.jsx index cb1f8f5..9129087 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -41,6 +41,8 @@ import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, import './i18n' +const { createRoot } = ReactDOM + const initRouter = async () => { return createBrowserRouter([ { @@ -92,7 +94,7 @@ const initAppliction = async () => { const router = await initRouter() - ReactDOM.createRoot(document.getElementById('root')).render( + createRoot(document.getElementById('root')).render( // {t('Submit')} - +
diff --git a/src/views/Login.jsx b/src/views/Login.jsx index 1ce2cc3..647a3fb 100644 --- a/src/views/Login.jsx +++ b/src/views/Login.jsx @@ -38,7 +38,7 @@ function Login() { } return ( - + - diff --git a/src/views/Standlone.jsx b/src/views/Standlone.jsx index 771f45c..9c7b20f 100644 --- a/src/views/Standlone.jsx +++ b/src/views/Standlone.jsx @@ -25,28 +25,19 @@ function Standlone() { algorithm: theme.defaultAlgorithm, }}> - +
App logo - Global Highlights Hub +

Global Highlights Hub

- +
diff --git a/src/views/account/ChangePassword.jsx b/src/views/account/ChangePassword.jsx index 11e63e5..9978c07 100644 --- a/src/views/account/ChangePassword.jsx +++ b/src/views/account/ChangePassword.jsx @@ -41,15 +41,13 @@ function ChangePassword() { return ( <> - + + src={reservationPreviewUrl} frameBorder='0' className='w-full h-[600px]'> + src={nameCardPreviewUrl} frameBorder='0' className='w-full h-[600px]'> From 9008ae8511295635d526f103ec13cb0a79ca786f Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 4 Jul 2024 09:17:53 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix=EF=BC=9A=E7=99=BB=E5=BD=95=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E5=90=8E=E6=B2=A1=E6=9C=89=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index 0b0a211..8b17a0b 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -126,11 +126,16 @@ const useAuthStore = create((set, get) => ({ }, logout: () => { - const { tokenInterval } = get() + const { tokenInterval, currentUser } = get() const { clearStorage } = usingStorage() clearStorage() clearInterval(tokenInterval) - set(initialState) + set(() => ({ + ...initialState, + currentUser: { + username: currentUser.username + } + })) }, startTokenInterval: () => { From dfd7d2a7490a0c50e8b77f1e783db4884c930360 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 4 Jul 2024 10:20:00 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E5=8F=8A=E8=AE=BE=E7=BD=AE=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++++---- package.json | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index db85873..38d3a02 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,15 @@ Global Highlights Hub 海外供应商平台 2. 运行开发环境:npm run dev 或者 start.bat 3. 打包代码:npm run build 或者 build.bat -// "push:tag": "npm version patch && git.exe push --progress "origin" main:main" -// "push:tag": "npm version patch && git push origin master" +## 版本设置 +npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] + +npm version premajor --no-git-tag-version +npm version prerelease --no-git-tag-version +npm version patch --no-git-tag-version + +"push:tag": "npm version patch && git.exe push --progress "origin" main:main" +"push:tag": "npm version patch && git push origin master" ## 相关文档 @@ -27,8 +34,6 @@ Bucket 名称:global-highlights-hub Endpoint:oss-cn-hongkong.aliyuncs.com global-highlights-hub.oss-cn-hongkong.aliyuncs.com - - 反馈表测试链接 http://202.103.68.111:5173/feedback/330948 diff --git a/package.json b/package.json index dd39be7..4d5e297 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "global.highlights.hub", + "name": "global-highlights-hub", "private": true, - "version": "2.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", From 7948d16613607fda3d242de5ffa75f5726666a39 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 4 Jul 2024 10:20:45 +0800 Subject: [PATCH 8/8] 2.0.0-0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d5e297..79be5b1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "1.0.0", + "version": "2.0.0-0", "type": "module", "scripts": { "dev": "vite",