Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
blind-box-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
blind-box-api
Commits
a227bf50
Commit
a227bf50
authored
Mar 21, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
662a6ce5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
16 deletions
+24
-16
app/Admin/Controllers/BlindBoxListController.php
+2
-0
app/Admin/Controllers/BlindBoxRecordController.php
+2
-13
app/Admin/Controllers/SetAddressController.php
+2
-0
app/Admin/Controllers/UserWalletController.php
+2
-3
app/Service/SelectService.php
+16
-0
No files found.
app/Admin/Controllers/BlindBoxListController.php
View file @
a227bf50
...
@@ -43,6 +43,8 @@ protected function grid()
...
@@ -43,6 +43,8 @@ protected function grid()
});
});
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
$filter
->
equal
(
'id'
);
$filter
->
equal
(
'projectName'
);
# $filter->panel();
});
});
$grid
->
tools
(
function
(
Grid\Tools
$tools
)
{
$grid
->
tools
(
function
(
Grid\Tools
$tools
)
{
$tools
->
append
(
new
CreateBlindBox
());
$tools
->
append
(
new
CreateBlindBox
());
...
...
app/Admin/Controllers/BlindBoxRecordController.php
View file @
a227bf50
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Admin\Controllers
;
namespace
App\Admin\Controllers
;
use
App\Models\TransferRecord
;
use
App\Models\TransferRecord
;
use
App\Service\SelectService
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Show
;
...
@@ -139,19 +140,7 @@ protected function grid()
...
@@ -139,19 +140,7 @@ protected function grid()
return
''
;
return
''
;
});
});
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
# $filter->equal('status', '状态');
$filter
->
equal
(
'status'
)
->
select
(
SelectService
::
$statusLabel
);
$filter
->
where
(
'status'
,
function
(
$query
)
{
$input
=
$this
->
input
;
$status
=
0
;
if
(
$input
==
'未开始'
)
{
$status
=
1
;
}
else
if
(
$input
==
'进行中'
)
{
$status
=
2
;
}
else
if
(
$input
==
'已完成'
)
{
$status
=
3
;
}
$query
->
where
(
'status'
,
'='
,
$status
);
});
});
});
});
});
}
}
...
...
app/Admin/Controllers/SetAddressController.php
View file @
a227bf50
...
@@ -27,6 +27,8 @@ protected function grid()
...
@@ -27,6 +27,8 @@ protected function grid()
$grid
->
disableActions
();
$grid
->
disableActions
();
// 行选择器
// 行选择器
$grid
->
disableRowSelector
();
$grid
->
disableRowSelector
();
// 禁用过滤器按钮
$grid
->
disableFilterButton
();
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'address'
)
->
editable
();
$grid
->
column
(
'address'
)
->
editable
();
# $grid->column('created_at');
# $grid->column('created_at');
...
...
app/Admin/Controllers/UserWalletController.php
View file @
a227bf50
...
@@ -23,10 +23,9 @@ protected function grid()
...
@@ -23,10 +23,9 @@ protected function grid()
$grid
->
column
(
'buy_list'
);
$grid
->
column
(
'buy_list'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
$filter
->
equal
(
'id'
);
});
});
});
});
}
}
...
@@ -60,7 +59,7 @@ protected function form()
...
@@ -60,7 +59,7 @@ protected function form()
$form
->
display
(
'id'
);
$form
->
display
(
'id'
);
$form
->
text
(
'user_address'
);
$form
->
text
(
'user_address'
);
$form
->
text
(
'buy_list'
);
$form
->
text
(
'buy_list'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
$form
->
display
(
'updated_at'
);
});
});
...
...
app/Service/SelectService.php
0 → 100644
View file @
a227bf50
<?php
namespace
App\Service
;
class
SelectService
{
public
const
STATUS_NOT_START
=
1
;
public
const
STATUS_PROJRESS
=
2
;
public
const
STATUS_FINISH
=
3
;
public
static
array
$statusLabel
=
[
self
::
STATUS_NOT_START
=>
'未完成'
,
self
::
STATUS_PROJRESS
=>
'进行中'
,
self
::
STATUS_FINISH
=>
'已完成'
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment