/**
 * 获取url链接参数
 * @param {Object} url
 * @param {Object} name
 */
export function getQueryString(url, name) {
	var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
	var r = url.substr(1).match(reg)
	if (r != null) {
		return r[2]
	}
	return null;
}