shop-php/public/static/js/pages-nongKe-specialty-index.be7800a3.js

1 line
25 KiB
JavaScript
Raw Normal View History

2023-09-07 13:33:18 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-nongKe-specialty-index"],{"0a85":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 r=a(i("5530")),o=i("94e5"),n=i("26cb"),s=(i("c211"),i("0cdc")),d=a(i("0a72")),c=(getApp(),{components:{easyLoadimage:d.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:"",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:""}},onLoad:function(t){this.sotreParam.type_code=t.type_code,this.storeList=[],1==this.mer_location&&this.selfLocation(),this.storeMerchantList(),this.getClassfication(),this.getStoreType()},computed:(0,r.default)({downMenus:function(){var t=this;return this.downMenu.filter((function(e){return t.mer_location?e:e.key<3}))}},(0,s.configMap)({margin_ico_switch:0,margin_ico:"",mer_location:0,store_street_theme:1,hide_mer_status:""},(0,n.mapGetters)(["viewColor"]))),methods:{navGo:function(t){uni.navigateTo({url:"/pages/nongKe/supply_chain/supplierA?type_id=10&?merchant_category_id=".concat(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,o.merClassifly)().then((function(i){e=i.data.map((function(t){return(0,r.default)((0,r.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,o.getStoreTypeApi)().then((function(i){i.data.forEach((function(i){i.mer_type_id==t.sotreParam.type_id&&e.push((0,r.default)((0,r.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:parseFloat(t.long),scale:8,name:t.mer_name,address:t.mer_address?t.mer_address:"",success:function(t){}})},selfLocation:function(){var t=this;uni.getLocation({type:"gcj02",success:function(e){var i,a;i=e.latitude.toString(),a=e.longitude.toString(),t.latitude=e.latitude,t.longitude=e.longitude,(0,o.getGeocoder)({lat:i,long:a}).then((function(e){t.detaile_address=e.data.address,t.location_address=e.data.address,t.recommend_address=e.data.address.length>4?e.data.address.slice(0,4)+"...":e.data.address})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},fail:function(t){uni.showToast({title:t,icon:"none",durati