diff --git a/app/api/controller/Setting.php b/app/api/controller/Setting.php index cd3694ec..094cd7a6 100644 --- a/app/api/controller/Setting.php +++ b/app/api/controller/Setting.php @@ -14,6 +14,7 @@ namespace app\api\controller; use think\response\Json; use app\api\service\Setting as SettingService; +use app\store\model\Delivery as DeliveryModel; /** * 商城设置控制器 @@ -35,4 +36,18 @@ class Setting extends Controller $setting = $service->getPublic(); return $this->renderSuccess(compact('setting')); } + + /** + * 获取所有记录 + * @return Json + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function deliveryall(): Json + { + $model = new DeliveryModel; + $list = $model->getAll(); + return $this->renderSuccess(compact('list')); + } }