feat(IndexController): 添加返回数据处理逻辑
This commit is contained in:
parent
9811e47f7e
commit
e8d1cbb7cd
@ -141,6 +141,7 @@ class IndexController extends BaseLikeController
|
||||
} else {
|
||||
$item['nickname'] = '';
|
||||
}
|
||||
return $item;
|
||||
});
|
||||
return $this->success('ok', $res?->toArray());
|
||||
}
|
||||
@ -160,7 +161,9 @@ class IndexController extends BaseLikeController
|
||||
// return $this->fail(ProductLogic::getError()); //获取错误信息并返回错误信息
|
||||
// }
|
||||
$select = Db::connect('demo')->name('store_order')->where($where)->limit(20)->order('id desc')
|
||||
->field('id,order_id,pay_price,create_time')->select()->toArray();
|
||||
->field('id,order_id,pay_price,create_time')->select()->each(function ($item) {
|
||||
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
|
||||
})->toArray();
|
||||
return $this->success('ok', $select);
|
||||
}
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user