手机正则
Vue.prototype.checkPhone = function(phone) {
if (!(/^1[3456789]\d{9}$/.test(phone))) {
return false;
}
return true;
}
获取url参数
Vue.prototype.getUrlParms = function(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}