调整接口

This commit is contained in:
2020-11-04 14:42:27 +08:00
parent a8852873d2
commit 102b7e1846
7 changed files with 2220 additions and 1574 deletions

View 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',
]);
}
}

View File

@@ -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');
});

View File

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

View File

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