Commit 8eefbf5e by haojie

1

parent 8aa58885
...@@ -113,15 +113,18 @@ protected function grid() ...@@ -113,15 +113,18 @@ 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->status == 1) { if ($record) {
$item = "<span style='color:green;font-weight: bold'>已打款 if ($record->status == 1) {
$item = "<span style='color:green;font-weight: bold'>已打款
--$record->hash --$record->hash
</span>"; </span>";
} 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>";
} }
......
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