迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
请问怎么写能拿到用户发的文章总数 谢谢各位大佬
插件教程:https://www.xunruicms.com/doc/app-361.html
public function zones_data($data, $all){ $uid = (int)$_GET['follow_state']; if($uid){ if(\phpcmf\service::M()->table_site('zone_form_guanzhu')->where('cid', $data['id'])->where('uid', $uid)counts()){ $data['follow_state'] = '1';//已关注 }else{ $data['follow_state'] = '0';//未关注 } }else{ $data['follow_state'] = '0';//游客未关注 } $user = dr_member_info($data['uid']); $data['name'] = $user['name']; $data['userid'] = $user['id']; $data['headimg'] = dr_avatar($data['uid']); // 统计news模块数量 $data['wenzhang'] = \Phpcmf\Service::M()->table_site('news')->where('uid', $data['uid'])->counts(); return $data; }