shop-php/public/static/js/pages-nongKe-specialty-short_index.13d7e1b7.js

1 line
64 KiB
JavaScript
Raw Normal View History

2024-02-20 11:01:59 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-nongKe-specialty-short_index"],{"030a":function(t,e,i){"use strict";var a=i("f95a"),o=i.n(a);o.a},"16e3":function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("4de4"),i("d3b7"),i("99af"),i("d81d"),i("159b"),i("14d9"),i("a9e3"),i("acd8"),i("d401"),i("25f0"),i("fb6a");var o=a(i("5530")),r=i("a126"),n=i("28e0"),s=i("26cb"),d=(i("bb20"),i("5315")),c=a(i("3516")),p=(a(i("df48")),getApp(),{components:{easyLoadimage:c.default},data:function(){return{titName:"坝坝宴",price:0,stock:0,nows:!1,loading:!1,loadingIcon:!0,loadTitle:"加载更多",title:"",hotPage:1,hotLimit:10,hotScroll:!1,rightBox:!1,brandList:[],downKey:0,downStatus:!1,menuList:[],downMenu:[{title:"默认",key:0,order:""},{title:"销量",key:1,order:"sales"},{title:"好评",key:2,order:"rate"},{title:"距离",key:3,order:"location"}],firstKey:0,storeList:[],sotreParam:{keyword:"",page:1,limit:10,order:"",category_id:"",type_id:"",street_id:"",village_id:"",type_code:""},storeKey:0,storeScroll:!0,mer_id:"",sortId:"",price_on:"",price_off:"",detaile_address:"",recommend_address:"",location_address:"",latitude:"",longitude:"",count:0,storeTypeArr:[],merList:[],product_type:0,show:!1,image:"",credit_buy:"",villageInfo:{},village_name:""}},onLoad:function(t){this.sotreParam.type_code=t.type_code,this.sotreParam.street_id=t.street_id||null,this.sotreParam.village_id=t.village_id||null,this.village_name=t.name||null,this.storeList=[],this.getVillageInfo(),1==this.mer_location&&this.selfLocation(),this.storeMerchantList(),this.getClassfication(),this.getStoreType()},computed:(0,o.default)({downMenus:function(){var t=this;return this.downMenu.filter((function(e){return t.mer_location?e:e.key<3}))}},(0,d.configMap)({margin_ico_switch:0,margin_ico:"",mer_location:0,store_street_theme:1,hide_mer_status:""},(0,s.mapGetters)(["viewColor"]))),methods:{getVillageInfo:function(){var t=this;(0,r.getVillageInfo)({village_id:this.sotreParam.village_id}).then((function(e){t.villageInfo=e.data.company})).catch((function(t){}))},navGo:function(t){uni.navigateTo({url:"/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=".concat(t)})},itemTap:function(t){uni.navigateTo({url:"/pages/goods_details/index_v?id=".concat(t.product_id,"&village_id=").concat(this.sotreParam.village_id),fail:function(t){}})},go_details:function(t,e){98==t&&uni.navigateTo({url:"/pages/admin/goods_details/index?product_id=".concat(e,"&product_type=").concat(t)}),0==t&&uni.navigateTo({url:"/pages/goods_details/index?id=".concat(e)})},getClassfication:function(){var t=this,e=[];(0,r.merClassifly)().then((function(i){e=i.data.map((function(t){return(0,o.default)((0,o.default)({},t),{},{check:!1})})),t.sotreParam.category_id.length>0&&t.sotreParam.category_id.forEach((function(t,i){e.forEach((function(e){t==e.merchant_category_id&&(e.check=!0)}))})),t.merList=e})).catch((function(e){t.$util.Tips({title:e})}))},getStoreType:function(){var t=this,e=[];(0,r.getStoreTypeApi)().then((function(i){i.data.forEach((function(i){i.mer_type_id==t.sotreParam.type_id&&e.push((0,o.default)((0,o.default)({},i),{},{check:!0}))})),t.storeTypeArr=e})).catch((function(e){t.$util.Tips({title:e})}))},showMaoLocation:function(t,e){if(!t||!e)return this.$util.Tips({title:"请设置允许商城访问您的位置!"});!0===this.$wechat.isWeixin()?this.$wechat.seeLocation({latitude:Number(t),longitude:Number(e),name:"当前位置",address:this.location_address}).then((function(t){})):uni.openLocation({latitude:parseFloat(t),longitude:parseFloat(e),name:"当前位置",address:this.location_address,scale:8,success:function(t){}})},showStoreLocation:function(t){if(!t.lat||!t.long)return this.$util.Tips({title:"请设置允许商城访问您的位置!"});!0===this.$wechat.isWeixin()?this.$wechat.seeLocation({latitude:Number(t.lat),longitude:Number(t.long),name:t.mer_name,address:t.mer_address?t.mer_address:""}).then((function(t){})):uni.openLocation({latitude:parseFloat(t.lat),longitude: