From 5c94b86b618e1eabd176358f36035a21494cb819 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 4 Jun 2020 20:13:12 +0800 Subject: [PATCH] 1 --- .../controller/ActivityController.class.php | 2 +- webapp/controller/ShopController.class.php | 34 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/webapp/controller/ActivityController.class.php b/webapp/controller/ActivityController.class.php index 58ca2a9..7e83feb 100644 --- a/webapp/controller/ActivityController.class.php +++ b/webapp/controller/ActivityController.class.php @@ -453,7 +453,7 @@ class ActivityController{ return; } - if ($row['free_times'] + $row['video_times'] + 1 == 3) { + if ($row['free_times'] + $row['video_times'] + 1 == 5) { $g_conf_lot_cluster = require('../res/lottery@lottery.php'); for($g = 1; $g <= count($g_conf_lot_cluster); $g++) { $l = $this->getLottery($g); diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 06d7b61..f4cb7b5 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -40,7 +40,9 @@ class ShopController{ 'discount' => $item_conf['discount'], 'shop_type' => $item_conf['shop_type'], 'type' => $item_conf['fuction'], - 'bug_groupnum' => $item_conf['bug_groupnum'] + 'bug_groupnum' => $item_conf['bug_groupnum'], + 'shop_list' => $item_conf['shop_list'], + 'bug_groupnum' => $item_conf['bug_groupnum'], ); return $it; } @@ -121,7 +123,7 @@ class ShopController{ 'price' => $shop['price'], 'tip' => $shop['tip'], 'status' => $shop['status'], - 'time' => $shop['time'] + 'time' => $shop['time'], )); } } @@ -168,7 +170,7 @@ class ShopController{ if ($r['status'] == 2 || $r['active_time'] != 0) { continue; } - if ($it['type'] == 10) { + if ($it['type'] == 10 || $it['type'] == 11) { continue; } $status = 1; @@ -180,8 +182,8 @@ class ShopController{ 'id' => $it['id'], )); } - if ($it['type'] == 10) { - $num = 10; + if ($it['type'] == 10 || $it['type'] == 11) { + $num = $it['bug_groupnum']; } array_push($coin_shop,array( 'id' => $it['id'], @@ -189,7 +191,8 @@ class ShopController{ 'status' => $status, 'discount' => 0, 'coin_id' => 10001, - 'num' => $num + 'num' => $num, + 'shop_list' => $it['shop_list'], )); } else if ($it['shop_type'] == 2) { if ($status == 0) { @@ -197,8 +200,8 @@ class ShopController{ 'id' => $it['id'], )); } - if ($it['type'] == 10) { - $num = 10; + if ($it['type'] == 10 || $it['type'] == 11) { + $num = $it['bug_groupnum']; } array_push($diamond_shop,array( 'id' => $it['id'], @@ -206,7 +209,8 @@ class ShopController{ 'status' => $status, 'discount' => 0, 'coin_id' => 10003, - 'num' => $num + 'num' => $num, + 'shop_list' => $it['shop_list'], )); } else if ($it['shop_type'] == 3) { if ($status == 0) { @@ -214,8 +218,8 @@ class ShopController{ 'id' => $it['id'], )); } - if ($it['type'] == 10) { - $num = 10; + if ($it['type'] == 10 || $it['type'] == 11) { + $num = $it['bug_groupnum']; } array_push($coin_shop,array( 'id' => $it['id'], @@ -223,7 +227,8 @@ class ShopController{ 'status' => $status, 'discount' => 0, 'coin_id' => 10001, - 'num' => $num + 'num' => $num, + 'shop_list' => $it['shop_list'], )); if ($status == 0) { array_push($rand_diamondshop,array( @@ -236,7 +241,8 @@ class ShopController{ 'status' => $status, 'discount' => 0, 'coin_id' => 10003, - 'num' => $num + 'num' => $num, + 'shop_list' => $it['shop_list'], )); } } @@ -374,7 +380,7 @@ class ShopController{ )); if ($row) { $it = $this->getItem($id); - if ($row['status'] != 2 && $row['active_time'] == 0 && $it['type'] != 10) { + if ($row['status'] != 2 && $row['active_time'] == 0 && $it['type'] != 10 && $it['type'] != 11) { phpcommon\sendError(ERR_USER_BASE + 4, '商品已购买'); return; }