Index.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace app\sub\controller;
  3. use app\common\model\Mobile;
  4. use app\common\model\MobileOrder;
  5. class Index extends SubCommon
  6. {
  7. protected $noNeedLogin = [];
  8. protected $noNeedRight = '*';
  9. protected $layout = '';
  10. public function index()
  11. {
  12. return $this->view->fetch();
  13. }
  14. public function main(){
  15. $mobileNo=Mobile::where('s_id',$this->auth->id)->count();
  16. $this->assign('mobileNo',$mobileNo);
  17. return view();
  18. }
  19. public function menu(){
  20. return [
  21. [
  22. "title"=>"后台首页",
  23. "icon"=>"icon-computer",
  24. "href"=>url('index/main'),
  25. "spread"=>false,
  26. ],
  27. [
  28. "title"=>"靓号管理",
  29. "icon"=>"icon-loginout",
  30. "href"=>'',
  31. "spread"=>false,
  32. 'children'=>[
  33. [
  34. "title"=>"号码商城",
  35. "icon"=>"icon-dengji3",
  36. "href"=>url('order/mobile'),
  37. "spread"=>false,
  38. ],
  39. [
  40. "title"=>"订单管理",
  41. "icon"=>"icon-star",
  42. "href"=>url('order/index'),
  43. "spread"=>false,
  44. ],
  45. [
  46. "title"=>"改价记录",
  47. "icon"=>"icon-wenben",
  48. "href"=>url('mobile/price_log'),
  49. "spread"=>false,
  50. ],
  51. ]
  52. ],
  53. [
  54. "title"=>"常规管理",
  55. "icon"=>"icon-dengji1",
  56. "href"=>'',
  57. "spread"=>false,
  58. 'children'=>[
  59. [
  60. 'title'=>'幻灯片管理',
  61. 'icon'=>'icon-dengji2',
  62. 'href'=>url('banner/index'),
  63. ]
  64. ]
  65. ],
  66. ];
  67. }
  68. }