(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shop-gift-detail/shop-gift-detail"],{"0092":function(t,e,n){},"390d":function(t,e,n){"use strict";(function(t){n("fdf4");i(n("66fd"));var e=i(n("f9f3"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"64e5":function(t,e,n){"use strict";var i=n("b60e"),a=n.n(i);a.a},"7f45":function(t,e,n){"use strict";n.r(e);var i=n("d4bb"),a=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},b60e:function(t,e,n){},d4bb:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("057a"),a={data:function(){return{current:0,giftList:[],agentList:[],agentTotal:0,params:{page_index:1,page_size:10},myNum:0,agentNum:0,totalPage:0,showHide:!1}},onShow:function(){this.getList(),this.getAgentList()},methods:{showAgent:function(e){var n=this;this.showHide=!showHide,this.showHide&&(0,i.getAgentGifts)({id:99}).then((function(e){200==e.code?n.agentGift=e.data:t.showModal({content:e.data||"获取下级经销商礼品失败",showCancel:!1})}))},getAgentList:function(e){var n=this,a=this.params;(0,i.myAgentExchange)(a).then((function(i){if(200==i.code){var a=i.data,s=a.list,o=a.total;n.agentTotal=Math.ceil(o/n.params.page_size),n.agentList=e?n.agentList.concat(s.user_gifts):s.user_gifts,n.agentNum=s.gifts_num}else t.showModal({content:i.data||"获取数据失败",showCancel:!1})}))},getList:function(e){var n=this,a=this.params;(0,i.myGifts)(a).then((function(i){if(200==i.code){var a=i.data,s=a.list,o=a.total;n.myNum=o,n.totalPage=Math.ceil(o/n.params.page_size),n.giftList=e?n.giftList.concat(s):s}else t.showModal({content:i.data||"获取数据失败",showCancel:!1})}))},getListMore:function(){if(this.params.page_index>=this.totalPage)return t.showToast({title:"没有更多啦~",icon:"none"}),!1;this.params.page_index++,0==this.current?this.getList(!0):this.getAgentList(!0)},cutTab:function(t){this.current=t,this.agentList=this.giftList=[],this.params.page_index=1,0==t?this.getList():this.getAgentList()}}};e.default=a}).call(this,n("543d")["default"])},d7ee:function(t,e,n){"use strict";var i=n("0092"),a=n.n(i);a.a},e849:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement,n=(t._self._c,0==t.current?t.__map(t.giftList,(function(e,n){var i=t.__get_orig(e),a=e.gift?Number(e.num):null;return{$orig:i,m0:a}})):null);t.$mp.data=Object.assign({},{$root:{l0:n}})},s=[]},f9f3:function(t,e,n){"use strict";n.r(e);var i=n("e849"),a=n("7f45");for(var s in a)"default"!==s&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("d7ee"),n("64e5");var o,u=n("f0c5"),r=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],o);e["default"]=r.exports}},[["390d","common/runtime","common/vendor"]]]);