(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/integral_mall/index/index"],{"4e7e":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("2f62");function a(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,o)}return e}function i(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?a(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var c={data:function(){return{success:!1,lose:!1,_num:0,more:!1,setting:{},coupon:[],userInfo:{integral:0},choose:{integral:0},banners:[],cats:[],id:0,exchangeCoupon:!1,current:"wechat",goods:[],args:!1,page:1}},computed:i({},(0,o.mapState)({theme:function(t){return t.mallConfig.theme},integralImg:function(t){return t.mallConfig.plugin.integral_mall},appSetting:function(t){return t.mallConfig.mall.setting},appImg:function(t){return t.mallConfig.__wxapp_img.mall}}),{},(0,o.mapGetters)("mallConfig",{getVideo:"getVideo"})),methods:{close:function(){this.success=!1,this.lose=!1},tab:function(t){this._num=t,this.page=1,this.goods=[],this.getGoods()},toList:function(){this.success=!1,t.navigateTo({url:"/pages/coupon/index/index"})},toGoods:function(n){console.log(n),n.goodsWarehouse.video_url&&1==this.getVideo?t.navigateTo({url:"/pages/goods/video?goods_id=".concat(n.id,"&sign=").concat(n.sign)}):t.navigateTo({url:"/plugins/integral_mall/goods/goods?goods_id="+n.id})},toCoupon:function(n){t.navigateTo({url:"/plugins/integral_mall/coupon/coupon?id="+n})},toAbout:function(){t.navigateTo({url:"/plugins/integral_mall/about/about"})},toExchange:function(){t.navigateTo({url:"/plugins/integral_mall/exchange/exchange"})},toDetail:function(){t.navigateTo({url:"/pages/user-center/integral-detail/integral-detail"})},getList:function(){var n=this;n.$request({url:n.$api.integral_mall.index}).then((function(e){n.$hideLoading(),0==e.code?(n.banners=e.data.banners,n.setting=e.data.setting,n.userInfo=e.data.userInfo):t.showToast({title:e.msg,icon:"none",duration:1e3})})).catch((function(t){n.$hideLoading()}))},getCoupon:function(){var n=this;n.$request({url:n.$api.integral_mall.coupon}).then((function(e){n.$hideLoading(),0==e.code?n.coupon=e.data.list:t.showToast({title:e.msg,icon:"none",duration:1e3})})).catch((function(t){n.$hideLoading()}))},getCat:function(){var n=this;n.$request({url:n.$api.integral_mall.cats}).then((function(e){n.$hideLoading(),0==e.code?n.cats=e.data.list:t.showToast({title:e.msg,icon:"none",duration:1e3})})).catch((function(t){n.$hideLoading()}))},getGoods:function(){var n=this;n.$request({url:n.$api.integral_mall.goods,data:{cat_id:n._num,page:n.page}}).then((function(e){n.$hideLoading(),0==e.code?(n.more=!1,e.data.list.length==e.data.pagination.pageSize&&(n.page++,n.more=!0),n.page>1?n.goods=n.goods.concat(e.data.list):n.goods=e.data.list):t.showToast({title:e.msg,icon:"none",duration:1e3})})).catch((function(t){n.$hideLoading()}))}},onReachBottom:function(){this.more&&this.getGoods()},onLoad:function(t){var n=this;n._num=0,n.$showLoading({type:"global",text:"加载中..."}),n.getList(),n.getCoupon(),n.getCat(),n.getGoods()}};n.default=c}).call(this,e("543d")["default"])},8511:function(t,n,e){"use strict";e.r(n);var o=e("4e7e"),a=e.n(o);for(var i in o)"default"!==i&&function(t){e.d(n,t,(function(){return o[t]}))}(i);n["default"]=a.a},e3a8:function(t,n,e){"use strict";e.r(n);var o=e("fecb"),a=e("8511");for(var i in a)"default"!==i&&function(t){e.d(n,t,(function(){return a[t]}))}(i);e("fbac");var r,c=e("f0c5"),u=Object(c["a"])(a["default"],o["b"],o["c"],!1,null,"876df00a",null,!1,o["a"],r);n["default"]=u.exports},fbac:function(t,n,e){"use strict";var o=e("fca2"),a=e.n(o);a.a},fc58:function(t,n,e){"use strict";(function(t){e("8748");o(e("66fd"));var n=o(e("e3a8"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},fca2:function(t,n,e){},fecb:function(t,n,e){"use strict";var o,a=function(){var t=this,n=t.$createElement;t._self._c},i=[];e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return o}))}},[["fc58","common/runtime","common/vendor"]]]);