<?php namespace app\api\controller\v1; use app\api\controller\Base; use app\common\model\Config; use app\hander\HelpHander; use think\App; use think\Db; class ConveyCate extends Base { public function getTime(){ $type = input('type'); $start = input('start'); $info = Db::name('convey_cate') ->where('id',$type) ->where('enable',1) ->where('del',0) ->find(); if($info['time_id'] > 0){ $time = Db::name('time') ->where('id',$info['time_id']) ->find(); $info['xq_time'] = $start?$start:date('Y-m-d H:i'); $info['ywc_time'] = date('Y-m-d H:i',strtotime($info['xq_time']) + 60*$time['bz_time']); }else{ $info['xq_time'] = $start?$start:date('Y-m-d H:i'); $info['ywc_time'] = ''; } HelpHander::success($info,'操作成功'); } }