显示网络名
This commit is contained in:
parent
5bf79646a2
commit
f84e122636
@ -753,7 +753,7 @@ class Article extends BaseController
|
|||||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||||
->alias('a')
|
->alias('a')
|
||||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time >=".date('Y-m-d'))
|
||||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
->field('a.id,a.title,a.describe,a.source,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||||
->order('a.id DESC')
|
->order('a.id DESC')
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
}else if ($screen==3){
|
}else if ($screen==3){
|
||||||
@ -764,7 +764,7 @@ class Article extends BaseController
|
|||||||
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
$select = Db::table('fa_article')->where($where)->page($page)->limit(20)
|
||||||
->alias('a')
|
->alias('a')
|
||||||
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
->join(['fa_article_vote_side_tables' => 'avst'],"a.id = avst.article_id and avst.end_time <=".date('Y-m-d'))
|
||||||
->field('a.id,a.title,a.describe,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
->field('a.id,a.title,a.describe,a.source,a.user_id,a.view,a.view_time,a.image,a.end_time,a.is_solve,a.is_vote,a.is_nickname,a.video,a.category_type,avst.end_time as die_time')
|
||||||
->order('a.id DESC')->select()->toArray();
|
->order('a.id DESC')->select()->toArray();
|
||||||
}else{
|
}else{
|
||||||
//查询是否解决
|
//查询是否解决
|
||||||
@ -774,7 +774,7 @@ class Article extends BaseController
|
|||||||
$where[] = ['is_solve', '=', 1];
|
$where[] = ['is_solve', '=', 1];
|
||||||
}
|
}
|
||||||
$select = Db::table('fa_article')->with('user')->where($where)->page($page)->limit(20)
|
$select = Db::table('fa_article')->with('user')->where($where)->page($page)->limit(20)
|
||||||
->field('id,title,user_id,view,view_time,image,end_time,is_solve,is_vote,is_nickname,video,category_type,describe')
|
->field('id,title,user_id,view,source,view_time,image,end_time,is_solve,is_vote,is_nickname,video,category_type,describe')
|
||||||
->order('id',$orders)->select()->toArray();
|
->order('id',$orders)->select()->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,8 +784,12 @@ class Article extends BaseController
|
|||||||
$select[$key]['avatar'] = "";
|
$select[$key]['avatar'] = "";
|
||||||
$select[$key]['user_id'] = 0;
|
$select[$key]['user_id'] = 0;
|
||||||
} else {
|
} else {
|
||||||
|
if ($value['user_id']==1){
|
||||||
|
$select[$key]['nickname']=$value['source'];
|
||||||
|
}else{
|
||||||
$select[$key]['nickname'] = Db::table('fa_szxc_information_usermsg')->where('user_id', $value['user_id'])->value('name');
|
$select[$key]['nickname'] = Db::table('fa_szxc_information_usermsg')->where('user_id', $value['user_id'])->value('name');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//投票处理
|
//投票处理
|
||||||
if ($value['is_vote'] == 1) {
|
if ($value['is_vote'] == 1) {
|
||||||
$article_vote = Db::table('fa_article_vote_side_tables')->where('article_id', $value['id'])->find();
|
$article_vote = Db::table('fa_article_vote_side_tables')->where('article_id', $value['id'])->find();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user