mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]增加微信粉丝列表
This commit is contained in:
parent
c996e89e64
commit
2d77206d5e
@ -15,6 +15,7 @@
|
||||
namespace app\wechat\controller;
|
||||
|
||||
use controller\BasicAdmin;
|
||||
use service\WechatService;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
@ -26,8 +27,16 @@ use think\Db;
|
||||
*/
|
||||
class Fans extends BasicAdmin {
|
||||
|
||||
/**
|
||||
* 定义当前默认数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table='WechatFans';
|
||||
|
||||
/**
|
||||
* 显示粉丝列表
|
||||
* @return array|string
|
||||
*/
|
||||
public function index() {
|
||||
$this->title='微信粉丝管理';
|
||||
$db = Db::name($this->table);
|
||||
@ -38,4 +47,15 @@ class Fans extends BasicAdmin {
|
||||
return parent::_list($db);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步粉丝列表
|
||||
*/
|
||||
public function sync(){
|
||||
if(WechatService::syncAllFans('')){
|
||||
$this->success('同步获取所有粉丝成功!','');
|
||||
}else{
|
||||
$this->error('同步获取粉丝失败,请稍候再试!');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user