调整接口
This commit is contained in:
16
app/Api/Controllers/IndexController.php
Normal file
16
app/Api/Controllers/IndexController.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Api\Controllers;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
return $this->respond('200', [
|
||||
'code' => 200,
|
||||
'message' => 'Json Api is ready',
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
Route::group(['prefix' => 'V1'], function () {
|
||||
Route::get('/', 'IndexController@index');
|
||||
|
||||
Route::post('user/get', 'UserController@index');
|
||||
Route::post('user/check', 'UserController@check');
|
||||
|
||||
@@ -22,5 +24,4 @@ Route::group(['prefix' => 'V1'], function () {
|
||||
Route::post('unionpay/index', 'UnionPayController@index');
|
||||
Route::post('unionpay/query', 'UnionPayController@query');
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ class TestController
|
||||
*/
|
||||
public function grant(Request $request)
|
||||
{
|
||||
$this->user = User::find(3);
|
||||
$this->user = User::find(299);
|
||||
|
||||
$data = $this->jiami($request->all());
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class Activity extends Model
|
||||
|
||||
try {
|
||||
// $code = 'YSD' . date('ymd') . mt_rand(100000, 999999);
|
||||
$code = '66406' . date('ymd') . mt_rand(100000, 999999);
|
||||
$code = '66406' . date('ymdH') . mt_rand(1000000, 9999999);
|
||||
if ($this->type == SELF::TYPE_EXTEND) {
|
||||
$start_at = now();
|
||||
$end_at = now()->addDays($this->days);
|
||||
|
||||
Reference in New Issue
Block a user