From eb36e338223bd8d44b419a62600c004fe2590764 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 10 Oct 2024 19:32:25 +0800 Subject: [PATCH] 1 --- .../controller/HashRateShopController.class.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/webapp/controller/HashRateShopController.class.php b/webapp/controller/HashRateShopController.class.php index a82ea703..5fdb4d98 100644 --- a/webapp/controller/HashRateShopController.class.php +++ b/webapp/controller/HashRateShopController.class.php @@ -21,9 +21,23 @@ class HashRateShopController extends BaseAuthedController { ); } + public function testBuyGoods() + { + if (SERVER_ENV != _ONLINE) { + $this->internalBuyGoods(); + } + } + public function buyGoodsS() { - myself()->_verifySwitch('hashrate.shop.buy'); + $this->internalBuyGoods(); + } + + public function internalBuyGoods() + { + if (SERVER_ENV == _ONLINE) { + myself()->_verifySwitch('hashrate.shop.buy'); + } $goodsId = getReqVal('goods_id', 0); $goodsNum = intval(getReqVal('goods_num', 0));