shop-php/public/static/js/pages-nongKe-goods_list-index.3117eb42.js

1 line
26 KiB
JavaScript
Raw Normal View History

2023-12-21 18:38:16 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-nongKe-goods_list-index"],{"055c":function(t,e,i){"use strict";i("7a82");var o=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(i("ade3")),n=o(i("5530"));i("99af"),i("d81d"),i("d3b7"),i("159b"),i("14d9"),i("26e9");var a=i("a126"),s=o(i("fb7b")),c=o(i("2ea6")),d=o(i("a825")),u=(i("95ca"),i("ece0")),l=i("5315"),p=i("26cb"),f=o(i("104c")),h=(i("bb20"),i("3093")),g=(getApp(),(0,r.default)({computed:(0,l.configMap)({hide_mer_status:1,recommend_switch:0},(0,p.mapGetters)(["uid","isLogin","scrollTop","viewColor","keyColor"])),components:{recommend:s.default,rightSlider:c.default,WaterfallsFlow:d.default,authorize:f.default},watch:{tabIndex:function(t,e){1==t?(this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)):(this.downStatus=!1,this.storeMerchantList())}},data:function(){return{domain:h.HTTP_REQUEST_URL,productList:[],list:[],is_switch:!0,where:{cate_pid:"",order:"",price_on:"",price_off:"",brand_id:"",keyword:"",page:1,limit:30,category_id:"",street_code:""},price:0,stock:0,nows:!1,loadend:!1,loading:!1,loadTitle:"加载更多",title:"",hostProduct:[],hotPage:1,hotLimit:10,hotScroll:!1,rightBox:!1,brandList:[],downKey:0,downStatus:!1,downMenu:[{title:"综合",key:1},{title:"评分",key:2},{title:"新品",key:3}],firstKey:0,tabIndex:1,storeList:[],sotreParam:{keyword:"",page:1,limit:30,order:""},storeKey:0,storeScroll:!0,isShowAuth:!1,isAuto:!1}},onPageScroll:function(){uni.$emit("scroll")},onLoad:function(t){uni.setNavigationBarTitle({title:t.name}),this.where.category_id=t.cate_id,this.where.street_code=t.street,this.$set(this.where,"cate_pid",t.id||""),this.title=t.title||"",this.$set(this.where,"keyword",t.searchValue||""),this.get_product_list(!0),this.get_host_product()},onReady:function(){},mounted:function(){},methods:{onLoadFun:function(){this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},goShop:function(t){1!=this.hide_mer_status&&uni.navigateTo({url:"/pages/store/home/index?id=".concat(t)})},storeMerchantList:function(){var t=this;this.storeScroll&&(0,a.storeMerchantList)({keyword:this.where.keyword,page:this.sotreParam.page,limit:this.sotreParam.limit,order:this.sotreParam.order}).then((function(e){t.storeScroll=e.data.list.length>=t.sotreParam.limit,t.sotreParam.page+=1,t.storeList=t.storeList.concat(e.data.list)}))},storeTab:function(t){this.storeKey=t,this.sotreParam.order=0==t?"":1==t?"sales":"rate",this.sotreParam.page=1,this.storeScroll=!0,this.storeList=[],this.storeMerchantList()},bindRight:function(){this.price=0,this.firstKey=4,this.getBrandlist()},getBrandlist:function(){var t=this,e=[];(0,a.getBrandlist)({cate_pid:this.where.cate_pid,keyword:this.where.keyword}).then((function(i){e=i.data.list.map((function(t){return(0,n.default)((0,n.default)({},t),{},{check:!1})})),t.where.brand_id.length>0&&t.where.brand_id.forEach((function(t,i){e.forEach((function(e){t==e.brand_id&&(e.check=!0)}))})),t.brandList=e,t.rightBox=!0}))},godDetail:function(t){},confirm:function(t){var e=[];0==t.brandList.length?this.where.brand_id="":(t.brandList.forEach((function(t){e.push(t.brand_id)})),this.where.brand_id=e),this.rightBox=t.status,this.where.price_on=t.price_on,this.where.price_off=t.price_off,this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},close:function(){this.rightBox=!1},bindDown:function(t,e){this.firstKey=0,0==e?this.where.order="":1==e?this.where.order="rate":2==e&&(this.where.order="is_new"),this.downKey=e,this.downStatus=!1,this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},Changswitch:function(){this.is_switch=!this.is_switch},searchSubmit:function(t){this.$set(this.where,"keyword",t.detail.value),1==this.tabIndex?(this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)):(this.sotreParam.page=1,this.storeScroll=!0,this.storeList=[],this.storeMerchantList())},get_host_product:function(){var t=this;t.hotScroll||(0,a.getProductHot)(t.hotPage,t.hotLimit).then((function(e){t.hotPage++,t.hotScroll=e.data.leng