You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
650 B
31 lines
650 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use Hyperf\Di\Annotation\Inject;
|
|
use App\Service\UserServiceInterface;
|
|
use App\Request\UserUnionidRequest;
|
|
|
|
class UserController extends BaseController
|
|
{
|
|
|
|
/**
|
|
* @Inject
|
|
* @var UserServiceInterface
|
|
*/
|
|
protected $userService;
|
|
|
|
/**
|
|
* 根据用户的openid更新unionid信息
|
|
*/
|
|
public function saveUserUnionid(UserUnionidRequest $request)
|
|
{
|
|
$openid = $this->request->input('openid','');
|
|
$unionid = $this->request->input('unionid','');
|
|
|
|
return $this->success($this->userService->saveUserUnionid($openid,$unionid));
|
|
}
|
|
|
|
}
|