xieruidong 2 years ago
parent
commit
7d7256d029
3 changed files with 305 additions and 165 deletions
  1. 2 2
      addons/epay/config.php
  2. 8 2
      application/api/controller/MobileController.php
  3. 295 161
      public/api.html

+ 2 - 2
addons/epay/config.php

@@ -11,8 +11,8 @@ return [
             'app_id' => 'wx799d545a856277fb',
             'app_secret' => 'wx799d545a856277fb',
             'miniapp_id' => 'wx799d545a856277fb',
-            'mch_id' => '1614422722',
-            'key' => 'a792f89843bc2b127ea8ba593ad781ad',
+            'mch_id' => '1617558415',
+            'key' => 'SW967SW967SW967SW967SW967SW967SW',
             'mode' => 'normal',
             'sub_mch_id' => '',
             'sub_appid' => '',

+ 8 - 2
application/api/controller/MobileController.php

@@ -600,15 +600,21 @@ class MobileController extends UserApi
     }
     /**
      * 预占号码
-     * @param (name=id,description=号码ID)
+     * @ApiParams (name=id,description=号码ID)
      */
     public function take(){
         $data=$this->_validate([
             'id|号码'=>['require','gt:0'],
         ]);
+        $open=config('site.auto_take_open');
+        $discount=config('site.auto_take_discount');
+        if(!$open||!$discount){
+            $this->success('');
+        }
         $mobile=Mobile::findOrFail($data['id']);
         if($mobile['is_activity']){
-            $this->success('',$mobile);
+            $this->success('');
         }
+        $chanId=getChanId();
     }
 }

File diff suppressed because it is too large
+ 295 - 161
public/api.html


Some files were not shown because too many files changed in this diff