更新分组密码
This commit is contained in:
@@ -65,6 +65,7 @@ class HomeController extends BaseController
|
||||
try {
|
||||
$goods = $this->goodsService->detail($id);
|
||||
$this->goodsService->validatorGoodsStatus($goods);
|
||||
$this->goodsService->validatorGoodsGroupAccess($goods);
|
||||
// 有没有优惠码可以展示
|
||||
if (count($goods->coupon)) {
|
||||
$goods->open_coupon = 1;
|
||||
@@ -83,6 +84,26 @@ class HomeController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证商品分类访问密码
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function verifyGroupPassword(Request $request)
|
||||
{
|
||||
try {
|
||||
$request->validate([
|
||||
'group_id' => 'required|integer',
|
||||
'password' => 'required|string',
|
||||
]);
|
||||
$this->goodsService->verifyGroupPassword((int) $request->input('group_id'), (string) $request->input('password'));
|
||||
return response()->json(['code' => 200, 'msg' => __('dujiaoka.prompt.goods_group_password_success')]);
|
||||
} catch (RuleValidationException $ruleValidationException) {
|
||||
return response()->json(['code' => 400, 'msg' => $ruleValidationException->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 极验行为验证
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user