芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/public/user/customs/js/withdrawal.min.js
"use strict";function restrictNumberToPrefdecimalOnInput(t){var e=$("select#currency_id").find(":selected").data("type");restrictNumberToPrefdecimal(t,e)}function determineDecimalPoint(){var t=$("select#currency_id").find(":selected").data("type");"crypto"==t?($(".pFees, .fFees, .total_fees").text(CRYPTODP),$("#amount").attr("placeholder",CRYPTODP)):"fiat"==t&&($(".pFees, .fFees, .total_fees").text(FIATDP),$("#amount").attr("placeholder",FIATDP))}if($(".main-containt").find("#withdrawalCreate").length){var lastPaymentMethod,currentPaymentMethod;function t(t){$("#payment_method_id").val(t);var e=JSON.parse($("option:selected","#withdrawal_method_id").attr("data-obj")),n=null!=e?e.currency_id:null;return new Promise(((e,a)=>{$.ajax({method:"post",url:withdrawalActiveCurrency,data:{_token:csrfToken,transaction_type_id:transactionTypeId,payment_method_id:t,currencyId:n},dataType:"json",success:function(t){if("success"==t.success.status){let n="";$.map(t.success.currencies,(function(t,e){n+=`
${t.code}
`})),$("#currency_id").html(n),e(t.success.status)}},error:function(t){a(t)}})}))}function e(t){$("#payment_method_id").val(t);var e=$("#amount").val().trim(),n=$("#currency_id").val();""==n?$("#walletHelp").hide():$("#walletHelp").show(),n&&""!=e&&$.ajax({method:"post",url:withdrawalAmountLimit,data:{_token:csrfToken,payment_method_id:t,currency_id:n,transaction_type_id:transactionTypeId,amount:e},dataType:"json",success:function(t){if(200!=t.success.status)return""==e?$("#amountLimit").text(""):$("#amountLimit").text(t.success.message),$("#withdrawalCreateSubmitBtn").attr("disabled",!0),!1;$(".total_fees").html(t.success.totalHtml),$(".pFees").html(t.success.pFeesHtml),$(".fFees").html(t.success.fFeesHtml),t.success.totalAmount>t.success.balance?($("#amountLimit").html(notEnoughBalanceText),$("#withdrawalCreateSubmitBtn").attr("disabled",!0)):($("#amountLimit").html(""),$("#withdrawalCreateSubmitBtn").removeAttr("disabled"))}})}$(window).on("load",(function(){var n=JSON.parse($("option:selected","#withdrawal_method_id").attr("data-type"));t(n).then((t=>{determineDecimalPoint()})).then((t=>{e(n)})).catch((t=>{console.log(t)}));var a=JSON.parse($("option:selected","#withdrawal_method_id").attr("data-obj"));if(null!=a.email)var o='
';else if(null!=a.account_name)o='
';else if(null!=a.account_number)o='
';else if(null!=a.crypto_address)o='
';else if(isActiveMobileMoney&&null!=a.mobilemoney_id&&null!=a.mobile_number)o='
';$("#withdrawalMethodInfo").html(o)})),$("select[name=withdrawal_method_id]").focus((function(){lastPaymentMethod=$("select#withdrawal_method_id").find(":selected").data("type")})).change((function(){currentPaymentMethod=$(this).find(":selected").data("type")})),$(document).ready((function(){$("#withdrawal_method_id").on("change",(function(){lastPaymentMethod!=currentPaymentMethod&&($("#amount").val(""),$("#amountLimit").text("")),lastPaymentMethod=currentPaymentMethod,$("#bank").css("display","none");var n=JSON.parse($("option:selected","#withdrawal_method_id").attr("data-obj"));if(null!=n.email)var a='
';else if(null!=n.account_name)a='
';else if(null!=n.account_number)a='
';else if(null!=n.crypto_address)a='
';$("#withdrawalMethodInfo").html(a);var o=JSON.parse($("option:selected","#withdrawal_method_id").attr("data-type"));t(o).then((t=>{determineDecimalPoint()})).then((t=>{e(o)})).catch((t=>{console.log(t)}))})),$("#currency_id, #amount").on("change keyup",$.debounce(1e3,(function(t){e(JSON.parse($("option:selected","#withdrawal_method_id").attr("data-type")))})))})),$("#withdrawalCreateForm").on("submit",(function(){setTimeout((function(){$("#withdrawalCreateSubmitBtn").removeAttr("disabled"),$(".spinner").addClass("d-done"),$("#withdrawalCreateSubmitBtnText").html("Proceed"),$("#withdrawalSvgIcon").removeClass("d-none")}),2e3),$(".spinner").removeClass("d-none"),$("#withdrawalSvgIcon").addClass("d-none"),$("#withdrawalCreateSubmitBtn").attr("disabled",!0),$("#withdrawalCreateSubmitBtnText").text(submitButtonText)}))}$(".main-containt").find("#withdrawalConfirm").length&&$(document).on("click","#withdrawalConfirmSubmitBtn",(function(t){$(".spinner").removeClass("d-none"),$("#withdrawalConfirmSubmitBtnText").text(submitButtonText),$("#withdrawalConfirmSubmitBtn").attr("disabled",!0),$("#withdrawalConfirmSubmitBtn").click((function(t){t.preventDefault()})),$("#withdrawalConfirmBackBtnText").attr("disabled",!0).click((function(t){t.preventDefault()})),$("#withdrawalConfirmBackBtn").click((function(t){t.preventDefault()}))})),$(".main-containt").find("#withdrawalSuccess").length&&($(document).ready((function(){window.history.pushState(null,"",window.location.href),$(window).on("popstate",(function(){window.history.pushState(null,"",window.location.href)}))})),$(document).on("keydown",(function(t){116==(t.which||t.keyCode)&&t.preventDefault()})),$(document).on("keydown",(function(t){82==t.keyCode&&t.ctrlKey&&t.preventDefault()})));