1
This commit is contained in:
parent
52709eda7a
commit
d60494418f
@ -56,7 +56,7 @@ class BagController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$itemDb = Bag::find($itemId);
|
$itemDb = Bag::find($itemId);
|
||||||
if (isset($itemDb) || $itemDb['item_num'] <= 0) {
|
if (!isset($itemDb) || $itemDb['item_num'] <= 0) {
|
||||||
$this->_rspErr(1, '道具不足');
|
$this->_rspErr(1, '道具不足');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ class BagController extends BaseAuthedController {
|
|||||||
$this->_rspErr(5, '参数错误名字长度不得小于3');
|
$this->_rspErr(5, '参数错误名字长度不得小于3');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mb_strlen($param1) > 7) {
|
if (mb_strlen($param1, 'utf8') > 7) {
|
||||||
$this->_rspErr(5, '参数错误名字长度不得大于7');
|
$this->_rspErr(5, '参数错误名字长度不得大于7');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ class BagController extends BaseAuthedController {
|
|||||||
$this->_rspErr(5, '参数错误名,签名校验失败');
|
$this->_rspErr(5, '参数错误名,签名校验失败');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!$nameService->nameUsed($param1)){
|
if ($nameService->nameUsed($param1)){
|
||||||
$this->_rspErr(6, '名字已被占用');
|
$this->_rspErr(6, '名字已被占用');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ class BagController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->_updateUserInfo(array(
|
$this->_updateUserInfo(array(
|
||||||
'name' => $name
|
'name' => $param1
|
||||||
));
|
));
|
||||||
$this->_decItems(array(
|
$this->_decItems(array(
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user