(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/cinema/orderdes"],{1316:function(e,t,r){},"2ce5":function(e,t,r){"use strict";r.r(t);var n=r("a140"),a=r("e70d");for(var o in a)"default"!==o&&function(e){r.d(t,e,(function(){return a[e]}))}(o);r("d46f");var i,c=r("f0c5"),u=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],i);t["default"]=u.exports},"588c":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r("a34a")),a=r("be0c"),o=r("482c"),i=c(r("b0a3"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r,n,a,o,i){try{var c=e[o](i),u=c.value}catch(s){return void r(s)}c.done?t(u):Promise.resolve(u).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){u(o,n,a,i,c,"next",e)}function c(e){u(o,n,a,i,c,"throw",e)}i(void 0)}))}}var d={data:function(){return{orderDes:{},seatList:[],outTradeNo:null,loading:!0,pollingTiemId:null,filmDes:{},qrcode:null,qrcodeLoading:!0,ticketType:null}},onLoad:function(e){this.outTradeNo=e.outTradeNo},mounted:function(){this.init()},computed:{},methods:{init:function(){var e=this;return s(n.default.mark((function t(){var r,i;return n.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,a.getWxOrder)(e.outTradeNo);case 2:if(r=t.sent,r.data.orderDataJson=JSON.parse(r.data.orderDataJson),e.orderDes=r.data,e.seatList=e.orderDes.orderDataJson.wxOrderCreateDTO.seat.split(","),e.ticketType=e.orderDes.orderDataJson.wxOrderCreateDTO.ticketType,2!=e.ticketType){t.next=12;break}if(!e.orderDes.orderDataJson.filmMcpData){t.next=12;break}return t.next=11,e.qrcodeGenerate(e.orderDes.orderDataJson.filmMcpData.ticket.slice(4));case 11:e.qrcode=t.sent;case 12:if(2==e.ticketType){t.next=18;break}return t.next=15,(0,o.orderQuery)({thirdOrderId:e.outTradeNo});case 15:i=t.sent,e.filmDes=i.data.data,e.filmDes.orderStatus<4?e.polling():e.filmDes.orderStatus<10&&e.qrcodeShow();case 18:e.loading=!1,e.qrcodeLoading=!1;case 20:case"end":return t.stop()}}),t)})))()},polling:function(){var e=this;this.pollingTiemId=setInterval(s(n.default.mark((function t(){var r;return n.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,o.orderQuery)({thirdOrderId:e.outTradeNo});case 2:r=t.sent,e.filmDes=r.data.data,4!=e.filmDes.orderStatus&&5!=e.filmDes.orderStatus||(clearInterval(e.pollingTiemId),e.qrcodeShow());case 5:case"end":return t.stop()}}),t)}))),3e3)},qrcodeShow:function(){var e=this,t=[];this.filmDes.ticketCode.forEach(function(){var r=s(n.default.mark((function r(a){var o;return n.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(1!=a.type){r.next=5;break}return r.next=3,e.qrcodeGenerate(a.code);case 3:o=r.sent,t.push({qrcode:o,code:a.code});case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()),this.$set(this.filmDes,"qrcode",t)},qrcodeGenerate:function(t){return s(n.default.mark((function r(){var a;return n.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i.default.toString(t,{margin:0,errorCorrectionLevel:"H"});case 2:return a=r.sent,r.abrupt("return","data:image/svg+xml;base64,"+e(a).toString("base64"));case 4:case"end":return r.stop()}}),r)})))()}},beforeDestroy:function(){clearInterval(this.pollingTiemId)}};t.default=d}).call(this,r("b639").Buffer)},"5eaf":function(e,t,r){"use strict";(function(e){r("63d7");n(r("66fd"));var t=n(r("2ce5"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,r("543d")["createPage"])},a140:function(e,t,r){"use strict";var n;r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement,r=(e._self._c,2==e.ticketType&&e.orderDes.orderDataJson.filmMcpData?e.orderDes.orderDataJson.filmMcpData.ticket.slice(4):null);e.$mp.data=Object.assign({},{$root:{g0:r}})},o=[]},d46f:function(e,t,r){"use strict";var n=r("1316"),a=r.n(n);a.a},e70d:function(e,t,r){"use strict";r.r(t);var n=r("588c"),a=r.n(n);for(var o in n)"default"!==o&&function(e){r.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a}},[["5eaf","common/runtime","common/vendor"]]]);