bztang-admin/addons/yun_shop/static/app/js/chunk-c285a1dc.c15e3b0b.js

1 line
6.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c285a1dc"],{"0d53":function(t,e,a){var o=a("46e8");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("2e9ee41f",o,!0,{sourceMap:!1,shadowMode:!1})},"42e2":function(t,e,a){var o=a("24fb");e=o(!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},"46e8":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".search-page .search-list[data-v-583b5fba]{padding:.75rem 0 0 0;margin:0 .75rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.search-page .search-list .goods-item[data-v-583b5fba]{border-radius:.625rem .625rem .625rem .625rem;background-color:#fff;width:calc(50% - .25rem);margin:0 0 .5rem 0}",""]),t.exports=e},"5c54":function(t,e,a){var o=a("42e2");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("0d556969",o,!0,{sourceMap:!1,shadowMode:!1})},"92db":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"search-page"},[a("c-title",{attrs:{hide:!1,text:"搜索页"}}),a("van-search",{attrs:{placeholder:"搜索课程",shape:"round"},on:{input:t.searchChange},model:{value:t.query.search.keyword,callback:function(e){t.$set(t.query.search,"keyword",e)},expression:"query.search.keyword"}}),t.searchList.length>0?a("div",{staticClass:"search-list flex-j-sb"},t._l(t.searchList,(function(t,e){return a("block",{key:e,staticClass:"goods-item"},[a("goods-item",{attrs:{dataItem:t,index:e}})],1)})),1):a("van-empty",{attrs:{description:"暂无数据"}})],1)},i=[],r=a("2909"),s=a("5530"),c=(a("ac1f"),a("841c"),a("99af"),a("a334")),n=a("ac0d"),d={name:"",components:{goodsItem:c["a"]},mixins:[n["a"]],data:function(){return{chatStrId:"",searchList:[],getConfig:{client:"work",type:17},isLoadMore:!0,total_page:0,query:{page:1,search:{keyword:"",category_id:""}},timer:0}},computed:{},watch:{},methods:{searchChange:function(t){var e=this;this.query.page=1,this.query.search.keyword=t,this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){e.debounce(e.getCoursesList())}),500)},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,o=a.courses_list.data;t.isLoadMore=!0,t.total_page=a.courses_list.last_page,t.total_page||(t.query.page=0),t.searchList=o}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=e.data,o=a.courses_list.data;t.searchList=[].concat(Object(r["a"])(t.searchList),Object(r["a"])(o))}else t.query.page=t.query.page-1,t.isLoadMore=!1}),(function(t){})))},debounce:function(t,e){var a,o;return function(i){var r=this,s=arguments,c=+new Date;a&&c<a+e?(clearTimeout(o),o=setTimeout((function(){a=c,t.apply(r,s)}),e)):(a=c,t.apply(r,s))}}},created:function(){("work"===this.fun.getKey("client")||window.localStorage.getItem("client"))&&(this.chatStrId=window.localStorage.getItem("chat_id")||""),this.getCoursesList()},mounted:function(){},beforeCreate:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},l=d,u=l,h=(a("d26e"),a("2877")),g=Object(h["a"])(u,o,i,!1,null,"583b5fba",null);e["default"]=g.exports},a334:function(t,e,a){"use strict";var o=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))])])])},i=[],r=(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=r,c=(a("efef"),a("2877")),n=Object(c["a"])(s,o,i,!1,null,"3d93c4d7",null);e["a"]=n.exports},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var o=document.documentElement,i=document.body,r={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return o&&o.scrollTop?t=o.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&o.clientHeight?Math.min(i.clientHeight,o.clientHeight):Math.max(i.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,o.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(){}}}},d26e:function(t,e,a){"use strict";a("0d53")},efef:function(t,e,a){"use strict";a("5c54")}}]);