-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
89 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
## 修改bsae.html | ||
|
||
> navbar当登陆后显示个人中心,未登陆显示login | ||
## 其他 | ||
|
||
> 创建roles表,在users表增加一些字段 | ||
1. 原来登陆后session存取的user_msg改为只存取uid | ||
2. 完成登陆后带有个人简介的功能 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,6 +245,7 @@ | |
], | ||
|
||
//密钥 | ||
'SECRET_KEY' => '123456' | ||
|
||
'SECRET_KEY' => '123456', | ||
//超级管理员 | ||
'BLOG_ADMIN' => '[email protected]' | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
namespace app\index\Model; | ||
use think\Model; | ||
|
||
class Roles extends Model{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{extend name="common/base" /} | ||
{block name="title"}我是首页{/block} | ||
{block name="page_content"}<h3>{$Think.APP_PATH}</h3>{/block} | ||
{block name="page_content"}<h3>{$user_msg.username}</h3>{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{extend name="common/base" /} | ||
{block name="title"}个人简介{/block} | ||
{block name="page_content"} | ||
<div class="page-header"> | ||
<h1>{$user_msg.username}</h1> | ||
<p> | ||
{$user_msg.name} | ||
来自: <a href="http://maps.google.com/?q={$user_msg.location}"> | ||
{$user_msg.location} | ||
</a> | ||
</p> | ||
<p><a href="mailto:{$user_msg.email}">{$user_msg.email}</a></p> | ||
<p>{$user_msg.about_me}</p> | ||
<p> | ||
上次登陆IP: {$user_msg.last_login_ip}<br/> | ||
上次登陆时间: {$user_msg.last_seen} | ||
</p> | ||
</div> | ||
{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
use think\migration\Seeder; | ||
|
||
class RolesSeeder extends Seeder | ||
{ | ||
public function run() | ||
{ | ||
$rows = [ | ||
['name' => 'Administrator','permission'=>255], | ||
['name' => 'User','permission'=>7] | ||
]; | ||
$this->table('roles')->insert($rows)->save(); | ||
} | ||
} |