userlogin

This commit is contained in:
zuiidea
2017-04-14 11:45:00 +08:00
parent 688d411dc1
commit 4cf25852da
7 changed files with 50 additions and 21 deletions
+14
View File
@@ -40,10 +40,24 @@ Date.prototype.format = function (format) {
return format
}
/**
* @param {String}
* @return {String}
*/
const queryURL = (name) => {
let reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`, 'i')
let r = window.location.search.substr(1).match(reg)
if (r != null) return decodeURI(r[2])
return null
}
module.exports = {
config,
menu,
request,
color,
classnames,
queryURL,
}