房间密码
This commit is contained in:
@@ -140,7 +140,7 @@ class Room extends BaseCom
|
||||
public function join_room()
|
||||
{
|
||||
$room_id = input('room_id', 0);
|
||||
$password = input('password', '');
|
||||
$password = input('room_password', '');
|
||||
|
||||
//检测系统是否维护中
|
||||
$is_maintenance = get_system_config_value('is_maintenance');
|
||||
|
||||
@@ -9,6 +9,9 @@ use think\Log;
|
||||
class Wechat extends Controller
|
||||
{
|
||||
|
||||
private $appId = 'wx0f0c0c0c0c0c0c0c';
|
||||
private $appSecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
|
||||
|
||||
/**
|
||||
* 核心:用code换取openid的方法
|
||||
* @param string $code 微信回调带来的code
|
||||
@@ -41,7 +44,7 @@ class Wechat extends Controller
|
||||
if (curl_errno($ch)) {
|
||||
Log::error('[微信授权] 请求失败:' . curl_error($ch));
|
||||
curl_close($ch);
|
||||
return false;
|
||||
return ['code' => 0, 'msg' => '[微信授权] 请求失败:' . curl_error($ch), 'data' => null];
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
@@ -54,10 +57,11 @@ class Wechat extends Controller
|
||||
if (empty($data) || isset($data['errcode'])) {
|
||||
Log::error('[微信授权] 解析失败或返回错误', $data);
|
||||
return false;
|
||||
return ['code' => 0, 'msg' => '[微信授权] 解析失败或返回错误', 'data' => null];
|
||||
}
|
||||
|
||||
// 成功获取到openid
|
||||
return $data['openid'] ?? false;
|
||||
return ['code' => 1, 'msg' => '获取成功', 'data' => ['openid' => $data['openid']]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user