(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{1516:function(e,t,n){"use strict";n.r(t);var o=n("a272"),i=n("e838");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("a7a8");var a=n("f0c5"),s=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=s.exports},"722b":function(e,t,n){"use strict";(function(e){var o=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("2eee")),r=o(n("c973")),a=o(n("9523")),s=n("d540"),c=(n("5635"),n("9918")),u=n("7346"),f=n("26cb");function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var p={data:function(){return{text:"",page:1,limit:10,loadingType:"more",swiperHeight:0,checkid:0,titleNViewBackground:"",swiperCurrent:0,swiperLength:0,carouselList:[],firstList:[],goodList:[],shopList:[]}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,f.mapState)("user",["hasLogin","userInfo"])),onShareAppMessage:function(e){var t=getCurrentPages(),n=t[t.length-1],o=n.route,i=(n.options,{});return i=this.userInfo.uid?{title:this.userInfo.nickname+"邀请您加入华景美业",path:o+"?scene="+this.userInfo.uid,imageUrl:"",success:function(e){e.errMsg},fail:function(){"shareAppMessage:fail cancel"==res.errMsg||res.errMsg}}:{title:"华景美业",path:o,imageUrl:"",success:function(e){e.errMsg},fail:function(){"shareAppMessage:fail cancel"==res.errMsg||res.errMsg}},i},onReachBottom:function(){console.log("到底"),this.getGoodList()},onLoad:function(t){t.scene&&e.setStorage({key:"spread_code",data:t.scene})},onShow:function(){this.getGoodList(),this.loadData()},methods:{getGoodList:function(){var e=this;"loading"!=e.loadingType&&"noMore"!=e.loadingType&&(e.loadingType="loading",(0,c.getProducts)({page:e.page,limit:e.limit,set_vip:1}).then((function(t){e.goodList=e.goodList.concat(t.data),e.limit==t.data.length?(e.page++,e.loadingType="more"):e.loadingType="noMore"})))},navto:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;1==n?this.hasLogin?e.navigateTo({url:t,fail:function(){e.switchTab({url:t})}}):((0,u.saveUrl)(),(0,u.interceptor)()):e.navigateTo({url:t,fail:function(){e.switchTab({url:t})}})},navTo:function(e){""==e?this.$api.msg("暂未开通，敬请期待"):this.navto(e)},clickSearch:function(){e.navigateTo({url:"/pages/product/search"})},onImageError:function(e,t){this[e][t].image="/static/error/errorImage.jpg"},loadData:function(){var t=this;return(0,r.default)(i.default.mark((function n(){return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:(0,s.loadIndexs)({}).then((function(n){var o=n.data,i=o.info;console.log(i,"商品信息"),t.carouselList=o.banner,t.swiperLength=t.carouselList.length,t.bastList=o.giftInfo,o.info.firstList.forEach((function(e){e.isVip=e.store_type?"3":"0"})),t.firstList=o.info.firstList,e.stopPullDownRefresh()})).catch((function(t){e.stopPullDownRefresh()}));case 1:case"end":return n.stop()}}),n)})))()},swiperChange:function(e){var t=e.detail.current;this.swiperCurrent=t,this.titleNViewBackground=this.carouselList[t].background},bannerNavToUrl:function(t){e.navigateTo({url:t.wap_url})},comfirm:function(t){console.log(t);var n=this.uniCopy(t);!1===n?e.showToast({title:"不支持"}):e.showToast({title:"复制成功",icon:"none"}),this.$refs.popupkf.close()},uniCopy:function(t){e.setClipboardData({data:t,success:function(){return console.log("success"),!0}})},openKf:function(){this.$refs.popupkf.open()},cancel:function(){this.$refs.popupkf.close()}}};t.default=p}).call(this,n("543d")["default"])},a272:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o}));var o={uniLoadMore:function(){return n.e("components/uni-load-more/uni-load-more").then(n.bind(null,"eaf8"))},uniPopup:function(){return n.e("components/uni-popup/uni-popup").then(n.bind(null,"9fd5"))}},i=function(){var e=this.$createElement;this._self._c},r=[]},a7a8:function(e,t,n){"use strict";var o=n("cb16"),i=n.n(o);i.a},cb16:function(e,t,n){},d576:function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("3e39");o(n("66fd"));var i=o(n("1516"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},e838:function(e,t,n){"use strict";n.r(t);var o=n("722b"),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a}},[["d576","common/runtime","common/vendor"]]]);