(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/search/search"],{1332:function(t,e,o){"use strict";(function(t){var n=o("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("b8e9")),u={data:function(){return{value:"",history:[],result:!1,product:[],page:1,limit:10,total:0}},onLoad:function(){this.getHistory()},methods:{leftClick:function(){},change:function(t){console.log(t),this.value=t},search:function(){var t=this;t.result=!0,i.default.req({url:"/api/Index/courselist",data:{page:t.page,limit:t.limit,keywords:t.value}},(function(e){1==e.code&&(1==t.page?(t.product=e.data.list,t.total=e.data.count):(t.total=e.data.count,t.product=t.product.concat(e.data.list)))}))},getHistory:function(){var e=this;t.getStorage({key:"history",success:function(t){console.log("缓存",t),e.history.push(t.data),console.log("缓存记录",e.history)}})},cancel:function(){this.result=!1,this.value=""},detele:function(){t.removeStorage({key:"history",success:function(t){}}),this.history=[]},detail:function(e){var o=this;i.default.jump("/pages/index/course/detail?id="+o.product[e].id);var n={id:o.product[e].id,img:o.product[e].img,name:o.product[e].name};t.setStorage({data:n,key:"history",success:function(){o.getHistory()}})},onReachBottom:function(){console.log("到底了"),console.log(this.page),console.log(this.limit),console.log(Number(this.total)),Number(this.page)*Number(this.limit)>=Number(this.total)?i.default.info("没有更多了"):(this.page++,this.change())},collect:function(t){0==this.product[t].is_collection?this.product[t].is_collection=1:this.product[t].is_collection=0,i.default.req({url:"/api/Index/collectionCancelCourse",data:{id:this.product[t].id,type:this.product[t].is_collection}},(function(t){console.log("收藏=",t),1==t.code&&i.default.info(t.msg)}))}}};e.default=u}).call(this,o("543d")["default"])},"17f1":function(t,e,o){"use strict";o.r(e);var n=o("1332"),i=o.n(n);for(var u in n)["default"].indexOf(u)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(u);e["default"]=i.a},"3e99":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return u})),o.d(e,"a",(function(){return n}));var n={"u-Input":function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/uview-ui/components/u--input/u--input")]).then(o.bind(null,"3ac4"))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"d3dc"))},"u-Image":function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/uview-ui/components/u--image/u--image")]).then(o.bind(null,"0288"))}},i=function(){var t=this.$createElement,e=(this._self._c,this.result?this.product.length:null),o=!this.result||e>0?null:this.product.length;this.$mp.data=Object.assign({},{$root:{g0:e,g1:o}})},u=[]},"57f0":function(t,e,o){"use strict";var n=o("ecf6"),i=o.n(n);i.a},ecc3:function(t,e,o){"use strict";o.r(e);var n=o("3e99"),i=o("17f1");for(var u in i)["default"].indexOf(u)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(u);o("57f0");var c=o("f0c5"),a=Object(c["a"])(i["default"],n["b"],n["c"],!1,null,"4461734a",null,!1,n["a"],void 0);e["default"]=a.exports},ecf6:function(t,e,o){},f27a:function(t,e,o){"use strict";(function(t,e){var n=o("4ea4");o("73d2");n(o("66fd"));var i=n(o("ecc3"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])}},[["f27a","common/runtime","common/vendor"]]]);