mybonus.php remove medal

This commit is contained in:
xiaomlove
2022-12-19 19:01:22 +08:00
parent 55fed75e97
commit b99ca57321
9 changed files with 65 additions and 26 deletions
+15 -14
View File
@@ -149,20 +149,21 @@ function bonusarray($option = 0){
$results[] = $bonus;
//Buy medal
$medals = \App\Models\Medal::query()->where('get_type', \App\Models\Medal::GET_TYPE_EXCHANGE)->get();
foreach ($medals as $medal) {
$results[] = [
'points' => $medal->price,
'art' => 'buy_medal',
'menge' => 0,
'name' => $medal->name,
'description' => sprintf(
'<div style="display: flex;align-items: center"><div style="padding: 10px">%s</div><div><img src="%s" style="max-height: 120px"/></div></div><input type="hidden" name="medal_id" value="%s">',
$medal->description, $medal->image_large, $medal->id
),
'medal_id' => $medal->id,
];
}
//migrate to medal.php since v1.8
// $medals = \App\Models\Medal::query()->where('get_type', \App\Models\Medal::GET_TYPE_EXCHANGE)->get();
// foreach ($medals as $medal) {
// $results[] = [
// 'points' => $medal->price,
// 'art' => 'buy_medal',
// 'menge' => 0,
// 'name' => $medal->name,
// 'description' => sprintf(
// '<div style="display: flex;align-items: center"><div style="padding: 10px">%s</div><div><img src="%s" style="max-height: 120px"/></div></div><input type="hidden" name="medal_id" value="%s">',
// $medal->description, $medal->image_large, $medal->id
// ),
// 'medal_id' => $medal->id,
// ];
// }
return $results;