如何触发bindgetuserinfo

来源:6-2 个人中心-扫码功能开发

fengyunzhu

2018-05-19

<button v-if='!userinfo' open-type='getUserInfo' bindgetuserinfo='onGotUserInfo'>getUserInfo</button>

methods: {
onGotUserInfo (e) {
showSuccess('登录成功!')
}
}
如何触发bindgetuserinfo

总是报错

Do not have onGotUserInfo handler in current page: pages/me/main. Please make sure that onGotUserInfo handler has been defined in pages/me/main, or pages/me/main has been added into app.json

写回答

3回答

fengyunzhu

提问者

2018-05-20

<button

v-if='!userinfo'

open-type='getUserInfo'

@getuserinfo='onGotUserInfo'

>

getUserInfo

</button>

@getuserinfo已经解决

0
0

784510104

2018-05-20

怎么获取到userInfo呢

0
0

慕仙1985628

2018-05-20

你去看看你的dist文件夹下的src有me这个文件么

0
3
慕仙1985628
回复
fengyunzhu
行啊,一起交流。563421209
2018-05-20
共3条回复

mpvue课程小程序全栈开发

慕课网独家首发 学习mpvue+Koa+vue 全栈开发小程序

1407 学习 · 1331 问题

查看课程