(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PeriodExchange"],{"1cef":function(t,e,a){"use strict";var n=a("b44c"),o=a.n(n);o.a},9084:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"periodExchange"},[t.headerStatus?n("m-header"):t._e(),n("van-cell-group",[n("van-cell",{attrs:{center:!0}},[n("template",{slot:"icon"},[t.userInfo.avatar?n("img",{staticClass:"logo",attrs:{src:t.userInfo.avatar,alt:""}}):n("img",{staticClass:"logo",attrs:{src:a("f9b5"),alt:""}})]),n("template",{slot:"title"},[n("p",{staticClass:"exchangeText"},[t._v(t._s(t.userInfo.realName))])]),n("template",{slot:"label"},[n("p",{staticClass:"info"},[t._v("剩余时长："+t._s(t.availableMinutes))])])],2)],1),n("div",{staticClass:"activeList"},t._l(t.dataList,function(e,a){return n("div",{key:a,staticClass:"active",on:{click:function(a){return t.onPayOrder(e)}}},[n("van-icon",{staticClass:"icon_question",attrs:{name:"question-o"},on:{click:function(a){return a.stopPropagation(),t.onMore(e)}}}),n("img",{attrs:{src:e.coverImg,alt:""}})],1)}),0),n("van-popup",{style:{minHeight:"30%",maxHeight:"60%"},attrs:{closeable:"",position:"bottom"},model:{value:t.popupShow,callback:function(e){t.popupShow=e},expression:"popupShow"}},[n("div",{staticClass:"popupContent",domProps:{innerHTML:t._s(t.popupContent)}})])],1)},o=[],i=(a("96cf"),a("3b8d")),s=a("6e6e"),r=a("ff51"),c=a("b562"),u={name:"courseApply",components:{MHeader:s["a"]},data:function(){return{userInfo:{},availableMinutes:0,headerStatus:!0,result:{},dataList:[],isClick:!1,popupShow:!1,popupContent:null}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="课时兑换",(Object(r["a"])().android||Object(r["a"])().iPhone)&&(this.headerStatus=!1),this.__init()},methods:{__init:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(){var e,a=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e=!0,this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),t.next=4,Object(c["k"])().then(function(t){var e=t.data;e&&(a.userInfo=e)});case 4:return t.next=6,Object(c["n"])().then(function(t){var n=t.data;if(200==n.code){var o=n.data;o&&(a.availableMinutes=Object(r["b"])(o.availableMinutes?o.availableMinutes:0))}else e=!1,a.$toast(n.msg)});case 6:return t.next=8,Object(c["p"])().then(function(t){var n=t.data;200==n.code?a.dataList=n.data.rows:(e=!1,a.$toast(n.msg))});case 8:e&&this.$toast.clear();case 9:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),onPayOrder:function(t){var e=this;this.isClick||(this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),this.isClick=!0,Object(c["d"])({activitiesId:t.id}).then(function(t){var a=t.data;e.$toast.clear(),e.isClick=!1,200==a.code?(e.result=a.data,e.onSubmit()):e.$toast(a.msg)}))},onSubmit:function(){var t=this.result,e=t.payMap;document.querySelector("#onSubmit").action=e.host,document.querySelector("#apiContent").value=e.apiContent,document.querySelector("#merNo").value=e.merNo,document.querySelector("#notifyUrl").value=e.notifyUrl,document.querySelector("#sign").value=e.sign,document.querySelector("#signType").value=e.signType,document.querySelector("#timestamp").value=e.timestamp,document.querySelector("#version").value=e.version,document.querySelector("#onSubmit").submit()},onMore:function(t){this.popupContent=t.detail,this.popupShow=!0}}},l=u,p=(a("1cef"),a("2877")),d=Object(p["a"])(l,n,o,!1,null,"744c3b4c",null);e["default"]=d.exports},b44c:function(t,e,a){},f9b5:function(t,e,a){t.exports=a.p+"img/icon_teacher.de517191.png"}}]);