PaymentResult.b97f82a0.js 5.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PaymentResult"],{"3e17":function(t,a,e){t.exports=e.p+"img/pay_error.109ccf27.png"},"3ed2":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"paymentresult"},[t.headerStatus?s("m-header",{attrs:{isBack:t.isBack}}):t._e(),"on"==t.pageStatus?s("div",{staticClass:"payon"},[s("img",{attrs:{src:e("82aa"),alt:""}}),s("p",[t._v("支付成功")]),s("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"error"==t.pageStatus?s("div",{staticClass:"payerror"},[s("img",{attrs:{src:e("3e17"),alt:""}}),s("p",[t._v("支付失败")]),s("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"paying"==t.pageStatus?s("div",{staticClass:"paying"},[s("img",{attrs:{src:e("f620"),alt:""}}),s("p",[t._v("订单处理中")]),s("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")]),s("p",{staticClass:"countdown"},[t._v("到计时"+t._s(t.smsText)+"秒刷新")])],1):t._e(),"success"==t.pageStatus?s("div",{staticClass:"paysuccess"},[s("div",{staticClass:"status"},[s("img",{attrs:{src:e("82aa"),alt:""}}),s("p",[t._v("支付成功")]),"PRACTICE"==t.groupType?s("p",{staticClass:"money"},[t._v("¥"+t._s(t.PRACTICEPRICE))]):s("p",{staticClass:"money"},[t._v("¥"+t._s(t.orderInfo.actualAmount))])]),s("div",{staticClass:"orderinfo"},[s("p",[s("span",[t._v("购买时间:")]),t._v("\n "+t._s(t.orderInfo.createTime)+"\n ")]),s("p",[s("span",[t._v("订单号:")]),t._v("\n "+t._s(t.orderInfo.orderNo)+"\n ")]),s("p",[s("span",[t._v("购买详情:")]),s("span",[t._v("购买:"+t._s(t._f("calcMinute")(t.orderInfo.transMinutes))+";")]),t.orderInfo.giveMinutes&&t.orderInfo.giveMinutes>0?s("span",[t._v("赠送:"+t._s(t._f("calcMinute")(t.orderInfo.giveMinutes))+";")]):t._e()])]),s("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e()],1)},n=[],i=e("6e6e"),o=e("ff51"),r=e("b562"),c={name:"paymentresult",components:{MHeader:i["a"]},data:function(){var t=this;return{headerStatus:!1,isBack:"off"!=t.$route.query.isBack,pageStatus:null,orderInfo:{},smsText:60,groupType:null,timer:null}},mounted:function(){Object(o["b"])().android||Object(o["b"])().iPhone||(this.headerStatus=!0),this.__init(),this.pushHistory(),window.addEventListener("popstate",function(t){Object(o["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):Object(o["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):window.location.replace(Object(o["i"])()+"/#/teacherDownload")},!1)},methods:{pushHistory:function(){var t={title:"title",url:"#"};window.history.pushState(t,"title","#")},__init:function(){var t=this,a=this.$route.query;a.orderNo?Object(r["i"])({orderNo:a.orderNo}).then(function(a){var e=a.data;if(200==e.code){var s=e.data;t.orderInfo=s,t.showStatus(s.status)}else t.pageStatus="paying",t.CountDown()}):a.type?this.pageStatus=a.type:(this.pageStatus="paying",this.CountDown())},getYMDToCn:function(t){"string"==typeof t&&(t=t.replace(/-/gi,"/"));var a=new Date(t);return a.getFullYear()+"年"+(a.getMonth()+1)+"月"+a.getDate()+"日"},splitStr:function(t){if(t){var a=t.split(":");return a[0]+":"+a[1]}return t},showStatus:function(t,a){"ING"==t?(this.pageStatus="paying",this.CountDown()):"SUCCESS"==t?this.pageStatus="success":"FAILED"==t&&(this.pageStatus="error")},onAppBack:function(){var t=window.localStorage.getItem("courseApply");clearInterval(this.timer);var a=window.history.length;Object(o["b"])().android||Object(o["b"])().iPhone?t?window.history.go(-(a-1)):window.history.go(-(a-2)):window.location.replace(Object(o["i"])()+"/#/teacherDownload")},CountDown:function(){var t=this,a=60;this.smsText=a,this.timer=setInterval(function(){a<=0?(window.location.reload(),clearInterval(t.timer)):(a--,t.smsText=a)},1e3)}}},u=c,p=(e("8027"),e("2877")),l=Object(p["a"])(u,s,n,!1,null,"9766c4f4",null);a["default"]=l.exports},"6e6e":function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mheader"},[e("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[e("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),e("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),e("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},n=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},o=i,r=(e("d133"),e("2877")),c=Object(r["a"])(o,s,n,!1,null,"0e835508",null);a["a"]=c.exports},8027:function(t,a,e){"use strict";var s=e("8165"),n=e.n(s);n.a},8165:function(t,a,e){},"82aa":function(t,a,e){t.exports=e.p+"img/pay_success.181846c1.png"},bb2c:function(t,a,e){},d133:function(t,a,e){"use strict";var s=e("bb2c"),n=e.n(s);n.a},f620:function(t,a,e){t.exports=e.p+"img/pay_ing.2848bdf2.png"}}]);