index-legacy.b9083004.js 11 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,a,o,i){try{var c=e[o](i),l=c.value}catch(p){return void n(p)}c.done?t(l):Promise.resolve(l).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function c(e){r(i,a,o,c,l,"next",e)}function l(e){r(i,a,o,c,l,"throw",e)}c(void 0)}))}}var o=document.createElement("style");o.innerHTML="._payment_y6th3_1 .van-cell__title{font-size:.42667rem;padding-left:.26667rem}._payment_y6th3_1 .van-icon-cross{position:absolute;z-index:1;top:.8rem;left:.34667rem;color:#ccc;font-size:.48rem;cursor:pointer}._payment_y6th3_1 .van-cell{padding:.53333rem}._payment_y6th3_1 .van-checkbox{display:inline-block;align-items:inherit;overflow:inherit}._payment_y6th3_1 .van-checkbox__icon{height:.48rem;line-height:.48rem;display:inline-block;vertical-align:middle}._payment_y6th3_1 .van-checkbox__label{line-height:.48rem}._payment_y6th3_1 ._boxStyle_y6th3_31{background:transparent!important;width:.48rem;height:.48rem;border:transparent!important}._payment_y6th3_1 ._title_y6th3_37{background-color:#fff;font-size:.48rem;font-weight:500;color:#333;padding:.8rem 0 .32rem;text-align:center}._payment_y6th3_1 ._payAmount_y6th3_45{background-color:#fff;padding:.53333rem 0;text-align:center}._payment_y6th3_1 ._payAmount_y6th3_45 p{font-size:.37333rem;color:#666;padding-bottom:.26667rem}._payment_y6th3_1 ._payAmount_y6th3_45 ._amount_y6th3_55{font-size:1.09333rem;font-family:DINAlternate-Bold,DINAlternate;font-weight:700;color:#333}._payment_y6th3_1 ._payAmount_y6th3_45 ._amount_y6th3_55 span{font-size:.82667rem}._payment_y6th3_1 ._blank_y6th3_64{height:1.73333rem}._payment_y6th3_1 ._payTypeRe_y6th3_67{display:flex;align-items:center;font-size:.42667rem;font-weight:600;color:#333;line-height:1.2}._payment_y6th3_1 ._recommend_y6th3_75{margin-left:.13333rem;background:#FE2451;border-radius:.26667rem;font-size:.29333rem;color:#fff;line-height:.42667rem;padding:.02667rem .13333rem 0}._payment_y6th3_1 ._payBtn_y6th3_84{width:90%!important;margin:0 auto;font-size:.42667rem;font-weight:600;margin-bottom:.53333rem}._payment_y6th3_1 ._tenantPayBtn_y6th3_91{background:linear-gradient(270deg,#FF204B 0%,#FE5B71 100%)}\n",document.head.appendChild(o),System.register(["./ResizeObserver.es-legacy.9ef5ac8c.js","./index-legacy.e9381954.js","./index-legacy.6268a8fe.js","./index-legacy.b0e8bd5d.js","./index-legacy.5893ff71.js","./hooks-legacy.b4b15558.js","./icon_checkbox_default-legacy.e33240bc.js","./icon_checkbox-tenant-legacy.b4d3b7a3.js"],(function(e){"use strict";var n,r,o,i,c,l,p,u,y,s,m,f,d,A,h,_,g,v,b,k,P;return{setters:[function(e){n=e.g,r=e.d,o=e.bs,i=e.D,c=e.y,l=e.f,p=e.n,u=e.T,y=e.b5,s=e.j,m=e.N,f=e.A,d=e.B},function(e){A=e.C},function(e){h=e.C},function(e){_=e.R,g=e.a},function(){},function(e){v=e.u},function(e){b=e.a,k=e.i},function(e){P=e.a}],execute:function(){var O="_payment_y6th3_1",w="_boxStyle_y6th3_31",j="_title_y6th3_37",x="_payAmount_y6th3_45",B="_amount_y6th3_55",T="_blank_y6th3_64",E="_payTypeRe_y6th3_67",V="_recommend_y6th3_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hmSCQisKV3nJELoRV3SAh2sdNmmOalKdx8Tej3569V1gF0+HSGcHDD+Zgp/9K9Ekb+7j0KYAccnJcnG03jdCcPO5Cwy0CS0wQAesqcjg/YJ6CZgze70Yj2qDV2A6VgZShrMwDrddranfR0whBUsBIM7eiBhyaH/K+YUOb/q9IEJE0zWipIKMbWS5u4DlfnxS8/v7aZguims4H7EKVGRqLOoqRakx/8JieQB+MHtsEaJlBry1SoInwgmLAHA8Cy6O7uZGxylMJSScq49EK3uasGErkNTAHNtB2u6s7qYJXXGbU+I1hdOjM3SRYsxkwErkGrcr+MuQo1HmzFhD7mMGbX7SVKsECPRteeHu6vN2c3ME83mckD2nRrc2uBBUy+8waZcnkASGbACe8WrSko043fgwlscKbRGjm0xsKbbHwbJDT0ddt4lwynLiaMolt0lWQm19zjm0kpyEPWfs3DMMdQLaOrqeY5K8XWX2Kuuwz+9YlbBPaJezAAAAABJRU5ErkJggg=="),S="TEACHER"===n.platformType?"/api-teacher":"/api-student",M={goodsPay:{cancelUrl:"/api-mall-portal/order/cancelUserOrder",payUrl:"/api-mall-portal/payment/orderPay"},orderPay:{cancelUrl:S+"/userOrder/orderCancel",payUrl:S+"/userOrder/orderPay"}};e("P",r({name:"payment",props:{modelValue:{type:Boolean,default:!1},orderInfo:{type:Object,default:{orderNo:"",actualPrice:0}},onBackOut:{type:Function,default:function(){}},paymentType:{type:String,default:"orderPay"}},data:function(){return{payType:"wx_app",pay_channel:""}},unmounted:function(){o("paymentOperation",this.paymentOperation)},mounted:function(){console.log(this.orderInfo,"this.orderInfo")},methods:{onClose:function(){var e=this;i.confirm({message:"是否放弃本次付款",confirmButtonText:"继续付款",cancelButtonText:"放弃"}).then((function(){})).catch(a(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.onCancel(),v("取消支付");case 2:case"end":return t.stop()}}),t)}))))},onCancel:function(e){var t=this;return a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.post(M[t.paymentType].cancelUrl,{data:{orderNo:t.orderInfo.orderNo}});case 3:n.next=7;break;case 5:n.prev=5,n.t0=n.catch(0);case 7:t.$emit("update:modelValue",!1),e||(l().isApp?p({api:"goBack"}):t.$router.go(-1)),t.onBackOut&&t.onBackOut();case 10:case"end":return n.stop()}}),n,null,[[0,5]])})))()},onSubmit:function(){var e=this;return a(regeneratorRuntime.mark((function r(){var a,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,a={orderNo:e.orderInfo.orderNo,payChannel:e.payType,paymentClient:null},"goodsPay"===e.paymentType&&(a.paymentClient="kt"===n.sourcType?"KT_STUDENT":n.platformType),r.next=5,c.post(M[e.paymentType].payUrl,{data:t({},a)});case 5:o=r.sent,p({api:"paymentOrder",content:{orderNo:e.orderInfo.orderNo,payChannel:e.payType,payInfo:o.data.pay_info}}),u.loading({message:"支付中...",forbidClick:!0,duration:3e3,loadingType:"spinner"}),u.clear(),e.$emit("update:modelValue",!1),y("paymentOperation",(function(t){console.log(t,"init paymentOperation"),e.paymentOperation(null==t?void 0:t.content)})),r.next=16;break;case 13:r.prev=13,r.t0=r.catch(0),console.log(r.t0);case 16:v("购买支付");case 17:case"end":return r.stop()}}),r,null,[[0,13]])})))()},paymentOperation:function(e){var t=this;if(console.log(e,"paymentOperation",this.paymentType,this.orderInfo),"success"===e.status||"error"===e.status){if(u.clear(),this.$emit("update:modelValue",!1),"goodsPay"===this.paymentType)return void this.$router.replace({path:"/shopTrade",query:{orderNo:this.orderInfo.orderNo}});this.$router.replace({path:"/tradeDetail",query:{orderNo:this.orderInfo.orderNo}})}else if("cancel"===e.status)u.clear(),this.$emit("update:modelValue",!1);else if("fail"===e.status){var n="ali_app"===this.payType?"您尚未安装支付宝":"您尚未安装微信";i.alert({title:"提示",message:n}).then((function(){u.clear(),t.$emit("update:modelValue",!1)}))}}},render:function(){var e=this;return s("div",{class:O},[s(m,{onClick:this.onClose,name:"cross",size:20},null),s("div",{class:[j]},[f("选择支付方式")]),s("div",{class:x},[s("p",null,[f("应付金额")]),s("div",{class:B},[s("span",null,[f("¥")]),this.$filters.moneyFormat(this.orderInfo.actualPrice)])]),s(_,{modelValue:this.payType,"onUpdate:modelValue":function(t){return e.payType=t}},{default:function(){return[s(h,{border:!1},{default:function(){return[s(A,{border:!0,center:!0,onClick:function(){e.payType="wx_app"}},{icon:function(){return s(m,{name:U,size:18},null)},"right-icon":function(){return s(g,{name:"wx_app"},{icon:function(e){return s(m,{class:w,name:e.checked?"tenant"===n.projectType?P:b:k},null)}})},title:function(){return s("div",{class:E},[f("微信支付 "),s("span",{class:V},[f("推荐")])])}}),s(A,{title:"支付宝支付",border:!0,center:!0,onClick:function(){e.payType="ali_app"}},{icon:function(){return s(m,{name:R,size:18},null)},"right-icon":function(){return s(g,{name:"ali_app"},{icon:function(e){return s(m,{class:w,name:e.checked?"tenant"===n.projectType?P:b:k},null)}})},title:function(){return s("div",{class:E},[f("支付宝支付")])}})]}})]}}),s("div",{class:T},null),s(d,{type:"primary",class:[I,"tenant"===n.projectType&&C],block:!0,round:!0,onClick:this.onSubmit},{default:function(){return[f("确认支付")]}})])}}))}}}))}();