(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mall"],{"41ef":function(e,t,n){},"5e4d":function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return a}));var a={uSearch:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-search/u-search")]).then(n.bind(null,"6f82"))},uSticky:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-sticky/u-sticky")]).then(n.bind(null,"99c7"))},uTabs:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-tabs/u-tabs")]).then(n.bind(null,"3cf8"))}},s=function(){var e=this.$createElement;this._self._c},l=[]},"6dec":function(e,t,n){"use strict";var a=n("41ef"),s=n.n(a);s.a},"7fb5":function(e,t,n){"use strict";(function(e,t){var a=n("4ea4");n("d716");a(n("66fd"));var s=a(n("82f1"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(s.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},8024:function(e,t,n){"use strict";n.r(t);var a=n("ea5f"),s=n.n(a);for(var l in a)["default"].indexOf(l)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(l);t["default"]=s.a},"82f1":function(e,t,n){"use strict";n.r(t);var a=n("5e4d"),s=n("8024");for(var l in s)["default"].indexOf(l)<0&&function(e){n.d(t,e,(function(){return s[e]}))}(l);n("6dec");var i=n("f0c5"),r=Object(i["a"])(s["default"],a["b"],a["c"],!1,null,"00700bca",null,!1,a["a"],void 0);t["default"]=r.exports},ea5f:function(e,t,n){"use strict";(function(e){var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=a(n("2eee")),l=a(n("c973")),i=(a(n("a0cf")),n("9ca2")),r={data:function(){return{searchKey:"",picUrl:this.$picUrl,picBase:this.$picBase,currBrandIndex:0,list1:[{name:"无主灯"},{name:"主灯"},{name:"开关插座"},{name:"智能家装"},{name:"智能锁"}],list2:[],activeStyle:{color:"#F7790C"},inactiveStyle:{color:"#080F18"},selTab:{type:1,brand:7},resList:[],allTypes:[],allTypesValues:[]}},created:function(){},onLoad:function(){return(0,l.default)(s.default.mark((function e(){return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},onShow:function(){var t=this;return(0,l.default)(s.default.mark((function n(){var a,l;return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,i.getMallCatReq)();case 2:a=n.sent,0==a.code?(console.log("获取商城分类数据返回值: ",a),l=[],a.data.classify.forEach((function(e,t){l.push({name:e.title,id:e.id,type:e.type})})),t.list1=l,t.list2=a.data.brand,t.selTab.type=a.data.classify[0].id,t.selTab.brand=a.data.brand[0].id,t.getMall(t.selTab.type,t.selTab.brand)):e.showToast({title:a.message,icon:"none"});case 4:case"end":return n.stop()}}),n)})))()},onReady:function(){},methods:{getMall:function(t,n){var a=this;return(0,l.default)(s.default.mark((function l(){var r;return s.default.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,(0,i.getMallReq)({type:t,brand:n});case 2:r=s.sent,0==r.code?(console.log("获取商城数据返回值: ",r),a.allTypes=Object.keys(r.data.typeName),a.allTypesValues=Object.values(r.data.typeName),a.resList=r.data,console.log("获取商城数据返回值列表: ",a.resList,a.allTypes,a.allTypesValues,a.typesList)):e.showToast({title:r.message,icon:"none"});case 4:case"end":return s.stop()}}),l)})))()},getMall2:function(t){var n=this;return(0,l.default)(s.default.mark((function a(){var l;return s.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,i.getMallReq)({search:t});case 2:l=a.sent,0==l.code?(console.log("获取商城数据返回值2: ",l),n.allTypes=Object.keys(l.data.typeName),n.allTypesValues=Object.values(l.data.typeName),n.resList=l.data,console.log("获取商城数据返回值列表2: ",n.resList,n.allTypes,n.allTypesValues,n.typesList)):e.showToast({title:l.message,icon:"none"});case 4:case"end":return a.stop()}}),a)})))()},change:function(e){this.selTab.type=e.id},change2:function(e,t){this.currBrandIndex=t,this.selTab.brand=e.id},toList:function(t,n){e.navigateTo({url:"/pages/mall/goodsList/index?typeNameId="+t+"&name="+n+"&brand="+this.selTab.brand+"&type="+this.selTab.type})},goDetail:function(t){getApp().mallItem=t,e.navigateTo({url:"/pages/mall/detail/index"})}},watch:{searchKey:function(e,t){var n=this;if(!e)return this.selTab={type:1,brand:7},void(this.currBrandIndex=0);setTimeout((function(){n.getMall2(e)}),1e3)},selTab:{handler:function(e,t){console.log("n, o",e),this.getMall(e.type,e.brand)},deep:!0}},components:{}};t.default=r}).call(this,n("543d")["default"])}},[["7fb5","common/runtime","common/vendor"]]]);