e.mp.detail.errMsg == "getPhoneNumber:fail user deny" || e.mp.detail.errMsg == "getPhoneNumber:user deny"
判定条件如上代码
完整如下:
<button
v-else-if="isShow && isShowPlanList && bindingMobile == 0"
plain
class="Regular c_fdc200 fz26 test_btn flex_center_center"
hover-class="none"
open-type="getPhoneNumber"
data-url="/pages/test/testStart"
@getphonenumber="getPhoneNumber"
>去测评</button>
getPhoneNumber(e) {
let url = e.mp.currentTarget.dataset.url;
if (e.mp.detail.errMsg == "getPhoneNumber:fail user deny" || e.mp.detail.errMsg == "getPhoneNumber:user deny") {
if (url == 1) {
this.toIM();
} else if (url == 2) {
this.toAgainTest();
} else {
this.toTestStart(url);
}
} else {}
}