auth->login_studio; $studio=db('studio')->where(['title'=>$login_studio])->find(); if(time()>=strtotime(date("Y-m-d {$studio['start']}")) && time()<= strtotime(date("Y-m-d {$studio['end']}")) ) { $status='营业中'; }elseif(time()< strtotime(date("Y-m-d {$studio['start']}"))){ $status='停业中'; }elseif(time() > strtotime(date("Y-m-d {$studio['end']}"))){ $status='停业中'; } $isappoint=db('studio_user')->where(['sid'=>$studio['id'],'userid'=>$this->auth->id])->find(); if($isappoint) { $flag=0; }else{ $flag=1; } $this->view->assign([ 'title'=>get_table_column('goods_cats',$catid,'name'), 'catid'=>$catid, 'studio'=>$studio, 'status'=>$status, 'flag'=>$flag, ]); return $this->fetch(); } /* 商品详情 */ function goodsdetailed() { $id=input('id'); $info=db('goods')->where(['id'=>$id])->find(); if(!empty($info['images'])) { $images=$info['image'].','.$info['images']; $info['img']=explode(',', $images); }else{ $info['img']=[$info['image']]; } $this->view->assign([ "info"=>$info, ]); return $this->fetch(); } /* 商品详情 */ function goodsdetailed1() { $id=input('id'); $info=db('goods')->where(['id'=>$id])->find(); if(!empty($info['images'])) { $images=$info['image'].','.$info['images']; $info['img']=explode(',', $images); }else{ $info['img']=[$info['image']]; } $this->view->assign([ "info"=>$info, ]); return $this->fetch(); } /* 评论 */ function appraise() { $goodsid=input('goodsid'); $this->view->assign('goodsid',$goodsid); return $this->fetch(); } /* 购物车 */ function cart() { return $this->fetch(); } }