正在显示
25 个修改的文件
包含
441 行增加
和
194 行删除
@@ -132,7 +132,7 @@ class IntermediaryController extends CommonController | @@ -132,7 +132,7 @@ class IntermediaryController extends CommonController | ||
132 | public function left($token){ | 132 | public function left($token){ |
133 | $where_member['token'] = $token; | 133 | $where_member['token'] = $token; |
134 | $where_member['status'] = 1; | 134 | $where_member['status'] = 1; |
135 | - $member = Db::name('Member')->where($where_member)->field('name,id,start,reputation,company,store,quarters,tel,city,pic,money,get_money,referee_tel')->find(); | 135 | + $member = Db::name('Member')->where($where_member)->field('name,id,start,reputation,company,store,quarters,tel,city,pic,money,get_money,referee_tel,referee_id')->find(); |
136 | if(!$member){ | 136 | if(!$member){ |
137 | $this->apiResponse('0','用户信息错误'); | 137 | $this->apiResponse('0','用户信息错误'); |
138 | }else{ | 138 | }else{ |
@@ -83,7 +83,7 @@ class IntermediaryneedController extends CommonController | @@ -83,7 +83,7 @@ class IntermediaryneedController extends CommonController | ||
83 | $size = 2; | 83 | $size = 2; |
84 | $where_member['token'] = $data['token']; | 84 | $where_member['token'] = $data['token']; |
85 | // 查询,匹配:省市区县精确匹配,小区名模糊匹配(只要有连续字匹配,就算匹配) | 85 | // 查询,匹配:省市区县精确匹配,小区名模糊匹配(只要有连续字匹配,就算匹配) |
86 | - $member_find = Db::name('Member')->where($where_member)->field("city,quarters")->find(); | 86 | + $member_find = Db::name('Member')->where($where_member)->field("id,city,quarters")->find(); |
87 | if(!$member_find){ | 87 | if(!$member_find){ |
88 | $this->apiResponse('0','用户信息错误'); | 88 | $this->apiResponse('0','用户信息错误'); |
89 | } | 89 | } |
@@ -98,10 +98,20 @@ class IntermediaryneedController extends CommonController | @@ -98,10 +98,20 @@ class IntermediaryneedController extends CommonController | ||
98 | } | 98 | } |
99 | $where_need['quarters'] = array('like',$quarters,'OR'); | 99 | $where_need['quarters'] = array('like',$quarters,'OR'); |
100 | $need_list = Db::name('UserNeed')->where($where_need)->field("id,city,quarters,room,floor,house_type,renovation,quotation_time,create_time,people")->limit($size)->page($page)->select()->toArray(); | 100 | $need_list = Db::name('UserNeed')->where($where_need)->field("id,city,quarters,room,floor,house_type,renovation,quotation_time,create_time,people")->limit($size)->page($page)->select()->toArray(); |
101 | - $count = Db::name('UserNeed')->where($where_need)->count(); | 101 | + $count = count($need_list); |
102 | $final['all_page'] = ceil($count/$size); | 102 | $final['all_page'] = ceil($count/$size); |
103 | - $final['need_list'] = $need_list; | 103 | + |
104 | if($need_list){ | 104 | if($need_list){ |
105 | +// 筛除已报价 | ||
106 | + foreach ($need_list as $nek=>$nev){ | ||
107 | + $where_age['need_id'] = $nev['id']; | ||
108 | + $where_age['agency_id'] = $member_find['id']; | ||
109 | + $is_agen = Db::name('Agency')->where($where_age)->field('id')->find(); | ||
110 | + if(!$is_agen){ | ||
111 | + $final_list[] = $nev; | ||
112 | + } | ||
113 | + } | ||
114 | + $final['need_list'] = $final_list; | ||
105 | $this->apiResponse('1','成功',$final); | 115 | $this->apiResponse('1','成功',$final); |
106 | }else{ | 116 | }else{ |
107 | $this->apiResponse('0','该地区暂无匹配需求'); | 117 | $this->apiResponse('0','该地区暂无匹配需求'); |
@@ -142,6 +152,7 @@ class IntermediaryneedController extends CommonController | @@ -142,6 +152,7 @@ class IntermediaryneedController extends CommonController | ||
142 | } | 152 | } |
143 | // 加数据库 | 153 | // 加数据库 |
144 | $data = $request->Post(); | 154 | $data = $request->Post(); |
155 | + $token = $data['token']; | ||
145 | $model = new AgencyModel(); | 156 | $model = new AgencyModel(); |
146 | $where_mem['token'] = $data['token']; | 157 | $where_mem['token'] = $data['token']; |
147 | $mem_id = Db::name('Member')->where($where_mem)->field('id')->find(); | 158 | $mem_id = Db::name('Member')->where($where_mem)->field('id')->find(); |
@@ -152,7 +163,8 @@ class IntermediaryneedController extends CommonController | @@ -152,7 +163,8 @@ class IntermediaryneedController extends CommonController | ||
152 | $find_isset = $model->where($where_isIsset)->find(); | 163 | $find_isset = $model->where($where_isIsset)->find(); |
153 | if($find_isset){ | 164 | if($find_isset){ |
154 | Db::rollback(); | 165 | Db::rollback(); |
155 | - $this->apiResponse('0','该房屋您已参与报价'); | 166 | + $middle_final['need_id'] = $data['need_id']; |
167 | + $this->apiResponse('0','该房屋您已参与报价',$middle_final); | ||
156 | } | 168 | } |
157 | // 判断是否存在 | 169 | // 判断是否存在 |
158 | $where_issetNeed['id'] = $data['need_id']; | 170 | $where_issetNeed['id'] = $data['need_id']; |
@@ -180,9 +192,9 @@ class IntermediaryneedController extends CommonController | @@ -180,9 +192,9 @@ class IntermediaryneedController extends CommonController | ||
180 | $final['intermediaryNeed_id'] = $model->getLastInsID(); | 192 | $final['intermediaryNeed_id'] = $model->getLastInsID(); |
181 | 193 | ||
182 | if($save){ | 194 | if($save){ |
183 | - $where_addCount['token'] = $data['token']; | 195 | + $where_addCount['token'] = $token; |
184 | $add_count = Db::name('member')->where($where_addCount)->setInc('count_agency',1); | 196 | $add_count = Db::name('member')->where($where_addCount)->setInc('count_agency',1); |
185 | - if($add_count){ | 197 | + if(!$add_count){ |
186 | Db::rollback(); | 198 | Db::rollback(); |
187 | }else{ | 199 | }else{ |
188 | Db::commit(); | 200 | Db::commit(); |
@@ -501,6 +501,7 @@ class ThirdsendController extends HomeBaseController | @@ -501,6 +501,7 @@ class ThirdsendController extends HomeBaseController | ||
501 | // 查询用户发布需求信息 | 501 | // 查询用户发布需求信息 |
502 | $where_need['status'] = 3; | 502 | $where_need['status'] = 3; |
503 | $userNeedList = Db::name('UserNeed')->where($where_need)->field('id,quotation_time,create_time,pay_time,user_id')->select()->toArray(); | 503 | $userNeedList = Db::name('UserNeed')->where($where_need)->field('id,quotation_time,create_time,pay_time,user_id')->select()->toArray(); |
504 | + $userNeedList['user_type'] = Db::name('Member')->where(['id'=>$userNeedList['user_id']])->value('type'); | ||
504 | $time = time(); | 505 | $time = time(); |
505 | // 循环需求,查询相应报价 | 506 | // 循环需求,查询相应报价 |
506 | foreach ($userNeedList as $uNeedk => $uNeedv) { | 507 | foreach ($userNeedList as $uNeedk => $uNeedv) { |
@@ -579,6 +580,8 @@ class ThirdsendController extends HomeBaseController | @@ -579,6 +580,8 @@ class ThirdsendController extends HomeBaseController | ||
579 | }else{ | 580 | }else{ |
580 | $get_list = $fin_arr; | 581 | $get_list = $fin_arr; |
581 | } | 582 | } |
583 | + }else{ | ||
584 | + $get_list = $fin_arr; | ||
582 | } | 585 | } |
583 | foreach ($else_changeList as $getk=>$getv){ | 586 | foreach ($else_changeList as $getk=>$getv){ |
584 | if(in_array($getv,$get_list)){ | 587 | if(in_array($getv,$get_list)){ |
@@ -587,6 +590,13 @@ class ThirdsendController extends HomeBaseController | @@ -587,6 +590,13 @@ class ThirdsendController extends HomeBaseController | ||
587 | }else{ | 590 | }else{ |
588 | $change_final['id'] = $getv; | 591 | $change_final['id'] = $getv; |
589 | $change_final['status'] = 3; | 592 | $change_final['status'] = 3; |
593 | + // 中介报价未进入决赛,执行订单退款 | ||
594 | + $agencyInfo = Db::name('Agency')->alias('a') | ||
595 | + ->where(['a.id'=>$getv]) | ||
596 | + ->join("hp_Member m", 'm.id = a.agency_id') | ||
597 | + ->field('a.*,m.company,m.type as user_type') | ||
598 | + ->find(); | ||
599 | + $refund_result = $this->agency_order_refund($agencyInfo,'中介报价未进入决赛圈退款',2); | ||
590 | } | 600 | } |
591 | $agencyModel = new AgencyModel(); | 601 | $agencyModel = new AgencyModel(); |
592 | $fianl_AgsaveFirst = $agencyModel->isUpdate(true)->save($change_final); | 602 | $fianl_AgsaveFirst = $agencyModel->isUpdate(true)->save($change_final); |
@@ -613,25 +623,8 @@ class ThirdsendController extends HomeBaseController | @@ -613,25 +623,8 @@ class ThirdsendController extends HomeBaseController | ||
613 | if(!$fianl_AgsaveNext){ | 623 | if(!$fianl_AgsaveNext){ |
614 | Db::rollback(); | 624 | Db::rollback(); |
615 | } | 625 | } |
616 | -// 退回中介保证金 | ||
617 | - $add_a['user_id'] = $changeva['agency_id']; | ||
618 | - $add_a['title'] = '报价人数不足'; | ||
619 | - $add_a['type'] = 1; | ||
620 | - $add_a['reason'] = 1; | ||
621 | - $add_a['money'] = $changeva['deposit']; | ||
622 | - $add_a['create_time'] = time(); | ||
623 | - $add_a['update_time'] = time(); | ||
624 | - $amoney_id = Db::name('AmoenyDetail')->insertGetId($add_a); | ||
625 | - if (!$amoney_id) { | ||
626 | - Db::rollback(); | ||
627 | - } | ||
628 | -// 用户表增加金额 | ||
629 | - $where_member['type'] = 2; | ||
630 | - $where_member['id'] = $changeva['agency_id']; | ||
631 | - $add_money = Db::name('Member')->where($where_member)->setInc('money',$changeva['deposit']); | ||
632 | - if (!$add_money) { | ||
633 | - Db::rollback(); | ||
634 | - } | 626 | + // 中介报价订单退款 |
627 | + $refund_result = $this->agency_order_refund($changeva,'中介报价少于3人退款',1); | ||
635 | 628 | ||
636 | } | 629 | } |
637 | $userSave_status['id'] = $uNeedv['id']; | 630 | $userSave_status['id'] = $uNeedv['id']; |
@@ -641,28 +634,8 @@ class ThirdsendController extends HomeBaseController | @@ -641,28 +634,8 @@ class ThirdsendController extends HomeBaseController | ||
641 | if(!$fianl_Ussave){ | 634 | if(!$fianl_Ussave){ |
642 | Db::rollback(); | 635 | Db::rollback(); |
643 | } | 636 | } |
644 | - | ||
645 | -// 退回保证金 | ||
646 | -// 用户 | ||
647 | -// 加用户金额明细表 | ||
648 | - $add_del['need_id'] = $uNeedv['id']; | ||
649 | - $add_del['user_id'] = $uNeedv['user_id']; | ||
650 | - $add_del['title'] = '报价人数不足'; | ||
651 | - $add_del['reason'] = 1; | ||
652 | - $add_del['type'] = 1; | ||
653 | - $add_del['money'] = $uNeedv['pay_money']; | ||
654 | - $add_del['create_time'] = time(); | ||
655 | - $add_del['update_time'] = time(); | ||
656 | - $umoney_id = Db::name('UmoenyDetail')->insertGetId($add_del); | ||
657 | - if (!$umoney_id) { | ||
658 | - Db::rollback(); | ||
659 | - } | ||
660 | - $where_memberNext['type'] = 1; | ||
661 | - $where_memberNext['id'] = $uNeedv['user_id']; | ||
662 | - $add_moneyNext = Db::name('Member')->where($where_memberNext)->setInc('money',$uNeedv['pay_money']); | ||
663 | - if (!$add_moneyNext) { | ||
664 | - Db::rollback(); | ||
665 | - } | 637 | + // 用户需求订单退款 |
638 | + $refund_result = $this->need_order_refund($userNeedList,'报价人数不足',1); | ||
666 | 639 | ||
667 | } | 640 | } |
668 | } else { | 641 | } else { |
@@ -674,27 +647,8 @@ class ThirdsendController extends HomeBaseController | @@ -674,27 +647,8 @@ class ThirdsendController extends HomeBaseController | ||
674 | if(!$fianl_Ussave){ | 647 | if(!$fianl_Ussave){ |
675 | Db::rollback(); | 648 | Db::rollback(); |
676 | } | 649 | } |
677 | - | ||
678 | -// 退回保证金 | ||
679 | -// 用户 | ||
680 | -// 加用户金额明细表 | ||
681 | - $add_del['need_id'] = $uNeedv['id']; | ||
682 | - $add_del['user_id'] = $uNeedv['user_id']; | ||
683 | - $add_del['title'] = '报价人数不足'; | ||
684 | - $add_del['type'] = 1; | ||
685 | - $add_del['money'] = $uNeedv['pay_money']; | ||
686 | - $add_del['create_time'] = time(); | ||
687 | - $add_del['update_time'] = time(); | ||
688 | - $umoney_id = Db::name('UmoenyDetail')->insertGetId($add_del); | ||
689 | - if (!$umoney_id) { | ||
690 | - Db::rollback(); | ||
691 | - } | ||
692 | - $where_memberNext['type'] = 1; | ||
693 | - $where_memberNext['id'] = $uNeedv['user_id']; | ||
694 | - $add_moneyNext = Db::name('Member')->where($where_memberNext)->setInc('money',$uNeedv['pay_money']); | ||
695 | - if (!$add_moneyNext) { | ||
696 | - Db::rollback(); | ||
697 | - } | 650 | + // 用户需求订单退款 |
651 | + $refund_result = $this->need_order_refund($userNeedList,'报价人数不足',1); | ||
698 | 652 | ||
699 | } | 653 | } |
700 | // 插入数据库 | 654 | // 插入数据库 |
@@ -724,7 +678,11 @@ class ThirdsendController extends HomeBaseController | @@ -724,7 +678,11 @@ class ThirdsendController extends HomeBaseController | ||
724 | if (time() >= ($needv['choose_time'] + 259200)) { | 678 | if (time() >= ($needv['choose_time'] + 259200)) { |
725 | $where_agency['need_id'] = $needv['id']; | 679 | $where_agency['need_id'] = $needv['id']; |
726 | $where_agency['status'] = 4; | 680 | $where_agency['status'] = 4; |
727 | - $agency_list = Db::name('Agency')->where($where_agency)->select()->toArray(); | 681 | + $agency_list = Db::name('Agency')->alias('a') |
682 | + ->where($where_agency) | ||
683 | + ->join("hp_Member m", 'm.id = a.agency_id') | ||
684 | + ->field('a.*,m.company,m.type as user_type') | ||
685 | + ->select()->toArray(); | ||
728 | if ($agency_list) { | 686 | if ($agency_list) { |
729 | $where_agencyUpdate['need_id'] = $needv['id']; | 687 | $where_agencyUpdate['need_id'] = $needv['id']; |
730 | $where_agencyUpdate['status'] = 4; | 688 | $where_agencyUpdate['status'] = 4; |
@@ -741,39 +699,12 @@ class ThirdsendController extends HomeBaseController | @@ -741,39 +699,12 @@ class ThirdsendController extends HomeBaseController | ||
741 | if (!$need_result) { | 699 | if (!$need_result) { |
742 | Db::rollback(); | 700 | Db::rollback(); |
743 | } else { | 701 | } else { |
744 | -// 加用户金额明细表 | ||
745 | - $add_del['need_id'] = $needv['id']; | ||
746 | - $add_del['user_id'] = $needv['user_id']; | ||
747 | - $add_del['title'] = '未选择中介'; | ||
748 | - $add_del['type'] = 2; | ||
749 | - $add_del['money'] = $needv['pay_money']; | ||
750 | - $add_del['create_time'] = time(); | ||
751 | - $add_del['update_time'] = time(); | ||
752 | - $umoney_id = Db::name('UmoenyDetail')->insertGetId($add_del); | ||
753 | - if (!$umoney_id) { | ||
754 | - Db::rollback(); | ||
755 | - } | ||
756 | -// 中介金额明细表 | ||
757 | - foreach ($agency_list as $agenk=>$agenv){ | ||
758 | - $add_a['ag_id'] = $agenv['id']; | ||
759 | - $add_a['user_id'] = $agenv['agency_id']; | ||
760 | - $add_a['title'] = '用户未选择中介'; | ||
761 | - $add_a['type'] = 1; | ||
762 | - $add_a['money'] = $agenv['deposit']; | ||
763 | - $add_a['create_time'] = time(); | ||
764 | - $add_a['update_time'] = time(); | ||
765 | - $amoney_id = Db::name('AmoenyDetail')->insertGetId($add_a); | ||
766 | - if (!$amoney_id) { | ||
767 | - Db::rollback(); | ||
768 | - } | ||
769 | - $where_member['type'] = 2; | ||
770 | - $where_member['id'] = $agenv['agency_id']; | ||
771 | - $add_money = Db::name('Member')->where($where_member)->setInc('money',$agenv['deposit']); | ||
772 | - if (!$add_money) { | ||
773 | - Db::rollback(); | 702 | + if ($agency_list) { |
703 | + foreach ($agency_list as $agency_key => $agency_val) { | ||
704 | + // 中介报价订单退款 | ||
705 | + $this->agency_order_refund($agency_val, '用户未选择中标中介退款',3); | ||
774 | } | 706 | } |
775 | } | 707 | } |
776 | - | ||
777 | } | 708 | } |
778 | } | 709 | } |
779 | } | 710 | } |
@@ -825,24 +756,8 @@ class ThirdsendController extends HomeBaseController | @@ -825,24 +756,8 @@ class ThirdsendController extends HomeBaseController | ||
825 | if (!$change_needFinal) { | 756 | if (!$change_needFinal) { |
826 | Db::rollback(); | 757 | Db::rollback(); |
827 | } | 758 | } |
828 | -// 增加用户保证金,余额 | ||
829 | - $add_del['need_id'] = $needv['id']; | ||
830 | - $add_del['user_id'] = $needv['user_id']; | ||
831 | - $add_del['title'] = '中介未确认'; | ||
832 | - $add_del['type'] = 1; | ||
833 | - $add_del['money'] = $needv['pay_money']; | ||
834 | - $add_del['create_time'] = time(); | ||
835 | - $add_del['update_time'] = time(); | ||
836 | - $umoney_id = Db::name('UmoenyDetail')->insertGetId($add_del); | ||
837 | - if (!$umoney_id) { | ||
838 | - Db::rollback(); | ||
839 | - } | ||
840 | - $where_member['type'] = 1; | ||
841 | - $where_member['id'] = $needv['user_id']; | ||
842 | - $add_money = Db::name('Member')->where($where_member)->setInc('money',$needv['pay_money']); | ||
843 | - if (!$add_money) { | ||
844 | - Db::rollback(); | ||
845 | - } | 759 | + $need_list['user_type'] = Db::name('Member')->where(['id'=>$need_list['user_id']])->value('type'); |
760 | + $this->need_order_refund($agency,'中介未确认成交退款',5); | ||
846 | } | 761 | } |
847 | } | 762 | } |
848 | Db::commit(); | 763 | Db::commit(); |
@@ -69,9 +69,9 @@ class AgencyController extends AdminBaseController | @@ -69,9 +69,9 @@ class AgencyController extends AdminBaseController | ||
69 | ->where($where_coo) | 69 | ->where($where_coo) |
70 | ->field("m.name as user_name,m.tel as user_tel,a.*") | 70 | ->field("m.name as user_name,m.tel as user_tel,a.*") |
71 | ->order('create_time desc') | 71 | ->order('create_time desc') |
72 | - ->select()->toArray(); | ||
73 | - | ||
74 | - | 72 | + ->paginate(10); |
73 | + $page = $coo_list->render(); | ||
74 | + $this->assign('page',$page); | ||
75 | $this->assign('list',$coo_list); | 75 | $this->assign('list',$coo_list); |
76 | return $this->fetch('index'); | 76 | return $this->fetch('index'); |
77 | } | 77 | } |
@@ -89,7 +89,7 @@ class BannerController extends AdminBaseController | @@ -89,7 +89,7 @@ class BannerController extends AdminBaseController | ||
89 | $mes = $validate->getError(); | 89 | $mes = $validate->getError(); |
90 | $this->error("$mes"); | 90 | $this->error("$mes"); |
91 | } | 91 | } |
92 | - $add['id'] = 1; | 92 | + $add['id'] = $request->Post('id'); |
93 | $model = new BannerModel(); | 93 | $model = new BannerModel(); |
94 | $final = $model->isUpdate(true)->allowField(true)->save($add); | 94 | $final = $model->isUpdate(true)->allowField(true)->save($add); |
95 | }else{ | 95 | }else{ |
@@ -57,7 +57,9 @@ class BrandController extends AdminBaseController | @@ -57,7 +57,9 @@ class BrandController extends AdminBaseController | ||
57 | $this->assign('keyword',$search['keyword']); | 57 | $this->assign('keyword',$search['keyword']); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | - $coo_list = Db::name('Brand')->where($where_coo)->order('score desc , create_time desc')->select()->toArray(); | 60 | + $coo_list = Db::name('Brand')->where($where_coo)->order('score desc , create_time desc')->paginate(10); |
61 | + $page = $coo_list->render(); | ||
62 | + $this->assign('page',$page); | ||
61 | $this->assign('list',$coo_list); | 63 | $this->assign('list',$coo_list); |
62 | return $this->fetch(); | 64 | return $this->fetch(); |
63 | } | 65 | } |
@@ -72,24 +72,25 @@ class CodeController extends AdminBaseController | @@ -72,24 +72,25 @@ class CodeController extends AdminBaseController | ||
72 | 72 | ||
73 | 73 | ||
74 | // 删除 | 74 | // 删除 |
75 | -// public function del(Request $request){ | ||
76 | -// $ids = $this->request->post(); | ||
77 | -// $id = $request->param('id'); | ||
78 | -// if($ids){ | ||
79 | -// $add_del['id'] = array('in',$ids['ids']); | ||
80 | -// }else if($id){ | ||
81 | -// $add_del['id'] = $request->param('id'); | ||
82 | -// }else{ | ||
83 | -// $this->error('删除失败'); | ||
84 | -// } | ||
85 | -// $add_del['status'] = 9; | 75 | + public function del(Request $request){ |
76 | + $ids = $this->request->post(); | ||
77 | + $id = $request->param('id'); | ||
78 | + if($ids){ | ||
79 | + $where_del['id'] = array('in',$ids['ids']); | ||
80 | + }else if($id){ | ||
81 | + $where_del['id'] = $request->param('id'); | ||
82 | + }else{ | ||
83 | + $this->error('删除失败'); | ||
84 | + } | ||
85 | + $add_del['status'] = 9; | ||
86 | + $add_del['update_time'] = time(); | ||
86 | // $model = new NewModel(); | 87 | // $model = new NewModel(); |
87 | -// $del = $model->isUpdate(true)->allowField(true)->save($add_del); | ||
88 | -// if($del){ | ||
89 | -// $this->success('删除成功',url('index')); | ||
90 | -// }else{ | ||
91 | -// $this->error('删除失败'); | ||
92 | -// } | ||
93 | -// } | 88 | + $del = Db::name('Code')->where($where_del)->update($add_del); |
89 | + if($del){ | ||
90 | + $this->success('删除成功',url('index')); | ||
91 | + }else{ | ||
92 | + $this->error('删除失败'); | ||
93 | + } | ||
94 | + } | ||
94 | 95 | ||
95 | } | 96 | } |
@@ -52,7 +52,7 @@ class ComplaintController extends AdminBaseController | @@ -52,7 +52,7 @@ class ComplaintController extends AdminBaseController | ||
52 | ->join("Member m",'m.id = c.user_id') | 52 | ->join("Member m",'m.id = c.user_id') |
53 | ->where($where_money) | 53 | ->where($where_money) |
54 | ->field("m.name,m.tel,c.*") | 54 | ->field("m.name,m.tel,c.*") |
55 | - ->paginate(); | 55 | + ->paginate(10); |
56 | $page = $money_list->render(); | 56 | $page = $money_list->render(); |
57 | $this->assign('page',$page); | 57 | $this->assign('page',$page); |
58 | $this->assign('lists',$money_list); | 58 | $this->assign('lists',$money_list); |
@@ -65,9 +65,10 @@ class NeedController extends AdminBaseController | @@ -65,9 +65,10 @@ class NeedController extends AdminBaseController | ||
65 | ->where($where_coo) | 65 | ->where($where_coo) |
66 | ->field("m.name as user_name,m.tel as user_tel,n.*") | 66 | ->field("m.name as user_name,m.tel as user_tel,n.*") |
67 | ->order('create_time desc') | 67 | ->order('create_time desc') |
68 | - ->select()->toArray(); | ||
69 | - | 68 | + ->paginate(10); |
70 | 69 | ||
70 | + $page = $coo_list->render(); | ||
71 | + $this->assign('page',$page); | ||
71 | $this->assign('list',$coo_list); | 72 | $this->assign('list',$coo_list); |
72 | return $this->fetch('index'); | 73 | return $this->fetch('index'); |
73 | } | 74 | } |
@@ -101,7 +101,7 @@ class ProcessController extends AdminBaseController | @@ -101,7 +101,7 @@ class ProcessController extends AdminBaseController | ||
101 | $final = $model->save($add); | 101 | $final = $model->save($add); |
102 | } | 102 | } |
103 | if($final){ | 103 | if($final){ |
104 | - $this->success('成功'); | 104 | + $this->success('成功',url('Process/index')); |
105 | }else{ | 105 | }else{ |
106 | $this->error('失败'); | 106 | $this->error('失败'); |
107 | } | 107 | } |
@@ -45,7 +45,7 @@ class UserNeedController extends AdminBaseController | @@ -45,7 +45,7 @@ class UserNeedController extends AdminBaseController | ||
45 | $this->assign('end_time',date('Y-m-d H:i',$end)); | 45 | $this->assign('end_time',date('Y-m-d H:i',$end)); |
46 | } | 46 | } |
47 | if($search['keyword']){ | 47 | if($search['keyword']){ |
48 | - $where_coo['title'] = $search['keyword']; | 48 | + $where_coo['title'] = array('like','%'.$search['keyword'].'%'); |
49 | $this->assign('keyword',$search['keyword']); | 49 | $this->assign('keyword',$search['keyword']); |
50 | } | 50 | } |
51 | } | 51 | } |
@@ -68,6 +68,7 @@ class UserNeedController extends AdminBaseController | @@ -68,6 +68,7 @@ class UserNeedController extends AdminBaseController | ||
68 | if($request->post()){ | 68 | if($request->post()){ |
69 | // 添加数据 | 69 | // 添加数据 |
70 | $data = $request->post(); | 70 | $data = $request->post(); |
71 | + | ||
71 | if($request->Post('id')){ | 72 | if($request->Post('id')){ |
72 | // 修改 | 73 | // 修改 |
73 | $add['content'] = $data['content']; | 74 | $add['content'] = $data['content']; |
@@ -103,7 +104,7 @@ class UserNeedController extends AdminBaseController | @@ -103,7 +104,7 @@ class UserNeedController extends AdminBaseController | ||
103 | $this->error('失败'); | 104 | $this->error('失败'); |
104 | } | 105 | } |
105 | }else{ | 106 | }else{ |
106 | - $where_find['type'] = $request->param('id'); | 107 | + $where_find['id'] = $request->param('id'); |
107 | $list = Db::name('NeedAnswer')->where($where_find)->find(); | 108 | $list = Db::name('NeedAnswer')->where($where_find)->find(); |
108 | if($list){ | 109 | if($list){ |
109 | $list['content'] = htmlspecialchars_decode($list['content']); | 110 | $list['content'] = htmlspecialchars_decode($list['content']); |
@@ -50,6 +50,8 @@ class AdminOauthController extends AdminBaseController | @@ -50,6 +50,8 @@ class AdminOauthController extends AdminBaseController | ||
50 | // 用户 | 50 | // 用户 |
51 | $where_member['type'] = 1; | 51 | $where_member['type'] = 1; |
52 | $data = $this->request->param(); | 52 | $data = $this->request->param(); |
53 | + $size = 2; | ||
54 | + $page = 1; | ||
53 | if($data){ | 55 | if($data){ |
54 | $startTime = empty($data['start_time']) ? 0 : strtotime($data['start_time']); | 56 | $startTime = empty($data['start_time']) ? 0 : strtotime($data['start_time']); |
55 | $endTime = empty($data['end_time']) ? 0 : strtotime($data['end_time']); | 57 | $endTime = empty($data['end_time']) ? 0 : strtotime($data['end_time']); |
@@ -77,7 +79,9 @@ class AdminOauthController extends AdminBaseController | @@ -77,7 +79,9 @@ class AdminOauthController extends AdminBaseController | ||
77 | $this->assign('tel', $data['tel']); | 79 | $this->assign('tel', $data['tel']); |
78 | } | 80 | } |
79 | } | 81 | } |
80 | - $lists = Db::name('Member')->where($where_member)->order('status,create_time desc')->select()->toArray(); | 82 | + $lists = Db::name('Member')->where($where_member)->order('status,create_time desc')->limit($size)->page($page)->select()->toArray(); |
83 | + $count = count($lists); | ||
84 | + $all_page = ceil($count/$size); | ||
81 | foreach ($lists as $lk=>$lv){ | 85 | foreach ($lists as $lk=>$lv){ |
82 | $where_referee['id'] = $lv['referee_id']; | 86 | $where_referee['id'] = $lv['referee_id']; |
83 | $referee = Db::name('Member')->where($where_referee)->field('id,name')->find(); | 87 | $referee = Db::name('Member')->where($where_referee)->field('id,name')->find(); |
@@ -87,10 +91,12 @@ class AdminOauthController extends AdminBaseController | @@ -87,10 +91,12 @@ class AdminOauthController extends AdminBaseController | ||
87 | $lists[$lk]['referee_name'] = ''; | 91 | $lists[$lk]['referee_name'] = ''; |
88 | } | 92 | } |
89 | } | 93 | } |
94 | +// $lists->appends($lists); | ||
95 | +// $this->assign('page', $page->render()); | ||
90 | // 获取分页显示 | 96 | // 获取分页显示 |
91 | // $page = $lists->render(); | 97 | // $page = $lists->render(); |
92 | $this->assign('lists', $lists); | 98 | $this->assign('lists', $lists); |
93 | -// $this->assign('page', $page); | 99 | + |
94 | // 渲染模板输出 | 100 | // 渲染模板输出 |
95 | return $this->fetch(); | 101 | return $this->fetch(); |
96 | } | 102 | } |
@@ -166,7 +172,9 @@ class AdminOauthController extends AdminBaseController | @@ -166,7 +172,9 @@ class AdminOauthController extends AdminBaseController | ||
166 | $where_money['user_type'] = 1; | 172 | $where_money['user_type'] = 1; |
167 | $where_money['type'] = 2; | 173 | $where_money['type'] = 2; |
168 | $where_money['status'] = 1; | 174 | $where_money['status'] = 1; |
169 | - $money = Db::name('MoneyDetail')->where($where_money)->select()->toArray(); | 175 | + $money = Db::name('MoneyDetail')->where($where_money)->paginate(); |
176 | + $page = $money->render(); | ||
177 | + $this->assign('page',$page); | ||
170 | $this->assign('lists',$money); | 178 | $this->assign('lists',$money); |
171 | }else{ | 179 | }else{ |
172 | $this->error('用户信息错误'); | 180 | $this->error('用户信息错误'); |
@@ -208,7 +216,9 @@ class AdminOauthController extends AdminBaseController | @@ -208,7 +216,9 @@ class AdminOauthController extends AdminBaseController | ||
208 | $where_money['user_type'] = 1; | 216 | $where_money['user_type'] = 1; |
209 | $where_money['type'] = 1; | 217 | $where_money['type'] = 1; |
210 | $where_money['status'] = 1; | 218 | $where_money['status'] = 1; |
211 | - $money = Db::name('MoneyDetail')->where($where_money)->select()->toArray(); | 219 | + $money = Db::name('MoneyDetail')->where($where_money)->paginate(); |
220 | + $page = $money->render(); | ||
221 | + $this->assign('page',$page); | ||
212 | $this->assign('lists',$money); | 222 | $this->assign('lists',$money); |
213 | }else{ | 223 | }else{ |
214 | $this->error('用户信息错误'); | 224 | $this->error('用户信息错误'); |
@@ -283,7 +293,9 @@ class AdminOauthController extends AdminBaseController | @@ -283,7 +293,9 @@ class AdminOauthController extends AdminBaseController | ||
283 | $this->assign('user',$member); | 293 | $this->assign('user',$member); |
284 | $this->assign('uid',$member['id']); | 294 | $this->assign('uid',$member['id']); |
285 | $where_referee['referee_id'] = $data['id']; | 295 | $where_referee['referee_id'] = $data['id']; |
286 | - $member = Db::name('Member')->where($where_referee)->select()->toArray(); | 296 | + $member = Db::name('Member')->where($where_referee)->paginate(); |
297 | + $page = $member->render(); | ||
298 | + $this->assign('page',$page); | ||
287 | $this->assign('lists',$member); | 299 | $this->assign('lists',$member); |
288 | return $this->fetch(); | 300 | return $this->fetch(); |
289 | } | 301 | } |
@@ -309,11 +321,16 @@ class AdminOauthController extends AdminBaseController | @@ -309,11 +321,16 @@ class AdminOauthController extends AdminBaseController | ||
309 | } | 321 | } |
310 | } | 322 | } |
311 | } | 323 | } |
324 | + $where_member['id'] = $data['id']; | ||
325 | + $member = Db::name('Member')->where($where_member)->field('id,name,tel')->find(); | ||
326 | + $this->assign('user',$member); | ||
312 | $where_money['user_id'] = $data['id']; | 327 | $where_money['user_id'] = $data['id']; |
313 | $where_money['order_type'] = 6; | 328 | $where_money['order_type'] = 6; |
314 | $where_money['type'] = 3; | 329 | $where_money['type'] = 3; |
315 | $where_money['status'] = array('neq',9); | 330 | $where_money['status'] = array('neq',9); |
316 | - $money_list = Db::name('MoneyDetail')->where($where_money)->select(); | 331 | + $money_list = Db::name('MoneyDetail')->where($where_money)->paginate(); |
332 | + $page = $money_list->render(); | ||
333 | + $this->assign('page',$page); | ||
317 | $this->assign('uid',$data['id']); | 334 | $this->assign('uid',$data['id']); |
318 | $this->assign('lists',$money_list); | 335 | $this->assign('lists',$money_list); |
319 | return $this->fetch('getdetail'); | 336 | return $this->fetch('getdetail'); |
@@ -344,7 +361,7 @@ class AdminOauthController extends AdminBaseController | @@ -344,7 +361,7 @@ class AdminOauthController extends AdminBaseController | ||
344 | } | 361 | } |
345 | } | 362 | } |
346 | 363 | ||
347 | - // 拒绝提现 | 364 | +// 拒绝提现 |
348 | public function refuse(){ | 365 | public function refuse(){ |
349 | $data = $this->request->param(); | 366 | $data = $this->request->param(); |
350 | $where_money['id'] = $data['id']; | 367 | $where_money['id'] = $data['id']; |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | value="{$list['id']}"/> | 19 | value="{$list['id']}"/> |
20 | <tr> | 20 | <tr> |
21 | <th width="15%">银行名称</th> | 21 | <th width="15%">银行名称</th> |
22 | - <td><input class="form-control" type="text" name="name11" | 22 | + <td><input class="form-control" type="text" name="name" |
23 | value="{$list['name']}" placeholder="请输入银行名称"/> | 23 | value="{$list['name']}" placeholder="请输入银行名称"/> |
24 | 24 | ||
25 | </td> | 25 | </td> |
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | 59 | ||
60 | <th width="130">更新时间</th> | 60 | <th width="130">更新时间</th> |
61 | <th width="130">发布时间</th> | 61 | <th width="130">发布时间</th> |
62 | - <!--<th width="90">操作</th>--> | 62 | + <th width="90">操作</th> |
63 | </tr> | 63 | </tr> |
64 | </thead> | 64 | </thead> |
65 | <foreach name="list" item="list"> | 65 | <foreach name="list" item="list"> |
@@ -93,10 +93,9 @@ | @@ -93,10 +93,9 @@ | ||
93 | 93 | ||
94 | </td> | 94 | </td> |
95 | 95 | ||
96 | - <!--<td>--> | ||
97 | - <!--<a href="{:url('New/add',array('id'=>$list['id']))}">{:lang('EDIT')}</a>--> | ||
98 | - <!--<a href="{:url('New/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>--> | ||
99 | - <!--</td>--> | 96 | + <td> |
97 | + <a href="{:url('Code/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a> | ||
98 | + </td> | ||
100 | </tr> | 99 | </tr> |
101 | </foreach> | 100 | </foreach> |
102 | 101 |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <div class="wrap js-check-wrap"> | 4 | <div class="wrap js-check-wrap"> |
5 | <ul class="nav nav-tabs"> | 5 | <ul class="nav nav-tabs"> |
6 | <li class="active"><a href="javascript:;">信誉奖励列表</a></li> | 6 | <li class="active"><a href="javascript:;">信誉奖励列表</a></li> |
7 | - <li><a href="{:url('Reward/add')}">添加信誉奖励</a></li> | 7 | + <!--<li><a href="{:url('Reward/add')}">添加信誉奖励</a></li>--> |
8 | </ul> | 8 | </ul> |
9 | <!--<form class="well form-inline margin-top-20" method="post" action="{:url('Reward/index')}">--> | 9 | <!--<form class="well form-inline margin-top-20" method="post" action="{:url('Reward/index')}">--> |
10 | <!--<!–分类:–>--> | 10 | <!--<!–分类:–>--> |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <tr> | 30 | <tr> |
31 | <th>内容</th> | 31 | <th>内容</th> |
32 | <td> | 32 | <td> |
33 | - <script type="text/plain" id="content" name="content" value="{$list['content']}" >{$list['content']}</script> | 33 | + <script type="text/plain" id="content" name="content" value="" >{$list['content']}</script> |
34 | </td> | 34 | </td> |
35 | </tr> | 35 | </tr> |
36 | </table> | 36 | </table> |
@@ -100,17 +100,17 @@ | @@ -100,17 +100,17 @@ | ||
100 | </tr> | 100 | </tr> |
101 | <tr> | 101 | <tr> |
102 | <th width="15%">首次登录时间</th> | 102 | <th width="15%">首次登录时间</th> |
103 | - <td><input class="form-control" type="text" name="login_time" value="{$list['login_time']|date='Y-m-d H:i:s',###}" /> | 103 | + <td><input class="form-control" type="text" name="login_time" value="{$list['login_time']|date='Y-m-d H:i:s',###}" readonly /> |
104 | </td> | 104 | </td> |
105 | </tr> | 105 | </tr> |
106 | <tr> | 106 | <tr> |
107 | <th width="15%">最后登录时间</th> | 107 | <th width="15%">最后登录时间</th> |
108 | - <td><input class="form-control" type="text" name="last_login_time" value="{$list['last_login_time']|date='Y-m-d H:i:s',###}" /> | 108 | + <td><input class="form-control" type="text" name="last_login_time" value="{$list['last_login_time']|date='Y-m-d H:i:s',###}" readonly/> |
109 | </td> | 109 | </td> |
110 | </tr> | 110 | </tr> |
111 | <tr> | 111 | <tr> |
112 | <th width="18%">注册时间</th> | 112 | <th width="18%">注册时间</th> |
113 | - <td><input class="form-control" type="text" name="create_time" value="{$list['create_time']|date='Y-m-d H:i:s',###}" /> | 113 | + <td><input class="form-control" type="text" name="create_time" value="{$list['create_time']|date='Y-m-d H:i:s',###}" readonly/> |
114 | </td> | 114 | </td> |
115 | </tr> | 115 | </tr> |
116 | <tr> | 116 | <tr> |
1 | +<include file="public@header"/> | ||
2 | +<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css"> | ||
3 | +<style> | ||
4 | + .popup,.popdown{ | ||
5 | + width: 250px; | ||
6 | + height: 100px; | ||
7 | + background-color: rgba(0,0,0,0.5); | ||
8 | + position: fixed; | ||
9 | + top: 50%; | ||
10 | + transform: translateY(-50px); | ||
11 | + left: 0; | ||
12 | + right: 0; | ||
13 | + margin: 0 auto; | ||
14 | + border-radius: 5px; | ||
15 | + color: #ffffff; | ||
16 | + } | ||
17 | + .popup p,.popdown p{ | ||
18 | + text-align: center; | ||
19 | + margin-top: 20px; | ||
20 | + } | ||
21 | + .popup span,.popdown span{ | ||
22 | + text-align: center; | ||
23 | + line-height: 30px; | ||
24 | + cursor: pointer; | ||
25 | + } | ||
26 | + .popup .queding,.popdown .sure{ | ||
27 | + display: inline-block; | ||
28 | + width: 80px; | ||
29 | + height: 30px; | ||
30 | + background-color: #1E9FFF; | ||
31 | + border-radius: 3px; | ||
32 | + } | ||
33 | + .popup span:hover,.popdown span:hover{ | ||
34 | + opacity: 0.8; | ||
35 | + } | ||
36 | + .popup .quxiao,.popdown .re{ | ||
37 | + display: inline-block; | ||
38 | + width: 80px; | ||
39 | + height: 30px; | ||
40 | + ckground-color: #9cb945 ; | ||
41 | + color: #333333; | ||
42 | + border-radius: 3px; | ||
43 | + background-color:#fff; | ||
44 | + margin-left: 35px; | ||
45 | + } | ||
46 | + .btn_list{ | ||
47 | + margin: 0 auto; | ||
48 | + width: 200px; | ||
49 | + } | ||
50 | +</style> | ||
51 | +</head> | ||
52 | +<body> | ||
53 | +<div class="wrap"> | ||
54 | + <ul class="nav nav-tabs"> | ||
55 | + <li class="active"><a>评论管理</a></li> | ||
56 | + </ul> | ||
57 | + <form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/comment',array('id'=>$uid))}"> | ||
58 | + 时间: | ||
59 | + <input type="text" class="form-control js-bootstrap-datetime" name="start_time" | ||
60 | + value="{$start_time|default=''}" | ||
61 | + style="width: 140px;" autocomplete="off"> - | ||
62 | + <input type="text" class="form-control js-bootstrap-datetime" name="end_time" | ||
63 | + value="{$end_time|default=''}" | ||
64 | + style="width: 140px;" autocomplete="off"> | ||
65 | + <input type="submit" class="btn btn-primary" value="搜索"/> | ||
66 | + <a class="btn btn-danger" href="{:url('AdminOauth/comment',array('id'=>$uid))}">清空</a> | ||
67 | + <span class="btn btn-default" onclick="window.history.back(-1)" >返回</span> | ||
68 | + </form> | ||
69 | + | ||
70 | + | ||
71 | + <form method="post" class="js-ajax-form margin-top-20"> | ||
72 | + <table class="table table-hover table-bordered"> | ||
73 | + <thead> | ||
74 | + <tr> | ||
75 | + <th>ID</th> | ||
76 | + <th>报价id</th> | ||
77 | + <th>评论人id</th> | ||
78 | + <th>评论内容</th> | ||
79 | + <th>是否已修改</th> | ||
80 | + <th>评论状态</th> | ||
81 | + <th>评论时间</th> | ||
82 | + <th>操作</th> | ||
83 | + </tr> | ||
84 | + </thead> | ||
85 | + <tbody> | ||
86 | + <foreach name="lists" item="vo"> | ||
87 | + <tr> | ||
88 | + <td>{$vo.id}</td> | ||
89 | + <td>{$vo.agency_id}</td> | ||
90 | + <td>{$vo.user_id}</td> | ||
91 | + <td>{$vo.content}</td> | ||
92 | + <td> | ||
93 | + <eq name="vo.is_comment" value="0">未修改</eq> | ||
94 | + <eq name="vo.is_comment" value="1">已修改</eq> | ||
95 | + </td> | ||
96 | + <td> | ||
97 | + <eq name="vo.status" value="1">正常</eq> | ||
98 | + </td> | ||
99 | + <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td> | ||
100 | + <td><span class="del" style="color: #ff0000; text-decoration:underline; cursor: pointer; " index="{$vo.id}">删除</span></td> | ||
101 | + </tr> | ||
102 | + </foreach> | ||
103 | + </tbody> | ||
104 | + </table> | ||
105 | + | ||
106 | + </form> | ||
107 | + <div class="popup" style="display: none;"> | ||
108 | + <p>确认删除</p> | ||
109 | + <div class="btn_list"> | ||
110 | + <span class="queding">确认</span> | ||
111 | + <span class="quxiao">取消</span> | ||
112 | + </div> | ||
113 | + </div> | ||
114 | + | ||
115 | + | ||
116 | +</div> | ||
117 | +<script src="__STATIC__/js/admin.js"></script> | ||
118 | +<script src="__STATIC__/js/layer/layer.js"></script> | ||
119 | +<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script> | ||
120 | +<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script> | ||
121 | +<script type=""> | ||
122 | + $('.del').click(function () { | ||
123 | + var id = $(this).attr('index'); | ||
124 | + $('.popup').css('display','block'); | ||
125 | + // 删除 | ||
126 | + $('.queding').click(function () { | ||
127 | + $.ajax({ | ||
128 | + type:"POST", | ||
129 | + url:"{:url('AdminOauth/agencyDel')}", | ||
130 | + data:{ | ||
131 | + "id":id, | ||
132 | + }, | ||
133 | + success:function (data) { | ||
134 | + new TipBox({type:'success',str:'操作成功',hasBtn:true}); | ||
135 | + $('.popup').css('display','none'); | ||
136 | + }, | ||
137 | + error:function () { | ||
138 | + new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true}); | ||
139 | + $('.popup').css('display','none'); | ||
140 | + } | ||
141 | + }) | ||
142 | + }) | ||
143 | + }) | ||
144 | + $('.quxiao').click(function () { | ||
145 | + $('.popup').css('display','none'); | ||
146 | + }) | ||
147 | + | ||
148 | + | ||
149 | +</script> | ||
150 | +</body> | ||
151 | +</html> |
@@ -64,9 +64,16 @@ | @@ -64,9 +64,16 @@ | ||
64 | style="width: 140px;" autocomplete="off"> | 64 | style="width: 140px;" autocomplete="off"> |
65 | <input type="submit" class="btn btn-primary" value="搜索"/> | 65 | <input type="submit" class="btn btn-primary" value="搜索"/> |
66 | <a class="btn btn-danger" href="{:url('AdminOauth/getMoneyDetail',array('id'=>$uid))}">清空</a> | 66 | <a class="btn btn-danger" href="{:url('AdminOauth/getMoneyDetail',array('id'=>$uid))}">清空</a> |
67 | - <span class="btn btn-default" onclick="window.history.back(-1)" >返回</span> | ||
68 | </form> | 67 | </form> |
69 | - | 68 | + <div class="well form-inline margin-top-20" style="background-color: #C8EBFA;"> |
69 | + <div style="text-align: center;">用户信息:</div> | ||
70 | + <div style="text-align: center;"> | ||
71 | + <span>用户id:{$user.id}</span> | ||
72 | + <span>用户名:{$user.name}</span> | ||
73 | + <span>手机号:{$user.tel}</span> | ||
74 | + <span class="btn btn-default" onclick="window.history.back(-1)" >返回</span> | ||
75 | + </div> | ||
76 | + </div> | ||
70 | 77 | ||
71 | <form method="post" class="js-ajax-form margin-top-20"> | 78 | <form method="post" class="js-ajax-form margin-top-20"> |
72 | <table class="table table-hover table-bordered"> | 79 | <table class="table table-hover table-bordered"> |
@@ -73,9 +73,9 @@ | @@ -73,9 +73,9 @@ | ||
73 | <input type="submit" class="btn btn-primary" value="搜索"/> | 73 | <input type="submit" class="btn btn-primary" value="搜索"/> |
74 | <a class="btn btn-danger" href="{:url('AdminOauth/inmoney',array('id'=>$uid))}">清空</a> | 74 | <a class="btn btn-danger" href="{:url('AdminOauth/inmoney',array('id'=>$uid))}">清空</a> |
75 | </form> | 75 | </form> |
76 | - <div class="well form-inline margin-top-20"> | ||
77 | - <div >用户信息</div> | ||
78 | - <div> | 76 | + <div class="well form-inline margin-top-20" style="background-color: #C8EBFA;"> |
77 | + <div style="text-align: center;">用户信息:</div> | ||
78 | + <div style="text-align: center;"> | ||
79 | <span>用户id:{$user.id}</span> | 79 | <span>用户id:{$user.id}</span> |
80 | <span>用户名:{$user.name}</span> | 80 | <span>用户名:{$user.name}</span> |
81 | <span>手机号:{$user.tel}</span> | 81 | <span>手机号:{$user.tel}</span> |
@@ -116,7 +116,7 @@ | @@ -116,7 +116,7 @@ | ||
116 | </foreach> | 116 | </foreach> |
117 | </tbody> | 117 | </tbody> |
118 | </table> | 118 | </table> |
119 | - | 119 | + <ul class="pagination">{$page|default=''}</ul> |
120 | </form> | 120 | </form> |
121 | <div class="popup" style="display: none;"> | 121 | <div class="popup" style="display: none;"> |
122 | <p>确认删除该信息</p> | 122 | <p>确认删除该信息</p> |
@@ -100,14 +100,18 @@ | @@ -100,14 +100,18 @@ | ||
100 | <td> | 100 | <td> |
101 | <empty name="vo.referee_name"> | 101 | <empty name="vo.referee_name"> |
102 | 暂无 | 102 | 暂无 |
103 | + <else/> | ||
104 | + {$vo.referee_name} | ||
103 | </empty> | 105 | </empty> |
104 | - {$vo.referee_name} | 106 | + |
105 | </td> | 107 | </td> |
106 | <td> | 108 | <td> |
107 | <empty name="vo.referee_id"> | 109 | <empty name="vo.referee_id"> |
108 | 暂无 | 110 | 暂无 |
111 | + <else/> | ||
112 | + {$vo.referee_id} | ||
109 | </empty> | 113 | </empty> |
110 | - {$vo.referee_id} | 114 | + |
111 | </td> | 115 | </td> |
112 | <td>{$vo.reputation}</td> | 116 | <td>{$vo.reputation}</td> |
113 | <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td> | 117 | <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td> |
@@ -124,7 +128,7 @@ | @@ -124,7 +128,7 @@ | ||
124 | </td> | 128 | </td> |
125 | <td> | 129 | <td> |
126 | <span class="detail" style="color: #0FD149; text-decoration:underline; cursor: pointer; " index="{$vo.id}" >详细信息</span> | 130 | <span class="detail" style="color: #0FD149; text-decoration:underline; cursor: pointer; " index="{$vo.id}" >详细信息</span> |
127 | - <span class="money" style="color: #9B399C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">收支明细</span> | 131 | + <span class="money" style="color: #9B399C;; text-decoration:underline; cursor: pointer; " index="{$vo.id}">收支明细</span> |
128 | <span class="getMoneyDetail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span> | 132 | <span class="getMoneyDetail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span> |
129 | <span class="referee" style="color: #BFB61D; text-decoration:underline; cursor: pointer; " index="{$vo.id}">邀请人</span> | 133 | <span class="referee" style="color: #BFB61D; text-decoration:underline; cursor: pointer; " index="{$vo.id}">邀请人</span> |
130 | <!--<span class="comment" style="color: #5EB3D7; text-decoration:underline; cursor: pointer; " index="{$vo.id}">查看评论</span>--> | 134 | <!--<span class="comment" style="color: #5EB3D7; text-decoration:underline; cursor: pointer; " index="{$vo.id}">查看评论</span>--> |
@@ -73,9 +73,9 @@ | @@ -73,9 +73,9 @@ | ||
73 | <input type="submit" class="btn btn-primary" value="搜索"/> | 73 | <input type="submit" class="btn btn-primary" value="搜索"/> |
74 | <a class="btn btn-danger" href="{:url('AdminOauth/money',array('id'=>$uid))}">清空</a> | 74 | <a class="btn btn-danger" href="{:url('AdminOauth/money',array('id'=>$uid))}">清空</a> |
75 | </form> | 75 | </form> |
76 | - <div class="well form-inline margin-top-20"> | ||
77 | - <div >用户信息</div> | ||
78 | - <div> | 76 | + <div class="well form-inline margin-top-20" style="background-color: #C8EBFA;"> |
77 | + <div style="text-align: center;">用户信息:</div> | ||
78 | + <div style="text-align: center;"> | ||
79 | <span>用户id:{$user.id}</span> | 79 | <span>用户id:{$user.id}</span> |
80 | <span>用户名:{$user.name}</span> | 80 | <span>用户名:{$user.name}</span> |
81 | <span>手机号:{$user.tel}</span> | 81 | <span>手机号:{$user.tel}</span> |
@@ -119,7 +119,7 @@ | @@ -119,7 +119,7 @@ | ||
119 | </foreach> | 119 | </foreach> |
120 | </tbody> | 120 | </tbody> |
121 | </table> | 121 | </table> |
122 | - | 122 | + <ul class="pagination">{$page|default=''}</ul> |
123 | </form> | 123 | </form> |
124 | <div class="popup" style="display: none;"> | 124 | <div class="popup" style="display: none;"> |
125 | <p>确认删除该信息</p> | 125 | <p>确认删除该信息</p> |
@@ -70,10 +70,17 @@ | @@ -70,10 +70,17 @@ | ||
70 | value="{$tel|default=''}" placeholder="请输入手机号"> | 70 | value="{$tel|default=''}" placeholder="请输入手机号"> |
71 | <input type="submit" class="btn btn-primary" value="搜索"/> | 71 | <input type="submit" class="btn btn-primary" value="搜索"/> |
72 | <a class="btn btn-danger" href="{:url('AdminOauth/referee',array('id'=>$uid))}">清空</a> | 72 | <a class="btn btn-danger" href="{:url('AdminOauth/referee',array('id'=>$uid))}">清空</a> |
73 | - <span class="btn btn-default" onclick="window.history.back(-1)" >返回</span> | ||
74 | - </form> | ||
75 | - | ||
76 | 73 | ||
74 | + </form> | ||
75 | + <div class="well form-inline margin-top-20" style="background-color: #C8EBFA;"> | ||
76 | + <div style="text-align: center;">用户信息:</div> | ||
77 | + <div style="text-align: center;"> | ||
78 | + <span>用户id:{$user.id}</span> | ||
79 | + <span>用户名:{$user.name}</span> | ||
80 | + <span>手机号:{$user.tel}</span> | ||
81 | + <span class="btn btn-default" onclick="window.history.back(-1)" >返回</span> | ||
82 | + </div> | ||
83 | + </div> | ||
77 | <form method="post" class="js-ajax-form margin-top-20"> | 84 | <form method="post" class="js-ajax-form margin-top-20"> |
78 | <table class="table table-hover table-bordered"> | 85 | <table class="table table-hover table-bordered"> |
79 | <thead> | 86 | <thead> |
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | <body> | 52 | <body> |
53 | <div class="wrap"> | 53 | <div class="wrap"> |
54 | <ul class="nav nav-tabs"> | 54 | <ul class="nav nav-tabs"> |
55 | - <li class="active"><a>{:lang('USER_OAUTHADMIN_INDEX')}</a></li> | 55 | + <li class="active"><a>中介信誉管理</a></li> |
56 | </ul> | 56 | </ul> |
57 | 57 | ||
58 | <form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/reward')}"> | 58 | <form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/reward')}"> |
@@ -67,9 +67,9 @@ | @@ -67,9 +67,9 @@ | ||
67 | <input type="submit" class="btn btn-primary" value="搜索"/> | 67 | <input type="submit" class="btn btn-primary" value="搜索"/> |
68 | <a class="btn btn-danger" href="{:url('AdminOauth/reward',array('id'=>$user.id))}">清空</a> | 68 | <a class="btn btn-danger" href="{:url('AdminOauth/reward',array('id'=>$user.id))}">清空</a> |
69 | </form> | 69 | </form> |
70 | - <div class="well form-inline margin-top-20"> | ||
71 | - <div >用户信息</div> | ||
72 | - <div> | 70 | + <div class="well form-inline margin-top-20" style="background-color: #C8EBFA;"> |
71 | + <div style="text-align: center;">用户信息:</div> | ||
72 | + <div style="text-align: center;"> | ||
73 | <span>用户id:{$user.id}</span> | 73 | <span>用户id:{$user.id}</span> |
74 | <span>用户名:{$user.name}</span> | 74 | <span>用户名:{$user.name}</span> |
75 | <span>手机号:{$user.tel}</span> | 75 | <span>手机号:{$user.tel}</span> |
@@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
120 | </foreach> | 120 | </foreach> |
121 | </tbody> | 121 | </tbody> |
122 | </table> | 122 | </table> |
123 | - | 123 | + <ul class="pagination">{$page|default=''}</ul> |
124 | </form> | 124 | </form> |
125 | <div class="popup" style="display: none;"> | 125 | <div class="popup" style="display: none;"> |
126 | <p>确认删除该记录</p> | 126 | <p>确认删除该记录</p> |
@@ -47,6 +47,55 @@ | @@ -47,6 +47,55 @@ | ||
47 | margin: 0 auto; | 47 | margin: 0 auto; |
48 | width: 200px; | 48 | width: 200px; |
49 | } | 49 | } |
50 | + | ||
51 | + .paging { | ||
52 | + width: auto; | ||
53 | + margin: 0 auto; | ||
54 | + margin-top: 50px; | ||
55 | + overflow: hidden; | ||
56 | + clear: both; | ||
57 | + width: 780px; | ||
58 | + margin-bottom: 67px; | ||
59 | + } | ||
60 | + | ||
61 | + .paging ul li { | ||
62 | + float: left; | ||
63 | + display: block; | ||
64 | + width: 40px; | ||
65 | + height: 40px; | ||
66 | + background-color: #FFFFFF; | ||
67 | + margin-left: 10px; | ||
68 | + line-height: 40px; | ||
69 | + text-align: center; | ||
70 | + } | ||
71 | + | ||
72 | + .paging ul li:first-child { | ||
73 | + margin-left: 0; | ||
74 | + } | ||
75 | + | ||
76 | + .paging .paging_first { | ||
77 | + width: 78px; | ||
78 | + } | ||
79 | + | ||
80 | + .paging .active { | ||
81 | + background-color: #80B13B; | ||
82 | + color: #FFFFFF; | ||
83 | + } | ||
84 | + | ||
85 | + .page_btn, | ||
86 | + .pre, | ||
87 | + .next, | ||
88 | + .paging_first, | ||
89 | + .paging_last { | ||
90 | + cursor: pointer; | ||
91 | + } | ||
92 | + | ||
93 | + .paging .paging_last { | ||
94 | + width: 78px; | ||
95 | + } | ||
96 | + .content_list{ | ||
97 | + min-height: 364px; | ||
98 | + } | ||
50 | </style> | 99 | </style> |
51 | </head> | 100 | </head> |
52 | <body> | 101 | <body> |
@@ -99,14 +148,18 @@ | @@ -99,14 +148,18 @@ | ||
99 | <td> | 148 | <td> |
100 | <empty name="vo.referee_name"> | 149 | <empty name="vo.referee_name"> |
101 | 暂无 | 150 | 暂无 |
151 | + <else/> | ||
152 | + {$vo.referee_name} | ||
102 | </empty> | 153 | </empty> |
103 | - {$vo.referee_name} | 154 | + |
104 | </td> | 155 | </td> |
105 | <td> | 156 | <td> |
106 | <empty name="vo.referee_id"> | 157 | <empty name="vo.referee_id"> |
107 | 暂无 | 158 | 暂无 |
159 | + <else/> | ||
160 | + {$vo.referee_id} | ||
108 | </empty> | 161 | </empty> |
109 | - {$vo.referee_id} | 162 | + |
110 | </td> | 163 | </td> |
111 | 164 | ||
112 | <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td> | 165 | <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td> |
@@ -122,14 +175,14 @@ | @@ -122,14 +175,14 @@ | ||
122 | </eq> | 175 | </eq> |
123 | </td> | 176 | </td> |
124 | <td> | 177 | <td> |
125 | - <span class="detail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}" >详细信息</span> | ||
126 | - <span class="money" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">收支明细</span> | ||
127 | - <span class="getMoneyDetail" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span> | ||
128 | - <span class="referee" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">邀请人</span> | 178 | + <span class="detail" style="color: #0FD149; text-decoration:underline; cursor: pointer; " index="{$vo.id}" >详细信息</span> |
179 | + <span class="money" style="color: #9B399C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">收支明细</span> | ||
180 | + <span class="getMoneyDetail" style="color: #18BC9C;text-decoration:underline; cursor: pointer; " index="{$vo.id}">提现申请</span> | ||
181 | + <span class="referee" style="color: #BFB61D; text-decoration:underline; cursor: pointer; " index="{$vo.id}">邀请人</span> | ||
129 | </td> | 182 | </td> |
130 | <td> | 183 | <td> |
131 | <eq name="vo.status" value="1"> | 184 | <eq name="vo.status" value="1"> |
132 | - <span class="black" style="color: #18BC9C; text-decoration:underline; cursor: pointer; " index="{$vo.id}">拉黑</span> | 185 | + <span class="black" style="color: #AC4555; text-decoration:underline; cursor: pointer; " index="{$vo.id}">拉黑</span> |
133 | </eq> | 186 | </eq> |
134 | <eq name="vo.status" value="8"> | 187 | <eq name="vo.status" value="8"> |
135 | <span style="color:#aaaaaa; cursor: pointer; " index="{$vo.id}">已拉黑</span> | 188 | <span style="color:#aaaaaa; cursor: pointer; " index="{$vo.id}">已拉黑</span> |
@@ -142,6 +195,28 @@ | @@ -142,6 +195,28 @@ | ||
142 | </foreach> | 195 | </foreach> |
143 | </tbody> | 196 | </tbody> |
144 | </table> | 197 | </table> |
198 | + <ul class="pagination"> | ||
199 | + <!--<li class="page-item disabled"><span class="page-link">«</span></li>--> | ||
200 | + <!--<li class="page-item"><a class="page-link" href="/public/portal/code/index.html?page=3">3</a></li>--> | ||
201 | + <!--<li class="page-item"><a class="page-link" href="/public/portal/code/index.html?page=3">4</a></li>--> | ||
202 | + <!--<li class="page-item"><a class="page-link" href="/public/portal/code/index.html?page=2">»</a></li>--> | ||
203 | + {$page|default='1'}</ul> | ||
204 | + <!--<div class="paging">--> | ||
205 | + <!--<ul class="page_list">--> | ||
206 | + <!--<li class="paging_first"><<首页</li>--> | ||
207 | + <!--<li><</li>--> | ||
208 | + <!--<li class="page_btn active" data-id=1>1</li>--> | ||
209 | + <!--<li class="page_btn" data-id=2>2</li>--> | ||
210 | + <!--<li class="page_btn" data-id=3>3</li>--> | ||
211 | + <!--<li class="page_btn" data-id=4>4</li>--> | ||
212 | + <!--<li class="page_btn" data-id=5>5</li>--> | ||
213 | + <!--<li class="page_btn" data-id=6>6</li>--> | ||
214 | + <!--<li class="page_btn" data-id=7>7</li>--> | ||
215 | + <!--<li>></li>--> | ||
216 | + <!--<li class="paging_first">尾页>></li>--> | ||
217 | + <!--</ul>--> | ||
218 | + <!--</div>--> | ||
219 | + | ||
145 | 220 | ||
146 | </form> | 221 | </form> |
147 | <div class="popup" style="display: none;"> | 222 | <div class="popup" style="display: none;"> |
@@ -217,6 +292,61 @@ | @@ -217,6 +292,61 @@ | ||
217 | window.location.href = url | 292 | window.location.href = url |
218 | }) | 293 | }) |
219 | 294 | ||
295 | + | ||
296 | + | ||
297 | + | ||
298 | + | ||
299 | + | ||
300 | + // 分页 | ||
301 | + page_list = ''; | ||
302 | + var tempPage = []; | ||
303 | + if(all_page - current_page > 9) { | ||
304 | + if(current_page > 0) { | ||
305 | + for(var i = 7; i > 0; i--) { | ||
306 | + tempPage[i] = parseInt(current_page - 1) + i; | ||
307 | + } | ||
308 | + } else { | ||
309 | + for(var i = 7; i > 0; i--) { | ||
310 | + tempPage[i] = parseInt(current_page) + i; | ||
311 | + } | ||
312 | + } | ||
313 | + tempPage.push('...'); | ||
314 | + tempPage.push(all_page - 1); | ||
315 | + tempPage.push(all_page) | ||
316 | + } else { | ||
317 | + tempPage = []; | ||
318 | + if(all_page > 10) { | ||
319 | + for(var i = 10; i >= 0; i--) { | ||
320 | + tempPage[10 - i] = parseInt(all_page) - i; | ||
321 | + console.log(tempPage) | ||
322 | + } | ||
323 | + } else { | ||
324 | + for(var i = all_page; i >= 0; i--) { | ||
325 | + tempPage[all_page - i] = parseInt(all_page) - i; | ||
326 | + } | ||
327 | + } | ||
328 | + | ||
329 | + } | ||
330 | + | ||
331 | + var total = all_page > 10 ? 10 : all_page; | ||
332 | + var pagelist = ''; | ||
333 | + for(var i = 1; i <= total; i++) { | ||
334 | + | ||
335 | + if(current_page == tempPage[i]) { | ||
336 | + if(tempPage[i] == '...') { | ||
337 | + pagelist += ' <li class="page_btn more" data-id = ' + i + ' >' + tempPage[i] + '</li>'; | ||
338 | + } else { | ||
339 | + pagelist += ' <li class="pageli active" >' + tempPage[i] + '</li>'; | ||
340 | + } | ||
341 | + | ||
342 | + } else { | ||
343 | + if(tempPage[i] == '...') { | ||
344 | + pagelist += ' <li class="page_btn more" data-id = ' + i + ' >' + tempPage[i] + '</li>'; | ||
345 | + } else { | ||
346 | + pagelist += ' <li class="page_btn" data-id = ' + tempPage[i] + ' >' + tempPage[i] + '</li>'; | ||
347 | + } | ||
348 | + } | ||
349 | + } | ||
220 | </script> | 350 | </script> |
221 | </body> | 351 | </body> |
222 | </html> | 352 | </html> |
-
请 注册 或 登录 后发表评论