hrjy 2 years ago
parent
commit
39b71ea526

+ 1 - 1
app/api/controller/many/ManyController.php

@@ -56,7 +56,7 @@ class ManyController
         ]);
         $many = Many::find($where['id']);
         if (!$many) return app('json')->fail('没有该场次');
-        return app('json')->fail($many->toArray());
+        return app('json')->success($many->toArray());
     }
 
     /**

+ 5 - 0
app/api/controller/many/ManyGreenController.php

@@ -106,5 +106,10 @@ class ManyGreenController
         return app('json')->fail('赠送失败');
     }
 
+    public function ratio(Request $request)
+    {
+        return app('json')->success(['bl' => SystemConfig::getConfigValue('green')]);
+    }
+
 
 }

+ 1 - 0
app/api/controller/user/UserExtractController.php

@@ -69,6 +69,7 @@ class UserExtractController
             ['cardnum', ''],
             ['weixin', ''],
         ], $request);
+        if ($extractInfo['money'] < 50) return app('json')->fail('最少提现50');
         if (time() - CacheService::get('UserExtract_' . $request->uid(), time()) < 5) return app('json')->fail('请勿连续多次提交');
         else CacheService::set('UserExtract_' . $request->uid(), time());
         if (!preg_match('/^(([1-9]\d*)|0)(\.\d{1-2})?$/', $extractInfo['money'])) return app('json')->fail('提现金额输入有误');

+ 1 - 0
route/api/route.php

@@ -179,6 +179,7 @@ Route::group(function () {
     Route::get('green/list', 'many.ManyGreenController/list')->name('green');//绿卡记录
     Route::post('green/exchange', 'many.ManyGreenController/exchange')->name('exchange');//绿卡兑换
     Route::post('green/give', 'many.ManyGreenController/give')->name('give');//绿卡赠送
+    Route::get('green/ratio', 'many.ManyGreenController/ratio')->name('ratio');//绿卡比例
     //申请商户记录
     Route::get('enter/list', 'user.UserEnterController/list')->name('enterList');//商户申请记录
     Route::post('enter/apply', 'user.UserEnterController/apply')->name('apply');//商户申请