chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
48
app/controller/api/v1/user/PromoterApply.php
Normal file
48
app/controller/api/v1/user/PromoterApply.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace app\controller\api\v1\user;
|
||||
|
||||
use app\Request;
|
||||
use app\services\agent\DivisionApplyServices;
|
||||
use app\services\agent\PromoterApplyServices;
|
||||
use crmeb\services\CacheService;
|
||||
use think\annotation\Inject;
|
||||
|
||||
class PromoterApply
|
||||
{
|
||||
/**
|
||||
* @var PromoterApplyServices
|
||||
*/
|
||||
#[Inject]
|
||||
protected PromoterApplyServices $services;
|
||||
|
||||
|
||||
public function applyInfo(Request $request)
|
||||
{
|
||||
$user = $request->user();
|
||||
$uid = $request->uid();
|
||||
$data = $this->services->applyInfo($uid, $user);
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
public function applyPromoter(Request $request, $id)
|
||||
{
|
||||
$data = $request->postMore([
|
||||
['uid', 0],
|
||||
['nickname', ''],
|
||||
['real_name', ''],
|
||||
['phone', ''],
|
||||
['code', 0]
|
||||
]);
|
||||
$data['uid'] = $request->uid();
|
||||
$userInfo = $request->user();
|
||||
if (sys_config('brokerage_apply_phone_verify') == 1) {
|
||||
$verifyCode = CacheService::get('code_' . $data['phone']);
|
||||
if ($verifyCode != $data['code']) return app('json')->fail('验证码错误');
|
||||
}
|
||||
unset($data['code']);
|
||||
$data['refusal_reason'] = '';
|
||||
$id = $this->services->applyPromoter($data, $id, $userInfo);
|
||||
return app('json')->success('申请成功', ['id' => $id]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user