Account.7bb0ebc2.js 6.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Account"],{"0339":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"account"},[t.headerStatus?n("m-header"):t._e(),n("van-cell-group",{staticStyle:{"margin-bottom":".15rem"}},[n("van-cell",{attrs:{title:"剩余时间","value-class":"available"}},[n("i",{staticClass:"icon icon_times",attrs:{slot:"icon"},slot:"icon"}),n("div",{attrs:{slot:"default"},slot:"default"},[t._v("\n "+t._s(t._f("calcMinute")(t.availableMinutes))+"\n ")])])],1),n("van-cell-group",[n("van-cell",{attrs:{title:"兑换记录","is-link":"",to:"exchangeRecord"}},[n("i",{staticClass:"icon icon_record",attrs:{slot:"icon"},slot:"icon"})]),n("van-cell",{attrs:{title:"课时使用记录","is-link":"",to:"periodRecord"}},[n("i",{staticClass:"icon icon_use",attrs:{slot:"icon"},slot:"icon"})])],1)],1)},i=[],r=n("6e6e"),o=n("ff51"),s=n("b562"),c={name:"courseApply",components:{MHeader:r["a"]},data:function(){return{headerStatus:!0,availableMinutes:0,frozenMinutes:0}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="我的账户",(Object(o["b"])().android||Object(o["b"])().iPhone)&&(this.headerStatus=!1),this.__init()},methods:{__init:function(){var t=this;this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(s["p"])().then(function(e){var n=e.data;if(t.$toast.clear(),200==n.code){var a=n.data;a&&(t.availableMinutes=a.availableMinutes?a.availableMinutes:0)}else t.$toast(n.msg)})}}},u=c,l=(n("cce4"),n("2877")),f=Object(l["a"])(u,a,i,!1,null,"00724f46",null);e["default"]=f.exports},2407:function(t,e,n){},"38f0":function(t,e,n){"use strict";var a=n("5b7e"),i=n.n(a);i.a},"5b7e":function(t,e,n){},"6e6e":function(t,e,n){"use strict";var a=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",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},i=[],r=n("a34a"),o=n.n(r),s=n("ddf4");function c(t,e,n,a,i,r,o){try{var s=t[r](o),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(a,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(a,i){var r=t.apply(e,n);function o(t){c(r,a,i,o,s,"next",t)}function s(t){c(r,a,i,o,s,"throw",t)}o(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(s["b"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=u(o.a.mark(function t(){var e,n,a=this;return o.a.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(s["b"])({api:"getNavHeight"},function(t){var e=t.content,n={},i=e.dpi||2;if(e.navHeight){var r=e.navHeight/i;sessionStorage.setItem("navHeight",r),a.navBarHeight=r,n={paddingTop:r+"px"}}if(e.titleHeight){var o=e.titleHeight/i;sessionStorage.setItem("titleHeight",o),a.titleHeight=o,n.height=o+"px",n.lineHeight=o+"px"}a.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(s["b"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},f=l,d=(n("38f0"),n("2877")),h=Object(d["a"])(f,a,i,!1,null,"6a74717c",null);e["a"]=h.exports},cce4:function(t,e,n){"use strict";var a=n("2407"),i=n.n(a);i.a},ddf4:function(t,e,n){"use strict";n.d(e,"b",function(){return d}),n.d(e,"a",function(){return h});var a=n("ff51");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,a)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(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){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)}var c=function(){},u={},l=Object(a["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===s(t.data)?t.data:JSON.parse(t.data):{},n=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(v){}if(!n){var a=Object.keys(u).filter(function(t){return 0===t.indexOf(e.api)}),i=!0,r=!1,o=void 0;try{for(var l,f=a[Symbol.iterator]();!(i=(l=f.next()).done);i=!0){var d=l.value,h=u[d]||c;h(e)}}catch(b){r=!0,o=b}finally{try{i||null==f.return||f.return()}finally{if(r)throw o}}return}var p=u[e.content.uuid||e.uuid||e.api+e.uuid]||c;p(e)}catch(v){console.error("通信消息解析错误",v)}});var f=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,d=function(t,e){if(l.isApp){var n=Object(a["g"])();u[n]=e||c,t.content=t.content?r({},t.content,{uuid:n}):{uuid:n},f.postMessage(JSON.stringify(t))}},h=function(t,e){if(l.isApp){var n=t+Object(a["g"])();u[n]=e||c}}}}]);