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..79be5b1 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": "2.0.0-0", "type": "module", "scripts": { "dev": "vite", 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 }) { ) } diff --git a/src/main.jsx b/src/main.jsx index 126a393..9129087 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -37,10 +37,12 @@ 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' +const { createRoot } = ReactDOM + const initRouter = async () => { return createBrowserRouter([ { @@ -69,7 +71,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:}, ] }, { @@ -92,7 +94,7 @@ const initAppliction = async () => { const router = await initRouter() - ReactDOM.createRoot(document.getElementById('root')).render( + createRoot(document.getElementById('root')).render( // ({ }, logout: () => { - const { tokenInterval } = get() + const { tokenInterval, currentUser } = get() const { clearStorage } = usingStorage() clearStorage() clearInterval(tokenInterval) - set(initialState) + set(() => ({ + ...initialState, + currentUser: { + username: currentUser.username + } + })) }, startTokenInterval: () => { diff --git a/src/views/App.jsx b/src/views/App.jsx index 7739d1a..e31a19d 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -101,8 +101,7 @@ function App() { >{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 ( <> - + 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..796aafe 100644 --- a/src/views/account/RoleList.jsx +++ b/src/views/account/RoleList.jsx @@ -161,17 +161,15 @@ function RoleList() { }} title={t('account:detail')} open={isRoleModalOpen} onOk={() => setRoleModalOpen(false)} onCancel={() => setRoleModalOpen(false)} - destroyOnClose={true} - clearOnDestroy={true} + destroyOnClose + forceRender modalRender={(dom) => ( + className='w-full' /> - + {t('account:roleList')} diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx index c9b62d9..e2cd7c2 100644 --- a/src/views/reservation/Detail.jsx +++ b/src/views/reservation/Detail.jsx @@ -167,12 +167,12 @@ function Detail() { + src={reservationPreviewUrl} frameBorder='0' className='w-full h-[600px]'> + src={nameCardPreviewUrl} frameBorder='0' className='w-full h-[600px]'>