This commit is contained in:
aozhiwei 2024-04-03 21:56:12 +08:00
parent 37ddb62bea
commit d7451619b6

View File

@ -141,9 +141,21 @@ class BagController extends BaseAuthedController {
$this->_rspErr(4, 'The prop function has not been realized yet');
}
}
public function rename()
{
$userInfo = $this->_getOrmUserInfo();
if ($userInfo['rename_count'] == 0){
$errCode = 0;
$errMsg = '';
$this->internalRename(getReqVal('name', ''), getReqVal('name_sign', ''), $errCode, $errMsg);
if ($errCode) {
$this->_rspErr($errCode, $errMsg);
return;
}
}
$itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE);
error_log(json_encode($itemDto));
if (!$itemDto || $itemDto['item_num'] < 0) {
$this->_rspErr(1, 'Not enough item');
return;