修改微信代理

This commit is contained in:
邹景立 2021-09-10 10:17:01 +08:00
parent e24527ecd7
commit eb04fc4dde
5 changed files with 3 additions and 7 deletions

View File

@ -154,5 +154,4 @@ class Config extends Controller
$this->error('抱歉,访问方式错误!'); $this->error('抱歉,访问方式错误!');
} }
} }
} }

View File

@ -78,11 +78,11 @@ class Fans extends Controller
public function black() public function black()
{ {
$data = $this->_vali([ $data = $this->_vali([
'openid.require' => '操作用户不能为空!',
'black.require' => '操作类型不能为空!', 'black.require' => '操作类型不能为空!',
'openid.require' => '操作用户不能为空!',
]); ]);
try { try {
foreach (array_chunk(explode(',', $data['openid']), 20) as $openids) { foreach (array_chunk(str2arr($data['openid']), 20) as $openids) {
if ($data['black']) { if ($data['black']) {
WechatService::WeChatUser()->batchBlackList($openids); WechatService::WeChatUser()->batchBlackList($openids);
$this->app->db->name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => 1]); $this->app->db->name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => 1]);

View File

@ -194,5 +194,4 @@ class Keys extends Controller
$this->error('关键字保存失败, 请稍候再试!'); $this->error('关键字保存失败, 请稍候再试!');
} }
} }
} }

View File

@ -38,7 +38,6 @@ class Login extends Controller
*/ */
protected $prefix = 'wxlogin'; protected $prefix = 'wxlogin';
/** /**
* 扫描显示二维码 * 扫描显示二维码
* @throws \Endroid\QrCode\Exceptions\ImageFunctionFailedException * @throws \Endroid\QrCode\Exceptions\ImageFunctionFailedException

View File

@ -47,7 +47,6 @@ class Push extends Controller
*/ */
protected $encrypt; protected $encrypt;
/** /**
* 请求微信 OPENID * 请求微信 OPENID
* @var string * @var string
@ -91,7 +90,7 @@ class Push extends Controller
* 消息推送处理接口 * 消息推送处理接口
* @return string * @return string
*/ */
public function index() public function index(): string
{ {
try { try {
if (WechatService::instance()->getType() === 'thr') { if (WechatService::instance()->getType() === 'thr') {