This commit is contained in:
mkm 2024-08-31 17:55:20 +08:00
parent e1ed493313
commit 1e03c45df2
2 changed files with 3 additions and 6 deletions

View File

@ -44,9 +44,8 @@ class IndexController extends BaseApiController
public function index()
{
$now_money=$this->request->get('money');
$a= (new User())->update(['now_money'=>$now_money],['id'=>366]);
return json($a);
return json(1);
}

View File

@ -198,12 +198,10 @@ class User extends BaseModel
public static function onBeforeWrite($data)
{
var_dump($data->toArray());
channelLog($data->toArray()??[], 'user', '更新前');
channelLog($data->getData()??[], 'user', '更新前');
}
public static function onAfterWrite($data)
{
var_dump($data->toArray());
channelLog($data->toArray()??[], 'user', '更新后');
}