(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabBar/home/home"],{"5dc0":function(t,e,o){},"9b1e":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o("524d"),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 e={code:a.globalData.code};(0,n.HandleCode)(e).then((function(t){"000000"==t.return_code&&(a.globalData.openId=t.return_data.openId)}))}}),this.postionIng(),t.getStorage({key:"user",success:function(e){a.globalData.userInfo=e.data,t.getStorage({key:"token",success:function(t){a.globalData.token=t.data}})},fail:function(t){}})},methods:{postionIng:function(){t.showLoading({title:"加载中"});var e=this;t.getLocation({type:"wgs84",success:function(o){t.request({url:"https://apis.map.qq.com/ws/geocoder/v1/?location="+o.latitude+","+o.longitude+"&key=YQDBZ-T54K4-5J6U7-DO3BA-CNZJO-PTFMU",data:{},success:function(o){e.city=o.data.result.address_component.city.replace(/市/g,"");o.data.result.ad_info.adcode.substring(5,"");a.globalData.cityId="500100",e.getCouponListArea(),e.getCouponListgold(),t.hideLoading()},fail:function(){t.hideLoading()}})}})},getCouponListArea:function(){var t=this,e={regionId:a.globalData.cityId,pageNum:this.pageNum,pageSize:this.pageSize,displayArea:1};(0,n.getCouponList)(e).then((function(e){"000000"==e.return_code&&(t.productList=e.return_data.list)}))},getCouponListgold:function(){var t=this,e={regionId:a.globalData.cityId,pageNum:this.pageNum,pageSize:this.pageSize,displayArea:2};(0,n.getCouponList)(e).then((function(e){"000000"==e.return_code&&(t.goldproductList=e.return_data.list)}))},tao:function(e,o){console.log(e),t.navigateToMiniProgram({appId:o,path:e,success:function(t){console.log("打开成功",t)},fail:function(t){console.log(t)}})},toMsg:function(){t.showToast({title:"暂未开通",icon:"none"})},toSearch:function(){t.navigateTo({url:"../../goods/HM-search/HM-search"})},toSwiper:function(e){t.reLaunch({url:"../category/category"})},toGoods:function(e){t.navigateTo({url:"../../goods/goods?id="+e})},swiperChange:function(t){this.currentSwiper=t.detail.current}}};e.default=i}).call(this,o("543d")["default"])},bc17:function(t,e,o){"use strict";var n=o("5dc0"),a=o.n(n);a.a},c3a6:function(t,e,o){"use strict";(function(t){o("185d");n(o("66fd"));var e=n(o("c840"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},c840:function(t,e,o){"use strict";o.r(e);var n=o("ee88"),a=o("db43");for(var i in a)"default"!==i&&function(t){o.d(e,t,(function(){return a[t]}))}(i);o("bc17");var u,c=o("f0c5"),r=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],u);e["default"]=r.exports},db43:function(t,e,o){"use strict";o.r(e);var n=o("9b1e"),a=o.n(n);for(var i in n)"default"!==i&&function(t){o.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},ee88:function(t,e,o){"use strict";var n;o.d(e,"b",(function(){return a})),o.d(e,"c",(function(){return i})),o.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement;t._self._c},i=[]}},[["c3a6","common/runtime","common/vendor"]]]);