Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
137cb709
Commit
137cb709
authored
Jan 31, 2018
by
zfc
Committed by
hujun
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刻苦
parent
06730cf4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
Basic.php
application/index/extend/Basic.php
+14
-14
public.js
public/resource/js/public.js
+2
-0
No files found.
application/index/extend/Basic.php
View file @
137cb709
...
...
@@ -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
;
}
/**
* 验证登录时效
...
...
public/resource/js/public.js
View file @
137cb709
...
...
@@ -32,6 +32,8 @@ function getUrlParam(name) {
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
//字符串格式化
String
.
prototype
.
stringFormat
=
function
(){
var
formatted
=
this
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment