How does mpvue deal with bindgetuserinfo?

in order to optimize the user experience, the development method of using the wx.getUserInfo interface to directly pop up the authorization box will gradually no longer be supported.

add user authorization button

clipboard.png

clipboard.png
detailwx.getUserInfo

mpvuebindgetuserinfo

clipboard.png

:node_modulesindex.js

clipboard.png

clipboard.png

:onGetUserInfocreatedmounted

clipboard.png

my console.log () did not return the result, and it is useless to put it in methods

Mar.18,2021

need to write
< button open-type= "getUserInfo" @ getuserinfo= "bindgetuserinfo" > user authorization < / button >
drop function is written in methods



clipboard.png
then replace the @ symbol with bind


successfully solved my troubles, nice, thanks

Menu