Commit 137cb709 authored by zfc's avatar zfc Committed by hujun

刻苦

parent 06730cf4
......@@ -81,22 +81,22 @@ class Basic extends Controller
if ($session != NULL) {
//判断当前控制器用户是否拥有进入权限
foreach ($session as $v){
//不区分大小写
if (strcasecmp(trim($v['name']), $requestPath) == 0){
$rule = $v;
}
}
}
if ($rule == 0){
if ($this->request->isAjax()){
return $this->response('300','没有权限');
}
} else {
Session::set("userRule",$rule);
}
}
public function userAuth(){
$request= \think\Request::instance();
$r= $request->controller();
$route= $request->module();
$name= $request->action();
$url=$route."/".$name;
}
/**
* 验证登录时效
......
......@@ -32,6 +32,8 @@ function getUrlParam(name) {
if(r != null) return unescape(r[2]);
return null;
}
//字符串格式化
String.prototype.stringFormat = function(){
var formatted = this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment