解决数据库查询的一个不兼容问题

This commit is contained in:
2020-04-20 22:46:50 +08:00
parent 8612f1ffae
commit 989b3a85e4

View File

@@ -160,7 +160,7 @@ class Base extends BaseC {
// 是否开发者模式 // 是否开发者模式
$where['is_dev'] = 0; $where['is_dev'] = 0;
} }
$row = Menu::where($where)->order('sort asc')->field('id,title,url,icon,"" as style')->select(); $row = Menu::where($where)->order('sort asc')->field('id,title,url,icon,'' as style')->select();
foreach ($row as $key => $value) { foreach ($row as $key => $value) {
//此处用来做权限判断 //此处用来做权限判断
if (!IS_ROOT && !$this->checkRule(substr($value['url'], 1), 2, null)) { if (!IS_ROOT && !$this->checkRule(substr($value['url'], 1), 2, null)) {