(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"029e":function(e,t,n){"use strict";n.r(t);var o=n("fb72"),r=n("98ee");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("2f5c");var a,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=u.exports},"2f5c":function(e,t,n){"use strict";var o=n("7fbe"),r=n.n(o);r.a},"38ba":function(e,t,n){"use strict";(function(e){n("e27b");o(n("66fd"));var t=o(n("029e"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},"7fbe":function(e,t,n){},"98ee":function(e,t,n){"use strict";n.r(t);var o=n("da0d"),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=r.a},da0d:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n("a34a")),r=n("095e"),i=n("26cb"),a=n("a978"),c=n("ef8a");function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,o,r,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(o,r)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){s(i,o,r,a,c,"next",e)}function c(e){s(i,o,r,a,c,"throw",e)}a(void 0)}))}}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}function p(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){d(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}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={data:function(){return{carouselList:[],swiperCurrent:0,dataList:[],erweima:"",weixin:"",swiperLength:1}},onLoad:function(t){t.scene&&e.setStorage({key:"spread_code",data:t.scene})},computed:p(p({},(0,i.mapState)("user",["userInfo","orderInfo","hasLogin"])),(0,i.mapState)(["baseURL"])),onShow:function(){this.hasLogin||e.showModal({title:"登录",content:"您未登录，是否马上登陆?",success:function(e){e.confirm&&(0,a.interceptor)()},fail:function(e){console.log(e)}}),this.loadData()},onPullDownRefresh:function(){this.loadData()},methods:{listChange:function(e){this.checkid=e.detail.current},clickSearch:function(){e.navigateTo({url:"/pages/product/search"})},nav:function(t){e.navigateTo({url:t,fail:function(){console.log(1),e.switchTab({url:t})}})},showPopup:function(){this.$refs.popup.open()},close:function(){this.$refs.popup.close()},swiperChange:function(e){var t=e.detail.current;this.swiperCurrent=t},copy:function(t){e.setClipboardData({data:t,success:function(){return console.log("success"),!0}})},comfirm:function(t){console.log(t);var n=this.uniCopy(t);!1===n?e.showToast({title:"不支持"}):e.showToast({title:"复制成功",icon:"none"}),this.$refs.popup.close()},bc_code:function(){var t=this;console.log("保存二维码",this.erweima),e.downloadFile({url:this.erweima,success:function(n){200==n.statusCode&&e.saveImageToPhotosAlbum({filePath:n.tempFilePath,success:function(){t.$api.msg("保存成功")},fail:function(){t.$api.msg("保存失败")}})}})},loadData:function(){var t=this;return f(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:(0,r.loadIndexs)({}).then((function(n){var o=n.data;console.log(o),t.carouselList=o.banner,t.swiperLength=t.carouselList.length,t.dataList=o.likeInfo,e.stopPullDownRefresh()})).catch((function(t){e.stopPullDownRefresh()})),(0,c.service)({}).then((function(e){var n=e.data;t.erweima=n.service_qr,t.weixin=n.service_wechat}));case 2:case"end":return n.stop()}}),n)})))()},navToDetailPage:function(t){var n=t.id;e.navigateTo({url:"/pages/product/product?id="+n})}}};t.default=h}).call(this,n("543d")["default"])},fb72:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var o={uniPopup:function(){return n.e("components/uni-popup/uni-popup").then(n.bind(null,"bf97"))}},r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.__map(e.dataList,(function(t,n){var o=e.__get_orig(t),r=(t.ot_price-t.price).toFixed(2);return{$orig:o,g0:r}})));e.$mp.data=Object.assign({},{$root:{l0:n}})},i=[]}},[["38ba","common/runtime","common/vendor"]]]);