getParam: function () {
try {
var url = window.location.href;
var result = url.split("?")[1];
var keyValue = result.split("&");
var obj = {};
for (var i = 0; i < keyValue.length; i++) {
var item = keyValue[i].split("=");
obj[item[0]] = item[1];
}
return obj;
} catch (e) {
console.warn("There has no param value!");
}
}
获取路由中的id
最新推荐文章于 2024-11-17 22:31:08 发布