From 544148eddae96db824423cd059ebecb9d13c392e Mon Sep 17 00:00:00 2001 From: xusd <330628789@qq.com> Date: Thu, 19 Jun 2025 20:52:50 +0800 Subject: [PATCH] fix:市平台项目更新 --- src/components/NewPage/index.jsx | 46 +++++++++++++++++++++++++++++++--------------- 1 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/components/NewPage/index.jsx b/src/components/NewPage/index.jsx index e32befb..44c870c 100644 --- a/src/components/NewPage/index.jsx +++ b/src/components/NewPage/index.jsx @@ -2,7 +2,7 @@ * @Company: hugeInfo * @Author: ldh * @Date: 2022-03-04 14:29:11 - * @LastEditTime: 2024-10-24 10:25:23 + * @LastEditTime: 2025-06-12 17:24:36 * @LastEditors: lwh * @Version: 1.0.0 * @Description: 页面框架 @@ -13,26 +13,42 @@ import './index.less'; import * as $$ from '../../utils/utility'; import RegisterChooseModal from '../RegisterChooseModal'; +import { Watermark } from '@arco-design/web-react'; const NewPage = ({ children, pageHead, registerChooseModalVisible }) => { - if (!$$.getSessionStorage('customerSystemToken')) { - $$.catchApiError({ content: '抱歉!登录状态已失效请重新登录', loginStatus: 'lose' }); - return null; - } + if (!$$.getSessionStorage('customerSystemToken')) { + $$.catchApiError({ content: '抱歉!登录状态已失效请重新登录', loginStatus: 'lose' }); + return null; + } - return ( - <> - {!!pageHead && <PageHead {...pageHead} />} - {children} - {/* 纠纷登录入口modal */} - {!!registerChooseModalVisible && <RegisterChooseModal visible={registerChooseModalVisible} />} - </> - ); + let customerSystemUser = $$.getSessionStorage('customerSystemUser'); + + const getCurrentTime = () => { + const now = new Date(); + const year = now.getFullYear(); + const month = String(now.getMonth() + 1).padStart(2, '0'); + const day = String(now.getDate()).padStart(2, '0'); + const hours = String(now.getHours()).padStart(2, '0'); + const minutes = String(now.getMinutes()).padStart(2, '0'); + const seconds = String(now.getSeconds()).padStart(2, '0'); + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + }; + + const watermarkContent = `${customerSystemUser.trueName} ${getCurrentTime()}`; + + return ( + <Watermark style={{ height: '100%' }} gap={[200, 200]} content={watermarkContent}> + {!!pageHead && <PageHead {...pageHead} />} + {children} + {/* 纠纷登录入口modal */} + {!!registerChooseModalVisible && <RegisterChooseModal visible={registerChooseModalVisible} />} + </Watermark> + ); }; NewPage.propTypes = { - pageHead: PropTypes.any, - registerChooseModalVisible: PropTypes.any, + pageHead: PropTypes.any, + registerChooseModalVisible: PropTypes.any, }; export default NewPage; -- Gitblit v1.8.0