activeDetail.466efe8a.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["activeDetail"],{"4f93":function(t,e,n){},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",s="week",a="month",u="quarter",o="year",c=/^(\d{4})-?(\d{1,2})?-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,v=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+l(r,2,"0")+":"+l(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),i=e-r<0,s=t.clone().add(n+(i?-1:1),a);return Number(-(n+(e-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:a,y:o,w:s,d:i,D:"date",h:r,m:n,s:e,ms:t,Q:u}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",d={};d[h]=f;var m=function(t){return t instanceof g},_=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)d[t]&&(r=t),e&&(d[t]=e,r=t);else{var i=t.name;d[i]=t,r=i}return!n&&r&&(h=r),r||!n&&h},y=function(t,e){if(m(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new g(n)},$=p;$.l=_,$.i=m,$.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var g=function(){function l(t){this.$L=this.$L||_(t.locale,null,!0),this.parse(t)}var p=l.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if($.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(c);if(r){var i=r[2]-1||0;return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return $},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<y(t)},p.$g=function(t,e,n){return $.u(t)?this[e]:this.set(n,t)},p.year=function(t){return this.$g(t,"$y",o)},p.month=function(t){return this.$g(t,"$M",a)},p.day=function(t){return this.$g(t,"$W",i)},p.date=function(t){return this.$g(t,"$D","date")},p.hour=function(t){return this.$g(t,"$H",r)},p.minute=function(t){return this.$g(t,"$m",n)},p.second=function(t){return this.$g(t,"$s",e)},p.millisecond=function(e){return this.$g(e,"$ms",t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,u){var c=this,v=!!$.u(u)||u,l=$.p(t),p=function(t,e){var n=$.w(c.$u?Date.UTC(c.$y,e,t):new Date(c.$y,e,t),c);return v?n:n.endOf(i)},f=function(t,e){return $.w(c.toDate()[t].apply(c.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(e)),c)},h=this.$W,d=this.$M,m=this.$D,_="set"+(this.$u?"UTC":"");switch(l){case o:return v?p(1,0):p(31,11);case a:return v?p(1,d):p(0,d+1);case s:var y=this.$locale().weekStart||0,g=(h<y?h+7:h)-y;return p(v?m-g:m+(6-g),d);case i:case"date":return f(_+"Hours",0);case r:return f(_+"Minutes",1);case n:return f(_+"Seconds",2);case e:return f(_+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(s,u){var c,v=$.p(s),l="set"+(this.$u?"UTC":""),p=(c={},c[i]=l+"Date",c.date=l+"Date",c[a]=l+"Month",c[o]=l+"FullYear",c[r]=l+"Hours",c[n]=l+"Minutes",c[e]=l+"Seconds",c[t]=l+"Milliseconds",c)[v],f=v===i?this.$D+(u-this.$W):u;if(v===a||v===o){var h=this.clone().set("date",1);h.$d[p](f),h.init(),this.$d=h.set("date",Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[$.p(t)]()},p.add=function(t,u){var c,v=this;t=Number(t);var l=$.p(u),p=function(e){var n=y(v);return $.w(n.date(n.date()+Math.round(e*t)),v)};if(l===a)return this.set(a,this.$M+t);if(l===o)return this.set(o,this.$y+t);if(l===i)return p(1);if(l===s)return p(7);var f=(c={},c[n]=6e4,c[r]=36e5,c[e]=1e3,c)[l]||1,h=this.$d.getTime()+t*f;return $.w(h,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=$.z(this),i=this.$locale(),s=this.$H,a=this.$m,u=this.$M,o=i.weekdays,c=i.months,l=function(t,r,i,s){return t&&(t[r]||t(e,n))||i[r].substr(0,s)},p=function(t){return $.s(s%12||12,t,"0")},f=i.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:$.s(u+1,2,"0"),MMM:l(i.monthsShort,u,c,3),MMMM:l(c,u),D:this.$D,DD:$.s(this.$D,2,"0"),d:String(this.$W),dd:l(i.weekdaysMin,this.$W,o,2),ddd:l(i.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:$.s(s,2,"0"),h:p(1),hh:p(2),a:f(s,a,!0),A:f(s,a,!1),m:String(a),mm:$.s(a,2,"0"),s:String(this.$s),ss:$.s(this.$s,2,"0"),SSS:$.s(this.$ms,3,"0"),Z:r};return n.replace(v,function(t,e){return e||h[t]||r.replace(":","")})},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(t,c,v){var l,p=$.p(c),f=y(t),h=6e4*(f.utcOffset()-this.utcOffset()),d=this-f,m=$.m(this,f);return m=(l={},l[o]=m/12,l[a]=m,l[u]=m/3,l[s]=(d-h)/6048e5,l[i]=(d-h)/864e5,l[r]=d/36e5,l[n]=d/6e4,l[e]=d/1e3,l)[p]||d,v?m:$.a(m)},p.daysInMonth=function(){return this.endOf(a).$D},p.$locale=function(){return d[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=_(t,e,!0);return r&&(n.$L=r),n},p.clone=function(){return $.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},l}();return y.prototype=g.prototype,y.extend=function(t,e){return t(e,g,y),y},y.locale=_,y.isDayjs=m,y.unix=function(t){return y(1e3*t)},y.en=d[h],y.Ls=d,y})},"7cb7":function(t,e,n){"use strict";var r=n("4f93"),i=n.n(r);i.a},"821d":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"activeDetail"},[t.vipGroup.name?n("van-cell-group",{staticClass:"van-cell-group--inset"},[n("van-cell",{staticClass:"titleContent",attrs:{title:t.vipGroup.name,"title-class":"titleStyle","label-class":"labelStyle"},scopedSlots:t._u([{key:"label",fn:function(){return[n("p",[t._v(t._s(t.vipGroup.description))])]},proxy:!0}],null,!1,3621255433)})],1):t._e(),n("h2",{staticClass:"van-block__title"},[t._v("详细规则")]),n("van-row",{staticClass:"active-row"},[n("van-col",{attrs:{span:"10"}},[t._v("排课时间范围")]),t.vipGroup.coursesStartTime&&t.vipGroup.coursesEndTime?n("van-col",{attrs:{span:"14"}},[t._v(t._s(t.vipGroup.coursesStartTime)+" 至 "+t._s(t.vipGroup.coursesEndTime))]):n("van-col",{attrs:{span:"14"}},[t._v("--")]),n("van-col",{attrs:{span:"10"}},[t._v("是否扣减课程余额")]),n("van-col",{attrs:{span:"14"}},[t._v(t._s(t.vipGroup.payToBalance?"是":"否"))])],1),n("h2",{staticClass:"van-block__title"},[t._v("付费课程")]),n("div",{staticClass:"active-row"},[n("van-row",[n("van-col",{attrs:{span:"8"}},[t._v("课程类型")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t._f("coursesType")(t.vipGroup.courseType))+" ")]),"VIP"==t.vipGroup.courseType?n("van-col",{attrs:{span:"8"}},[t._v("课程形式")]):t._e(),"VIP"==t.vipGroup.courseType?n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.vipGroupCategoryNames)+" ")]):t._e(),n("van-col",{attrs:{span:"8"}},[t._v("上课模式")]),"PRACTICE"==t.vipGroup.courseType?n("van-col",{attrs:{span:"16"}},[t._v("线上 ")]):n("van-col",{attrs:{span:"16"}},[t._v(t._s(t._f("formatTeachModel")(t.vipGroup.giveTeachMode))+" ")]),n("van-col",{attrs:{span:"8"}},[t._v("单课时时长")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.singleCourseTime)+"分钟")]),n("van-col",{attrs:{span:"8"}},[t._v("课时数")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.avgCourseNum)+" ")])],1),n("van-cell",{staticClass:"teaching",attrs:{"is-link":"",clickable:!1},scopedSlots:t._u([{key:"title",fn:function(){return[t._v("\n 剩余 "),n("span",{staticStyle:{color:"#01C1B5"}},[t._v("\n "+t._s("VIP"==t.vipGroup.courseType?t.vipDetail.vipNum:null)+"\n "+t._s("PRACTICE"==t.vipGroup.courseType?t.vipDetail.practiceNum:null)+"\n ")]),t._v(" 名学员未排课\n ")]},proxy:!0},{key:"default",fn:function(){return["VIP"==t.vipGroup.courseType&&t.vipDetail.vipNum||"PRACTICE"==t.vipGroup.courseType&&t.vipDetail.practiceNum?n("span",{staticStyle:{color:"#01C1B5"},on:{click:function(e){return t.onProgram("pay")}}},[t._v("立即排课")]):n("span",{staticStyle:{color:"#c0c0c0"}},[t._v("立即排课")])]},proxy:!0}])})],1),t.vipGroup.giveCourseType&&t.vipGroup.giveCourseNum>0&&"MEMBER"!=t.vipGroup.giveCourseType?[n("h2",{staticClass:"van-block__title"},[t._v("赠送课程")]),n("div",{staticClass:"active-row"},[n("van-row",[n("van-col",{attrs:{span:"8"}},[t._v("课程类型")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t._f("coursesType")(t.vipGroup.giveCourseType))+" ")]),"VIP"==t.vipGroup.giveCourseType?n("van-col",{attrs:{span:"8"}},[t._v("课程形式")]):t._e(),"VIP"==t.vipGroup.giveCourseType?n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.giveCategoryName)+" ")]):t._e(),n("van-col",{attrs:{span:"8"}},[t._v("上课模式")]),"PRACTICE"==t.vipGroup.giveCourseType?n("van-col",{attrs:{span:"16"}},[t._v("线上 ")]):n("van-col",{attrs:{span:"16"}},[t._v(t._s(t._f("formatTeachModel")(t.vipGroup.giveTeachMode))+" ")]),n("van-col",{attrs:{span:"8"}},[t._v("单课时时长")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.giveSingleCourseTime)+"分钟")]),n("van-col",{attrs:{span:"8"}},[t._v("课时数")]),n("van-col",{attrs:{span:"16"}},[t._v(t._s(t.vipGroup.giveCourseNum)+"课时")])],1),n("van-cell",{staticClass:"teaching",attrs:{"is-link":"",clickable:!1},scopedSlots:t._u([{key:"title",fn:function(){return[t._v("\n 剩余 "),n("span",{staticStyle:{color:"#01C1B5"}},[t._v("\n "+t._s("VIP"==t.vipGroup.giveCourseType?t.vipDetail.giveVipNum:null)+"\n "+t._s("PRACTICE"==t.vipGroup.giveCourseType?t.vipDetail.givePracticeNum:null)+"\n ")]),t._v(" 名学员未排课\n ")]},proxy:!0},{key:"default",fn:function(){return["VIP"==t.vipGroup.giveCourseType&&t.vipDetail.giveVipNum||"PRACTICE"==t.vipGroup.giveCourseType&&t.vipDetail.givePracticeNum?n("span",{staticStyle:{color:"#01C1B5"},on:{click:function(e){return t.onProgram("give")}}},[t._v("立即排课")]):n("span",{staticStyle:{color:"#c0c0c0"}},[t._v("立即排课")])]},proxy:!0}],null,!1,785294055)})],1)]:t._e()],2)},i=[],s=n("a34a"),a=n.n(s),u=n("ef13"),o=n("d678"),c=n("5a0c"),v=n.n(c);function l(t,e,n,r,i,s,a){try{var u=t[s](a),o=u.value}catch(c){return void n(c)}u.done?e(o):Promise.resolve(o).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(t){l(s,r,i,a,u,"next",t)}function u(t){l(s,r,i,a,u,"throw",t)}a(void 0)})}}var f={components:{MEmpty:o["a"]},data:function(){var t=this.$route.query;return{activityId:t.activityId,vipDetail:{},vipGroup:{}}},mounted:function(){document.title="活动详情",this.__init()},methods:{__init:function(){var t=p(a.a.mark(function t(){var e,n;return a.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(u["d"])({activityId:this.activityId});case 3:e=t.sent,this.vipDetail=e.data,n=e.data.vipGroupActivity,n.coursesStartTime=n.coursesStartTime?v()(n.coursesStartTime).format("YYYY-MM-DD"):null,n.coursesEndTime=n.coursesEndTime?v()(n.coursesEndTime).format("YYYY-MM-DD"):null,n.minCourseNum>0?n.minCourseNum!=n.maxCourseNum?n.avgCourseNum=n.minCourseNum+"课时 ~ "+n.maxCourseNum+"课时":n.avgCourseNum=n.maxCourseNum+"课时":n.avgCourseNum="自定义",this.vipGroup=n,t.next=14;break;case 12:t.prev=12,t.t0=t["catch"](0);case 14:case"end":return t.stop()}},t,this,[[0,12]])}));function e(){return t.apply(this,arguments)}return e}(),onProgram:function(t){this.$router.push({path:"/program",query:{activityId:this.activityId,type:t}})}},filters:{formatTeachModel:function(t){return-1===t?"线上,线下":0===t?"线上":1===t?"线下":void 0}}},h=f,d=(n("7cb7"),n("2877")),m=Object(d["a"])(h,r,i,!1,null,"6cd9fc48",null);e["default"]=m.exports}}]);