Skip to main content
Version: 3.x

Taro.setOfficialDress(option)

QQ美化平台内测阶段,仅被邀请的商户可使用此接口。

支持情况:

参考文档

类型

(option: Option) => void

参数

参数类型
optionOption

Option

参数类型必填说明
actionstring方法名,设置头像填"setAvatar",其他方法后续开放
uinstringopenid,给自己设置头像填"self"
item_idstring物品id
busi_infostring设置头像"setAvatar"此处不用填
complete(res: TaroGeneral.CallbackResult) => void接口调用结束的回调函数(调用成功、失败都会执行)
fail(res: TaroGeneral.CallbackResult) => void接口调用失败的回调函数
success(res: TaroGeneral.CallbackResult) => void接口调用成功的回调函数

示例代码

Taro.setOfficialDress({
action: "setAvatar",
uin: "self",
item_id: "2740",
success(res) {
console.log("success"+res);
},
fail(res) {
console.log("fail"+res);
}
})