| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4884"],{"+h1d":function(t,e,a){"use strict";var s={components:{video_course:a("bmyc").a},props:{defaultActive:{type:String,default:""},slideName:{type:String,default:""},slideBottomName:{type:String,default:""},top_style:{type:String,default:""}},data:function(){return{search:{}}},mounted:function(){},methods:{}},n=(a("sxda"),a("KHd+")),i=Object(n.a)(s,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"all"},[a("video_course",{attrs:{defaultActive:t.defaultActive}}),t._v(" "),a("div",{staticStyle:{width:"calc(100% - 150px)"},attrs:{id:"app"}},[t._t("top-other"),t._v(" "),a("div",{staticClass:"top-pane",style:t.top_style},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),t._v(" "),a("div",{staticClass:"vue-main-title-content"},[t._v(t._s(t.slideName))]),t._v(" "),t._t("top")],2),t._v(" "),a("div",{staticClass:"vue-search"},[t._t("content")],2)]),t._v(" "),t.slideBottomName?a("div",{staticClass:"table-pane"},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),t._v(" "),a("div",{staticClass:"vue-main-title-content"},[t._v(t._s(t.slideBottomName))])]),t._v(" "),a("div",{staticClass:"vue-search"},[t._t("content-bottom")],2)]):t._e(),t._v(" "),t.slideBottomName?a("div",{staticClass:"vue-page"},[t._t("vue-page")],2):t._e(),t._v(" "),t._t("bottom-other")],2)],1)},[],!1,null,"121101e6",null);i.options.__file="slide_cpm.vue";e.a=i.exports},"3M4J":function(t,e,a){"use strict";function s(){for(var t=new Date,e=[],a=1;a<13;a++)for(var s=new Date(t.getFullYear(),a,0).getDate(),n=1;n<s+1;n++){var i=[];i[0]=n+"日",i[1]=a+"月",i[2]=0,e.push(i)}return e.length}function n(t){var e={};return t.reduce(function(t,a){return!e[a.id]&&(e[a.id]=t.push(a)),t},[])}a.d(e,"b",function(){return s}),a.d(e,"a",function(){return n})},E4ZW:function(t,e,a){},EzgT:function(t,e,a){},O7Sl:function(t,e,a){"use strict";var s=a("3M4J"),n={data:function(){return{times:[],timeType:0,days_of_last_year:365}},mounted:function(){this.days_of_last_year=Object(s.b)(),console.log(this.days_of_last_year,"days_of_last_year",Object(s.b)()),this.switchSearchTime(5)},methods:{pickerChangeFn:function(t){console.log(t,"eventevent"),t||(this.timeType=0)},getStartEndTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=864e5*t,a=new Date((new Date).setHours(0,0,0,0)).getTime(),s=new Date((new Date).setHours(23,59,59,999)).getTime(),n=s-e;return[parseInt(a-e),parseInt(t>1?s:n)]},switchSearchTime:function(t){var e=void 0;switch(t){case 1:e=this.getStartEndTime(0);break;case 2:e=this.getStartEndTime(1);break;case 3:e=this.getStartEndTime(7);break;case 4:e=this.getStartEndTime(30);break;case 5:e=this.getStartEndTime(this.days_of_last_year)}this.times=e,this.timeType==t?(this.timeType=0,this.times=[]):this.timeType=t}}},i=(a("aZbm"),a("KHd+")),r=Object(i.a)(n,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Header",{staticClass:"time-list"},[a("el-date-picker",{attrs:{"value-format":"timestamp",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.pickerChangeFn},model:{value:t.times,callback:function(e){t.times=e},expression:"times"}}),t._v(" "),a("el-button",{class:1==t.timeType?"button-color left-gap":"active-colors left-gap",attrs:{type:"success",plain:""},on:{click:function(e){t.switchSearchTime(1)}}},[t._v("今")]),t._v(" "),a("el-button",{class:2==t.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(e){t.switchSearchTime(2)}}},[t._v("昨")]),t._v(" "),a("el-button",{class:3==t.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(e){t.switchSearchTime(3)}}},[t._v("近7天")]),t._v(" "),a("el-button",{class:4==t.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(e){t.switchSearchTime(4)}}},[t._v("近30天")]),t._v(" "),a("el-button",{class:5==t.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(e){t.switchSearchTime(5)}}},[t._v("近1年")])],1)},[],!1,null,"40c25990",null);r.options.__file="time_card.vue";e.a=r.exports},aZbm:function(t,e,a){"use strict";var s=a("EzgT");a.n(s).a},msvP:function(t,e,a){"use strict";a.r(e);var s=a("14Xm"),n=a.n(s),i=a("QbLZ"),r=a.n(i),c=a("D3Ub"),o=a.n(c),l=a("+h1d"),u=a("O7Sl"),d={components:{slide_cpm:l.a,time_card:u.a},data:function(){return{search:{},statusOptions:[{value:"1",label:"启用"},{value:"0",label:"禁用"}],tableData:[],current_page:1,total:0,per_page:1}},mounted:function(){this.getCourseList(1)},methods:{getCourseList:function(t){var e=this;return o()(n.a.mark(function a(){var s,i,c,o;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/wechatVideoCourses/getCourseList",{search:r()({},e.search,{date:[e.$refs.time_card.times?parseInt(e.$refs.time_card.times[0]/1e3):"",e.$refs.time_card.times?parseInt(e.$refs.time_card.times[1]/1e3):""]}),page:t});case 2:s=a.sent,i=s.data,c=s.result,o=s.msg,c?(e.tableData=i.courses_list.data,e.total=i.courses_list.total,e.current_page=i.courses_list.current_page,e.per_page=i.courses_list.per_page):e.$message.error(o);case 7:case"end":return a.stop()}},a,e)}))()},changeSwitch:function(t,e){var a=this;return o()(n.a.mark(function t(){var s,i,r;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$http.pc_post("plugin/wechatVideoCourses/saveCourse",{change_status:1,courses_id:e});case 2:s=t.sent,s.data,i=s.result,r=s.msg,i?a.$message.success(r):a.$message.error(r);case 7:case"end":return t.stop()}},t,a)}))()},editCourse:function(t){this.$router.push(this.fun.getUrl("videoAddCourses",{id:t},{}))},checkRecord:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$router.push(this.fun.getUrl("videoViewingRecord",{},{name:t}))}}},p=(a("t4wV"),a("KHd+")),m=Object(p.a)(d,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"video-course"},[a("slide_cpm",{attrs:{defaultActive:"videoCourseManagement",slideName:"课程管理",slideBottomName:"课程列表"}},[a("template",{slot:"top"},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus"},on:{click:function(e){t.editCourse(0)}}},[t._v("新增课程")])],1),t._v(" "),a("template",{slot:"content"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"课程名称"},model:{value:t.search.keyword,callback:function(e){t.$set(t.search,"keyword",e)},expression:"search.keyword"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择状态"},model:{value:t.search.status,callback:function(e){t.$set(t.search,"status",e)},expression:"search.status"}},t._l(t.statusOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1),t._v(" "),a("time_card",{ref:"time_card",attrs:{days_of_last_year:"365"}}),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{staticClass:"width-btn",attrs:{type:"primary"},on:{click:function(e){t.getCourseList(1)}}},[t._v("搜索")])],1)],1)],1),t._v(" "),a("template",{slot:"content-bottom"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"时间",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"课程名称",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"watch_member_count",label:"累计观看人数",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"累计播放次数",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{},[a("div",[t._v(t._s(e.row.watch_count))]),t._v(" "),a("div",{staticClass:"check-sty",on:{click:function(a){t.checkRecord(e.row.name)}}},[t._v("查看")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"reward_count",label:"累计发红包数量",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(a){t.changeSwitch(a,e.row.id)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-edit icon-sty",on:{click:function(a){t.editCourse(e.row.id)}}})]}}])})],1)],1),t._v(" "),a("template",{slot:"vue-page"},[a("el-row",[a("el-col",{attrs:{align:"right"}},[a("el-pagination",{attrs:{layout:"prev, pager, next,jumper",total:t.total,"page-size":t.per_page,"current-page":t.current_page,background:""},on:{"current-change":t.getCourseList}})],1)],1)],1)],2)],1)},[],!1,null,"1bbd27aa",null);m.options.__file="course_management.vue";e.default=m.exports},svs4:function(t,e,a){},sxda:function(t,e,a){"use strict";var s=a("E4ZW");a.n(s).a},t4wV:function(t,e,a){"use strict";var s=a("svs4");a.n(s).a}}]);
|