$this->assign('type_id', $article['cid']);
/*$now_time = strtotime('now');
if(($article['update_time']+180)<$now_time){
$article['view'] += 1;
db('article')->where('id',$article_id)->update(['update_time'=>$now_time,'view'=>$article['view']]);
}*/
if(!empty($article['photo_code']))
$article['photo_code'] = json_decode($article['photo_code'],true);
$this->assign('article', $article);
$this->assign('up_article', db('article')->where('cid',$article['cid'])->where("create_time", ">", $create_time)->order("create_time", "asc")->find());
$this->assign('down_article', db('article')->where('cid',$article['cid'])->where("create_time", "<", $create_time)->order("create_time", "desc")->find());
return $this->fetch();
}
public function add_alliance(){
$date = input();
$date['create_time'] = time();
if(db('alliance')->insert($date))
return json(['msg'=>'提交成功']);
else