PaymentResult.5b8b6201.js 7.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PaymentResult"],{3354:function(t,e,n){},"3e17":function(t,e,n){t.exports=n.p+"img/pay_error.109ccf27.png"},"3ed2":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"paymentresult"},[t.headerStatus?r("m-header",{attrs:{isBack:t.isBack}}):t._e(),"on"==t.pageStatus?r("div",{staticClass:"payon"},[r("img",{attrs:{src:n("82aa"),alt:""}}),r("p",[t._v("支付成功")]),r("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"error"==t.pageStatus?r("div",{staticClass:"payerror"},[r("img",{attrs:{src:n("3e17"),alt:""}}),r("p",[t._v("支付失败")]),r("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"paying"==t.pageStatus?r("div",{staticClass:"paying"},[r("img",{attrs:{src:n("f620"),alt:""}}),r("p",[t._v("订单处理中")]),r("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")]),r("p",{staticClass:"countdown"},[t._v("到计时"+t._s(t.smsText)+"秒刷新")])],1):t._e(),"success"==t.pageStatus?r("div",{staticClass:"paysuccess"},[r("div",{staticClass:"status"},[r("img",{attrs:{src:n("82aa"),alt:""}}),r("p",[t._v("支付成功")]),"PRACTICE"==t.groupType?r("p",{staticClass:"money"},[t._v("¥"+t._s(t.PRACTICEPRICE))]):r("p",{staticClass:"money"},[t._v("¥"+t._s(t.orderInfo.actualAmount))])]),r("div",{staticClass:"orderinfo"},[r("p",[r("span",[t._v("购买时间:")]),t._v("\n "+t._s(t.orderInfo.createTime)+"\n ")]),r("p",[r("span",[t._v("订单号:")]),t._v("\n "+t._s(t.orderInfo.orderNo)+"\n ")]),r("p",[r("span",[t._v("购买详情:")]),r("span",[t._v("购买:"+t._s(t._f("calcMinute")(t.orderInfo.transMinutes))+";")]),t.orderInfo.giveMinutes&&t.orderInfo.giveMinutes>0?r("span",[t._v("赠送:"+t._s(t._f("calcMinute")(t.orderInfo.giveMinutes))+";")]):t._e()])]),r("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e()],1)},a=[],s=n("6e6e"),o=n("ff51"),i=n("b562"),u={name:"paymentresult",components:{MHeader:s["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["g"])()+"/#/teacherDownload")},!1)},methods:{pushHistory:function(){var t={title:"title",url:"#"};window.history.pushState(t,"title","#")},__init:function(){var t=this,e=this.$route.query;e.orderNo?Object(i["i"])({orderNo:e.orderNo}).then(function(e){var n=e.data;if(200==n.code){var r=n.data;t.orderInfo=r,t.showStatus(r.status)}else t.pageStatus="paying",t.CountDown()}):e.type?this.pageStatus=e.type:(this.pageStatus="paying",this.CountDown())},getYMDToCn:function(t){"string"==typeof t&&(t=t.replace(/-/gi,"/"));var e=new Date(t);return e.getFullYear()+"年"+(e.getMonth()+1)+"月"+e.getDate()+"日"},splitStr:function(t){if(t){var e=t.split(":");return e[0]+":"+e[1]}return t},showStatus:function(t,e){"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 e=window.history.length;Object(o["b"])().android||Object(o["b"])().iPhone?t?window.history.go(-(e-1)):window.history.go(-(e-2)):window.location.replace(Object(o["g"])()+"/#/teacherDownload")},CountDown:function(){var t=this,e=60;this.smsText=e,this.timer=setInterval(function(){e<=0?(window.location.reload(),clearInterval(t.timer)):(e--,t.smsText=e)},1e3)}}},c=u,p=(n("8027"),n("2877")),d=Object(p["a"])(c,r,a,!1,null,"9766c4f4",null);e["default"]=d.exports},5115:function(t,e,n){"use strict";var r=n("3354"),a=n.n(r);a.a},"6e6e":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mheader"},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},a=[],s={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=s,i=(n("5115"),n("2877")),u=Object(i["a"])(o,r,a,!1,null,"61d0e2e4",null);e["a"]=u.exports},8027:function(t,e,n){"use strict";var r=n("8165"),a=n.n(r);a.a},8165:function(t,e,n){},"82aa":function(t,e,n){t.exports=n.p+"img/pay_success.181846c1.png"},b562:function(t,e,n){"use strict";n.d(e,"s",function(){return i}),n.d(e,"m",function(){return u}),n.d(e,"n",function(){return c}),n.d(e,"r",function(){return p}),n.d(e,"e",function(){return l}),n.d(e,"b",function(){return f}),n.d(e,"c",function(){return h}),n.d(e,"o",function(){return m}),n.d(e,"j",function(){return g}),n.d(e,"g",function(){return b}),n.d(e,"h",function(){return C}),n.d(e,"p",function(){return v}),n.d(e,"q",function(){return y}),n.d(e,"l",function(){return k}),n.d(e,"d",function(){return _}),n.d(e,"i",function(){return w}),n.d(e,"f",function(){return S}),n.d(e,"a",function(){return A}),n.d(e,"k",function(){return d});var r=n("4328"),a=n.n(r),s=n("981f").default,o="/api-teacher",i=function(t){return s({url:"/api-auth/usernameLogin",method:"post",data:a.a.stringify(t)})},u=function(t){return s({url:"/api-student/code/sendSms",method:"post",data:a.a.stringify(t)})},c=function(t){return s({url:"/api-auth/smsLogin",method:"post",data:a.a.stringify(t)})},p=function(t){return s({url:"/api-auth/user/setPassword",method:"post",data:a.a.stringify(t)})},d=function(t){return s({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:t})},l=function(t){return s({url:"/api-student/courseGroup/getGroupDetail",method:"get",params:t})},f=function(t){return s({url:"/api-student/courseGroup/buyCourseGroup",method:"post",data:a.a.stringify(t)})},h=function(t){return s({url:o+"/courseGroup/createCourseGroup",method:"post",data:t})},m=function(t){return s({url:o+"/sysTenantAccount/get",method:"get",params:t})},g=function(t){return s({url:o+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:t})},v=function(t){return s({url:o+"/teacherCourseSchedule/teacherCourseMinutes",method:"get",params:t})},y=function(t){return s({url:o+"/tenantEntryActivities/queryPage",method:"get",params:t})},_=function(t){return s({url:o+"/tenantPaymentOrder/createOrder",method:"post",data:a.a.stringify(t)})},w=function(t){return s({url:o+"/teacherOrder/queryByOrderNo",method:"get",params:t})},b=function(t){return s({url:"/api-cms/helpCenterCatalog/list",method:"get",params:t})},C=function(t){return s({url:"/api-cms/helpCenterContent/list",method:"get",params:t})},k=function(t){return s({url:"/api-auth/queryUserInfo",method:"get",params:t})},S=function(t){return s({url:o+"/courseReview/getStuAndTeaReview",method:"get",params:t})},A=function(t){return s({url:o+"/courseReview/batchAdd",method:"post",data:t})}},f620:function(t,e,n){t.exports=n.p+"img/pay_ing.2848bdf2.png"}}]);