1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e3e134f"],{"1a46":function(t,e,a){var i=a("7950");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("782fce7a",i,!0,{sourceMap:!1,shadowMode:!1})},"386d":function(t,e,a){"use strict";a("c007")},"42e2":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".p-6[data-v-3d93c4d7]{padding-bottom:.375rem}.pl[data-v-3d93c4d7]{white-space:nowrap}.ell[data-v-3d93c4d7],.pl[data-v-3d93c4d7]{overflow:hidden;text-overflow:ellipsis}.ell[data-v-3d93c4d7]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.goods-item .img[data-v-3d93c4d7]{position:relative}.goods-item .img img[data-v-3d93c4d7]{width:100%;height:6rem;border-radius:.625rem .625rem 0 0;display:block}.goods-item .img .img-tag[data-v-3d93c4d7]{color:#fff;font-size:.75rem;line-height:.75rem;left:0;bottom:0;position:absolute;padding:.25rem .375rem;border-radius:0 .375rem 0 0;background-color:rgba(0,0,0,.7)}.goods-item .goods-desc[data-v-3d93c4d7]{padding:.5rem .4375rem .75rem .4375rem}.goods-item .goods-desc h3[data-v-3d93c4d7]{font-size:.9375rem;line-height:1.125rem;font-weight:500;color:#00001c;text-align:left}.goods-item .goods-desc p[data-v-3d93c4d7]{text-align:left;color:#6e6e79;font-size:.8125rem}",""]),t.exports=e},5830:function(t,e,a){var i=a("c827");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("4c7b995b",i,!0,{sourceMap:!1,shadowMode:!1})},"5c54":function(t,e,a){var i=a("42e2");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("0d556969",i,!0,{sourceMap:!1,shadowMode:!1})},"6fad":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,"",""]),t.exports=e},7854:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("van-search",{attrs:{placeholder:"搜索课程",shape:"round",disabled:""},on:{click:t.searchTo},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}}),a("div",{staticClass:"classify-content flex"},[a("div",{ref:"classifyArr",staticClass:"classify-left",staticStyle:{overflow:"hidden"}},[t.classify.length>1?a("div",{staticClass:"left-box"},t._l(t.classify,(function(e,i){return a("block",{key:i},[a("div",{class:t.classifyIndex===i?"on":"",on:{"!click":function(a){return t.classifyOnText(i,e.id,a)}}},[t._v(t._s(e.name))])])})),1):t._e()]),a("div",{ref:"handpickList",staticClass:"classify-main",staticStyle:{overflow:"hidden"}},[t.classifyList.length>0?a("div",{staticClass:"classify-box flex-j-sb"},[t._l(t.classifyList,(function(t,e){return a("block",{key:e,staticClass:"goods-item"},[a("goods-item",{attrs:{dataItem:t,index:e}})],1)})),a("span",{staticStyle:{display:"inline-block",width:"100%",height:"5rem"},attrs:{id:"loadMore"}})],2):a("van-empty",{attrs:{description:"暂无数据"}})],1)]),a("footer-tabbar",{directives:[{name:"show",rawName:"v-show",value:t.footerFlag,expression:"footerFlag"}]})],1)},o=[],n=a("2909"),s=a("5530"),r=(a("14d9"),a("ac1f"),a("841c"),a("99af"),a("a334")),c=a("97fa"),l=a("d76c"),d=a("ac0d"),f=a("1fba"),u={name:"",components:{goodsItem:r["a"],footerTabbar:c["a"]},mixins:[d["a"],l["a"]],data:function(){return{chatStrId:"",getConfig:{client:"work",type:17},active:2,value:"",storeScroll:"",classifyScroll:"",classifyIndex:0,classify:[{id:"",name:"全部"}],classifyList:[],isLoadMore:!0,total_page:0,query:{page:1,search:{keyword:"",category_id:""}},debounce_timer:0,classify_timer:0,clientFlag:"",footerFlag:!0}},computed:{},watch:{},methods:{debounce:function(){var t=this;this.debounce_timer&&clearTimeout(this.debounce_timer),this.debounce_timer=setTimeout((function(){t._initScrollList()}),800)},_initScrollList:function(){var t=this;this.classifyList.length>0?this.storeScroll=new f["a"](this.$refs.handpickList,{click:!0,scrollY:!0,probeType:3,swipeBounceTime:500,useTransition:!1,mouseWheel:!0}):this.storeScroll.refresh();var e=document.getElementById("loadMore");this.storeScroll.on("scroll",(function(a){e.offsetTop>t.$refs.handpickList.offsetHeight&&e.offsetTop+a.y<t.$refs.handpickList.offsetHeight&&t.isLoadMore&&(t.getMoreData(),setTimeout((function(){t.storeScroll.refresh()}),800))})),this.$once("hook:beforeDestroy",(function(){window.removeEventListener("scroll",t.storeScroll)}))},initData:function(){this.classify=[{id:"",name:"全部"}],this.storeScroll="",this.classifyList=[]},_initScrollClassify:function(){this.classify.length>0&&(this.classifyScroll=new f["a"](this.$refs.classifyArr,{click:!0,scrollY:!0,probeType:3,swipeBounceTime:500,useTransition:!1,mouseWheel:!0}))},searchTo:function(){this.$router.push(this.fun.getUrl("courseSearch",{},{}))},classifyOnText:function(t,e,a){var i=this;this.classify_timer&&clearTimeout(this.classify_timer),this.classify_timer=setTimeout((function(){i.query.page=1,i.classifyIndex=t,i.query.search.category_id=e,i.storeScroll&&i.storeScroll.scrollTo(0,0),i.getCoursesList()}),50)},contactsUid:function(){var t=this;wx.invoke("getCurExternalChat",{},(function(e){"getCurExternalChat:ok"==e.err_msg&&(t.chatStrId=e.chatId,t.getCategory(),t.getCoursesList(),window.localStorage.setItem("chat_id",e.chatId))}))},getCategory:function(){var t=this,e={};("work"===this.fun.getKey("client")||window.localStorage.getItem("client"))&&(e=Object(s["a"])(Object(s["a"])({},this.getConfig),{},{chat_str_id:this.chatStrId})),$http.post("plugin.wechat-video-courses.frontend.controller.manage.courses.get-category",e,"loading").then((function(e){if(1===e.result){var a=e.data,i=a.category_list,o=t.classify;t.classify=[].concat(Object(n["a"])(o),Object(n["a"])(i)),t.$nextTick((function(){t._initScrollClassify()}),50)}else t.$toast("getCategory error",e.msg)})).catch((function(t){}))},getCoursesList:function(){var t=this,e=this.query;("work"===this.fun.getKey("client")||window.localStorage.getItem("client"))&&(this.query=Object(s["a"])(Object(s["a"])(Object(s["a"])({},this.getConfig),e),{},{chat_str_id:this.chatStrId})),$http.post("plugin.wechat-video-courses.frontend.controller.manage.courses.index",this.query,"加载中..").then((function(e){if(1==e.result){var a=e.data,i=a.courses_list.data;t.isLoadMore=!0,t.total_page=a.courses_list.last_page,t.total_page||(t.query.page=0),t.classifyList=i,t.$nextTick((function(){t.debounce()}),50)}else t.query.page=t.query.page-1,t.isLoadMore=!1,t.$dialog.alert({message:e.msg})}))},getMoreData:function(){var t=this;this.isLoadMore=!1,this.query.page>=this.total_page||(this.query.page=this.query.page+1,$http.post("plugin.wechat-video-courses.frontend.controller.manage.courses.index",this.query,"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var a,i=null===(a=e.data.courses_list)||void 0===a?void 0:a.data;t.classifyList=[].concat(Object(n["a"])(t.classifyList),Object(n["a"])(i))}else t.query.page=t.query.page-1,t.isLoadMore=!1}),(function(t){})))}},created:function(){var t=this;this.appjsApiList=["getCurExternalChat","getCurExternalContact","getContext"],this.agentConfigUrl="plugin.wechat-video-courses.frontend.controller.config.index",this.clientFlag=window.localStorage.getItem("client"),("work"===this.fun.getKey("client")||window.localStorage.getItem("client"))&&(this.footerFlag=!1,this.appSignSuccess=function(){wx.invoke("getContext",{},(function(e){if("getContext:ok"==e.err_msg){var a=e.entry;"group_chat_tools"==a?t.contactsUid():wx.invoke("getCurExternalContact",{},(function(e){"getCurExternalContact:ok"==e.err_msg||t.$toast("获取当前外部联系人失败!")}))}}))})},mounted:function(){},beforeCreate:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){"work"===this.fun.getKey("client")&&window.localStorage.getItem("client")||(this.initData(),this.getCategory(),this.getCoursesList())}},g=u,h=g,p=(a("386d"),a("9fd1"),a("2877")),m=Object(p["a"])(h,i,o,!1,null,"7a9686d8",null);e["default"]=m.exports},7950:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".footer-tabbar[data-v-252c15dc] .van-tabbar{width:375px;margin:0 auto;right:50%;left:auto;margin-right:-187.5px}.iphoneXStyle[data-v-252c15dc] .van-tabbar{bottom:14px}",""]),t.exports=e},"8bd87":function(t,e,a){"use strict";a("9719")},9719:function(t,e,a){var i=a("b0cb");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("4d9aa34c",i,!0,{sourceMap:!1,shadowMode:!1})},"97fa":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"footer-tabbar"},[a("nav",{staticClass:"tabbar nav-class set-pc-style",class:[t.fun.isIphoneX()?"iphoneXStyle":""]},[a("router-link",{attrs:{to:t.fun.getUrl("courseMember")}},[a("div",{staticClass:"flex tabBar-box"},[a("div",{staticClass:"tabbar-icon iconfont icon-zb_zhiboing"}),a("div",[t._v("数据")])])]),a("router-link",{attrs:{to:t.fun.getUrl("groupMember")}},[a("div",{staticClass:"flex tabBar-box"},[a("div",{staticClass:"tabbar-icon iconfont icon-fontclass-huiyuanzhongxin"}),a("div",[t._v("群会员")])])]),a("router-link",{attrs:{to:t.fun.getUrl("classifyCourse")}},[a("div",{staticClass:"flex tabBar-box"},[a("div",{staticClass:"tabbar-icon iconfont icon-icon_dingdan_1"}),a("div",[t._v("课程")])])])],1)])},o=[],n={name:"",props:["active"],components:{},data:function(){return{}},computed:{},watch:{},methods:{},created:function(){},mounted:function(){},activated:function(){}},s=n,r=(a("9d743"),a("8bd87"),a("2877")),c=Object(r["a"])(s,i,o,!1,null,"252c15dc",null);e["a"]=c.exports},"9d743":function(t,e,a){"use strict";a("1a46")},"9fd1":function(t,e,a){"use strict";a("5830")},a334:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{on:{click:function(e){return t.goodsNav(t.dataItem.id)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:t.dataItem.img}}),a("div",{staticClass:"img-tag"},[t._v(t._s(t.dataItem.cycle)+"期")])]),a("div",{staticClass:"goods-desc"},[a("h3",{staticClass:"ell"},[t._v(t._s(t.dataItem.name))]),a("p",{staticClass:"p-6"}),a("p",{staticClass:"pl"},[t._v(t._s(t.dataItem.desc))])])])},o=[],n=(a("14d9"),{name:"",props:["dataItem","index"],components:{},data:function(){return{}},computed:{},watch:{},methods:{goodsNav:function(t){this.$router.push(this.fun.getUrl("videoDetails",{id:t},{}))}},created:function(){},mounted:function(){},activated:function(){}}),s=n,r=(a("efef"),a("2877")),c=Object(r["a"])(s,i,o,!1,null,"3d93c4d7",null);e["a"]=c.exports},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var i=document.documentElement,o=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&i.clientHeight?Math.min(o.clientHeight,i.clientHeight):Math.max(o.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(o.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},b0cb:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".tabbar[data-v-252c15dc]{display:grid;grid-template-columns:repeat(3,33.3%);-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:fixed;z-index:999;bottom:0;left:0;width:100%;height:3.4375rem;background:#fff;-webkit-box-shadow:0 -.125rem .25rem 0 hsla(0,0%,57.3%,.1);box-shadow:0 -.125rem .25rem 0 hsla(0,0%,57.3%,.1)}.tabbar .tabBar-box[data-v-252c15dc]{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.tabbar .tabbar-icon[data-v-252c15dc]{font-size:19px;vertical-align:sub;padding-bottom:4px}.tabbar .icon-fontclass-huiyuanzhongxin[data-v-252c15dc],.tabbar .icon-zb_zhiboing[data-v-252c15dc]{font-size:19px}.tabbar .icon-icon_dingdan_1[data-v-252c15dc]{font-size:1.1875rem}.tabbar a[data-v-252c15dc]{display:block;color:#6e6e79}.tabbar a.active[data-v-252c15dc]{color:#f15353}.tabbar-placeholder[data-v-252c15dc]{height:3.4375rem;background:transparent}.tabbar .circle-add[data-v-252c15dc]{font-size:2rem;color:#f15353}",""]),t.exports=e},c007:function(t,e,a){var i=a("6fad");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=a("499e").default;o("1353231a",i,!0,{sourceMap:!1,shadowMode:!1})},c827:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'.h-50[data-v-7a9686d8]{height:3.125rem;clear:both}.classify-content[data-v-7a9686d8]{margin:.8125rem 0 0 0;position:relative}.classify-content .classify-left[data-v-7a9686d8]{background-color:#fff;min-width:6.25rem;height:90vh}.classify-content .classify-left .left-box[data-v-7a9686d8]{padding:0 0 3.125rem 0}.classify-content .classify-left .left-box div[data-v-7a9686d8]{padding:1.1875rem 0;text-align:center;font-size:.875rem;color:#3b3b4a}.classify-content .classify-left .left-box .on[data-v-7a9686d8]{background:#fafafa;position:relative}.classify-content .classify-left .left-box .on[data-v-7a9686d8]:after{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);content:"";width:.1875rem;height:1.25rem;background:#f15353;border-radius:.9375rem .9375rem .9375rem .9375rem}.classify-content .classify-main[data-v-7a9686d8]{-webkit-box-sizing:border-box;box-sizing:border-box;width:calc(100% - 7.875rem);height:90vh;margin:0 .8125rem;position:relative}.classify-content .classify-main .classify-box[data-v-7a9686d8]{padding:0 0 3.125rem 0;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;cursor:pointer}.classify-content .classify-main .classify-box .goods-item[data-v-7a9686d8]{border-radius:.625rem .625rem .625rem .625rem;background-color:#fff;width:calc(50% - .25rem);margin:0 0 .5rem 0;position:relative}',""]),t.exports=e},d76c:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var i=a("c7eb"),o=a("1da1"),n=(a("e9c4"),{data:function(){return{agentConfigUrl:null,isSignWorkApp:!1,agentData:{agent_secret:"",agentid:"",corpid:""},get_token:{},appjsApiList:[],appSignCallback:null,appSignError:null,agentConfigLoading:0}},created:function(){if(this.fun.getKey("crop_id")){var t=this.fun.getKey("crop_id");window.localStorage.setItem("crop_id",t),this.corp_id=t}else this.corp_id=window.localStorage.getItem("crop_id")||"0"},activated:function(){("work"===this.fun.getKey("client")||window.localStorage.getItem("client"))&&this.getAgentConfig()},methods:{getAgentConfig:function(){var t=this;return Object(o["a"])(Object(i["a"])().mark((function e(){var a,o,n,s,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t,o=t.agentConfigUrl||"plugin.wechat-chat-sidebar.frontend.controller.index.get-config",n="ios"===t.fun.isIosOrAndroid()?window.initUrl:document.location.href,e.prev=3,e.next=6,$http.post(o,{crop_id:t.corp_id,url:n},"loading");case 6:if(s=e.sent,1!=s.result){e.next=11;break}t.agentData=s.data,e.next=13;break;case 11:return t.agentConfigLoading=-1,e.abrupt("return",t.$toast(s.msg));case 13:t.agentConfigLoading=0,t.get_token=t.agentData.get_token,r={debug:!1,beta:!0,jsApiList:["agentConfig","closeWindow"],openTagList:["ww-open-data"],appId:t.agentData.corpid,nonceStr:t.get_token.noncestr,timestamp:t.get_token.timestamp,signature:t.get_token.token},wx.config(r),wx.ready((function(){setTimeout((function(){t.getAgentSign(r,t.get_token.app_token)}),500)})),wx.error((function(t){a.$toast(JSON.stringify(t))})),e.next=24;break;case 21:e.prev=21,e.t0=e["catch"](3),t.$toast(e.t0);case 24:case"end":return e.stop()}}),e,null,[[3,21]])})))()},getAgentSign:function(t,e){var a=this;wx.agentConfig({debug:!1,corpid:t.appId,agentid:this.agentData.agentid,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:e,jsApiList:a.appjsApiList,success:function(){a.isSignWorkApp=!0,a.agentConfigLoading=1,a.appSignSuccess&&a.appSignSuccess()},fail:function(t){a.agentConfigLoading=-1,a.appSignError&&a.appSignError(),t.errMsg.indexOf("function not exist")>-1?a.$toast("版本过低请升级"):a.$toast("企业应用授权失败,请联系管理员重新配置!")}})}}})},efef:function(t,e,a){"use strict";a("5c54")}}]); |