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));