(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/product/list"],{"2a17":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("7ca3")),a=n("8f59");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var c={data:function(){return{type:1,page:1,list:[],lastPage:1,active:1,isMoney:!0,name:"",province:"",city:"",industryid:"",token:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,a.mapState)(["user"])),components:{list:function(){Promise.all([n.e("common/vendor"),n.e("components/productList")]).then(function(){return resolve(n("3ea9"))}.bind(null,n)).catch(n.oe)},pikerSearch:function(){Promise.all([n.e("common/vendor"),n.e("components/search")]).then(function(){return resolve(n("f2a4"))}.bind(null,n)).catch(n.oe)}},onLoad:function(e){this.type=e.type,this.handleList(),this.token=t.getStorageSync("token"),t.setNavigationBarTitle({title:3==this.type?"商品展示":"供求信息"})},onShow:function(){this.$store.commit("changeSecratary",!1)},onReachBottom:function(){console.log("this.lastPage",this.lastPage),!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据！",icon:"none"}):(this.page++,this.handleList())},methods:{handleActive:function(t){this.active=t,this.list=[],this.isMoney=1==t,this.handleList()},handleList:function(){var t=this,e=this;e.$model.getProductList({name:e.name,province:e.province,city:e.city,industryid:e.industryid,pageNo:e.page,pageSize:10,type:3==this.type?3:1==this.active?8:9}).then((function(n){0==n.code?(e.list=t.list.concat(n.data.rows),e.lastPage=n.data.totalpage):e.$tools.msg(n.message)}))},handlefabu:function(){var e=3==this.type?3:1==this.active?8:9;if(t.getStorageSync("token")){if(3==e||8==e)if(this.user.authlist.length)for(var n=0;n<this.user.authlist.length;n++){var i=this.user.authlist[n];-1==i.code.indexOf("product:submit")&&-1==i.code.indexOf("supply:submit")||t.navigateTo({url:"/pageTwo/me/addNeeds?status=add&type="+e});break}else this.$store.commit("changeSecratary",!0);else t.navigateTo({url:"/pageTwo/me/addNeeds?status=add&type="+e});console.log("发布")}else this.$tools.msg("登录后查看更多")},handleDetail:function(e){var n=this,i=3==this.type?3:1==this.active?8:9;console.log("详情",this.active),n.$model.getProductDetail({id:e.id,type:i}).then((function(o){0==o.code?(o.data.type=i,t.navigateTo({url:"/pageTwo/product/detail?type="+i+"&id="+e.id})):n.$tools.msg(o.message)}))},handleSearch:function(t,e,n,i){this.name=t,this.province=e,this.city=n,this.industryid=i,this.list=[],this.page=1,console.log("搜索返回",this.name,this.province,this.city,this.industryid),this.handleList()}}};e.default=c}).call(this,n("df3c")["default"])},"65a2":function(t,e,n){"use strict";var i=n("a837"),o=n.n(i);o.a},"6ae5":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("e92e");i(n("3240"));var o=i(n("c16d"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},a837:function(t,e,n){},c16d:function(t,e,n){"use strict";n.r(e);var i=n("ecfd"),o=n("edd6");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("65a2");var s=n("828b"),c=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"5028a434",null,!1,i["a"],void 0);e["default"]=c.exports},ecfd:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"b80a"))}},o=function(){var t=this.$createElement,e=(this._self._c,this.list.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},a=[]},edd6:function(t,e,n){"use strict";n.r(e);var i=n("2a17"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a}},[["6ae5","common/runtime","common/vendor"]]]);