diff --git a/app/Constants/v3/ErrorCode.php b/app/Constants/v3/ErrorCode.php index 40490b9..a955131 100644 --- a/app/Constants/v3/ErrorCode.php +++ b/app/Constants/v3/ErrorCode.php @@ -66,6 +66,12 @@ class ErrorCode extends AbstractConstants * @Message("更新失败") */ const USER_INFO_UPDATE_ERROR = 705; + + /** + * 商户账户密码不匹配 + * @Message("账号密码错误") + */ + const STORE_LOGIN_ERROR = 706; /************************************/ /* 定位相关 751-800 */ /************************************/ diff --git a/app/Controller/v3/StoreLoginController.php b/app/Controller/v3/StoreLoginController.php new file mode 100644 index 0000000..0a5e185 --- /dev/null +++ b/app/Controller/v3/StoreLoginController.php @@ -0,0 +1,25 @@ +request->all(); + $res = $this->storeLoginServicce->do($params['account'],$params['password']); + return $this->success($res); + } +} \ No newline at end of file diff --git a/app/Service/v3/Implementations/StoreLoginService.php b/app/Service/v3/Implementations/StoreLoginService.php new file mode 100644 index 0000000..b94dd7d --- /dev/null +++ b/app/Service/v3/Implementations/StoreLoginService.php @@ -0,0 +1,29 @@ + \App\Service\v3\Implementations\CouponService::class, \App\Service\v3\Interfaces\OrderListServiceInterface::class => \App\Service\v3\Implementations\OrderListService::class, \App\Service\v3\Interfaces\UserCenterBlockServiceInterface::class => \App\Service\v3\Implementations\UserCenterBlockService::class, + \App\Service\v3\Interfaces\StoreLoginServicceInterface::class => \App\Service\v3\Implementations\StoreLoginService::class, ]; diff --git a/config/routes.php b/config/routes.php index 37ff3a0..75dc918 100644 --- a/config/routes.php +++ b/config/routes.php @@ -107,4 +107,5 @@ Router::addGroup('/v3/', function () { Router::post('collectStore/update', 'App\Controller\v3\CollectStoreController@update'); Router::post('shopCartUpdate/update', 'App\Controller\v3\ShopCartUpdateController@update'); Router::post('shopCart/detail', 'App\Controller\v3\ShopCartController@detail'); + Router::post('storeLogin/login', 'App\Controller\v3\StoreLoginController@login'); },['middleware' => [\App\Middleware\Auth\ApiMiddleware::class, \App\Middleware\Auth\UserMiddleware::class]]); \ No newline at end of file