This commit is contained in:
hujiabin 2023-02-14 15:57:22 +08:00
parent 910fbcffec
commit a6b67282f3
3 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,8 @@ class Emoji(object):
], ],
'response': [ 'response': [
_common.RspHead(), _common.RspHead(),
['!data', [_common.Emoji()], '表情列表'] ['!data', [_common.Emoji()], '表情列表'],
['!use_emoji', [], '已选择的表情列表'],
] ]
},{ },{
'name': 'setEmoji', 'name': 'setEmoji',

View File

@ -95,3 +95,4 @@ const kWantedLockType = 3;
const kMaxHeroUpLevelNum = 2; const kMaxHeroUpLevelNum = 2;
const kMaxHeroUpQualityNum = 2; const kMaxHeroUpQualityNum = 2;
const kMaxEmojiNum = 6;

View File

@ -26,7 +26,8 @@ class EmojiController extends BaseAuthedController
} }
} }
$this->_rspData(array( $this->_rspData(array(
'data' => $data 'data' => $data,
'use_emoji' => $uses
)); ));
} }
@ -41,7 +42,7 @@ class EmojiController extends BaseAuthedController
$this->_rspErr(1, 'The emoji has been used'); $this->_rspErr(1, 'The emoji has been used');
return; return;
} }
if(count($uses) >= 6){ if(count($uses) >= kMaxEmojiNum){
$this->_rspErr(1, 'To maximize'); $this->_rspErr(1, 'To maximize');
return; return;
} }