(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/bonus/order/order"],{1151:function(t,e,n){"use strict";n.r(e);var o=n("d4b4"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},11519:function(t,e,n){"use strict";var o=n("78cb"),i=n.n(o);i.a},"1dae":function(t,e,n){"use strict";n.r(e);var o=n("b53f"),i=n("1151");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("11519");var r,c=n("f0c5"),u=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"c6bfea96",null,!1,o["a"],r);e["default"]=u.exports},"763c":function(t,e,n){"use strict";(function(t){n("8748");o(n("66fd"));var e=o(n("1dae"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"78cb":function(t,e,n){},b53f:function(t,e,n){"use strict";var o,i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.toSearch=!t.toSearch})},a=[];n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}))},d4b4:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-layout/app-layout")]).then(function(){return resolve(n("3dd6"))}.bind(null,n)).catch(n.oe)},u=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-form-id/app-form-id")]).then(function(){return resolve(n("e583"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/basic-component/app-tab-nav/app-tab-nav").then(function(){return resolve(n("5c8b"))}.bind(null,n)).catch(n.oe)},d={data:function(){return r({tabList:[{id:1,name:"未完成"},{id:2,name:"已完成"}],loading:null,list:[],activeTab:1,page:2,keyword:"",toSearch:!1,haveKeyword:!1},"list",[])},components:{"app-layout":c,"app-form-id":u,"app-tab-nav":s},computed:a({},(0,o.mapState)({theme:function(t){return t.mallConfig.theme},mall:function(t){return t.mallConfig.mall}})),methods:{open:function(t){this.id=t},goSearch:function(){t.showLoading({title:"加载中..."}),this.getList()},tabStatus:function(e){t.showLoading({title:"加载中..."}),this.list=[],this.page=2,this.activeTab=e.currentTarget.dataset.id,this.getList()},getSetting:function(){var e=this;e.$request({url:e.$api.bonus.setting}).then((function(n){0==n.code?(e.setting=n.data.list,e.setting.form&&e.setting.form.orders?t.setNavigationBarTitle({title:e.setting.form.orders}):t.setNavigationBarTitle({title:"分红订单"})):t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(t){e.$event.on(e.$const.EVENT_USER_LOGIN).then((function(){e.getSetting()}))}))},getList:function(){var e=this;e.$request({url:e.$api.bonus.order,data:{status:e.activeTab,keyword:e.keyword}}).then((function(n){e.$hideLoading(),t.hideLoading(),0==n.code?e.list=n.data.list:t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(n){e.$hideLoading(),t.hideLoading(),e.$event.on(e.$const.EVENT_USER_LOGIN).then((function(){e.getList()}))}))},getMore:function(){var e=this;t.showLoading({title:"加载中..."}),e.$request({url:e.$api.bonus.order,data:{status:e.activeTab,keyword:e.keyword,page:e.page}}).then((function(n){t.hideLoading(),0==n.code?n.data.list.length>0&&(e.loading=null,e.list=e.list.concat(n.data.list),e.page++):t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(e){t.hideLoading()}))},cancelSeacrch:function(){this.keyword="",this.toSearch=!this.toSearch,this.getList(),this.$hideLoading()}},onLoad:function(t){var e=this;t.nickname&&(e.keyword=t.nickname,e.haveKeyword=!0,e.toSearch=!0),e.$showLoading({text:"加载中..."}),e.getSetting(),e.getList()},onReachBottom:function(){this.getMore()}};e.default=d}).call(this,n("543d")["default"])}},[["763c","common/runtime","common/vendor"]]]);