Order.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\sub\controller;
  3. use app\common\library\MobileConstant;
  4. use app\common\model\Attachment;
  5. use app\common\model\Mobile;
  6. use think\Cookie;
  7. use think\Hook;
  8. use think\Validate;
  9. /**
  10. * 会员中心
  11. */
  12. class Order extends SubCommon
  13. {
  14. protected $noNeedLogin=[];
  15. protected $noNeedRight="*";
  16. public function mobile(){
  17. $data=input();
  18. $model=new Mobile();
  19. if(!empty($data['province_id'])){
  20. $model->where('province_id',$data['province_id']);
  21. }
  22. if(!empty($data['city_id'])){
  23. $model->where('city_id',$data['city_id']);
  24. }
  25. if(!empty($data['network']) && !empty(MobileConstant::getNetwork()[$data['network']]['search'])){
  26. $model->whereIn('network',MobileConstant::getNetwork()[$data['network']]['search']);
  27. }
  28. $list=$model->with(['info'])
  29. ->where('s_id',$this->auth->id)
  30. ->order('id','desc')
  31. ->paginate();
  32. $this->assign('list',$list);
  33. $this->assign('network',MobileConstant::getNetwork());
  34. return view();
  35. }
  36. }