#1024一起掘金# 如何返回字符串?
原函数:
function geUrl() {
const userInfo = wx.getStorageSync('userInfo')||{};
return userInfo.isOwner
}
变化:
现在userInfo 无法从getStorageSync中取出,需要从接口中获取;

改造:
async function geUrl() {
const userInfo = await getData();
return userInfo.isOwner
}
问题,我如何直接获取 userInfo.isOwner 而不是 promise?
展开
6