where(['title'=>$this->auth->login_studio])->find(); #轮播 $slideshow = db('ads')->where(['status' => 1,'studio'=>$this->auth->login_studio])->select(); if (empty($slideshow)) { $slideshow = []; } $index_order=config('site')['index_order']; $artist = db('article')->where(['catid' => 2, 'status' => 1])->select(); if(!$artist) { $artist=[]; } $cats = db('goods_cats')->where(['status'=>1])->order('id asc')->select(); foreach ($cats as $k=>$v) { $start=strtotime(date("Y-m-d {$v['start']}")); $end=strtotime(date("Y-m-d {$v['end']}")); /*未开始*/ if(time()<$start) { $cats[$k]['jctime1']=$start-time(); $cats[$k]['flag']=1; }elseif(time()>=$start && time()<$end) { $cats[$k]['jctime1']=$end-time(); $cats[$k]['flag']=2; }else{ $cats[$k]['flag']=0; $cats[$k]['jctime1']=0; } } $awards = \app\common\model\Trade::getAwardTotal(); $counts = \app\common\model\Trade::getSpeedTotalByUser($this->auth->id); $awards = [ 'total'=> isset($awards['total'])? $awards['total'] : 0, 'total_usdt'=> isset($awards['total_usdt'])? $awards['total_usdt'] : 0, 'speed_total'=> isset($counts['speed_total'])? $counts['speed_total'] : 0, 'speed_usdt'=> isset($counts['speed_usdt'])? $counts['speed_usdt'] : 0, ]; $config = Config::getConfigByGroup('basic'); $indexVideo = isset($config['index_video'])? $config['index_video']['value'] : ''; $this->view->assign([ 'indexVideo'=>$indexVideo, 'slideshow'=>$slideshow, 'cats' => $cats, 'awards'=> $awards, 'index_order'=>$index_order, 'artist'=>$artist, 'title'=>$sinfo['name'], ]); return $this->fetch(); } function artistdetail() { $id = input('id'); $noticeinfo = db('article')->where(['id' => $id, 'status' => 1])->find(); if (empty($noticeinfo)) { $noticeinfo = []; } $this->view->assign('info', $noticeinfo); return $this->fetch(); } function noticedetail() { $id = input('id'); $noticeinfo = db('article')->where(['id' => $id, 'status' => 1])->find(); if (empty($noticeinfo)) { $noticeinfo = []; } $this->view->assign('info', $noticeinfo); return $this->fetch(); } function notice() { #轮播 $slideshow = db('ads')->where(['status' => 1])->select(); if (empty($slideshow)) { $slideshow = []; } $this->view->assign([ 'slideshow' => $slideshow, ]); return $this->fetch(); } function kefu() { $noticeinfo = db('article')->where(['catid' => 4, 'status' => 1])->find(); if (empty($noticeinfo)) { $noticeinfo = []; } $this->view->assign('info', $noticeinfo); return $this->fetch(); } function qyjs() { $noticeinfo = db('article')->where(['catid' => 3, 'status' => 1])->find(); if (empty($noticeinfo)) { $noticeinfo = []; } $this->view->assign('info', $noticeinfo); return $this->fetch(); } function xszn() { $noticeinfo = db('article')->where(['catid' => 2, 'status' => 1])->find(); if (empty($noticeinfo)) { $noticeinfo = []; } $this->view->assign('info', $noticeinfo); return $this->fetch(); } }