Commit 8aa58885 by haojie

1

parent 46dfe1f7
...@@ -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;
} }
......
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