Ejemplo n.º 1
0
 public function index()
 {
     $list = $this->lists($this->_table, $this->_getWhere(), 'type,sort');
     int_to_string($list, array('type' => $this->_type_config, 'status' => array(1 => '正常', -1 => '删除', 0 => '禁用', 2 => '未审核', 3 => '草稿')));
     foreach ($list as &$value) {
         $value['url'] = $value['url'] ?: fenqi_host('page/' . $value['id']);
     }
     $this->assign('_node_name', $this->_node_name);
     $this->assign('_list', $list);
     $this->assign('_type', $this->_type_config);
     $this->meta_title = $this->_node_name . '管理';
     $this->display();
 }
Ejemplo n.º 2
0
 public function index()
 {
     $model = M()->table('zj_loan_web_help h')->join('zj_loan_web_help_category c on c.id=h.category_id');
     $list = $this->lists($model, $this->_getWhere(), 'h.id desc', 'h.*,c.name category_name');
     int_to_string($list, array('status' => array(1 => '正常', -1 => '删除', 0 => '禁用', 2 => '未审核', 3 => '草稿')));
     foreach ($list as &$value) {
         $value['url'] = fenqi_host('help/' . $value['id']);
     }
     $this->assign('_node_name', $this->_node_name);
     $this->assign('_list', $list);
     $this->meta_title = $this->_node_name . '管理';
     $this->display();
 }
Ejemplo n.º 3
0
 protected function _filterList(&$list)
 {
     foreach ($list as $key => $vo) {
         $list[$key]['url'] = $vo['url'] ?: fenqi_host('notice/' . $vo['id']);
     }
 }
Ejemplo n.º 4
0
 public function index()
 {
     if (I('get.action') == 'remark') {
         M('loan_order_remark')->add(['order_id' => I('order_id'), 'created' => time(), 'uid' => $this->_user['uid'], 'uname' => $this->_user['uname'], 'content' => I('content')]);
         $this->success();
         exit;
     }
     if (I('get.action') == 'contract') {
         $model = new \Loan\Model\OrderContractModel();
         $url = $model->pdfUrl(I('id')) or $this->error($model->getError());
         header('Location: ' . $url);
         exit;
     }
     $id = I('get.id', 0, 'intval');
     $id && $this->_detail($id);
     // 显示正常的订单列表
     $model = D('Loan/order');
     $list = $this->lists($this->_table, $this->_getWhere(), $this->_list_order);
     foreach ($list as $key => $vo) {
         $list[$key]['url'] = $vo['url'] ?: ($vo['goods_id'] > 0 ? fenqi_host($vo['goods_id']) : '');
     }
     int_to_string($list, ['status' => $this->_status, 'type' => $this->_type, 'city_id' => $list ? M('common_region')->where(['id' => ['in', array_column($list, 'city_id')]])->getField('id,name_short') : [], 'campus_id' => $list ? M('university_campus')->where(['id' => ['in', array_column($list, 'campus_id')]])->getField('id,university_name') : []]);
     $this->assign('_list', $list);
     $this->assign('orderModel', $model);
     $this->meta_title = $this->_node_name . '信息';
     $this->display();
 }