(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabBar/home/home"],{"3f51":function(t,o,e){"use strict";e.r(o);var n=e("d115"),a=e("5964");for(var i in a)"default"!==i&&function(t){e.d(o,t,(function(){return a[t]}))}(i);e("4bab");var u,c=e("f0c5"),s=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],u);o["default"]=s.exports},"41ea":function(t,o,e){"use strict";(function(t){e("eba6");n(e("66fd"));var o=n(e("3f51"));function n(t){return t&&t.__esModule?t:{default:t}}t(o.default)}).call(this,e("543d")["createPage"])},"4bab":function(t,o,e){"use strict";var n=e("91be"),a=e.n(n);a.a},5964:function(t,o,e){"use strict";e.r(o);var n=e("c8f8"),a=e.n(n);for(var i in n)"default"!==i&&function(t){e.d(o,t,(function(){return n[t]}))}(i);o["default"]=a.a},"91be":function(t,o,e){},c8f8:function(t,o,e){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=e("b528"),a=getApp(),i={data:function(){return{showHeader:!0,afterHeaderOpacity:1,headerPosition:"fixed",headerTop:null,statusTop:null,nVueTitle:null,city:"",currentSwiper:0,imageUrl:a.globalData.imgUrl,swiperList:[{id:1,src:"url1",img:"/static/img/banner2.png"},{id:2,src:"url2",img:"/static/img/banner3.png"}],productList:[],goldproductList:[],loadingText:"正在加载...",pageNum:1,pageSize:6}},onPageScroll:function(t){this.headerPosition=t.scrollTop>=0?"fixed":"absolute",this.headerTop=t.scrollTop>=0?null:0,this.statusTop=t.scrollTop>=0?null:-this.statusHeight+"px"},onPullDownRefresh:function(){setTimeout((function(){t.stopPullDownRefresh()}),1e3)},onReachBottom:function(){},authColse:function(){},onLoad:function(){t.login({provider:"weixin",success:function(t){a.globalData.code=t.code;var o={code:a.globalData.code};(0,n.HandleCode)(o).then((function(t){"000000"==t.return_code&&(a.globalData.openId=t.return_data.openId)}))}}),this.postionIng(),t.getStorage({key:"user",success:function(o){a.globalData.userInfo=o.data,t.getStorage({key:"token",success:function(t){a.globalData.token=t.data}})},fail:function(t){}})},methods:{postionIng:function(){t.showLoading({title:"加载中"});var o=this;t.getLocation({type:"wgs84",success:function(e){a.globalData.latitude=e.latitude,a.globalData.longitude=e.longitude,t.request({url:"https://apis.map.qq.com/ws/geocoder/v1/?location="+e.latitude+","+e.longitude+"&key=YQDBZ-T54K4-5J6U7-DO3BA-CNZJO-PTFMU",data:{},success:function(e){o.city=e.data.result.address_component.city.replace(/市/g,"");var n=e.data.result.ad_info.adcode.substring(5,"");a.globalData.cityId=n+0,o.getCouponListArea(),o.getCouponListgold(),t.hideLoading()},fail:function(){t.hideLoading()}})}})},toScan:function(){t.scanCode({success:function(o){t.navigateTo({url:"../../goods/coupons-info-details/coupons-info-details?id="+JSON.parse(o.result).code})},fail:function(){t.showToast({title:"无法识别二维码",icon:"none",duration:2e3})}})},getCouponListArea:function(){var t=this,o={regionId:a.globalData.cityId,pageNum:this.pageNum,pageSize:this.pageSize,displayArea:1};(0,n.getCouponList)(o).then((function(o){"000000"==o.return_code&&(t.productList=o.return_data.list)}))},getCouponListgold:function(){var t=this,o={regionId:a.globalData.cityId,pageNum:this.pageNum,pageSize:this.pageSize,displayArea:2};(0,n.getCouponList)(o).then((function(o){"000000"==o.return_code&&(t.goldproductList=o.return_data.list)}))},tao:function(o,e){console.log(o),t.navigateToMiniProgram({appId:e,path:o,success:function(t){console.log("打开成功",t)},fail:function(t){console.log(t)}})},toMsg:function(){},toSearch:function(){t.navigateTo({url:"../../goods/HM-search/HM-search"})},toSwiper:function(o){t.reLaunch({url:"../category/category"})},toGoods:function(o){t.navigateTo({url:"../../goods/goods?id="+o})},swiperChange:function(t){this.currentSwiper=t.detail.current}}};o.default=i}).call(this,e("543d")["default"])},d115:function(t,o,e){"use strict";var n;e.d(o,"b",(function(){return a})),e.d(o,"c",(function(){return i})),e.d(o,"a",(function(){return n}));var a=function(){var t=this,o=t.$createElement;t._self._c},i=[]}},[["41ea","common/runtime","common/vendor"]]]);