要搞直接登录

This commit is contained in:
xk_guohonglei
2020-09-04 09:20:45 +08:00
parent 39d433998a
commit 395ebd432d
28 changed files with 7367 additions and 44 deletions

22
common/checker.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
error:'',
isJSON : function (str){
if (typeof str == 'string') {
try {
var obj=JSON.parse(str);
if(typeof obj == 'object' && obj ){
return true;
}else{
return false;
}
} catch(e) {
console.log('error'+str+'!!!'+e);
return false;
}
}
},
isNumber : function (checkVal){
var reg = /^-?[1-9][0-9]?.?[0-9]*$/;
return reg.test(checkVal);
}
}