作者 王智

接口

... ... @@ -12,6 +12,8 @@ return [
'Plane_type' => '飞机类型',
'Plane_type 1' => '飞机一',
'Plane_type 2' => '飞机二',
'Plane_type 3' => '飞机三',
'Plane_type 4' => '飞机四',
'Createtime' => '创建时间',
'Updatetime' => '更改时间',
'Time.title' => '时间'
... ...
... ... @@ -44,7 +44,7 @@ class Moban extends Model
public function getPlaneTypeList()
{
return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2')];
return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2'),'3' => __('Plane_type 3'),'4' => __('Plane_type 4')];
}
... ...
... ... @@ -44,8 +44,8 @@ class Index extends Api
$user_id = $this->is_token($this->request->header());
$id = input('id');
$vip = Db::name('user')->where(['id' => $user_id])->value('vip');
//拦截预约当天
$this->is_day($id);
// //拦截预约当天
// $this->is_day($id);
//vip等级拦截
$this->is_vip($vip, $id);
//超过最大次数拦截
... ... @@ -315,7 +315,7 @@ class Index extends Api
}
})
*/
public function TableList()
public function TableList()
{
$date = input('date');
$day = strtotime(date($date));
... ... @@ -328,7 +328,7 @@ class Index extends Api
->where($map)
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 1])
->join('planename p','p.id=s.plane_type')
->join('planename p', 'p.id=s.plane_type')
->field('t.title,p.name,s.id,s.plane_type,s.status,s.user_id')
->select();
foreach ($shangwu1 as $k => $v) {
... ... @@ -348,7 +348,7 @@ class Index extends Api
->where($map)
->where(['s.cloud_type' => 1])
->where(['s.plane_type' => 2])
->join('planename p','p.id=s.plane_type')
->join('planename p', 'p.id=s.plane_type')
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->select();
foreach ($shangwu2 as $k => $v) {
... ... @@ -373,7 +373,7 @@ class Index extends Api
->where($map)
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 1])
->join('planename p','p.id=s.plane_type')
->join('planename p', 'p.id=s.plane_type')
->field('t.title,p.name,s.id,s.plane_type,s.status,s.user_id')
->select();
foreach ($xiawu1 as $k => $v) {
... ... @@ -393,7 +393,7 @@ class Index extends Api
->where($map)
->where(['s.cloud_type' => 2])
->where(['s.plane_type' => 2])
->join('planename p','p.id=s.plane_type')
->join('planename p', 'p.id=s.plane_type')
->field('s.id as fid,p.name as fname,s.plane_type as fplane_type,s.status as fstatus,s.user_id as fuser_id')
->select();
foreach ($xiawu2 as $k => $v) {
... ... @@ -461,7 +461,7 @@ class Index extends Api
}
})
*/
public function Kill()
public function Kill()
{
$id = input('id');
$user_id = $this->is_token($this->request->header());
... ... @@ -476,7 +476,7 @@ class Index extends Api
'2' => $id + 1
];
$vip_level = DB::name('user')->where('id', $user_id)->value('vip');
if ($vip_level == 1 || $vip_level == 2) {
if ($vip_level == 1 || $vip_level == 2 || $vip_level == 3) {
foreach ($array as $k => $v) {
$kill = Db::name('yuyue')->where(['sun_id' => $v])->where('user_id', $user_id)->find();
if (!empty($kill)) {
... ...
... ... @@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'time.title', title: __('Time.title')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'cloud_type', title: __('Cloud_type'), searchList: {"1":__('Cloud_type 1'),"2":__('Cloud_type 2')}, formatter: Table.api.formatter.normal},
{field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2')}, formatter: Table.api.formatter.normal},
{field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2'),"3":__('Plane_type 3'),"4":__('Plane_type 4')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...