PaymentResult.d7c1ded7.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PaymentResult"],{"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"},[r("m-header",{attrs:{isBack:!1}}),"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(),"close"==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("支付成功")]),r("p",{staticClass:"money"},[t._v("¥"+t._s(t._f("moneyFormat")(t.orderInfo.price)))])]),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 ")]),t.goodsInfo.length>0?r("div",[r("span",[t._v("购买详情:")]),t._l(t.goodsInfo,(function(e,n){return r("p",{key:n},[t._v(t._s(e))])}))],2):t._e(),t.financeChops?r("img",{staticClass:"icon_img",attrs:{src:t.financeChops}}):t._e()]),r("van-button",{attrs:{type:"info",round:""},on:{click:t.onAppBack}},[t._v("返回")])],1):t._e()],1)},o=[],a=n("71c2"),i=n("ff51"),s=n("b562"),c={name:"paymentresult",components:{MHeader:a["a"]},data:function(){var t=this.$route.query;return{headerStatus:!1,isBack:"off"!=t.isBack,pageStatus:null,orderInfo:{},smsText:60,groupType:null,timer:null,financeChops:null,goodsInfo:[]}},mounted:function(){this.__init(),window.addEventListener("popstate",(function(t){Object(i["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):Object(i["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):window.location.replace(Object(i["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?n.data:{};t.orderInfo=r,t.groupType=r.type,console.log(r),t.financeChops=r.financeChops||null,t.showStatus(r.status),"GOODS_SELL"==r.type?t.getGoodsInfo(r.detail):"MALL_BUY"==r.type&&t.getSaleGoods(r.detail)}else t.pageStatus="paying",t.CountDown()})):e.type?this.pageStatus=e.type:(this.pageStatus="paying",this.CountDown())},getGoodsInfo:function(t){var e=this,n=t.goodsJson?JSON.parse(t.goodsJson):[];this.goodsInfo=[],n.forEach((function(t){e.goodsInfo.push(t.goodsName+" ×"+t.goodsNum)}))},getSaleGoods:function(t){var e=this,n=t.goodsJson?JSON.parse(t.goodsJson):{};this.goodsInfo=[];var r=n.orderItemList||[];r.forEach((function(t){e.goodsInfo.push(t.productName+" ×"+t.productQuantity)}))},showStatus:function(t,e){"ING"==t?(this.pageStatus="paying",this.CountDown()):"SUCCESS"==t?this.pageStatus="success":"FAILED"==t?this.pageStatus="error":"CLOSE"==t&&(this.pageStatus="close")},onAppBack:function(){var t=window.localStorage.getItem("courseApply");clearInterval(this.timer);var e=window.history.length;Object(i["b"])().android||Object(i["b"])().iPhone?t?window.history.go(-(e-1)):window.history.go(-(e-2)):window.location.replace(Object(i["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("f6c8"),n("2877")),f=Object(l["a"])(u,r,o,!1,null,"e7cbdb1a",null);e["default"]=f.exports},"71c2":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.appHide?n("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":"","white"==t.background?"white":null],style:[t.styleName,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:t.$route.meta.descrition))]}))],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])]):t._e()},o=[],a=n("ddf4"),i=n("ff51");function s(t){return s="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},s(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=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(E){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return C()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=S(i,n);if(s){if(s===h)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===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,i),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(E){return{type:"throw",arg:E}}}t.wrap=l;var h={};function p(){}function d(){}function v(){}var g={};u(g,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,o)&&(g=m);var w=v.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(h).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}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 h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;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,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function x(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 L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function O(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,a=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 a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=v,u(w,"constructor",v),u(v,"constructor",d),d.displayName=u(v,i,"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,i,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new _(l(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(w),u(w,i,"Generator"),u(w,o,(function(){return this})),u(w,"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=O,L.prototype={constructor:L,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)&&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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},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),h},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),k(n),h}},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;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function u(t,e,n,r,o,a,i){try{var s=t[a](i),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(r,o)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){u(a,r,o,i,s,"next",t)}function s(t){u(a,r,o,i,s,"throw",t)}i(void 0)}))}}var f=!Object(i["b"])().isApp,h={name:"mheader",props:{appHide:{name:Boolean,default:function(){return!f}},name:String,isBack:{type:Boolean,default:f},isFixed:{type:Boolean,default:!0},styleName:{type:Object,default:function(){return{}}},background:String,titleClass:String,backUrl:{type:Object,default:function(){return{callBack:null,status:!1,path:"",params:{}}}}},data:function(){return{title:this.name,backUrlParams:this.backUrl,navBarHeight:0,headStyle:{},titleHeight:44}},created:function(){var t=l(c().mark((function t(){var e,n,r=this;return c().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(a["b"])({api:"setBarStatus",content:{status:0}});case 2:return t.next=4,Object(a["b"])({api:"backIconChange",content:{iconStyle:"black"}});case 4:if(e=sessionStorage.getItem("navHeight"),n=sessionStorage.getItem("titleHeight"),!e||!n){t.next=11;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:n+"px",lineHeight:n+"px"},t.next=13;break;case 11:return t.next=13,Object(a["b"])({api:"getNavHeight"},(function(t){var e=t.content,n={},o=e.dpi||2;if(e.navHeight){var a=e.navHeight/o;sessionStorage.setItem("navHeight",a),r.navBarHeight=a,n={paddingTop:a+"px"}}if(e.titleHeight){var i=e.titleHeight/o;sessionStorage.setItem("titleHeight",i),r.titleHeight=i,n.height=i+"px",n.lineHeight=i+"px"}r.headStyle=n}));case 13:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{goBack:function(){var t=this.backUrlParams;"function"==typeof t.callBack?t.callBack():t.status?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},p=h,d=(n("8017"),n("2877")),v=Object(d["a"])(p,r,o,!1,null,"695ab781",null);e["a"]=v.exports},8017:function(t,e,n){"use strict";n("a89a")},"82aa":function(t,e,n){t.exports=n.p+"img/pay_success.181846c1.png"},a89a:function(t,e,n){},f620:function(t,e,n){t.exports=n.p+"img/pay_ing.2848bdf2.png"},f6c8:function(t,e,n){"use strict";n("fecf")},fecf:function(t,e,n){}}]);