代码如下
复制代码uni.getSetting({
success(res) {
console.log(res.authSetting)
}
})
因为在@dcloudio/types/uni-app
中对于GetSettingOptions的定义如下
复制代码
interface GetSettingOptions {
/**
* 接口调用成功的回调函数
*/
success?: () => void;
/**
* 接口调用失败的回调函数
*/
fail?: (result: AuthSetting) => void;
/**
* 接口调用结束的回调函数(调用成功、失败都会执行)
*/
complete?: () => void;
}
success没有参数
0 个回复