// +---------------------------------------------------------------------- namespace app\controller\api\user; use app\common\repositories\user\AwardIntegralPriceRepository; use crmeb\basic\BaseController; use think\App; class Award extends BaseController { protected $repository; public function __construct(App $app, AwardIntegralPriceRepository $repository) { parent::__construct($app); $this->repository = $repository; } /** * 积分价格 * @return mixed * @author xaboy * @day 2020/5/28 */ public function integral_price() { return app('json')->success($this->repository->getPrice()); } }