PeriodExchange.4e459070.js 7.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["PeriodExchange"],{"1e7e":function(t,e,n){"use strict";var a=n("b7a4"),r=n.n(a);r.a},3354:function(t,e,n){},5115:function(t,e,n){"use strict";var a=n("3354"),r=n.n(a);r.a},"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"},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[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)])])},r=[],o={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{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)}}},i=o,u=(n("5115"),n("2877")),s=Object(u["a"])(i,a,r,!1,null,"61d0e2e4",null);e["a"]=s.exports},9084:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"periodExchange"},[t.headerStatus?a("m-header"):t._e(),a("van-cell-group",[a("van-cell",{attrs:{center:!0}},[a("template",{slot:"icon"},[t.userInfo.avatar?a("img",{staticClass:"logo",attrs:{src:t.userInfo.avatar,alt:""}}):a("img",{staticClass:"logo",attrs:{src:n("f9b5"),alt:""}})]),a("template",{slot:"title"},[a("p",{staticClass:"exchangeText"},[t._v(t._s(t.userInfo.realName))])]),a("template",{slot:"label"},[a("p",{staticClass:"info"},[t._v("剩余时长:"+t._s(t.availableMinutes))])])],2)],1),a("div",{staticClass:"activeList"},[a("h2",[t._v("优惠活动:")]),t._l(t.dataList,function(e,n){return a("div",{key:n,staticClass:"active",on:{click:function(n){return t.onPayOrder(e)}}},[t.imageStatus?a("van-icon",{staticClass:"icon_question",attrs:{name:"question-o"},on:{click:function(n){return n.stopPropagation(),t.onMore(e)}}}):t._e(),a("van-image",{attrs:{src:e.coverImg},on:{load:t.onImageLoad},scopedSlots:t._u([{key:"loading",fn:function(){return[a("van-loading",{attrs:{type:"spinner",size:"20"}})]},proxy:!0}],null,!0)})],1)})],2),a("van-popup",{style:{minHeight:"30%",maxHeight:"60%"},attrs:{closeable:"",position:"bottom"},model:{value:t.popupShow,callback:function(e){t.popupShow=e},expression:"popupShow"}},[a("div",{staticClass:"popupContent",domProps:{innerHTML:t._s(t.popupContent)}})])],1)},r=[],o=n("a34a"),i=n.n(o),u=n("6e6e"),s=n("ff51"),c=n("b562");function l(t,e,n,a,r,o,i){try{var u=t[o](i),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).then(a,r)}function d(t){return function(){var e=this,n=arguments;return new Promise(function(a,r){var o=t.apply(e,n);function i(t){l(o,a,r,i,u,"next",t)}function u(t){l(o,a,r,i,u,"throw",t)}i(void 0)})}}var p={name:"courseApply",components:{MHeader:u["a"]},data:function(){return{userInfo:{},availableMinutes:0,headerStatus:!0,result:{},dataList:[],isClick:!1,popupShow:!1,popupContent:null,imageStatus:!1}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="课时兑换",(Object(s["a"])().android||Object(s["a"])().iPhone)&&(this.headerStatus=!1),this.__init()},methods:{__init:function(){var t=d(i.a.mark(function t(){var e,n=this;return i.a.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["l"])().then(function(t){var e=t.data;e&&(n.userInfo=e)});case 4:return t.next=6,Object(c["o"])().then(function(t){var a=t.data;if(200==a.code){var r=a.data;r&&(n.availableMinutes=Object(s["b"])(r.availableMinutes?r.availableMinutes:0))}else e=!1,n.$toast(a.msg)});case 6:return t.next=8,Object(c["q"])().then(function(t){var a=t.data;200==a.code?n.dataList=a.data.rows:(e=!1,n.$toast(a.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}(),onImageLoad:function(){this.imageStatus=!0},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 n=t.data;e.$toast.clear(),e.isClick=!1,200==n.code?(e.result=n.data,e.onSubmit()):e.$toast(n.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}}},f=p,m=(n("1e7e"),n("2877")),h=Object(m["a"])(f,a,r,!1,null,"602d58ae",null);e["default"]=h.exports},a34a:function(t,e,n){t.exports=n("96cf")},b562:function(t,e,n){"use strict";n.d(e,"m",function(){return u}),n.d(e,"n",function(){return s}),n.d(e,"e",function(){return l}),n.d(e,"b",function(){return d}),n.d(e,"c",function(){return p}),n.d(e,"o",function(){return f}),n.d(e,"j",function(){return m}),n.d(e,"g",function(){return b}),n.d(e,"h",function(){return C}),n.d(e,"p",function(){return h}),n.d(e,"q",function(){return v}),n.d(e,"l",function(){return S}),n.d(e,"d",function(){return g}),n.d(e,"i",function(){return y}),n.d(e,"f",function(){return _}),n.d(e,"a",function(){return k}),n.d(e,"k",function(){return c});var a=n("4328"),r=n.n(a),o=n("981f").default,i="/api-teacher",u=function(t){return o({url:"/api-student/code/sendSms",method:"post",data:r.a.stringify(t)})},s=function(t){return o({url:"/api-auth/smsLogin",method:"post",data:r.a.stringify(t)})},c=function(t){return o({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:t})},l=function(t){return o({url:"/api-student/courseGroup/getGroupDetail",method:"get",params:t})},d=function(t){return o({url:"/api-student/courseGroup/buyCourseGroup",method:"post",data:r.a.stringify(t)})},p=function(t){return o({url:i+"/courseGroup/createCourseGroup",method:"post",data:t})},f=function(t){return o({url:i+"/sysTenantAccount/get",method:"get",params:t})},m=function(t){return o({url:i+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:t})},h=function(t){return o({url:i+"/teacherCourseSchedule/teacherCourseMinutes",method:"get",params:t})},v=function(t){return o({url:i+"/tenantEntryActivities/queryPage",method:"get",params:t})},g=function(t){return o({url:i+"/tenantPaymentOrder/createOrder",method:"post",data:r.a.stringify(t)})},y=function(t){return o({url:i+"/teacherOrder/queryByOrderNo",method:"get",params:t})},b=function(t){return o({url:"/api-cms/helpCenterCatalog/list",method:"get",params:t})},C=function(t){return o({url:"/api-cms/helpCenterContent/list",method:"get",params:t})},S=function(t){return o({url:"/api-auth/queryUserInfo",method:"get",params:t})},_=function(t){return o({url:i+"/courseReview/getStuAndTeaReview",method:"get",params:t})},k=function(t){return o({url:i+"/courseReview/batchAdd",method:"post",data:t})}},b7a4:function(t,e,n){},f9b5:function(t,e,n){t.exports=n.p+"img/icon_teacher.de517191.png"}}]);