37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
||
// +------------------------------------------------+
|
||
// |http://www.cjango.com |
|
||
// +------------------------------------------------+
|
||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||
// +------------------------------------------------+
|
||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||
// +------------------------------------------------+
|
||
namespace app\system\controller;
|
||
|
||
use app\common\model\VipOrder;
|
||
|
||
class Vip extends _Init
|
||
{
|
||
public function index($title = '', $type = '')
|
||
{
|
||
$model = new VipOrder();
|
||
$model->alias('VipOrder');
|
||
$map = [];
|
||
if (!empty($title)) {
|
||
$model = $model->hasWhere('user', ['nickname' => ['like', "%$title%"]]);
|
||
}
|
||
|
||
if ($type) {
|
||
$map['VipOrder.type'] = $type;
|
||
}
|
||
$this->list = $model->where($map)->order('create_time desc')->paginate();
|
||
return $this->fetch('');
|
||
}
|
||
|
||
public function info($id)
|
||
{
|
||
$this->list = VipOrder::where('uid', $id)->paginate();
|
||
return $this->fetch('');
|
||
}
|
||
}
|