Commit 8eefbf5e by haojie

1

parent 8aa58885
......@@ -113,15 +113,18 @@ protected function grid()
# 是数组
$div = '';
foreach ($json as $value) {
$item = '';
# 查询是否中奖
$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'>已打款
if ($record) {
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>";
} else {
$item = "<span style='color:red;font-weight: bold'>未打款</span>";
}
}
$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