# Function: getAttachedAttributes

getAttachedAttributes(params: GetAttachedAttributesParams): Promise‹AttachedAttributeMap | null›

获取物品的附加属性

description 如果是业务方自定义的物品,可通过此接口获取其附加属性;如果是背包中的物品,可直接从物品对象上的attachedAttributes获取,无需调用此接口

# 参数:

属性 类型 描述
params GetAttachedAttributesParams 调用参数

GetAttachedAttributesParams

属性 类型 描述
backpackItem? BackpackItem 背包物品
itemId string 物品ID
itemType number 物品类型(背包物品为0,否则传业务方自定义维护的值)
complete? Method 操作完成时(成功或失败),均会调用该回调函数
fail? Method 操作失败时,调用该回调函数
success? Method 操作成功时,调用该回调函数

# 返回值:

Promise‹AttachedAttributeMap | null›