记一个自己遇到的小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>

代码错在mpvuebind要改为v-on或@

正确写法:

<button open-type="getUserInfo" @getuserinfo="login" hover-class="none">{{userInfo.nickName}}</button>

bingetuserinfo改为:@getuserinfo

Logo

前往低代码交流专区

更多推荐