button属性为getUserInfo时,是否可以做成组件调用
发布于 4 年前 作者 lilong 2786 次浏览 来自 问答

业务需求,有多入口需要调用用户基本信息,故将其写成组件,放入button按钮,但在页面中调用时,提示bindgetuserinfo不在页面中,为何不能在组件中调用

2 回复

Do not have $authorizeBtn$bindGetUserInfo handler in current page: pages/mine. Please make sure that $authorizeBtn$bindGetUserInfo handler has been defined in pages/mine, or pages/mine has been added into app.json

你可以把获取用户信息的接口放在全局里面调用

回到顶部