1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PaymentResult"],{"04a4":function(t,e,r){"use strict";r("3761")},"09bc":function(t,e,r){"use strict";r("5e56")},3761:function(t,e,r){},"3e17":function(t,e,r){t.exports=r.p+"img/pay_error.109ccf27.png"},"3ed2":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"paymentresult"},[t.headerStatus?n("m-header",{attrs:{isBack:t.isBack}}):t._e(),"on"==t.pageStatus?n("div",{staticClass:"payon"},[n("img",{attrs:{src:r("82aa"),alt:""}}),n("p",[t._v("支付成功")]),n("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"error"==t.pageStatus?n("div",{staticClass:"payerror"},[n("img",{attrs:{src:r("3e17"),alt:""}}),n("p",[t._v("支付失败")]),n("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e(),"paying"==t.pageStatus?n("div",{staticClass:"paying"},[n("img",{attrs:{src:r("f620"),alt:""}}),n("p",[t._v("订单处理中")]),n("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")]),n("p",{staticClass:"countdown"},[t._v("到计时"+t._s(t.smsText)+"秒刷新")])],1):t._e(),"success"==t.pageStatus?n("div",{staticClass:"paysuccess"},[n("div",{staticClass:"status"},[n("img",{attrs:{src:r("82aa"),alt:""}}),n("p",[t._v("支付成功")]),"PRACTICE"==t.groupType?n("p",{staticClass:"money"},[t._v("¥"+t._s(t.PRACTICEPRICE))]):n("p",{staticClass:"money"},[t._v("¥"+t._s(t.orderInfo.actualAmount))])]),n("div",{staticClass:"orderinfo"},[n("p",[n("span",[t._v("购买时间:")]),t._v("\n "+t._s(t.orderInfo.createTime)+"\n ")]),n("p",[n("span",[t._v("订单号:")]),t._v("\n "+t._s(t.orderInfo.orderNo)+"\n ")]),n("p",[n("span",[t._v("购买详情:")]),n("span",[t._v("购买:"+t._s(t._f("calcMinute")(t.orderInfo.transMinutes))+";")]),t.orderInfo.giveMinutes&&t.orderInfo.giveMinutes>0?n("span",[t._v("赠送:"+t._s(t._f("calcMinute")(t.orderInfo.giveMinutes))+";")]):t._e()])]),n("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e()],1)},o=[],i=r("6e6e"),a=r("ff51"),s=r("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(a["b"])().android||Object(a["b"])().iPhone||(this.headerStatus=!0),this.__init(),this.pushHistory(),window.addEventListener("popstate",(function(t){Object(a["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):Object(a["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):window.location.replace(Object(a["i"])()+"/#/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(s["i"])({orderNo:e.orderNo}).then((function(e){var r=e.data;if(200==r.code){var n=r.data;t.orderInfo=n,t.showStatus(n.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(a["b"])().android||Object(a["b"])().iPhone?t?window.history.go(-(e-1)):window.history.go(-(e-2)):window.location.replace(Object(a["i"])()+"/#/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)}}},u=c,l=(r("09bc"),r("2877")),h=Object(l["a"])(u,n,o,!1,null,"7276fc32",null);e["default"]=h.exports},"5e56":function(t,e,r){},"6e6e":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[r("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[r("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),r("div",{staticClass:"m-nav-bar__title"},[t._t("default",(function(){return[t._v(t._s(t.name?t.name:this.$route.meta.descrition))]}))],2),r("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},o=[],i=r("ddf4");function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(B){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(B){return{type:"throw",arg:B}}}t.wrap=l;var f={};function p(){}function d(){}function v(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(L([])));m&&m!==e&&r.call(m,o)&&(y=m);var w=v.prototype=p.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(o,i,s,c){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==a(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=v,u(w,"constructor",v),u(v,"constructor",d),d.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),u(w,c,"Generator"),u(w,o,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function c(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,s,"next",t)}function s(t){c(i,n,o,a,s,"throw",t)}a(void 0)}))}}var l={name:"mheader",props:{name:String,isNative:{type:Boolean,default:!0},isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},data:function(){return{navBarHeight:0,headStyle:{},titleHeight:44}},mounted:function(){this.isNative||(Object(i["b"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=u(s().mark((function t(){var e,r,n=this;return s().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),r=sessionStorage.getItem("titleHeight"),!e||!r){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:r+"px",lineHeight:r+"px"},t.next=9;break;case 7:return t.next=9,Object(i["b"])({api:"getNavHeight"},(function(t){var e=t.content,r={},o=e.dpi||2;if(e.navHeight){var i=e.navHeight/o;sessionStorage.setItem("navHeight",i),n.navBarHeight=i,r={paddingTop:i+"px"}}if(e.titleHeight){var a=e.titleHeight/o;sessionStorage.setItem("titleHeight",a),n.titleHeight=a,r.height=a+"px",r.lineHeight=a+"px"}n.headStyle=r}));case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),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)}},beforeDestroy:function(){this.isNative||(Object(i["b"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},h=l,f=(r("04a4"),r("2877")),p=Object(f["a"])(h,n,o,!1,null,"641fc55e",null);e["a"]=p.exports},"82aa":function(t,e,r){t.exports=r.p+"img/pay_success.181846c1.png"},f620:function(t,e,r){t.exports=r.p+"img/pay_ing.2848bdf2.png"}}]);
|