Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

70 righe
1.7 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 倪宗锋
  12. * PhpStorm NzfController.php
  13. * Create By 2016/11/4 17:43 $
  14. */
  15. namespace Api\Controller;
  16. use Util\Controller\MvcController;
  17. use Util\Util\BrowserCache;
  18. use Util\Util\Util;
  19. class NzfController extends MvcController
  20. {
  21. /**
  22. * Function Description:返回成功json数据
  23. * Function Name: indexAction
  24. *
  25. * @return string
  26. *
  27. * @author 倪宗锋
  28. */
  29. public function indexAction()
  30. {
  31. return Util::returnJsSu('倪宗锋');
  32. }
  33. /**
  34. * Function Description:倪宗锋测试页面
  35. * Function Name: testAction
  36. *
  37. * @return string
  38. *
  39. * @author 倪宗锋
  40. */
  41. public function testAction()
  42. {
  43. $this->setViewParam('testHtml', '倪宗锋测试功能');
  44. return $this->viewModel('test');
  45. }
  46. /**
  47. * Function Description:返回普通随机数
  48. * Function Name: getRandAction
  49. *
  50. * @return int|string
  51. *
  52. * @author 倪宗锋
  53. */
  54. public function getRandAction()
  55. {
  56. $checkCache = BrowserCache::checkCache(100);
  57. if($checkCache['flag'] == false){
  58. return '';
  59. }
  60. $round = rand(1000,9999);
  61. return $round;
  62. }
  63. }