mpvue开发小程序时小程序报错:Do not have login handler in current page……
记一个自己遇到的小bug:报错如下:Do not have login handler in current page: pages/me/main. Please make sure that login handler has been defined in pages/me/main, or pages/me/main has been added into app.json在小...
·
记一个自己遇到的小bug:
报错如下:Do not have login handler in current page: pages/me/main. Please make sure that login handler has been defined in pages/me/main, or pages/me/main has been added into app.json
在小程序文档直接复制代码然后发现不可行
代码如下:
<button open-type="getUserInfo" bindgetuserinfo="login" hover-class="none">{{userInfo.nickName}}</button>
代码错在mpvue中bind要改为v-on或@
正确写法:
<button open-type="getUserInfo" @getuserinfo="login" hover-class="none">{{userInfo.nickName}}</button>
bingetuserinfo改为:@getuserinfo
更多推荐
已为社区贡献4条内容
所有评论(0)