芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/public/user/customs/js/profile.min.js
"use strict";function changeProfile(){$("#upload").trigger("click")}if($(".main-containt").find("#profileUpdate").length){function upload(img){var form_data=new FormData;form_data.append("file",img.files[0]),form_data.append("_token",csrfToken),$("#loading").css("display","block"),$.ajax({url:profileImageUploadUrl,data:form_data,type:"POST",contentType:!1,processData:!1,cache:!1,success:function(data){data.fail?$("#file-error").show().addClass("error").html(data.errors.file):($("#file-error").hide(),$("#file_name").val(data),location.reload()),$("#loading").css("display","none")},error:function(xhr,status,error){}})}function phoneValidityCheck(){updatePhoneInfo().then(()=>{validateInternaltionalPhoneNumber().then(status=>{status&&checkDuplicatePhoneNumber()})})}$(document).on("click","#printQrCodeBtn",(function(e){e.preventDefault(),$(this).prop("href",printQrCodeUrl),window.open(printQrCodeUrl,"_blank")})),$("#updateQrCodeBtn").on("click",(function(e){e.preventDefault();let user_id=$("#user_id").val();$.post({url:updateQrCodeUrl,dataType:"json",data:{_token:csrfToken,user_id:user_id},beforeSend:function(){swal(pleaseWaitText,loadingText,{closeOnClickOutside:!1,closeOnEsc:!1,buttons:!1,timer:2e3})}}).done((function(response){response.status&&$(".qrCodeImage").attr("src",response.imgSource)})).fail((function(error){swal({title:errorText,text:JSON.parse(error.responseText).exception,icon:"error",closeOnClickOutside:!1,closeOnEsc:!1})}))})),$("#upload").change((function(){""!=$(this).val()&&upload(this)})),$("#phone").on("countrychange",(function(){phoneValidityCheck()})),$("#phone").on("blur",(function(){phoneValidityCheck()})),$("#defaultCurrencyForm").on("submit",(function(){$(".spinner").removeClass("d-none"),$("#defaultCurrencySubmitBtn").attr("disabled",!0),$("#defaultCurrencySubmitBtnText").text(submitButtonText)})),$("#profileResetPasswordForm").on("submit",(function(){$(".spinner").removeClass("d-none"),$("#profileResetPasswordSubmitBtn").attr("disabled",!0),$("#profileResetPasswordSubmitBtnText").text(submitButtonText)})),$("#profileUpdateForm").on("submit",(function(){$(".spinner").removeClass("d-none"),$("#profileUpdateSubmitBtn").attr("disabled",!0),$("#profileUpdateSubmitBtnText").text(submitButtonText)}))}