homepage.js 3.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageD/homepage/homepage"],{"2b2d":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){o.e("pageD/homepage/component/goodsCard").then(function(){return resolve(o("c846"))}.bind(null,o)).catch(o.oe)},i={components:{GoodsCard:n},data:function(){return{value:4,selectTab:0,iconUp:0,isShow:"2",userId:"",userInfo:{},goodsList:[],user_other:{},user_other_no:"",show:"",page:1,last_page:1}},onLoad:function(t){t.page&&(this.isShow=t.page),t.user_other&&(this.user_other=JSON.parse(decodeURIComponent(t.user_other))),this.show=t.show,this.userId=t.merchant_id,this.user_other_no=t.user_other_no},onReachBottom:function(){this.page<this.last_page?(this.page++,this.getCommodityList()):this.$u.toast("已无更多数据")},methods:{tochat:function(){t.navigateTo({url:"/pageA/chat/chat?user_other="+encodeURIComponent(JSON.stringify(this.user_other))+"&user_other_no="+this.user_other_no})},switchTab:function(t){if(this.selectTab=t,4==t)switch(this.iconUp){case 1:this.iconUp=2;break;case 0:this.iconUp=1;break;case 2:this.iconUp=1;break}else this.iconUp=0},toDetail:function(e){console.log(e),t.navigateTo({url:"/pageA/productdetails?id=".concat(e.id)})},followTeam:function(e){var o=this;t.$u.http.post("/api/interest/follow",{interest_type:1,interest_id:this.userInfo.id}).then((function(n){o.userInfo.is_interest=e,t.showToast({title:e?"取消关注":"关注成功",icon:"none"})}))},getCommodityList:function(){var e=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t.$u.http.get("/api/merchant/info?merchant_id=".concat(this.userId)).then((function(t){e.userInfo=t})),t.$u.http.post("/api/goods/merchant_goods",{page:this.page,limit:10,merchant_id:this.userId,status:o,keywords:this.keywords,source:this.source}).then((function(t){e.last_page=t.last_page,1==e.page?e.goodsList=t.data:e.goodsList=e.goodsList.concat(t.data)}))}},mounted:function(){this.getCommodityList(),t.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:"#f74639"})}};e.default=i}).call(this,o("543d")["default"])},9692:function(t,e,o){"use strict";o.r(e);var n=o("f790"),i=o("cb02");for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(s);o("d6bc");var a,r=o("f0c5"),u=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"2372f4ba",null,!1,n["a"],a);e["default"]=u.exports},"9af1":function(t,e,o){"use strict";(function(t,e){var n=o("4ea4");o("f93b");n(o("66fd"));var i=n(o("9692"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])},b2f3:function(t,e,o){},cb02:function(t,e,o){"use strict";o.r(e);var n=o("2b2d"),i=o.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},d6bc:function(t,e,o){"use strict";var n=o("b2f3"),i=o.n(n);i.a},f790:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return s})),o.d(e,"a",(function(){return n}));var n={uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"01eb"))},uRate:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-rate/u-rate")]).then(o.bind(null,"9b05"))}},i=function(){var t=this,e=t.$createElement;t._self._c},s=[]}},[["9af1","common/runtime","common/vendor"]]]);