<button class="state" bindgetuserinfo="unbindPhone" wx:if="{{phoneNumber!=""}}" hover-class="none" open-type="getUserInfo">/</button>
<button class="state" wx:else bindgetuserinfo="bindPhone" hover-class="none" open-type="getUserInfo"></button>
< hr >
//
bindPhone(event){
if(event.detail.errMsg=="getUserInfo:ok"){
wx.redirectTo({
url: "../replacePhone/index?type=bind",
})
}
},
Click the button button to execute the bindPhone event when entering the page for the first time. Then jump to another page. Before returning to this page. Then click the button to bind the phone and the event will not be triggered. Debugging is performed on Android. Debugging is also performed on developer tools. Collapsed in ios. The event will not be triggered.