芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/public/user/customs/js/phone.min.js
var hasPhoneError=!1,hasEmailError=!1;function enableDisableButton(){hasPhoneError||hasEmailError?$("form").find("button[type='submit']").prop("disabled",!0):$("form").find("button[type='submit']").prop("disabled",!1)}function updatePhoneInfo(){let promiseObj=new Promise((function(resolve,reject){hasPhoneError=!0,enableDisableButton(),$("#defaultCountry").val($("#phone").intlTelInput("getSelectedCountryData").iso2),$("#carrierCode").val($("#phone").intlTelInput("getSelectedCountryData").dialCode),""!=$("#phone").val&&$("#formattedPhone").val($("#phone").intlTelInput("getNumber").replace(/-|\s/g,"")),resolve()}));return hasPhoneError=!1,enableDisableButton(),promiseObj}function checkDuplicatePhoneNumber(){$.post({url:duplicatePhoneCheckUrl,dataType:"json",data:{_token:csrfToken,phone:$.trim($("#phone").val()),carrierCode:$.trim($("#phone").intlTelInput("getSelectedCountryData").dialCode),id:userId}}).done((function(response){response.status?($("#phone-error").show().addClass("error").html(response.fail),hasPhoneError=!0,enableDisableButton()):($("#phone-error").html(""),hasPhoneError=!1,enableDisableButton())}))}function validateInternaltionalPhoneNumber(){let promiseObj;return new Promise((function(resolve,reject){let resolveStatus=!1;""!==$.trim($("#phone").val())?$("#phone").intlTelInput("isValidNumber")&&isValidPhoneNumber($.trim($("#phone").val()))?(resolveStatus=!0,$("#tel-error").html(""),hasPhoneError=!1,enableDisableButton()):($("#phone-error").html(""),$("#tel-error").addClass("error").html(validPhoneNumberErrorText),hasPhoneError=!0,enableDisableButton()):($("#tel-error").html(""),hasPhoneError=!1,enableDisableButton()),resolve(resolveStatus)}))}$("#phone").intlTelInput({separateDialCode:!0,nationalMode:!0,preferredCountries:[countryShortCode],autoPlaceholder:"polite",placeholderNumberType:"MOBILE",utilsScript:utilsScriptLoadingPath}),null!==formattedPhoneNumber&&null!==defaultCountry&&null!==carrierCode&&($("#phone").intlTelInput("setNumber",formattedPhoneNumber),$("#defaultCountry").val(defaultCountry),$("#carrierCode").val(carrierCode),$("#formattedPhone").val(formattedPhoneNumber));