配置修改

This commit is contained in:
2026-04-17 18:04:51 +08:00
parent 84eab66b52
commit 2ccd6787e7
2 changed files with 64 additions and 1 deletions

View File

@ -35,7 +35,28 @@ class Distribution extends Api
return JsonServer::error('请求方式错误');
}
}
/**
* 扫码成为分销会员
*/
public function wxCodeApply()
{
if($this->request->isPost()){
$post = $this->request->post();
$user_id = $this->user_id;
try{
validate(DistributionValidate::class)->scene('apply')->check($post);
}catch(ValidateException $e) {
return JsonServer::error($e->getError());
}
$result = DistributionLogic::wxCodeApply($post,$user_id);
if($result) {
return JsonServer::success('成功');
}
return JsonServer::error('失败');
}else{
return JsonServer::error('请求方式错误');
}
}
/**
* 判断是否为分销会员
*/