1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-156d7c6b"],{1175:function(t,e,s){},2241:function(t,e,s){"use strict";var i,n=s("1988"),a=s("8bbf"),o=s.n(a),l=s("2638"),c=s.n(l),r=s("d282"),u=s("ea8e"),h=s("b1d2"),d=s("6605"),f=s("b650"),m=s("9884"),p=Object(r["a"])("goods-action"),v=p[0],g=p[1],y=v({mixins:[Object(m["b"])("vanGoodsAction")],props:{safeAreaInsetBottom:{type:Boolean,default:!0}},render:function(){var t=arguments[0];return t("div",{class:g({unfit:!this.safeAreaInsetBottom})},[this.slots()])}}),C=s("48f4"),b=Object(r["a"])("goods-action-button"),w=b[0],x=b[1],B=w({mixins:[Object(m["a"])("vanGoodsAction")],props:Object(n["a"])({},C["c"],{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}),computed:{isFirst:function(){var t=this.parent&&this.parent.children[this.index-1];return!t||t.$options.name!==this.$options.name},isLast:function(){var t=this.parent&&this.parent.children[this.index+1];return!t||t.$options.name!==this.$options.name}},methods:{onClick:function(t){this.$emit("click",t),Object(C["b"])(this.$router,this)}},render:function(){var t=arguments[0];return t(f["a"],{class:x([{first:this.isFirst,last:this.isLast},this.type]),attrs:{size:"large",type:this.type,icon:this.icon,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}}),k=Object(r["a"])("dialog"),_=k[0],O=k[1],T=k[2],S=_({mixins:[Object(d["a"])()],props:{title:String,theme:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,overlay:{type:Boolean,default:!0},allowHtml:{type:Boolean,default:!0},transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{onClickOverlay:function(){this.handleAction("overlay")},handleAction:function(t){var e=this;this.$emit(t),this.value&&(this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,(function(s){!1!==s&&e.loading[t]&&e.onClose(t),e.loading.confirm=!1,e.loading.cancel=!1}))):this.onClose(t))},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){this.$emit("opened")},onClosed:function(){this.$emit("closed")},genRoundButtons:function(){var t=this,e=this.$createElement;return e(y,{class:O("footer")},[this.showCancelButton&&e(B,{attrs:{size:"large",type:"warning",text:this.cancelButtonText||T("cancel"),color:this.cancelButtonColor,loading:this.loading.cancel},class:O("cancel"),on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&e(B,{attrs:{size:"large",type:"danger",text:this.confirmButtonText||T("confirm"),color:this.confirmButtonColor,loading:this.loading.confirm},class:O("confirm"),on:{click:function(){t.handleAction("confirm")}}})])},genButtons:function(){var t,e=this,s=this.$createElement,i=this.showCancelButton&&this.showConfirmButton;return s("div",{class:[h["e"],O("footer")]},[this.showCancelButton&&s(f["a"],{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||T("cancel")},class:O("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){e.handleAction("cancel")}}}),this.showConfirmButton&&s(f["a"],{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||T("confirm")},class:[O("confirm"),(t={},t[h["c"]]=i,t)],style:{color:this.confirmButtonColor},on:{click:function(){e.handleAction("confirm")}}})])},genContent:function(t,e){var s=this.$createElement;if(e)return s("div",{class:O("content")},[e]);var i=this.message,n=this.messageAlign;if(i){var a,o,l={class:O("message",(a={"has-title":t},a[n]=n,a)),domProps:(o={},o[this.allowHtml?"innerHTML":"textContent"]=i,o)};return s("div",{class:O("content",{isolated:!t})},[s("div",c()([{},l]))])}}},render:function(){var t=arguments[0];if(this.shouldRender){var e=this.message,s=this.slots(),i=this.slots("title")||this.title,n=i&&t("div",{class:O("header",{isolated:!e&&!s})},[i]);return t("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[t("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||e},class:[O([this.theme]),this.className],style:{width:Object(u["a"])(this.width)}},[n,this.genContent(i,s),"round-button"===this.theme?this.genRoundButtons():this.genButtons()])])}}}),$=s("a142");function j(t){return document.body.contains(t)}function N(){i&&i.$destroy(),i=new(o.a.extend(S))({el:document.createElement("div"),propsData:{lazyRender:!1}}),i.$on("input",(function(t){i.value=t}))}function P(t){return $["g"]?Promise.resolve():new Promise((function(e,s){i&&j(i.$el)||N(),Object(n["a"])(i,P.currentOptions,t,{resolve:e,reject:s})}))}P.defaultOptions={value:!0,title:"",width:"",theme:null,message:"",overlay:!0,className:"",allowHtml:!0,lockScroll:!0,transition:"van-dialog-bounce",beforeClose:null,overlayClass:"",overlayStyle:null,messageAlign:"",getContainer:"body",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1,callback:function(t){i["confirm"===t?"resolve":"reject"](t)}},P.alert=P,P.confirm=function(t){return P(Object(n["a"])({showCancelButton:!0},t))},P.close=function(){i&&(i.value=!1)},P.setDefaultOptions=function(t){Object(n["a"])(P.currentOptions,t)},P.resetDefaultOptions=function(){P.currentOptions=Object(n["a"])({},P.defaultOptions)},P.resetDefaultOptions(),P.install=function(){o.a.use(S)},P.Component=S,o.a.prototype.$dialog=P;e["a"]=P},"2fcb":function(t,e,s){},4079:function(t,e,s){},"4cf9":function(t,e,s){},"83fd":function(t,e,s){"use strict";s("4079")},"918e":function(t,e,s){"use strict";s("f07a")},d734:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"page",class:{"padding-one":0==t.storetype&&"全部"!=t.activeType,"padding-threw":0==t.storetype&&"全部"==t.activeType,"padding-two":2==t.storetype}},[0==t.storetype?[i("div",{staticClass:"searchEle flex-row align-center justify-center"},[i("div",{staticClass:"searchTab flex-row align-center justify-center"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.keyword,expression:"keyword"}],staticClass:"searchIpt flex-sub",attrs:{type:"text",placeholder:"请输入关键字搜索"},domProps:{value:t.keyword},on:{input:function(e){e.target.composing||(t.keyword=e.target.value)}}}),i("div",{staticClass:"searchline"}),i("img",{staticClass:"searchIcon",attrs:{src:s("50ea"),width:"18px",height:"18px",alt:""},on:{click:t.search}})])]),i("div",{staticClass:"leftClassCate scroll_content"},t._l(t.classCate,(function(e){return i("div",{key:e.id,staticClass:"classCateItem flex-row align-center justify-center color333 font28",class:{activeType:t.activeType==e.name},on:{click:function(s){return t.switchClass(e.id,e.name)}}},[i("span",{staticClass:"ellipsis"},[t._v(t._s(e.name))])])})),0),i("div",{directives:[{name:"show",rawName:"v-show",value:"全部"!=t.activeType,expression:"activeType != '全部'"}],staticClass:"subSearchTab"},t._l(t.subClasslist,(function(e){return i("div",{key:e.id,staticClass:"subSearchItem flex-row align-center justify-center",class:{activeSub:e.name==t.subLabel},on:{click:function(s){return t.switchSubClass(e)}}},[i("span",{staticClass:"ellipsis"},[t._v(t._s(e.name))])])})),0),i("div",{staticClass:"rightClassCourse",class:{height216:"全部"==t.activeType,height296:"全部"!=t.activeType}},[i("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[t._l(t.trainlist,(function(e,s){return i("div",{key:s,staticClass:"classCourseItem flex-row",on:{click:function(s){return t.traintap(e.id)}}},[i("div",{staticClass:"classImage"},[i("img",{attrs:{src:e.cover+"?x-oss-process=image/resize,w_300",width:"100%",height:"100%",alt:""}})]),i("div",{staticClass:"classContent flex-sub flex-column"},[i("div",{staticClass:"classTitle flex-sub"},[i("span",{staticClass:"ellipsis"},[t._v(t._s(e.title))])]),i("div",{staticClass:"flex-sub flex-row align-center"},[i("span",{directives:[{name:"show",rawName:"v-show",value:"compulsory"==e.category,expression:"item.category == 'compulsory'"}],staticClass:"compulsory"},[t._v("必修")]),i("span",{directives:[{name:"show",rawName:"v-show",value:"elective"==e.category,expression:"item.category == 'elective'"}],staticClass:"elective"},[t._v("选修")]),i("span",{staticClass:"ml20 color999 font20"},[t._v(t._s(e.course_num)+"节课件 | "+t._s("order"==e.type?"顺序学习":"自由学习"))])]),i("div",{staticClass:"flex-sub color999 font20 flex-row align-center"},[t._v(" 更新时间:"+t._s(e.addtime?e.addtime.split(" ")[0]:"--")+" ")])])])})),i("nonedata",{attrs:{len:t.trainlist.length,datashow:t.datashow}})],2)],1)]:[i("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[i("div",{staticClass:"listBoxStyle"},t._l(t.trainlist,(function(e){return i("div",{key:e.id,staticClass:"everytraincourse clearfix",on:{click:function(s){return t.traintap(e.id)}}},[i("img",{directives:[{name:"show",rawName:"v-show",value:e.cover,expression:"item.cover"}],staticClass:"trainimg pull-left",attrs:{src:e.cover+"?x-oss-process=image/resize,w_200",alt:""}}),i("img",{directives:[{name:"show",rawName:"v-show",value:!e.cover,expression:"!item.cover"}],staticClass:"trainimg pull-left",attrs:{src:t.$store.state.imgUrl+"/xcx/nonedata.jpg?x-oss-process=image/resize,w_200"}}),i("div",{staticClass:"rightcontentbox pull-left relative"},[i("div",{staticClass:"fontfpr font32 color384855 lh40 coursetitle ellipsisTwo"},[t._v(" "+t._s(e.title)+" ")]),i("div",{staticClass:"clearfix absolute otherbox fontfpr font28 color666 lh40"},[i("div",{staticClass:"pull-left width40"},[t._v(t._s(e.course_num)+"节课程")]),i("span",{staticClass:"absolute"}),i("div",{staticClass:"pull-left width60 clearfix personimgbox"},[i("div",{directives:[{name:"show",rawName:"v-show",value:0==e.headimgurl.length,expression:"item.headimgurl.length == 0"}],staticClass:"pull-right"},[t._v(" 暂无学员学习 ")]),t._l(e.headimgurl,(function(t,e){return i("img",{key:e,staticClass:"pull-right",attrs:{src:t}})})),e.headimgurl.length>5?i("span",{staticClass:"pull-right"},[t._v("...")]):t._e()],2)])]),"compulsory"==e.category?i("div",{staticClass:"fixed-right-top"},[t._v(" "+t._s("compulsory"==e.category?"必修":"")+" ")]):t._e()])})),0),i("nonedata",{attrs:{len:t.trainlist.length,datashow:t.datashow}})],1)],i("div",{staticClass:"signUpBtn",on:{click:t.signUpFunc}},[t._v("立即报名")]),i("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]}),i("van-dialog",{attrs:{title:"立即报名",closeOnClickOverlay:"",confirmButtonColor:"#fff","before-close":t.beforeCloseFun},on:{confirm:t.confirmFunc},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[i("div",{staticClass:"signUpBox"},[i("div",{staticClass:"signitem"},[i("span",[t._v("姓名")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.fName,expression:"fName"}],attrs:{type:"text",placeholder:"请输入姓名"},domProps:{value:t.fName},on:{input:function(e){e.target.composing||(t.fName=e.target.value)}}})]),i("div",{staticClass:"signitem"},[i("span",{staticStyle:{color:"red"}},[t._v("*")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.fPhone,expression:"fPhone"}],attrs:{type:"number",placeholder:"请输入手机号"},domProps:{value:t.fPhone},on:{input:function(e){e.target.composing||(t.fPhone=e.target.value)}}})])])])],2)},n=[],a=s("f3f3"),o=s("fc11"),l=(s("e17f"),s("2241")),c=(s("b0c0"),s("ac1f"),s("00b4"),s("5319"),s("99af"),s("9df2")),r=s("8d6b"),u=s("a92e"),h=s("18a0"),d=s.n(h),f=s("5880"),m={components:Object(o["a"])({MescrollVue:r["a"],nonedata:u["a"]},l["a"].Component.name,l["a"].Component),name:"traincourse",data:function(){return{activeType:"全部",keyword:"",subLabel:"全部",tab:[{name:"当前店面",type:"0"},{name:"其他店面",type:"2"}],classCate:[],subClasslist:[{name:"全部",id:""}],loadFlag:!0,type:1,storetype:0,shareuid:"",fPhone:"",fName:"",company_id:"",trainlist:[],showDialog:!1,datashow:!1,mescroll:null,mescrollDown:{},mescrollUp:{callback:this.trainfun,page:{num:0,size:10},htmlLoading:"",htmlNodata:"",noMoreSize:0},scrollTop:0}},computed:Object(a["a"])({},Object(f["mapState"])({clientype:function(t){return t.clientype}})),created:function(){var t=this.getQueryStringArgs(window.location.href);t.type?this.type=t.type:this.type=this.$route.query.type,t.uid&&(this.shareuid=t.uid),2==this.type&&(this.storetype=1,document.title="集团培训")},mounted:function(){this.getTrainClassType(),this.company_id=this.$route.query.pid},methods:{handleTab:function(t){this.datashow=!1,this.trainlist=[],this.storetype=t,this.activeType="全部",this.subLabel="全部",this.mescroll.resetUpScroll(),this.subClasslist=[{name:"全部",id:""}]},switchClass:function(t,e){this.activeType=e,this.subLabel="全部",this.mescroll.resetUpScroll(),t?this.getClassLabels(t):this.subClasslist=[{name:"全部",id:""}]},switchSubClass:function(t){this.subLabel=t.name,this.mescroll.resetUpScroll()},search:function(){this.mescroll.resetUpScroll()},isPhoneNum:function(t){var e=/^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\d{8})$/;return!!e.test(t)},beforeCloseFun:function(t,e){"overlay"!=t?this.fPhone&&this.isPhoneNum(this.fPhone)?e():e(!1):e()},signUpFunc:function(){this.showDialog=!0},confirmFunc:function(){var t=this;if(!this.fPhone)return this.$toast("请输入手机号"),!1;if(!this.isPhoneNum(this.fPhone))return this.$toast("手机号格式错误"),!1;var e={name:this.fName,mobile:this.fPhone,id:this.company_id,type:"TrainClassList"};this.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(c["k"])(e).then((function(e){t.$toast.clear(),0==e.data.code?(t.fName="",t.fPhone="",t.showDialog=!1,t.$toast("报名成功")):t.showDialog=!1}))},getTrainClassType:function(){var t=this;Object(c["q"])({}).then((function(e){0==e.data.code&&(t.classCate=e.data.data,t.classCate.unshift({name:"全部",id:""}))}))},getClassLabels:function(t){var e=this;Object(c["r"])({pid:t}).then((function(t){0==t.data.code&&(e.subClasslist=t.data.data,e.subClasslist.unshift({name:"全部",id:""}))}))},getQueryStringArgs:function(t){t=null==t?window.location.href:t;var e=t.substring(t.lastIndexOf("?")+1),s={},i=/([^?&=]+)=([^?&=]*)/g;return e.replace(i,(function(t,e,i){var n=decodeURIComponent(e),a=decodeURIComponent(i);return a=String(a),s[n]=a,t})),s},mescrollInit:function(t){this.mescroll=t},trainfun:function(t,e){var s=this,i={};i="0"!=this.storetype||2==this.type?{page:t.num,from_type:2==this.type?1:this.storetype}:{page:t.num,from_type:2==this.type?1:this.storetype,cate:"全部"==this.activeType?"":this.activeType,keyword:this.keyword,label:"全部"==this.subLabel?"":this.subLabel},Object(c["F"])(i).then((function(i){s.datashow=!0,s.loadFlag=!1,0==i.data.code&&(1===t.num&&(s.trainlist=[]),s.datashow=!0,s.trainlist=s.trainlist.concat(i.data.data),s.$nextTick((function(){e.endSuccess(i.data.data.length)})))}))},traintap:function(t){d.a.miniProgram.navigateTo({url:"/share/pages/course/course?tid="+t+"&cty="+this.clientype+"&uid="+this.shareuid})}},deactivated:function(){this.scrollTop=this.mescroll.preScrollY},beforeRouteEnter:function(t,e,s){null==e.name||"school"==e.name?t.meta.isBack=!0:t.meta.isBack=!1,s()},activated:function(){var t=this;if(this.$route.meta.isBack){this.loadFlag=!0,t.trainlist=[],t.datashow=!1;var e=this.getQueryStringArgs(window.location.href);e.type?this.type=e.type:this.type=this.$route.query.type,2==this.type?(this.storetype=1,document.title="集团培训"):this.storetype=0,t.mescroll.resetUpScroll()}else this.mescroll.scrollTo(this.scrollTop,2)}},p=m,v=(s("918e"),s("83fd"),s("2877")),g=Object(v["a"])(p,i,n,!1,null,"e17474e6",null);e["default"]=g.exports},e17f:function(t,e,s){"use strict";s("68ef"),s("a71a"),s("9d70"),s("3743"),s("4d75"),s("e3b3"),s("bc1b"),s("1175"),s("4cf9"),s("2fcb")},f07a:function(t,e,s){}}]);
|