Mini Program button button to get user information. After jumping to another page in ios, clicking the button button on the return does not trigger an event.

<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.

Mar.23,2021

I should write the component in < template > and then in the import page. It is caused by untimely loading in ios

Menu