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
8aa58885
Commit
8aa58885
authored
Mar 17, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
46dfe1f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
app/Admin/Controllers/BlindBoxRecordController.php
+12
-1
public/uploads/files/092120eb04451618d97aa585d0f7544b.png
+0
-0
public/uploads/files/24aee6848471a1c6feb28622464572f5.png
+0
-0
No files found.
app/Admin/Controllers/BlindBoxRecordController.php
View file @
8aa58885
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
App\Admin\Controllers
;
namespace
App\Admin\Controllers
;
use
App\Models\TransferRecord
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Show
;
...
@@ -112,7 +113,17 @@ protected function grid()
...
@@ -112,7 +113,17 @@ protected function grid()
# 是数组
# 是数组
$div
=
''
;
$div
=
''
;
foreach
(
$json
as
$value
)
{
foreach
(
$json
as
$value
)
{
$div
=
$div
.
"<div>
$value
</div>"
;
# 查询是否中奖
$record
=
TransferRecord
::
query
()
->
where
(
'blind_box_id'
,
$this
->
id
)
->
whereIn
(
'status'
,
[
1
,
2
])
->
first
([
'status'
,
'hash'
]);
if
(
$record
->
status
==
1
)
{
$item
=
"<span style='color:green;font-weight: bold'>已打款
--
$record->hash
</span>"
;
}
else
{
$item
=
"<span style='color:red;font-weight: bold'>未打款</span>"
;
}
$div
=
$div
.
"<div style='margin: 12px 0'>
$value
--
$item
</div>"
;
}
}
return
$div
;
return
$div
;
}
}
...
...
public/uploads/files/092120eb04451618d97aa585d0f7544b.png
0 → 100644
View file @
8aa58885
6.34 KB
public/uploads/files/24aee6848471a1c6feb28622464572f5.png
0 → 100644
View file @
8aa58885
6.34 KB
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