勾股CMS2.0版本,重构了系统菜单功能模块、权限模块,新增商品功能,以及其他功能模块的优化。

This commit is contained in:
hdm 2022-02-16 18:51:46 +08:00
parent 1747797e44
commit b02ce674ea
4 changed files with 10 additions and 5 deletions

View File

@ -41,6 +41,8 @@ class Index extends BaseController
$adminCount = Db::name('Admin')->where('status', '1')->count();
$userCount = Db::name('User')->where('status', '1')->count();
$articleCount = Db::name('Article')->where('status', '1')->count();
$goodsCount = Db::name('Goods')->where('status', '1')->count();
$fileCount = Db::name('File')->count();
$install = false;
if (file_exists(CMS_ROOT . 'app/install')) {
$install = true;
@ -48,6 +50,8 @@ class Index extends BaseController
View::assign('adminCount', $adminCount);
View::assign('userCount', $userCount);
View::assign('articleCount', $articleCount);
View::assign('goodsCount', $goodsCount);
View::assign('fileCount', $fileCount);
View::assign('install', $install);
return View();
}

View File

@ -63,7 +63,7 @@ class User extends BaseController
if (!empty($param['id']) && $param['id'] > 0) {
$param['update_time'] = time();
$res = Db::name('User')->where(['id' => $param['id']])->strict(false)->field(true)->update($param);
if ($res) {
if ($res !== false) {
add_log('edit', $param['id'], $param);
return to_assign();
} else {

View File

@ -81,12 +81,12 @@
<div class="num-num">{$articleCount}</div>
</td>
<td>
<div class="num-title">图片</div>
<div class="num-num">0</div>
<div class="num-title">商品</div>
<div class="num-num">{$goodsCount}</div>
</td>
<td>
<div class="num-title">商品</div>
<div class="num-num">0</div>
<div class="num-title">附件</div>
<div class="num-num">{$fileCount}</div>
</td>
</tr>
</table>

View File

@ -41,6 +41,7 @@ class User extends BaseController
{
$param = get_params();
$param['birthday'] = strtotime($param['birthday']);
$param['update_time'] = time();
$res = Db::name('User')->where(['id' => $param['id']])->strict(false)->field(true)->update($param);
if ($res !== false) {
add_user_log('edit', '个人信息', $param['id'], $param);