Commit 8eefbf5e by haojie

1

parent 8aa58885
...@@ -113,9 +113,11 @@ protected function grid() ...@@ -113,9 +113,11 @@ protected function grid()
# 是数组 # 是数组
$div = ''; $div = '';
foreach ($json as $value) { foreach ($json as $value) {
$item = '';
# 查询是否中奖 # 查询是否中奖
$record = TransferRecord::query()->where('blind_box_id', $this->id) $record = TransferRecord::query()->where('blind_box_id', $this->id)
->whereIn('status', [1, 2])->first(['status', 'hash']); ->whereIn('status', [1, 2])->first(['status', 'hash']);
if ($record) {
if ($record->status == 1) { if ($record->status == 1) {
$item = "<span style='color:green;font-weight: bold'>已打款 $item = "<span style='color:green;font-weight: bold'>已打款
--$record->hash --$record->hash
...@@ -123,6 +125,7 @@ protected function grid() ...@@ -123,6 +125,7 @@ protected function grid()
} else { } else {
$item = "<span style='color:red;font-weight: bold'>未打款</span>"; $item = "<span style='color:red;font-weight: bold'>未打款</span>";
} }
}
$div = $div . "<div style='margin: 12px 0'>$value--$item</div>"; $div = $div . "<div style='margin: 12px 0'>$value--$item</div>";
} }
return $div; return $div;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment