/* eslint-disable */ import { Modal, message as antdMessage } from 'antd-v4'; import { Modal as mobileModal } from 'antd-mobile-v2'; import commonConfig from '../config'; const { warning } = Modal; const antdMobileAlert = mobileModal.alert; let debounceCount; let secondContent = []; let width; const queryWidth = () => { width = document?.documentElement?.getBoundingClientRect()?.width <= 750 ? '80%' : 500; } const openConfirm = (config) => { queryWidth(); const { message, ...rest } = config; secondContent.push(
{message}
) if (debounceCount) { clearTimeout(debounceCount); }; const fn = () => { const userinfo = JSON.parse(localStorage.getItem(`${commonConfig.prefix}userinfo`)) || {}; const language = userinfo.sLanguage || 'sChinese'; // 默认简体中文 const isEnglish = language === 'sEnglish'; // 使用语言设置 const sTitle = isEnglish ? 'Reminder' : language === 'sBig5' ? '溫馨提示' : '温馨提示'; const okText = language === 'sEnglish' ? 'Confirm' : language === 'sBig5' ? '確認': '确认'; if (location.pathname.toLocaleLowerCase().includes('mobile')) { antdMobileAlert(sTitle, secondContent || '出错了', [ { text: '确认', }, ]) } else { warning({ title: sTitle, content: