globalExpress-Index.3d97eec5.js 9.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["globalExpress-Index"],{6886:function(t,a,e){"use strict";e("b77f")},a34f:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t._self._c;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pictLoading,expression:"pictLoading"}],staticClass:"views",attrs:{id:"documentary_index","element-loading-background":"rgba(43, 48, 67, 0.1)","element-loading-spinner":"el-icon-loading"}},[a("div",{staticClass:"accounts"},[a("div",{staticClass:"account-top crm-title-box"},[a("span",{staticClass:"tit"},[a("span",{directives:[{name:"t",rawName:"v-t",value:"global.title1",expression:"'global.title1'"}]})])])]),a("div",{staticClass:"account-summary"},[a("el-row",[a("el-col",{attrs:{span:12}},[a("div",{staticClass:"custom-money"},[a("div",{staticClass:"title"},[a("div",[a("i",{staticClass:"icon iconfont iconwallet"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"wallet.item5",expression:"'wallet.item5'"}],staticClass:"tit"})]),a("div",[a("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[a("i",{staticClass:"el-icon-more crm-cursor"}),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:1}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"card.tab17",expression:"'card.tab17'"}]})]),t.isView?a("el-dropdown-item",{attrs:{command:2}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"card.Btn.Recharge",expression:"'card.Btn.Recharge'"}]})]):t._e(),t.isView?a("el-dropdown-item",{attrs:{command:6}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"WalletApply.title1",expression:"'WalletApply.title1'"}]})]):t._e(),t.isView?a("el-dropdown-item",{attrs:{command:3}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"Blockchain1.title",expression:"'Blockchain1.title'"}]})]):t._e(),t.isView?a("el-dropdown-item",{attrs:{command:5}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"WalletApply.title",expression:"'WalletApply.title'"}]})]):t._e()],1)],1)],1)]),a("div",{staticClass:"content"},[a("div",{staticClass:"con"},[a("div",{staticClass:"num"},[t._v(" $ "),a("span",[t._v(t._s(t.userBalance))])])])])])]),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"custom-money no-border"},[a("div",{staticClass:"title"},[a("div",[a("i",{staticClass:"icon iconfont iconhuiyuanqukuan"}),a("span",{directives:[{name:"t",rawName:"v-t",value:"global.title1",expression:"'global.title1'"}],staticClass:"tit"})]),a("div",[a("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleGlobalCommand}},[a("i",{staticClass:"el-icon-more crm-cursor"}),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:1}},[a("span",{directives:[{name:"t",rawName:"v-t",value:"global.title",expression:"'global.title'"}]})])],1)],1)],1)]),a("div",{staticClass:"content"},[a("div",{staticClass:"status-box-btn"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"global.title2",expression:"'global.title2'"}],staticClass:"btn-apply",on:{click:t.addGlobalOrder}})])])])])],1)],1),t.dialogInfoTradingAdd?a("CardHandle",{attrs:{dialogInfoTradingAdd:t.dialogInfoTradingAdd,formList:t.formList},on:{closeAdd:function(a){t.dialogInfoTradingAdd=!1}}}):t._e(),t.dialogCardVaultody?a("CardVaultody",{attrs:{dialogCardVaultody:t.dialogCardVaultody,formList:t.formList},on:{closeAdd:function(a){t.dialogCardVaultody=!1}}}):t._e(),t.dialogCardApply?a("CardApply",{attrs:{dialogCardApply:t.dialogCardApply,formList:t.formList},on:{closeAdd:function(a){t.dialogCardApply=!1}}}):t._e()],1)},i=[],r=(e("14d9"),e("e9f5"),e("910d"),e("ab43"),e("1e70"),e("79a4"),e("c1a1"),e("8b00"),e("a4e7"),e("1e5a"),e("72c3"),e("c6e4")),o=e("f121"),n=e.n(o),d=e("5377"),l=e("b688"),c=e("1346");let{Host80:p}=n.a;const u=[700101,701483,701443,701440,700222],m="production";console.log(m,1212);var h={name:"Index",components:{CardHandle:d["a"],CardVaultody:c["a"],CardApply:l["a"]},inject:["reload"],data(){return{Host80:p,c:m,isFlipping:"",isAuthInfo:!1,dialogInfoTradingAdd:!1,dialogCardVaultody:!1,dialogCardApply:!1,userBalance:0,businessForm:{merchantOrderNo:"",cardTypeId:0,areaCode:"",email:"",firstName:"",lastName:"",birthday:"",nationality:"",country:"",town:"",address:"",postCode:"",gender:"",annualSalary:"",accountPurpose:"",expectedMonthlyVolume:"",idType:"",idNumber:"",ssn:"",issueDate:"",idNoExpiryDate:"",idFrontUrl:"",idBackUrl:"",idHoldUrl:"",mobile:"",occupation:"",ipAddress:"",cId:void 0,customId:void 0},optionsCur:[],optionsLev:[],countryCityList:[],cityList:[],formList:{},occupationList:[],pictLoading:!1,pictViews:!1,cardList:[],typesList:[],balanceData:{}}},computed:{getInfoId(){return JSON.parse(this.Session.Get("user",!0)).customInfo.cId},isView(){return u.includes(this.getInfoId)},customInfo(){return JSON.parse(this.Session.Get("user",!0)).customInfo},AccessToken(){return{"Access-Token":this.Session.Get("access_token")}},lang(){return this.Session.Get("lang")}},methods:{flatData(t){return t.filter(t=>t.holderStatus)},flipCard(t){this.$set(t,"_flip",!t._flip)},async updateCardTypes(t,a){switch(a){case 1:this.$router.push({path:"/card/select",query:{cardTypeId:t.cardTypeId,type:t.type}});break;case 2:this.$router.push({path:"/card/details",query:{cardId:t.id,type:t.activateStatus?2:1}});break}},async ucardBalance(t,a){const{uniqueId:e,cardNo:s,isOpen:i}=t;if(this.pictLoading=!0,i)return this.toggleCard(a),void(this.pictLoading=!1);let o=await r["a"].ucardBalance({uniqueId:e,cardNo:s});200==o.code?(this.$pigeon.MessageOK(this.$i18n.t("Msg.SearchSuccess")),this.balanceData=o.data,this.pictLoading=!1,this.toggleCard(a)):(this.pictLoading=!1,this.$pigeon.MessageError(o.msg))},toggleCard(t){this.cardList=this.cardList.map((a,e)=>({...a,isOpen:e===t&&!a.isOpen}))},toSelect(){0!=this.typesList.length?this.$router.push({path:"/card/select"}):this.$pigeon.MessageError(this.$i18n.t("card.Msg.m11"))},async applyList(){try{const[t,a,e]=await Promise.all([r["a"].cardList({page:{current:1,row:10}}),r["a"].applyList({page:{current:1,row:10},cId:this.getInfoId}),r["a"].cardTypesList()]);let[s,i,o]=await Promise.all([t.data,a.data,e.data]);this.pictLoading=!1,this.pictViews=!1,this.cardList=this.mergeLists(s,i).map(t=>({...t,_flip:!1})),console.log(this.cardList,122),this.cardTypesList(o,i)}catch(t){this.pictLoading=!1,this.pictViews=!1,this.cardList=[]}},async cardTypesList(t,a){try{const e=new Set(a.map(t=>{if("fail"!=t.status&&"cancel"!=t.status)return t.cardTypeId})),s=t,i=s.filter(t=>!e.has(t.cardTypeId)),r=i.filter(t=>t.supportHolderRegin.includes(this.businessForm.country));this.typesList=r}catch(e){console.log(e),this.typesList=[]}},mergeLists(t,a){const e=t.map(t=>{const{status:a,...e}=t;return{...e,activateStatus:a||null,status:a}});let s=a.filter(t=>"fail"!=t.status);const i=s.map(t=>{const{status:a,...e}=t;return{...e,applyStatus:a||null,status:a}}),r=new Set(e.map(t=>t.cardTypeId));let o=i.filter(t=>!r.has(t.cardTypeId));const n={};for(const c of o){const t=n[c.cardTypeId];(!t||new Date(c.addTime).getTime()>new Date(t.addTime).getTime())&&(n[c.cardTypeId]={...c,aId:c.id})}let d=Object.values(n);const l=d.filter(t=>"cancel"!=t.status);return[...l,...e]},async ucardActivate(t,a){"2"!=t.freezeType||"5"==a?t.blocked?this.$pigeon.MessageOK(this.$i18n.t("card.New2.p6")):"success"==t.freezeStatus?this.$router.push({path:"/card/operation",query:{cardId:t.id,type:a}}):"1"==t.freezeType?this.$pigeon.MessageOK(this.$i18n.t("card.Btn.b14")):this.$pigeon.MessageOK(this.$i18n.t("card.Btn.b15")):this.$pigeon.MessageOK(this.$i18n.t("card.Msg.m10"))},handleCommand(t){switch(t){case 1:this.$router.push({path:"/card-g/wallet"});break;case 2:this.formList={uniqueId:this.businessForm.uniqueId},this.dialogCardVaultody=!0;break;case 3:this.$router.push({path:"/blockchain-g/transaction"});break;case 6:this.formList={uniqueId:this.businessForm.uniqueId,country:this.businessForm.country,email:this.businessForm.email,userBalance:this.userBalance},this.dialogCardApply=!0;break;case 5:this.$router.push({path:"/wallet-g/apply"});break}},addGlobalOrder(){this.$router.push({path:"/global-express/order"})},handleGlobalCommand(){this.$router.push({path:"/global-express/order/list"})},async getSingle(){try{const t=await r["a"].getSingle();if(200===t.code){if(!t.data||2!=t.data.approveStatus)return this.$router.push({path:"/card/info"});this.businessForm=t.data,this.applyList(),this.walletBalance()}else this.$message.error(t.msg)}catch(t){this.$message.error(t)}},async walletBalance(){try{const t=await r["a"].walletBalance();200===t.code?this.userBalance=t.data.balance||0:(this.$message.error(t.msg),this.userBalance=0)}catch(t){this.userBalance=0,this.$message.error(t)}},copyCvv(t){this.dialogInfoTradingAdd=!0,this.formList=t},copyText(t){if(!t)return void this.$pigeon.MessageError(this.$i18n.t("card.Msg.m9"));const a=document.createElement("textarea");a.value=t,document.body.appendChild(a),a.select();try{document.execCommand("copy"),this.$pigeon.MessageOK(this.$i18n.t("card.Msg.m8"))}catch(e){this.$pigeon.MessageError(this.$i18n.t("card.Msg.m9"))}document.body.removeChild(a)}},watch:{dialogCardApply:function(t){t||this.walletBalance()}},mounted(){this.pictLoading=!0,this.pictViews=!0,this.getSingle()}},g=h,y=(e("6886"),e("2877")),v=Object(y["a"])(g,s,i,!1,null,"d32b3d4a",null);a["default"]=v.exports},b77f:function(t,a,e){}}]);