mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-31 04:02:07 +08:00 
			
		
		
		
	增加粉丝数据清空操作
This commit is contained in:
		
							parent
							
								
									6586d8acef
								
							
						
					
					
						commit
						1245523a83
					
				| @ -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 | ||||
|  | ||||
| @ -9,8 +9,12 @@ | ||||
| <button data-action='{:url("blackDel")}' data-rule="openid#{key}" data-csrf="{:systoken('blackDel')}" class='layui-btn layui-btn-sm layui-btn-primary'>移出黑名单</button> | ||||
| <!--{/if}--> | ||||
| 
 | ||||
| <!--{if auth("truncate")}--> | ||||
| <button data-load='{:url("truncate")}' data-confirm="确定要清空所有用户数据吗?" class='layui-btn layui-btn-sm layui-btn-primary'>清空用户数据</button> | ||||
| <!--{/if}--> | ||||
| 
 | ||||
| <!--{if auth("sync")}--> | ||||
| <button data-queue='{:url("sync")}' data-confirm="是否要创建后台任务同步用户数据?" class='layui-btn layui-btn-sm layui-btn-primary'>同步用户数据</button> | ||||
| <button data-queue='{:url("sync")}' data-confirm="确定要创建同步用户数据的后台任务?" class='layui-btn layui-btn-sm layui-btn-primary'>同步用户数据</button> | ||||
| <!--{/if}--> | ||||
| {/block} | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user