pull/1/head
lqmac 10 months ago
parent e13614e36f
commit c35e212e42
  1. 4
      app/admin/controller/Goods.php
  2. 7
      app/admin/controller/Store.php
  3. 6
      config/app.php

@ -65,7 +65,9 @@ class Goods extends Controller
->where($where)
->order($sort." ".$order)
->paginate($this->request->param('per_page', 15))->each(function ($item, $key){
$item['create_time'] = date("Y-m-d H:i:s", $item['create_time']);
$item['update_time'] = date("Y-m-d H:i:s", $item['update_time']);
$item['channel'] = config('app.platformList')[$item['channel']] ?? "";
return $item;
});
return $this->renderSuccess(compact('list'));

@ -162,12 +162,7 @@ class Store extends Controller
*/
public function platformList(): Json
{
$platformList = [
'sn' => "苏宁",
'jd' => "京东",
'tb' => "淘宝",
'pdd' => "拼多多",
];
$platformList = config('app.platformList');
return $this->renderSuccess($platformList);
}
/**

@ -39,4 +39,10 @@ return [
'error_message' => '页面错误!请稍后再试~',
// 显示错误信息
'show_error_msg' => true,
'platformList' => [
'sn' => "苏宁",
'jd' => "京东",
'tb' => "淘宝",
'pdd' => "拼多多",
],
];

Loading…
Cancel
Save