(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"2df2":function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("7d57");n(o("3240"));var a=n(o("b345"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(a.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},5181:function(t,e,o){"use strict";(function(t){var n=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n(o("fd32"));var a={components:{diy:function(){o.e("components/diy/diy").then(function(){return resolve(o("502f"))}.bind(null,o)).catch(o.oe)},Homepush:function(){o.e("pages/index/home-push/home-push").then(function(){return resolve(o("e978"))}.bind(null,o)).catch(o.oe)},navBar:function(){o.e("components/navBar/navBar").then(function(){return resolve(o("0f96"))}.bind(null,o)).catch(o.oe)},uniLoadMore:function(){o.e("components/uni-load-more").then(function(){return resolve(o("e5dd"))}.bind(null,o)).catch(o.oe)},searchProduct:function(){o.e("components/searchProduct").then(function(){return resolve(o("a936"))}.bind(null,o)).catch(o.oe)}},data:function(){return{loading:!1,background:"",listData:[],indicatorDots:!0,autoplay:!0,interval:2e3,duration:500,items:[],is_collection:!1,is_follow:"0",is_homepush:!1,homepush_data:{},triggered:!0,target:0,thisindex:0,category_list:[],product_list:[],page:1,last_page:0,no_more:!1,indexStop:0,title_name:"",bgcolor:"",msgNum:0,title_image:!1,toplogo:"",url:"",jweixin:null,showSearch:!1,openCategory:{color:"#000000",open:0},is_auto:0}},watch:{thisindex:function(t,e){t!=e&&(this.category_id=this.category_list[t].category_id,this.toggleInit(),0!=t&&this.getProduct())}},computed:{loadingType:function(){return this.loading?1:0!=this.product_list.length&&this.no_more?2:0}},onTabItemTap:function(){},onShow:function(){this.getTabBarLinks()},onLoad:function(){this._freshing=!1,this.getData(),this.getList()},onPullDownRefresh:function(){0==this.thisindex?this.getData():(this.toggleInit(),this.getProduct())},onReachBottom:function(){this.scrolltolowerFunc(),console.log("到底了")},methods:{getData:function(){var e=this;t.showLoading({title:"加载中"}),e._get("index/index",{url:e.url},(function(o){var n=t.getStorageSync("TabBar").is_auto&&0!=t.getStorageSync("TabBar").is_auto;e.is_auto=n,e.listData=o.data.list,e.background=o.data.background,e.items=o.data.items,e.title_name=o.data.page.params.title,e.bgcolor=o.data.page.style.titleBackgroundColor,e.msgNum=o.data.msgNum,e.toplogo=o.data.page.style.toplogo,e.setPage(o.data.page),e.title_type=o.data.page.params.title_type,e.titleTextColor=o.data.page.style.titleTextColor,e.openCategory=o.data.page.category;var a=t.getStorageSync("isFirst");""==a&&"1"==o.data.setting.collection.status&&(e.is_collection=!0,t.setStorageSync("isFirst",1)),e.is_follow=o.data.setting.officia.status;var i=t.getStorageSync("homepush_name");o.data.setting.homepush.is_open&&i!=o.data.setting.homepush.name&&(e.homepush_data=o.data.setting.homepush,e.is_homepush=!0,e.is_homepush=!0),t.hideLoading(),e.loadding=!1,t.stopPullDownRefresh()}))},getList:function(){var t=this;t._get("product.category/index",{},(function(e){t.category_list=e.data.list;t.category_list.unshift({name:"推荐",category_id:"0"})}))},getProduct:function(){var e=this,o=e.page;e.loading=!0,e._get("product.product/lists",{page:o||1,category_id:e.category_id,search:"",sortType:"all",sortPrice:0,list_rows:10},(function(n){e.loading=!1,t.stopPullDownRefresh(),e.product_list=e.product_list.concat(n.data.list.data),e.last_page=n.data.list.last_page,n.data.list.last_page<=1&&(e.no_more=!0),o>=9&&(e.no_more=!0)}))},scrolltolowerFunc:function(){this.page