优化代码
This commit is contained in:
parent
6b8be76b29
commit
0cad005267
@ -230,11 +230,11 @@ class BaseModel extends Model
|
||||
if(!$this->withTable)$alisa = '';
|
||||
$alisa_name = '';
|
||||
if($alisa)$alisa_name = "{$alisa}.";
|
||||
if(!$sort)$sort = "{$alisa_name}id asc";
|
||||
if(!$sort)$sort = "{$alisa_name}id desc";
|
||||
$self = static::getBaseWhere($whereData, null, $alisa,$this->withTable);
|
||||
if($this->withTable)$self = $self->with($this->withTable);
|
||||
if($page&&$limit)$self = $self->orderRaw($sort)->where($where)->page($page, $limit);
|
||||
$list = $self->select();
|
||||
if($page&&$limit)$self = $self->where($where)->page($page, $limit);
|
||||
$list = $self->orderRaw($sort)->select();
|
||||
foreach ($list as $row) {
|
||||
|
||||
if(isset($field['base'])&&$field['base']!=['*']){
|
||||
|
@ -34,9 +34,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
{field: 'miniurl', title: __('核销码内容'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'codeimage',visible:false, title: __('Codeimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'codeimage', title: __('Codeimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
|
||||
{field: 'codeoneimage',visible:false, title: __('Codeoneimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'codeoneimage', title: __('Codeoneimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'status', title: __('Status'), searchList: {"3":__('Status 3'),"6":__('Status 6')}, formatter: Table.api.formatter.status},
|
||||
{field: 'verificationtime', title: __('Verificationtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'verification_user_id', title: __('Verification_user_id')},
|
||||
|
Loading…
x
Reference in New Issue
Block a user