diff --git a/app/wechat/controller/Fans.php b/app/wechat/controller/Fans.php
index 985891164..f5c5af2ab 100644
--- a/app/wechat/controller/Fans.php
+++ b/app/wechat/controller/Fans.php
@@ -74,6 +74,23 @@ class Fans extends Controller
$this->_queue('同步微信用户数据', "xadmin:fansall");
}
+ /**
+ * 清空用户数据
+ * @auth true
+ */
+ public function truncate()
+ {
+ try {
+ $this->_query('WechatFans')->empty();
+ $this->_query('WechatFansTags')->empty();
+ $this->success('清空用户数据成功!');
+ } catch (\think\exception\HttpResponseException $exception) {
+ throw $exception;
+ } catch (\Exception $exception) {
+ $this->error("清空用户数据失败,{$exception->getMessage()}");
+ }
+ }
+
/**
* 删除用户信息
* @auth true
diff --git a/app/wechat/view/fans/index.html b/app/wechat/view/fans/index.html
index ab3f72345..27a4c81d3 100644
--- a/app/wechat/view/fans/index.html
+++ b/app/wechat/view/fans/index.html
@@ -9,8 +9,12 @@
+
+
+
+
-
+
{/block}