修改登录

This commit is contained in:
小松树 committed 2019-03-04 16:48:27 +08:00
1 parent a1e6dc24dc
commit 02883ee0ac
4 files changed
+9 -12

No files matched your search

+6 -9
View File
@@ -13,20 +13,17 @@ class YanZheng extends Controller
public function handle($request, \Closure $next)
{
// 声明帐号密码变量
$username = 0;
$password = 0;
$username = session('username');
$password = session('password');
// 如果用户没有登录直接跳转到登录页面
if( session('?username') )
if( strlen($username)<1 )
{
$username = session('username');
$password = session('password');
}elseif(cookie('username') != null)
{
// 获取用户名和密码
$username = cookie('username');
$password = cookie('password');
}else{
}
if( strlen($username)<1 )
{
$this->redirect('/login',302);
}
+1 -1
View File
@@ -102,7 +102,7 @@ class Index extends Controller
if($check)
{
// Session存值
session(null);
session('userid', $userinfo->id);
session('username', $username);
session('password', $password);
@@ -248,7 +248,7 @@
}
for (var i = data.length - 1; i >= 0; i--) {
var myhtml = "";
myhtml = "<input class='btn btn-secondary radius mr-5 size-MINI' type='button' value='" + data[i]['xingming'] + "' onclick=addCy(this,"+data[i]['id']+") title="+data[i]['danwei']+' '+data[i]['sex']+' '+data[i]['age']+" >";
myhtml = "<input class='btn btn-secondary radius mr-5 size-MINI' type='button' value='" + data[i]['xingming'] + "' onclick=addCy(this,"+data[i]['id']+") title="+data[i]['js_danwei']['jiancheng']+' '+data[i]['sex']+' '+data[i]['age']+" >";
$('#cySelect').append(myhtml);
}
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more