60 lines
1.6 KiB
PHP
60 lines
1.6 KiB
PHP
<?php
|
|
defined('WXAPP_APP') OR exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Created by Vim
|
|
* User: lcc
|
|
* Date: 2021/09/09
|
|
* Time: 14:08
|
|
*/
|
|
require_once APPPATH.'controllers/wxapp/Wxapp.php';
|
|
class Finance extends Wxapp{
|
|
|
|
public function __construct($inputs, $app_key){
|
|
parent::__construct($inputs, $app_key);
|
|
|
|
$this->login_white = array();//登录白名单
|
|
$this->check_status = array();//用户状态校验
|
|
$this->check_mobile = array();//需要手机号
|
|
$this->check_headimg =array();//授权微信信息
|
|
$this->load->model('auto/auto_series_model');
|
|
$this->load->model('auto/auto_cars_model');
|
|
$this->load->model('auto/auto_finance_model');
|
|
$this->load->model('sys/sys_finance_model');
|
|
}
|
|
|
|
protected function get(){
|
|
$page = $this->input_param('page');
|
|
$size = $this->input_param('size');
|
|
|
|
!$page && $page = 1;
|
|
!$size && $size = 10;
|
|
|
|
$where = [
|
|
'status' => 1
|
|
];
|
|
$count = $this->sys_finance_model->count($where);
|
|
$lists = [];
|
|
if($count){
|
|
$rows = $this->sys_finance_model->select($where,'id desc',$page,$size,'id,title');
|
|
foreach($rows as $key => $val){
|
|
$lists[] = $val;
|
|
}
|
|
}
|
|
$data = [
|
|
'list' => $lists,
|
|
'total' => $count
|
|
];
|
|
return $data;
|
|
}
|
|
|
|
protected function get_nums(){
|
|
$list = $this->sys_finance_model->get_nums();
|
|
$data = [
|
|
'list' => $list,
|
|
];
|
|
return $data;
|
|
|
|
}
|
|
}
|