修改获取返补比例列表方法
This commit is contained in:
parent
305e3b1bc4
commit
18a2ec33dc
@ -14,7 +14,8 @@ class Subsidy extends AdminBase
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
return JsonServer::success('获取成功', SubsidyLogic::lists($get));
|
||||
$lists = (new GoodsSubsidy())->getSubsidy($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
return view('', [
|
||||
|
||||
@ -16,26 +16,6 @@ use think\facade\Db;
|
||||
*/
|
||||
class SubsidyLogic extends Logic
|
||||
{
|
||||
// 列表
|
||||
public static function lists($get)
|
||||
{
|
||||
$lists = GoodsSubsidy::where('is_delete', 0)
|
||||
->order('id desc')
|
||||
->paginate([
|
||||
'list_rows'=> $get['limit'],
|
||||
'page'=> $get['page'],
|
||||
]);
|
||||
|
||||
foreach ($lists as &$v) {
|
||||
$v['profit'] = self::formatStr($v['profit']);
|
||||
$v['discount'] = self::formatStr($v['discount']);
|
||||
$v['subsidy'] = self::formatStr($v['subsidy']);
|
||||
}
|
||||
|
||||
return ['count' => $lists->total(), 'lists' => $lists->getCollection()];
|
||||
}
|
||||
|
||||
|
||||
// 添加返补比例设置
|
||||
public static function add($post)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user