This commit is contained in:
2022-09-09 16:35:41 +08:00
parent af2304dece
commit 66fbd56613
3 changed files with 31 additions and 7 deletions

View File

@@ -2,17 +2,26 @@
namespace app\controller;
use think\response\Json;
class Order
{
public function create()
/**
* Notes : 捐助订单
*
* @Date : 2022/9/9 16:30
* @Author : <Jason.C>
* @return Json
*/
public function create(): Json
{
$userid = $GLOBALS['data']['userid'];
$order = \app\model\Order::create([
'student_id' => 1,
$amount = $GLOBALS['data']['amount'] ?? 15;
$order = \app\model\Order::create([
'student_id' => 14,
'user_id' => $userid,
'amount' => 15,
'type' => 1,
'amount' => $amount,
'status' => 0,
]);