We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在处理 '2024-04-01 19:00:00' 遇到空格时,会格式化处理,因此优化方案如下
const formatParams = (data = {}, method = 'get') => { const newParams = Object.assign(data); const keys = Object.keys(newParams).sort((a, b) => a.localeCompare(b)); const newParams1 = {}; keys.forEach((key) => { newParams1[key] = newParams[key]; }); const stirngA = qs.stringify(newParams1, { encoder: (str) => { if (typeof str !== 'string') return str; return str.replace(/ /g, ' '); }, }); const stringSignTemp = `${stirngA}&key=${config.hyKey}`; const sign = md5.md5Hash(stringSignTemp).toString().toUpperCase(); if (method === 'get') { const otherParams = Object.assign(newParams1, { sign, }); return qs.stringify(otherParams, { encoder: (str) => { if (typeof str !== 'string') return str; return str.replace(/ /g, ' '); }, }); } const otherParams = Object.assign(newParams1, { sign, }); return otherParams; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在处理 '2024-04-01 19:00:00' 遇到空格时,会格式化处理,因此优化方案如下
The text was updated successfully, but these errors were encountered: