feat: 添加车牌的搭建

This commit is contained in:
2025-09-18 20:44:29 +08:00
parent 8af82e54ef
commit fd5902ca05
10 changed files with 209 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
export function GetWxMiniProgramUrlParam(url) {
export function getUrlParams(url) {
let theRequest = {};
if(url.indexOf("#") != -1){
const str=url.split("#")[1];
@@ -15,3 +15,23 @@ export function GetWxMiniProgramUrlParam(url) {
}
return theRequest;
}
/**
* 将对象参数转换为URL查询字符串格式
* @param {Object} args - 参数对象
* @returns {String} 返回key=value&格式的查询字符串
*/
export function objectToUrlParams(args) {
if (!args || typeof args !== 'object') {
return '';
}
const params = [];
for (const key in args) {
if (args.hasOwnProperty(key) && args[key] !== undefined && args[key] !== null) {
params.push(`${key}=${args[key]}`);
}
}
return params.length > 0 ? params.join('&') : '';
}