Files
xiaoyu 27ac5aab3f piac
2025-03-14 15:20:04 +08:00

48 lines
1.4 KiB
PHP

<?php
defined('WXAPP_APP') or exit('No direct script access allowed');
require_once APPPATH . 'controllers/wxapp/Wxapp.php';
class Paic extends Wxapp
{
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('app/paic/app_paic_users_model');
}
//获取车系
protected function get()
{
$page = $this->input_param('page');
$size = $this->input_param('size');
$keyword = $this->input_param('keyword');
!$page && $page = 1;
!$size && $size = 100;
$where = [
'status' => App_paic_users_model::STATUS_NORMAL
];
if ($keyword) {
$where["name like '%{$keyword}%'"] = null;
}
$count = $this->app_paic_users_model->count($where);
$list = $this->app_paic_users_model->select($where, 'id desc', $page, $size, 'id,name,mobile');
foreach ($list as $k => $v){
$list[$k]['name'] = $v['name'] . " (".substr($v['mobile'], -4).")";
}
$data = [
'list' => $list,
'total' => $count
];
return $data;
}
}