Commit e96b6fe3 authored by shajiaiming's avatar shajiaiming

fix

parent 43f75234
......@@ -24,7 +24,7 @@ class GameController extends BaseController
$address = $post['address'] ?? '';
$nickname = $post['nickname'] ?? '';
if (empty($address) || empty($nickname)) {
return ['code' => -1, 'msg' => '地址和昵称不能为空', 'data' => []];
return ['code' => -1, 'msg' => '地址和昵称不能为空', 'data' => null];
}
//判断重复
$count = GameUser::find()->where(['nickname' => $nickname])->count();
......@@ -48,7 +48,7 @@ class GameController extends BaseController
{
$address = Yii::$app->request->post('address', '');
if (empty($address)) {
return ['code' => -1, 'msg' => '地址不能为空', 'data' => []];
return ['code' => -1, 'msg' => '地址不能为空', 'data' => null];
}
//todo 获取地址
$address = GameUser::find()->select(['nickname'])->where(['address' => $address])->one();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment