diff --git a/app/api/controller/ArticleComment.php b/app/api/controller/ArticleComment.php index 2eb9711..46a326d 100644 --- a/app/api/controller/ArticleComment.php +++ b/app/api/controller/ArticleComment.php @@ -25,7 +25,7 @@ class ArticleComment extends BaseController{ public function index($search='',$vote_id=1,$page=1) { $select=Db::table('fa_article_comment') ->withAttr('user_info',function ($data,$value){ - $find=Db::connect('shop')->table('eb_user')->where('id',$value['user_id'])->field('nickname,avatar')->find(); + $find=Db::connect('shop')->table('eb_user')->where('uid',$value['user_id'])->field('nickname,avatar')->find(); $msg=Db::table('fa_szxc_information_usermsg')->where('user_id',$value['user_id'])->field('political_outlook,name')->find(); $data = $find; $data['user_type_info']='群众'; @@ -47,7 +47,7 @@ class ArticleComment extends BaseController{ ->where('vote_id', $vote_id)->where('status', 1)->where('type',1)->page($page)->limit(20)->select(); $select_type2=Db::table('fa_article_comment') ->withAttr('user_info',function ($data,$value){ - $find=Db::connect('shop')->table('eb_user')->where('id',$value['user_id'])->field('nickname,avatar')->find(); + $find=Db::connect('shop')->table('eb_user')->where('uid',$value['user_id'])->field('nickname,avatar')->find(); $msg=Db::table('fa_szxc_information_usermsg')->where('user_id',$value['user_id'])->field('political_outlook,name')->find(); $data = $find; $data['user_type_info']='群众'; @@ -69,7 +69,7 @@ class ArticleComment extends BaseController{ ->where('vote_id', $vote_id)->where('status', 1)->where('type',2)->page($page)->limit(20)->select(); $select_type3=Db::table('fa_article_comment') ->withAttr('user_info',function ($data,$value){ - $find=Db::connect('shop')->table('eb_user')->where('id',$value['user_id'])->field('nickname,avatar')->find(); + $find=Db::connect('shop')->table('eb_user')->where('uid',$value['user_id'])->field('nickname,avatar')->find(); $msg=Db::table('fa_szxc_information_usermsg')->where('user_id',$value['user_id'])->field('political_outlook,name')->find(); $data = $find; $data['user_type_info']='群众'; @@ -94,7 +94,7 @@ class ArticleComment extends BaseController{ public function one_list($vote_id=1,$page=1) { $select=Db::table('fa_article_comment') ->withAttr('user_info',function ($data,$value){ - $find=Db::connect('shop')->table('eb_user')->where('id',$value['user_id'])->field('nickname,avatar')->find(); + $find=Db::connect('shop')->table('eb_user')->where('uid',$value['user_id'])->field('nickname,avatar')->find(); $msg=Db::table('fa_szxc_information_usermsg')->where('user_id',$value['user_id'])->field('political_outlook,name')->find(); $data = $find; $data['user_type_info']='群众'; diff --git a/app/api/controller/MyArticle.php b/app/api/controller/MyArticle.php index 5024063..e52debd 100644 --- a/app/api/controller/MyArticle.php +++ b/app/api/controller/MyArticle.php @@ -111,7 +111,7 @@ class MyArticle extends BaseController $find['end_count'] = 0; $find['overdue_count'] = 0; if ($value['is_nickname'] == 0) { - $user = Db::connect('shop')->table('eb_user')->where('id', $value['user_id'])->field('nickname,avatar,phone')->find(); + $user = Db::connect('shop')->table('eb_user')->where('uid', $value['user_id'])->field('nickname,avatar,phone')->find(); if ($user) { $find = $user; }