add-licheb-options
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
defined('WXAPP_APP') OR exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* User: lcc
|
||||
* Date: 2023.03.21
|
||||
* Time: 14:08
|
||||
*/
|
||||
require_once APPPATH.'controllers/wxapp/Wxapp.php';
|
||||
class Options extends Wxapp{
|
||||
|
||||
function __construct($inputs, $app_key){
|
||||
parent::__construct($inputs, $app_key);
|
||||
|
||||
$this->login_white = array('get');//登录白名单
|
||||
$this->check_status = array();//用户状态校验
|
||||
$this->check_mobile = array();//需要手机号
|
||||
$this->check_headimg =array();//授权微信信息
|
||||
$this->load->model('auto/auto_option_model');
|
||||
}
|
||||
|
||||
protected function get(){
|
||||
$page = $this->input_param('page');
|
||||
$size = $this->input_param('size');
|
||||
$s_id = $this->input_param('id'); //车系id
|
||||
!$page && $page = 1;
|
||||
!$size && $size = 100;
|
||||
|
||||
$where = [
|
||||
'status' => 1,
|
||||
's_id' => $s_id
|
||||
];
|
||||
|
||||
$count = $this->auto_option_model->count($where);
|
||||
$lists = [];
|
||||
if($count){
|
||||
$rows = $this->auto_option_model->select($where,'id desc',$page,$size);
|
||||
foreach ($rows as $item) {
|
||||
$lists[] = [
|
||||
'id' => $item['id'],
|
||||
'title' => $item['title'],
|
||||
'descrip' => $item['descrip'],
|
||||
'price' => $item['price']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$data = [
|
||||
'list' => $lists,
|
||||
'total' => $count
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user