ConveyCate.php 931 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\common\model\Config;
  5. use app\hander\HelpHander;
  6. use think\App;
  7. use think\Db;
  8. class ConveyCate extends Base
  9. {
  10. public function getTime(){
  11. $type = input('type');
  12. $start = input('start');
  13. $info = Db::name('convey_cate')
  14. ->where('id',$type)
  15. ->where('enable',1)
  16. ->where('del',0)
  17. ->find();
  18. if($info['time_id'] > 0){
  19. $time = Db::name('time')
  20. ->where('id',$info['time_id'])
  21. ->find();
  22. $info['xq_time'] = $start?$start:date('Y-m-d H:i');
  23. $info['ywc_time'] = date('Y-m-d H:i',strtotime($info['xq_time']) + 60*$time['bz_time']);
  24. }else{
  25. $info['xq_time'] = $start?$start:date('Y-m-d H:i');
  26. $info['ywc_time'] = '';
  27. }
  28. HelpHander::success($info,'操作成功');
  29. }
  30. }