add avatar

This commit is contained in:
hujiabin 2023-09-25 15:43:54 +08:00
parent ac9fd117e4
commit c77ff819d0
2 changed files with 18 additions and 3 deletions

View File

@ -42,6 +42,7 @@ class Avatar(object):
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},{
'name': 'buyAvatar',
@ -66,6 +67,7 @@ class Avatar(object):
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},{
'name': 'clearAvatar',
@ -78,6 +80,7 @@ class Avatar(object):
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
]

View File

@ -74,7 +74,11 @@ class AvatarController extends BaseAuthedController {
}
Avatar::equipUpdate($avatarDb,$heroUniid);
$this->_rspOk();
$propertyChgService = new services\PropertyChgService();
$propertyChgService->addHeroChg();
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
));
}
public function remove(){
@ -89,7 +93,11 @@ class AvatarController extends BaseAuthedController {
'status' => 0,
'modifytime' => myself()->_getNowTime(),
));
$this->_rspOk();
$propertyChgService = new services\PropertyChgService();
$propertyChgService->addHeroChg();
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
));
}
public function clearAvatar(){
@ -111,7 +119,11 @@ class AvatarController extends BaseAuthedController {
'modifytime' => myself()->_getNowTime(),
));
}
$this->_rspOk();
$propertyChgService = new services\PropertyChgService();
$propertyChgService->addHeroChg();
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
));
}