Platform.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace app\api\controller;
  3. use think\Db;
  4. use fast\Tree;
  5. use app\common\controller\Api;
  6. /**
  7. * 股份 收益 分红
  8. */
  9. class Platform extends Api
  10. {
  11. protected $noNeedLogin = ['*'];
  12. protected $noNeedRight = ['*'];
  13. public function index()
  14. {
  15. $config=$this->config();
  16. $configs=config('site');
  17. $map=[];
  18. // $map['ishot']=2;
  19. // $map['endtimesjc']=['>',time()];
  20. // if(input('uid',0)>0){
  21. // $map['uid']=input('uid');
  22. // }
  23. $list = model('Platform')
  24. // ->with('user')
  25. // ->where($map)
  26. ->limit(10)
  27. ->select();
  28. $data=['config'=>$config,'doctor'=>$list];
  29. $this->success('请求成功',$data);
  30. }
  31. public function test(){
  32. $this->success('请求成功');
  33. }
  34. public function user_share(){
  35. if(input('uid',0)>0){
  36. $map['uid']=input('uid');
  37. }
  38. $config=$this->config();
  39. $configs=config('site');
  40. $list = model('VideoShare')
  41. ->with('videolist')
  42. ->where($map)
  43. ->limit(10)
  44. ->select();
  45. $data=['config'=>$config,'doctor'=>$list];
  46. $this->success('请求成功',$data);
  47. }
  48. // 每个短剧更具贡献值分红
  49. public function dividend(){
  50. }
  51. }