|
|
@ -12,6 +12,7 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
|
|
namespace app\admin\controller; |
|
|
|
namespace app\admin\controller; |
|
|
|
use app\store\model\RetailDescribe as retDescribeModel; |
|
|
|
use app\store\model\RetailDescribe as retDescribeModel; |
|
|
|
|
|
|
|
use app\common\enum\RetailDescribeEnum; |
|
|
|
|
|
|
|
|
|
|
|
class RetailDescribe extends Controller |
|
|
|
class RetailDescribe extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
@ -19,7 +20,10 @@ class RetailDescribe extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
$model = new retDescribeModel; |
|
|
|
$model = new retDescribeModel; |
|
|
|
$where = $this->request->get(); |
|
|
|
$where = $this->request->get(); |
|
|
|
$list = $model->getList($where); |
|
|
|
$list = $model->getList($where)->toArray(); |
|
|
|
|
|
|
|
foreach($list['data'] as &$item){ |
|
|
|
|
|
|
|
$item['plate_name'] = RetailDescribeEnum::$version[$item['plate_id']]??''; |
|
|
|
|
|
|
|
} |
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -47,4 +51,13 @@ class RetailDescribe extends Controller |
|
|
|
return $this->renderError($model->getError() ?: '删除失败'); |
|
|
|
return $this->renderError($model->getError() ?: '删除失败'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getPlate(){ |
|
|
|
|
|
|
|
$list1 = RetailDescribeEnum::$version; |
|
|
|
|
|
|
|
$list = []; |
|
|
|
|
|
|
|
foreach($list1 as $key => $value){ |
|
|
|
|
|
|
|
$list[] = ['id' => $key, 'name' => $value]; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return $this->renderSuccess(compact('list')); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |