You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.8 KiB
1 lines
3.8 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/tabBar/home/home"],{"3f51":function(t,e,o){"use strict";o.r(e);var n=o("e4d9"),a=o("5964");for(var i in a)"default"!==i&&function(t){o.d(e,t,(function(){return a[t]}))}(i);o("4bab");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},"41ea":function(t,e,o){"use strict";(function(t){o("eba6");n(o("66fd"));var e=n(o("3f51"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},"4bab":function(t,e,o){"use strict";var n=o("91be"),a=o.n(n);a.a},5964:function(t,e,o){"use strict";o.r(e);var n=o("c8f8"),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},"91be":function(t,e,o){},c8f8:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o("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){},onPullDownRefresh:function(){},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){a.globalData.latitude=o.latitude,a.globalData.longitude=o.longitude,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,"");var n=o.data.result.ad_info.adcode.substring(5,"");a.globalData.cityId=n+0,e.getCouponListArea(),e.getCouponListgold(),t.hideLoading()},fail:function(){t.hideLoading()}})}})},toScan:function(){t.scanCode({success:function(e){t.navigateTo({url:"../../goods/coupons-info-details/coupons-info-details?id="+JSON.parse(e.result).code})},fail:function(){t.showToast({title:"无法识别二维码",icon:"none",duration:2e3})}})},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(){},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"])},e4d9: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=[]}},[["41ea","common/runtime","common/vendor"]]]); |