huanyamall.com Open in urlscan Pro
38.165.42.43  Public Scan

URL: https://huanyamall.com/js/chunk-f5053148.43d78f50.js
Submission: On October 26 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f5053148"],{1347:function(e,t,a){"use strict";a.r(t),a("eae7");var s=a("8a6c"),i=a("6c1f"),r=a("21f4"),o=a("4260"),n=a("15a0"),l=a("5133"),m=a("56f9");i={name:"withdraw-dialog",components:{EsPayModal:i.a},props:{value:{type:Boolean,default:!1},currentCoin:{type:String,default:""}},data(){return{itemname:"KaiFeng Shop",form:{network:"",address:"",quantity:"",arrival:"",coin:""},formBank:{bankName:"",bankUserName:"",bankCardNo:"",quantity:"",bankQuantity:""},options:[],rachargeType:[{label:this.$t("message.home.加密货币"),value:"Virtual"},{label:this.$t("message.home.银行卡"),value:"bank"}],rachargeTypeV:"Virtual",optionsValue:"USDT",bankRules:{bankName:[r.a.ruleUtils.getRule("required",this.$t("message.home.请输入开户行名称"))],bankUserName:[r.a.ruleUtils.getRule("required",this.$t("message.home.yourName"))],bankCardNo:[r.a.ruleUtils.getRule("required",this.$t("message.home.请输入银行卡号"))],bankQuantity:[r.a.ruleUtils.getRule("required",this.$t("message.home.pleaseEnterQuantity")),r.a.ruleUtils.getRule("decimalExceedZero"),r.a.ruleUtils.getRule("validator","",{validator:(e,t,a)=>{var s=this.money||1e9;Number(t)>s&&a(this.$t("message.home.validatorMaxNumber")),a()}})]},rules:{address:[r.a.ruleUtils.getRule("cionAddress"),r.a.ruleUtils.getRule("required",this.$t("message.home.pleaseEnterAddress"))],quantity:[r.a.ruleUtils.getRule("required",this.$t("message.home.pleaseEnterQuantity")),r.a.ruleUtils.getRule("decimalSix"),r.a.ruleUtils.getRule("validator","",{validator:(e,t,a)=>{var s=this.$big(this.money).div(this.fee)?this.$big(this.money).div(this.fee):1e9;Number(t)>s&&a(this.$t("message.home.validatorMaxNumber")),a()}})]},currentSelectBlock:{},coinInfo:[],payModalShow:!1,withdrawRecordVisible:!1,showOnlieService:!1,count:0,money:0,dialogVisible:!1,swithButton:!1,coinType:"USDT",groupBlockAddress:{},fee:1,coinArr:[],withdrawFee:0}},async mounted(){var e=localStorage.getItem("ES_LANG")||"en";"SM-Wholesale Business"==this.itemname&&"en"==e&&(this.rachargeType[1].label=this.bankCard),"AliExpress Wholesale"==this.itemname&&(this.rachargeType=this.rachargeType.filter(e=>"bank"!==e.value)),"Harrods"==this.itemname&&(this.rachargeTypeV="bank",this.rachargeType=this.rachargeType.filter(e=>"bank"==e.value)),this.money="undefined"==localStorage.getItem("userBalance")?0:localStorage.getItem("userBalance"),await Promise.all([this.requestWithdrawFee(),this.requestSessionToken(),this.requestChannelAddress()]),this.$nextTick(()=>{let e=[],t=[];this.rechargeAddress.forEach(a=>{-1===t.indexOf(a.coin)&&(t.push(a.coin),e.push(a))}),this.groupBlockAddress=Object(m.groupBy)(this.rechargeAddress,"coin"),this.coinArr=Object.keys(this.groupBlockAddress),this.coinArr.includes("USDT")&&(this.coinType="USDT"),this.options=Object.keys(this.groupBlockAddress),this.coinType=this.coinArr[0];var a=this.rechargeAddress.filter(e=>e.coin===this.coinType);a&&a.length&&(this.form.network=a[0].blockchain_name,this.getFee(a[0].coin),this.fee=a[0].fee),this.coinInfo=[...a]}),this.getwithdraw(),this.groupAddress()},watch:{"form.network":{handler(e,t){e!==t&&(t=this.rechargeAddress.find(t=>t.blockchain_name===e))&&(this.form.address="",this.form.quantity="",this.form.arrival=0,this.currentSelectBlock={...t})},immediate:!0},"form.quantity":{handler(e,t){e!==t&&(e=Object(n.c)(e,Object(n.b)(1,null!=(t=this.withdrawFee)?t:0)),this.form.arrival=isNaN(e)?"":e)}},"formBank.bankQuantity":{handler(e,t){e!==t&&(e=Object(n.c)(e,Object(n.b)(1,null!=(t=this.withdrawFee)?t:0)),this.formBank.arrival=isNaN(e)?"":e)}}},computed:{...Object(s.c)("user",["userBalance"]),...Object(s.c)("withdraw",["sessionToken","httpLoading","btnLoading"]),rechargeAddress(){return this.$store.state.recharge.rechargeAddress},getRealWithdrawFee(){return this.withdrawFee?100*this.withdrawFee:0},isDisabled(){return Object(o.e)(this.form.address)},bankCard(){var e=localStorage.getItem("ES_LANG")||"en";return"SM-Wholesale Business"==this.itemname&&"en"==e?"BANK TRANSFER":this.$t("message.home.银行卡")}},methods:{async getFee(e){e=await Object(l.e)(e),this.withdrawFee=e.data.withdraw_fee},openService(){this.showOnlieService=!0},changeCoinType(e){var t=this.rechargeAddress.filter(t=>t.coin===e);t&&t.length&&(this.form.network=t[0].blockchain_name,this.fee=t[0].fee,this.getFee(t[0].coin)),this.coinInfo=[...t]},groupAddress(){this.coinType=Object.keys(this.groupBlockAddress)[0]},async getwithdraw(){var e=await Object(l.b)();e.data.openWithdrawAddressBinding?e.data.existWithdrawAddress||e.data.chainName?(this.form.address=e.data.existWithdrawAddress,this.coinType=e.data.coinType,this.form.network=e.data.chainName,this.swithButton=!0):(this.swithButton=!0,this.dialogVisible=!0,this.coinType="USDT",(e=this.rechargeAddress.filter(e=>e.coin===this.coinType))&&e.length&&(this.form.network=e[0].blockchain_name,this.getFee(e[0].coin),this.fee=e[0].fee),this.coinInfo=[...e]):this.swithButton=!1},changeType(e){"bank"==e&&"SM-Wholesale Business"==this.itemname&&(this.showOnlieService=!0),"bank"==e?(this.getFee("bank"),this.coinType=e,this.formBank.bankCardNo="",this.formBank.bankName="",this.formBank.bankUserName="",this.formBank.quantity="",this.formBank.arrival=""):(this.coinType="USDT",this.form.address="",this.form.quantity="",this.form.arrival=""),this.getSesstionToken()},onKeyPress(e){var t=String.fromCharCode(e.keyCode);/^[a-zA-Z0-9]+$/.test(t)||e.preventDefault()},async getSesstionToken(){await this.requestSessionToken()},...Object(s.b)("withdraw",["requestSessionToken","requesWithdraw","requestWithdrawFee"]),handleClose(){this.dialogVisible=!1},async pushWithdrawAddress(){""==this.addresss?this.$message({message:this.$t("message.home.请输入完整的支付密码!"),type:"warning"}):0==(await Object(l.a)({blockchain_name:this.form.network,coin:this.optionsValue,channel_address:this.form.address})).code&&(this.$message({message:this.$t("message.home.绑定成功"),type:"success"}),this.dialogVisible=!1)},numberFormat:o.h,changeCoin(e){var t=this.rechargeAddress.filter(t=>t.coin===e);t&&t.length&&(this.form.network=t[0].blockchain_name,this.getFee(t[0].coin),this.fee=t[0].fee),this.coinInfo=[...t]},goBack(){this.$router.push("/userInfo/money-package")},requestChannelAddress(){return this.$store.dispatch("recharge/requestRechargeAddress")},selectCurrency(e){this.$emit("select-currency",e),this.dialogVisible=!1},copy(){Object(o.e)(this.form.address)||(Object(o.a)(this.form.address),this.$notify({title:this.$t("message.home.successTips"),message:this.$t("message.home.copySuccess"),type:"success"}))},async payCallback(e,t,a){this.password=e,this.requesWithdraw({session_token:this.sessionToken,amount:this.form.quantity||this.formBank.bankQuantity,from:this.form.address,channel:this.coinType,bankUserName:this.formBank.bankUserName,bankName:this.formBank.bankName,bankCardNo:this.formBank.bankCardNo,safeword:this.password}).then(e=>{this.$notify({title:this.$t("message.home.successTips"),message:this.$t("message.home.withdrawSuccess"),type:"success"}),this.goBack(),t&&t()}).catch(e=>{a&&a(),this.payModalShow=!1})},withdraw(){this.$refs.withdrawForm.validate(async e=>{e&&("Selfridges"==this.itemname?(this.openService(),this.$message({message:this.$t("message.home.请联系客服完成操作"),type:"warning"})):this.payModalShow=!0)})},Bankwithdraw(){this.$refs.withdrawBankForm.validate(async e=>{e&&("Harrods"==this.itemname?(this.openService(),this.$message({message:this.$t("message.home.请联系客服完成操作"),type:"warning"})):this.payModalShow=!0)})}}},a("f99b"),s=a("d798"),a=Object(s.a)(i,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"info_page_container",staticStyle:{width:"480px"}},[t("div",{staticClass:"page-title",staticStyle:{cursor:"pointer","margin-bottom":"20px"},on:{click:e.goBack}},[t("i",{staticClass:"el-icon-arrow-left"}),e._v(" "+e._s(e.$t("message.home.myPurse"))+"/"+e._s(e.$t("message.home.withdraw"))+" ")]),"FamilyShop"!==e.itemname&&"TikTok Shop"!==e.itemname&&"Selfridges"!==e.itemname?t("el-form",[t("el-form-item",{attrs:{label:e.$t("message.home.提现方式")}},[t("el-select",{staticStyle:{width:"100%"},on:{change:e.changeType},model:{value:e.rachargeTypeV,callback:function(t){e.rachargeTypeV=t},expression:"rachargeTypeV"}},e._l(e.rachargeType,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1):e._e(),"Virtual"===e.rachargeTypeV?t("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.httpLoading,expression:"httpLoading"}],ref:"withdrawForm",attrs:{"label-position":"top",model:e.form,rules:e.rules}},[t("div",[t("el-form-item",{attrs:{label:e.$t("message.home.coinBlock")}},[t("el-select",{attrs:{placeholder:e.$t("message.home.请选择")},on:{change:function(t){return e.changeCoinType(e.coinType)}},model:{value:e.coinType,callback:function(t){e.coinType=t},expression:"coinType"}},e._l(Object.keys(this.groupBlockAddress),(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1),this.form.network?t("div",{staticClass:"network-select"},[t("el-form-item",{attrs:{label:e.$t("message.home.blockchainNetwork"),prop:"network"}},[t("el-radio-group",{model:{value:e.form.network,callback:function(t){e.$set(e.form,"network",t)},expression:"form.network"}},e._l(e.coinInfo,(function(a){return t("el-radio-button",{key:a.blockchain_name,attrs:{label:a.blockchain_name,disabled:e.swithButton}})})),1)],1)],1):e._e(),t("el-form-item",{staticClass:"wallet-address",attrs:{label:e.$t("message.home.withdrawAddress"),prop:"address"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.withdrawInputTips"),disabled:e.swithButton},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}}),t("span",{class:{"copy-btn":!0,disabled:e.isDisabled},on:{click:e.copy}},[e._v(" "+e._s(e.$t("message.home.copy"))+" ")])],1),t("el-form-item",{attrs:{label:e.$t("message.home.quantity"),prop:"quantity"}},[t("el-input",{attrs:{maxlength:"12",onkeyup:"if(isNaN(value))execCommand('undo')",onafterpaste:"if(isNaN(value))execCommand('undo')",disabled:e.money<1,placeholder:e.$t("message.home.enterTips")},model:{value:e.form.quantity,callback:function(t){e.$set(e.form,"quantity",t)},expression:"form.quantity"}})],1),t("el-form-item",[t("div",{staticStyle:{color:"#56B069"}},[e._v(" "+e._s(e.$t("message.home.当前余额"))+": "+e._s(e.numberFormat(e.money))+" USDT ≈ "+e._s(e.numberFormat(e.$big(e.money).div(e.fee)))+" "+e._s(e.coinType)+" ")])]),t("el-form-item",[t("div",{staticClass:"withdraw-tips flex-between"},[t("span",[e._v(" "+e._s(e.$t("message.home.ActualLedger"))+": "+e._s(e.numberFormat(e.form.arrival))+" "+e._s(e.coinType)+" ")]),t("span",[e._v(" "+e._s(e.$t("message.home.handlingFee"))+": "+e._s(e.numberFormat(e.getRealWithdrawFee))+"% ")])])]),t("el-form-item",[t("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.withdraw}},[e._v(" "+e._s(e.$t("message.home.btnSure"))+" ")])],1)],1):e._e(),"bank"===e.rachargeTypeV&&"FamilyShop"!==e.itemname&&"SM-Wholesale Business"!==e.itemname&&"TikTok Shop"!==e.itemname&&"Selfridges"!==e.itemname?t("el-form",{ref:"withdrawBankForm",attrs:{model:e.formBank,rules:e.bankRules}},["Harrods"!==e.itemname?t("el-form-item",{attrs:{label:e.$t("message.home.actualName"),prop:"bankUserName"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.yourName")},nativeOn:{keypress:function(t){return e.onKeyPress.apply(null,arguments)}},model:{value:e.formBank.bankUserName,callback:function(t){e.$set(e.formBank,"bankUserName",t)},expression:"formBank.bankUserName"}})],1):e._e(),"Harrods"!==e.itemname?t("el-form-item",{attrs:{label:e.$t("message.home.开户行"),prop:"bankName"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.请输入开户行名称")},nativeOn:{keypress:function(t){return e.onKeyPress.apply(null,arguments)}},model:{value:e.formBank.bankName,callback:function(t){e.$set(e.formBank,"bankName",t)},expression:"formBank.bankName"}})],1):e._e(),"Harrods"!==e.itemname?t("el-form-item",{attrs:{label:e.$t("message.home.银行卡号"),prop:"bankCardNo"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.请输入银行卡号"),onkeyup:"value=value.replace(/[^\\w\\.\\/]/ig,'')"},model:{value:e.formBank.bankCardNo,callback:function(t){e.$set(e.formBank,"bankCardNo",t)},expression:"formBank.bankCardNo"}})],1):e._e(),"Harrods"!==e.itemname?t("el-form-item",{attrs:{label:e.$t("message.home.quantity"),prop:"bankQuantity"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.enterTips"),onkeyup:"if(isNaN(value))execCommand('undo')",onafterpaste:"if(isNaN(value))execCommand('undo')"},model:{value:e.formBank.bankQuantity,callback:function(t){e.$set(e.formBank,"bankQuantity",t)},expression:"formBank.bankQuantity"}})],1):e._e(),"Harrods"!==e.itemname?t("el-form-item",[t("div",{staticClass:"withdraw-tips flex-between"},[t("span",[e._v(" "+e._s(e.$t("message.home.ActualLedger"))+": "+e._s(e.numberFormat(e.formBank.arrival))+" (USD) ")]),t("span",[e._v(" "+e._s(e.$t("message.home.handlingFee"))+": "+e._s(e.numberFormat(e.getRealWithdrawFee))+"% ")])])]):e._e(),t("el-form-item",[t("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.Bankwithdraw}},[e._v(" "+e._s(e.$t("message.home.btnSure"))+" ")])],1)],1):e._e(),t("el-dialog",{attrs:{title:e.$t("message.home.提款地址绑定"),visible:e.dialogVisible,width:"30%","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("div",{staticClass:"with_container"},[t("el-form",{attrs:{"label-position":"top","label-width":"80px"}},[t("el-form-item",{attrs:{label:e.$t("message.home.coinBlock")}},[t("el-select",{attrs:{placeholder:e.$t("message.home.请选择")},on:{change:function(t){return e.changeCoin(e.optionsValue)}},model:{value:e.optionsValue,callback:function(t){e.optionsValue=t},expression:"optionsValue"}},e._l(e.options,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("message.home.blockchainNetwork")}},[t("el-select",{attrs:{placeholder:e.$t("message.home.请选择")},model:{value:e.form.network,callback:function(t){e.$set(e.form,"network",t)},expression:"form.network"}},e._l(e.coinInfo,(function(e){return t("el-option",{key:e.blockchain_name,attrs:{label:e.blockchain_name,value:e.blockchain_name}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("message.home.withdrawAddress"),prop:"address"}},[t("el-input",{attrs:{placeholder:e.$t("message.home.withdrawInputTips")},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1)],1)],1),t("div",{staticStyle:{color:"#FF3E3E"}},[e._v(e._s(e.$t("message.home.仅能绑定一个收款地址!")))]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.pushWithdrawAddress}},[e._v(e._s(e.$t("message.home.btnSure")))])],1)]),t("EsPayModal",{attrs:{payCallback:e.payCallback,payLoading:e.btnLoading},model:{value:e.payModalShow,callback:function(t){e.payModalShow=t},expression:"payModalShow"}}),t("EsOnlineServiceView",{model:{value:e.showOnlieService,callback:function(t){e.showOnlieService=t},expression:"showOnlieService"}})],1)}),[],!1,null,"35d5eb48",null);t.default=a.exports},"15a0":function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return o})),a("1c37"),a("21bc"),a("58d5"),a("d418"),a("887c"),a("ee05"),a("ddf6"),a("206b");t=a("7b61");var s=a.n(t);function i(e,t){return new s.a(e).plus(new s.a(t)).toNumber()}function r(e,t){return new s.a(e).minus(new s.a(t)).toNumber()}function o(e,t){return new s.a(e).multipliedBy(new s.a(t)).toNumber()}},c6eb:function(e,t,a){},f99b:function(e,t,a){"use strict";a("c6eb")}}]);