JIALDemo/target/classes/front/js/common.js

24 lines
480 B
JavaScript
Raw Normal View History

2023-12-06 23:19:44 +08:00
var web_prefix = '/front'
function imgPath(path){
return '/common/download?name=' + path
}
//将url传参转换为数组
function parseUrl(url) {
// 找到url中的第一个?号
var parse = url.substring(url.indexOf("?") + 1),
params = parse.split("&"),
len = params.length,
item = [],
param = {};
for (var i = 0; i < len; i++) {
item = params[i].split("=");
param[item[0]] = item[1];
}
return param;
}