mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Fans.php
This commit is contained in:
parent
b3a78e680f
commit
146bbe6a04
@ -102,7 +102,7 @@ class Fans extends Controller
|
|||||||
try {
|
try {
|
||||||
foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) {
|
foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) {
|
||||||
WechatService::WeChatUser($this->appid)->batchBlackList($openids);
|
WechatService::WeChatUser($this->appid)->batchBlackList($openids);
|
||||||
Db::name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => '1']);
|
Db::name('WechatFans')->where(['appid' => $this->appid])->whereIn('openid', $openids)->update(['is_black' => '1']);
|
||||||
}
|
}
|
||||||
$this->success('拉黑粉丝信息成功!');
|
$this->success('拉黑粉丝信息成功!');
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
@ -122,7 +122,7 @@ class Fans extends Controller
|
|||||||
$this->applyCsrfToken();
|
$this->applyCsrfToken();
|
||||||
foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) {
|
foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) {
|
||||||
WechatService::WeChatUser($this->appid)->batchUnblackList($openids);
|
WechatService::WeChatUser($this->appid)->batchUnblackList($openids);
|
||||||
Db::name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => '0']);
|
Db::name('WechatFans')->where(['appid' => $this->appid])->whereIn('openid', $openids)->update(['is_black' => '0']);
|
||||||
}
|
}
|
||||||
$this->success('取消拉黑粉丝信息成功!');
|
$this->success('取消拉黑粉丝信息成功!');
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user