如何将wx.openSetting的结果return给调用方?
openSetting: async function () {
return await wx.openSetting({
withSubscriptions: true
}).then(res=>{
return res
}).catch(err=>{
return err
})
},
这种写法会发生“TypeError: Cannot read property ‘then’ of undefined”错误
查了一下,说wx.openSetting不接受Promise写法,那如何将返回数据return
给调用方?