You've already forked guangan
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace plugin\ticket\controller;
|
|
|
|
use plugin\ticket\model\TicketType;
|
|
use plugin\ticket\model\TicketUserShare;
|
|
use think\admin\Controller;
|
|
use think\admin\helper\QueryHelper;
|
|
|
|
/**
|
|
* 用户随手拍
|
|
*/
|
|
class UserShare extends Controller
|
|
{
|
|
/**
|
|
* 随手拍列表
|
|
* @auth true
|
|
* @menu true
|
|
* @return void
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
*/
|
|
public function index()
|
|
{
|
|
$this->title = '用户随手拍';
|
|
$this->type_list = TicketType::getList();
|
|
TicketUserShare::mQuery()->layTable(function () {
|
|
|
|
}, function (QueryHelper $query) {
|
|
$query->like(['title|content|ticket_address|contact_phone#keyword'])
|
|
->dateBetween(['create_at'])
|
|
->equal(['status', 'type_id']);
|
|
$query->with(['user'])->append(['imgs_arr', 'type_name']);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 随手拍详情
|
|
* @auth true
|
|
* @menu true
|
|
* @return void
|
|
*/
|
|
public function info()
|
|
{
|
|
$this->title = '随手拍详情';
|
|
TicketUserShare::mForm('form');
|
|
}
|
|
} |