From a61ef8882baabc51b483b1b0555644a0bbb39daa Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 21 Jun 2024 09:38:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=8F=82?= =?UTF-8?q?=E6=95=B0:=20wu=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useProductsSets.js | 14 +++++++------- src/stores/Auth.js | 1 + src/views/App.jsx | 3 ++- src/views/products/Audit.jsx | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 93feaac..0994b3f 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -9,13 +9,13 @@ import { useTranslation } from 'react-i18next'; 3 飞机票务 4 游船 5 快巴 -6 旅行社(综费) -7 景点 -8 特殊项目 +6 旅行社(综费) - +7 景点 - +8 特殊项目 - 9 其他 A 酒店 -B 超公里 -C 餐费 +B 超公里 - +C 餐费 - D 包价包 X 站 */ @@ -33,7 +33,7 @@ export const useProductsTypes = () => { { label: t('products:type.Attractions'), value: '7', key: '7' }, { label: t('products:type.Meals'), value: 'C', key: 'C' }, { label: t('products:type.Extras'), value: '8', key: '8' }, - { label: t('products:type.Special'), value: 'Special', key: 'Special' }, + // { label: t('products:type.Special'), value: 'Special', key: 'Special' }, ]; setTypes(newData); }, [i18n.language]); @@ -51,7 +51,7 @@ export const useProductsAuditStates = () => { { key: '-1', value: '-1', label: t('products:auditState.New') }, { key: '0', value: '0', label: t('products:auditState.Pending') }, { key: '2', value: '2', label: t('products:auditState.Approved') }, - // { key: '3', value: '3', label: t('products:auditState.Rejected') }, + { key: '3', value: '3', label: t('products:auditState.Rejected') }, { key: '1', value: '1', label: t('products:auditState.Published') }, ]; setTypes(newData); diff --git a/src/stores/Auth.js b/src/stores/Auth.js index f7f31f3..5511e6b 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -88,6 +88,7 @@ const useAuthStore = create((set, get) => ({ setStorage(KEY_TRAVEL_AGENCY_ID, userDetail.LMI_VEI_SN) setStorage(KEY_USER_DETAIL, {username: userDetail.LoginName, travelAgencyName: userDetail.VName}) appendRequestParams('token', loginToken) + appendRequestParams('wu_id', userDetail.LMI_SN) // loadPageSpy(`${json.Result.VName}-${json.Result.LoginName}`) startTokenInterval() }, diff --git a/src/views/App.jsx b/src/views/App.jsx index 0edd221..b61c1ce 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -28,7 +28,7 @@ function App() { const [validateUserPassword, tokenTimeout] = useAuthStore( (state) => [state.validateUserPassword, state.tokenTimeout]) - const { loginToken, userDetail } = usingStorage() + const { loginToken, userDetail, userId } = usingStorage() const noticeUnRead = useNoticeStore((state) => state.noticeUnRead) const href = useHref() @@ -40,6 +40,7 @@ function App() { if (!needToLogin) { appendRequestParams('token', loginToken) + appendRequestParams('wu_id', userId) } useEffect(() => { diff --git a/src/views/products/Audit.jsx b/src/views/products/Audit.jsx index 16cefc9..c548de2 100644 --- a/src/views/products/Audit.jsx +++ b/src/views/products/Audit.jsx @@ -96,12 +96,12 @@ const PriceTable = ({dataSource, loading}) => { { title: '', key: 'action', - render: (_, r) => ( + render: (_, r) => r.audit_state_id <= 0 ?( - ), + ) : null, }, ]; return r.id} />;