xxxrrrdddd 2 years ago
parent
commit
890b77e7f8
2 changed files with 8 additions and 1 deletions
  1. 4 0
      extend/logicmodel/BoxLogic.php
  2. 4 1
      extend/logicmodel/GoodsLogic.php

+ 4 - 0
extend/logicmodel/BoxLogic.php

@@ -4,6 +4,7 @@
 namespace logicmodel;
 
 
+use app\common\model\Config;
 use comservice\GetRedis;
 use comservice\Response;
 use datamodel\Box;
@@ -287,6 +288,9 @@ class BoxLogic
      */
     public function apply($userInfo,$id,$pay_type){
         $pay_type=1;
+        if(!Config::getValue('wallet_open')){
+            return Response::fail('暂未开放支付');
+        }
         if($userInfo['is_auth'] == 0) return Response::bindAuth();
         if($this->redis->getItem('box_order_'.$userInfo['id'])){
             return Response::fail('频繁操作');

+ 4 - 1
extend/logicmodel/GoodsLogic.php

@@ -4,6 +4,7 @@
 namespace logicmodel;
 
 
+use app\common\model\Config;
 use comservice\GetRedis;
 use comservice\Response;
 use datamodel\Author;
@@ -399,7 +400,9 @@ class GoodsLogic
      */
     public function apply($userInfo,$id,$pay_type){
         if($userInfo['is_auth'] == 0) return Response::bindAuth();
-
+        if(!Config::getValue('wallet_open')){
+            return Response::fail('暂未开放支付');
+        }
         if( $this->redis->getItem('goods_order_'.$userInfo['id'])){
             return Response::fail('频繁操作');
         }