PaymentResult.447bea1b.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PaymentResult"],{"04a4":function(t,e,n){"use strict";n("3761")},"09bc":function(t,e,n){"use strict";n("5e56")},3761: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)},o=[],i=n("6e6e"),a=n("ff51"),s=n("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 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(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=(n("09bc"),n("2877")),f=Object(l["a"])(u,r,o,!1,null,"7276fc32",null);e["default"]=f.exports},"5e56":function(t,e,n){},"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",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[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",(function(){return[t._v(t._s(t.name?t.name:this.$route.meta.descrition))]}))],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},o=[],i=n("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,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(L){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(L){return{type:"throw",arg:L}}}t.wrap=l;var p={};function h(){}function d(){}function v(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&n.call(m,o)&&(y=m);var b=v.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,s,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==a(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var o=r.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,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function O(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(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 r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=v,u(b,"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(b),t},t.awrap=function(t){return{__await:t}},w(_.prototype),u(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),u(b,c,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=j,k.prototype={constructor:k,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(x),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function c(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(r,o)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){c(i,r,o,a,s,"next",t)}function s(t){c(i,r,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,n,r=this;return s().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),n=sessionStorage.getItem("titleHeight"),!e||!n){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:n+"px",lineHeight:n+"px"},t.next=9;break;case 7:return t.next=9,Object(i["b"])({api:"getNavHeight"},(function(t){var e=t.content,n={},o=e.dpi||2;if(e.navHeight){var i=e.navHeight/o;sessionStorage.setItem("navHeight",i),r.navBarHeight=i,n={paddingTop:i+"px"}}if(e.titleHeight){var a=e.titleHeight/o;sessionStorage.setItem("titleHeight",a),r.titleHeight=a,n.height=a+"px",n.lineHeight=a+"px"}r.headStyle=n}));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)}},f=l,p=(n("04a4"),n("2877")),h=Object(p["a"])(f,r,o,!1,null,"641fc55e",null);e["a"]=h.exports},"82aa":function(t,e,n){t.exports=n.p+"img/pay_success.181846c1.png"},ddf4:function(t,e,n){"use strict";n.d(e,"b",(function(){return v})),n.d(e,"a",(function(){return y}));var r=n("ff51");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t){return l="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},l(t)}var f=function(){},p={},h=Object(r["b"])();h.isApp&&window.addEventListener("message",(function(t){try{var e=t.data?"object"===l(t.data)?t.data:JSON.parse(t.data):{},n=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(h){}if(!n){var r,o=Object.keys(p).filter((function(t){return 0===t.indexOf(e.api)})),i=s(o);try{for(i.s();!(r=i.n()).done;){var a=r.value,c=p[a]||f;c(e)}}catch(d){i.e(d)}finally{i.f()}return}var u=p[e.content.uuid||e.uuid||e.api+e.uuid]||f;u(e)}catch(h){console.error("通信消息解析错误",h)}}));var d=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,v=function(t,e){if(h.isApp){var n=Object(r["g"])();p[n]=e||f,t.content=t.content?i(i({},t.content),{},{uuid:n}):{uuid:n},d.postMessage(JSON.stringify(t))}},y=function(t,e){if(h.isApp){var n=t+Object(r["g"])();p[n]=e||f}}},f620:function(t,e,n){t.exports=n.p+"img/pay_ing.2848bdf2.png"}}]);