添加UGC
This commit is contained in:
parent
120e08865d
commit
12a431935e
@ -9,9 +9,12 @@ use app\api\validate\UpdateUserValidate;
|
||||
use app\api\validate\SetWechatUserValidate;
|
||||
use app\api\validate\WechatMobileValidate;
|
||||
use app\api\validate\ChangeMobileValidate;
|
||||
use app\common\server\WeChatServer;
|
||||
use think\exception\ValidateException;
|
||||
use app\common\server\UrlServer;
|
||||
use think\facade\Db;
|
||||
use Requests;
|
||||
|
||||
class User extends Api
|
||||
{
|
||||
/***
|
||||
@ -43,6 +46,15 @@ class User extends Api
|
||||
}catch(ValidateException $e) {
|
||||
return JsonServer::error($e->getError());
|
||||
}
|
||||
|
||||
if ($post['ugc']) {
|
||||
$config = WeChatServer::getOpWebConfig();
|
||||
$appid = $config['app_id'];
|
||||
$secret = $config['secret'];
|
||||
$result = Requests::get('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appid . '&secret=' . $secret);
|
||||
dump($result);die;
|
||||
}
|
||||
|
||||
$result = UserLogic::setUserInfo($post);
|
||||
if($result === true) {
|
||||
return JsonServer::success('设置成功');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user