File: /var/www/uileague/cms/js/chunk-4341dd7c.689d151c.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4341dd7c","chunk-2d22e0e0","chunk-2d0b6e7c"],{"1ec5":function(e,t,a){"use strict";a.r(t),a.d(t,"tableColumn",(function(){return n}));var n=[{prop:"id",label:"ID",width:70},{prop:"league_name",label:"聯賽名稱"},{prop:"league_logo",label:"Logo",noRepeat:!0},{prop:"league_type",label:"聯賽類型",noRepeat:!0},{prop:"league_teams",label:"聯賽球隊",noRepeat:!0},{prop:"created",label:"添加時間",width:160},{prop:"updated",label:"更新時間",width:160}]},3695:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"tableSample"},[a("div",{staticClass:"header"},[a("div",{staticClass:"header-left"},[a("lin-search",{attrs:{placeholder:"搜索"},on:{query:e.onQueryChange}}),a("el-select",{staticClass:"select-filters",staticStyle:{width:"160px",margin:"0 10px"},attrs:{size:"medium",placeholder:"聯賽類型"},on:{change:e.filterChange},model:{value:e.filter_league_type,callback:function(t){e.filter_league_type=t},expression:"filter_league_type"}},e._l(e.filter_league_types,(function(e){return a("el-option",{key:e.key,attrs:{label:e.value,value:e.key}})})),1)],1),a("div",{staticClass:"header-right"},[e.canAdd?a("el-button",{attrs:{type:"primary",round:""},on:{click:e.handAdd}},[e._v("添加聯賽"),a("i",{staticClass:"el-icon-circle-plus-outline el-icon--right"})]):e._e()],1)]),a("div",{staticClass:"table-main"},[a("el-dialog",{attrs:{top:"5vh",width:"60%",visible:e.dialogTableVisible},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("span",[e._v("選擇要展示的列:")]),a("el-checkbox-group",{staticClass:"m-20",on:{change:e.handleChange},model:{value:e.checkList,callback:function(t){e.checkList=t},expression:"checkList"}},e._l(e.tempCheckList,(function(e){return a("el-checkbox",{key:e,attrs:{disabled:"標題"===e||"排名"===e,label:e}})})),1),a("span",[e._v("選擇固定在左側的列:")]),a("el-checkbox-group",{staticClass:"m-20",model:{value:e.fixedLeftList,callback:function(t){e.fixedLeftList=t},expression:"fixedLeftList"}},e._l(e.tempCheckList,(function(t){return a("el-checkbox",{key:t,attrs:{disabled:e.fixedRightList.indexOf(t)>-1||-1===e.checkList.indexOf(t),label:t}})})),1),a("span",[e._v("選擇固定在右側的列:")]),a("el-checkbox-group",{staticClass:"m-20",model:{value:e.fixedRightList,callback:function(t){e.fixedRightList=t},expression:"fixedRightList"}},e._l(e.tempCheckList,(function(t){return a("el-checkbox",{key:t,attrs:{disabled:e.fixedLeftList.indexOf(t)>-1||-1===e.checkList.indexOf(t),label:t}})})),1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.tableData,id:"out-table'"},on:{"row-dblclick":e.rowClick}},[e._l(e.filterTableColumn,(function(t){return["排序"===t.label?a("el-table-column",{key:t.label,attrs:{label:"排序"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("input",{directives:[{name:"model",rawName:"v-model",value:t.row.sorting,expression:"props.row.sorting"}],staticClass:"sort-input",attrs:{type:"number"},domProps:{value:t.row.sorting},on:{blur:function(a){return e.handleSort(t.row.sorting,t.row)},input:function(a){a.target.composing||e.$set(t.row,"sorting",a.target.value)}}})]}}],null,!0)}):e._e(),t.noRepeat?e._e():a("el-table-column",{key:t.label,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""}}),"league_logo"===t.prop?a("el-table-column",{key:t.label,attrs:{label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[null!=t.row.logo_obj?a("a",{attrs:{target:"_blank",href:t.row.logo_obj.url}},[a("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[a("a",{attrs:{target:"_blank",href:t.row.logo_obj.url}},[a("img",{attrs:{src:t.row.logo_obj.url}})]),a("img",{staticClass:"team-logo",attrs:{slot:"reference",src:t.row.logo_obj.thumbnail},slot:"reference"})])],1):e._e()]}}],null,!0)}):e._e(),"league_teams"===t.prop?a("el-table-column",{key:t.label,attrs:{label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.league_teams.length)+" 個")])]}}],null,!0)}):e._e(),"league_type"===t.prop?a("el-table-column",{key:t.label,attrs:{label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e.league_types.length>0?a("div",e._l(e.league_types,(function(n,i){return a("el-tag",{directives:[{name:"show",rawName:"v-show",value:t.row.league_type==n.key,expression:"props.row.league_type == league_type.key"}],key:n.key,attrs:{color:e.league_color[i]}},[e._v(e._s(n.value))])})),1):e._e()]}}],null,!0)}):e._e(),"status"===t.prop?a("el-table-column",{key:t.label,attrs:{label:t.label,"show-overflow-tooltip":!0,fixed:!!t.fixed&&t.fixed,width:t.width?t.width:""},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.status?a("el-tag",{attrs:{type:"success"}},[e._v("正常")]):a("el-tag",{attrs:{type:"danger"}},[e._v("停用")])]}}],null,!0)}):e._e()]})),e.canEdit||e.canDelete?a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.operate,(function(n,i){return a("el-button",{key:i,attrs:{type:n.type,plain:"",size:"mini"},nativeOn:{click:function(a){return a.preventDefault(),a.stopPropagation(),e.buttonMethods(n.func,t.$index,t.row)}}},[e._v(e._s(n.name))])}))}}],null,!1,3794201391)}):e._e()],2),a("el-dialog",{attrs:{title:e.dialogTitle,width:"800px",visible:e.showDialog,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.showDialog=t},close:e.resetForm}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.syncLoading,expression:"syncLoading"}],ref:"form",attrs:{model:e.temp,"label-width":"120px",rules:e.rules}},[a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{label:"ID",prop:"id"}},[a("el-col",{attrs:{span:11}},[a("el-input",{attrs:{value:this.temp.id,disabled:""}})],1)],1),a("el-form-item",{attrs:{label:"聯賽名稱",prop:"league_name"}},[a("el-col",{attrs:{span:24}},[a("el-input",{model:{value:e.temp.league_name,callback:function(t){e.$set(e.temp,"league_name",t)},expression:"temp.league_name"}})],1)],1),a("el-form-item",{attrs:{label:"聯賽 Logo",prop:"league_logo"}},[a("el-col",{attrs:{span:24}},[a("el-upload",{staticClass:"upload-demo",attrs:{action:"/api-data/",multiple:!1,name:"orm_file",data:e.uploadPayload,"on-preview":e.handlePreview,"on-remove":e.handleRemoveLogo,"on-success":e.handleUploadLogo,"file-list":e.fileListLogo,accept:"image/*",limit:1,"list-type":"picture"}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("點擊上載")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只能上載一個 jpg/png 文件")])],1)],1)],1),a("el-form-item",{attrs:{label:"聯賽類型",prop:"league_type"}},[a("el-col",{attrs:{span:24}},[a("el-radio-group",{model:{value:e.temp.league_type,callback:function(t){e.$set(e.temp,"league_type",t)},expression:"temp.league_type"}},e._l(e.league_types,(function(t){return a("el-radio-button",{attrs:{label:t.key}},[e._v(e._s(t.value))])})),1)],1)],1),a("el-form-item",{attrs:{label:"聯賽球隊",prop:"league_teams"}},[a("el-col",{attrs:{span:24}},[a("el-select",{attrs:{filterable:"",multiple:"",placeholder:"請選擇"},model:{value:e.temp.league_teams,callback:function(t){e.$set(e.temp,"league_teams",t)},expression:"temp.league_teams"}},e._l(e.teams,(function(t){return a("el-option",{key:t.id,attrs:{label:t.team_name,value:t.id}},[null!=t.logo_obj?a("img",{staticStyle:{width:"20px",display:"inline","line-height":"32px","vertical-align":"middle"},attrs:{src:t.logo_obj.thumbnail,alt:""}}):e._e(),a("span",{staticStyle:{"font-weight":"bold","padding-left":"5px"}},[e._v(e._s(t.team_name))])])})),1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{round:""},on:{click:function(t){e.showDialog=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary",round:""},on:{click:function(t){0==e.temp.id?e.confirmAdd():e.confirmEdit()}}},[e._v("保 存")])],1)],1),a("matches-dialog",{attrs:{title:(null!=e.currentLeague?e.currentLeague.league_name+" - ":"")+"賽程",league:e.currentLeague,visible:e.showMatchesDialog},on:{beforeClose:function(t){e.showMatchesDialog=!1}}}),e.searchKeyword?e._e():a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{"current-page":this.currentPage,"page-sizes":[10,20,30,50],"page-size":this.pageCount,layout:"total, sizes, prev, pager, next, jumper",total:this.total_nums},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)])},i=[],l=a("a34a"),o=a.n(l),r=a("63b8"),s=a("566a"),u=a("1ec5"),c=a("f9b9"),p=a("b4b6"),d=(a("f121"),a("283a"));function h(e,t,a,n,i,l,o){try{var r=e[l](o),s=r.value}catch(u){return void a(u)}r.done?t(s):Promise.resolve(s).then(n,i)}function g(e){return function(){var t=this,a=arguments;return new Promise((function(n,i){var l=e.apply(t,a);function o(e){h(l,n,i,o,r,"next",e)}function r(e){h(l,n,i,o,r,"throw",e)}o(void 0)}))}}var f={components:{LinSearch:r["default"],MatchesDialog:s["default"]},data:function(){return{tableData:[],loading:!1,Hidden:!0,searchKeyword:"",checkList:[],filterTableColumn:[],refreshPagination:!0,currentPage:1,pageCount:50,total_nums:0,dialogTableVisible:!1,fixedLeftList:[],fixedRightList:[],value:"",editRow:0,showTooltip:!0,syncLoading:!1,catList:[],options:[],optionsValue:[1],status:{0:"下架",1:"展示中",99:"已删除"},dialogTitle:"",showDialog:!1,temp:{id:0,league_name:null,league_logo:null,league_type:null,league_teams:[]},nfc:null,nfc_options:[],loadingNFC:!1,transfer_data:[],filterMethod:function(e,t){return t.pinyin.indexOf(e)>-1},rules:{league_name:[{required:!0,message:"聯賽名稱不能為空",trigger:"blur"}]},showDeleteDialog:!1,showImportDialog:!1,league_types:[{key:"0",value:"循環賽"},{key:"1",value:"淘汰賽"}],league_color:["","green"],filter_league_type:"",filter_league_types:[{key:"",value:"所有類型"},{key:"0",value:"循環賽"},{key:"1",value:"淘汰賽"}],teams:[],filter_teams:[{id:"",dept_name:"所有球隊",dept_desc:""}],uploadPayload:{c:"UploadFile",a:"upload",for:"league-logo",allow:"image",token:""},fileListLogo:[],currentLeague:null,showMatchesDialog:!1}},computed:{canAdd:function(){return-1!=this.$store.state.permissions.indexOf("add_team")},canEdit:function(){return-1!=this.$store.state.permissions.indexOf("edit_team")},canDelete:function(){return-1!=this.$store.state.permissions.indexOf("delete_team")}},created:function(){var e=this;this.uploadPayload.token=Object(d["getToken"])("access_token").split(" ")[1],this.getList(this.cat,this.currentPage,this.pageCount),this.getTeamList(),this.tableColumn=u["tableColumn"],this.operate=[],this.canEdit&&(this.operate.push({name:"比賽",func:"handleMaches",type:"primary"}),this.operate.push({name:"修改",func:"handleEdit",type:"primary"})),this.canDelete&&this.operate.push({name:"刪除",func:"handleDelete",type:"danger"}),this.tempCheckList=u["tableColumn"].map((function(e){return e.label})).slice(),this.checkList=u["tableColumn"].map((function(e){return e.label})),this.filterTableColumn=u["tableColumn"].filter((function(t){return e.checkList.indexOf(t.label)>-1}))},methods:{getList:function(){var e=g(o.a.mark((function e(t,a,n){var i,l;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.loading=!0,i=this.searchKeyword,e.next=4,c["LeagueModel"].getList({cat:t,start:a,count:n,keyword:i,filter_league_type:this.filter_league_type});case 4:l=e.sent,this.tableData=l.data,this.currentPage=l.currentPage,this.total_nums=parseInt(l.total),this.loading=!1;case 9:case"end":return e.stop()}}),e,this)})));function t(t,a,n){return e.apply(this,arguments)}return t}(),filterChange:function(){this.currentPage=1,this.getList(this.cat,this.currentPage,this.pageCount)},getTeamList:function(){var e=g(o.a.mark((function e(){var t,a;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,p["TeamModel"].getList({cat:0,start:1,count:-1,keyword:""});case 2:t=e.sent,this.teams=t.data,a=[{id:"",team_name:"所有球隊",team_desc:""}],this.filter_teams=a.concat(t.data);case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),rowClick:function(e){console.log(e)},filterRoleChange:function(e){console.log(e),this.getList(this.cat,this.currentPage,this.pageCount)},handleChange:function(){var e=this;this.filterTableColumn=u["tableColumn"].filter((function(t){return e.checkList.indexOf(t.label)>-1}))},showRowOperateModal:function(){},handleSort:function(e,t){console.log("rowData",t),this.$message({type:"success",message:"排序已更改为:".concat(e)})},handleRecommend:function(e,t){var a=this;this.loading=!0,console.log(e,t),e?setTimeout((function(){a.loading=!1,a.$message({type:"success",message:"推荐成功"})}),1e3):setTimeout((function(){a.loading=!1,a.$message({type:"success",message:"取消推荐"})}),1e3)},handleCellEdit:function(e){e.editFlag=!0,this.$set(this.filterTableColumn[7],"width",200),this.tempEditRemark=e.remark,this.editRow++},handleCellSave:function(e){var t=this;e.editFlag=!1,setTimeout((function(){t.editRow--,t.$message({type:"success",message:"修改成功"})}),1e3)},handleCellCancel:function(e){e.editFlag=!1,console.log(this.tempEditRemark),e.remark=this.tempEditRemark,this.editRow--},handleSizeChange:function(e){var t=this;console.log("每页 ".concat(e," 条")),this.pageCount=e,this.loading=!0,setTimeout((function(){t.getList(t.cat,t.currentPage,t.pageCount),t.loading=!1}),1e3)},handleCurrentChange:function(){var e=g(o.a.mark((function e(t){var a=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.currentPage=t,this.loading=!0,setTimeout((function(){a.getList(a.cat,a.currentPage,a.pageCount),a.loading=!1}),1e3);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),buttonMethods:function(e,t,a){var n=this,i=this.$options.methods;i[e](n,t,a)},beforeCloseImportDialog:function(){this.showImportDialog=!1},handleImport:function(){var e=g(o.a.mark((function e(t){var a,n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(t),null!=t){e.next=5;break}this.$message.error("文件解析出錯"),e.next=20;break;case 5:if(t=t.map((function(e){var t=new Object;return t.group_name=e.Name,t.remark=e.Remark,t})),0!=t.length){e.next=10;break}this.$message.error("導入失敗,數據表為空"),e.next=20;break;case 10:return a=this.$loading({lock:!0,text:"正在導入,請稍候...",background:"rgba(255,255,255, 0.8)"}),e.next=13,GroupModel.import(this.temp.server_id,t);case 13:n=e.sent,console.log(n),0==n.rc?this.$confirm("其中"+n.data.success.length+"項導入成功,"+n.data.error.length+"項導入失敗,"+n.data.duplicate.length+"項因已存在已被忽略","處理完成",{confirmButtonText:"確定",showCancelButton:!1,type:"success"}):this.$message.error(n.msg),a.close(),this.showImportDialog=!1,this.currentPage=1,this.getList(this.cat,this.currentPage,this.pageCount);case 20:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),handleEdit:function(e,t,a,n){e.temp.id=a.id,e.temp.league_name=a.league_name,e.temp.league_logo=a.league_logo,e.temp.league_type=a.league_type,e.temp.league_teams=null==a.league_teams?[]:a.league_teams,e.fileListLogo=null==a.logo_obj?[]:[a.logo_obj],e.dialogTitle="修改聯賽",e.showDialog=!0},handleMaches:function(e,t,a,n){e.currentLeague=a,e.showMatchesDialog=!0},handAdd:function(){this.temp.id=0,this.temp.league_name="",this.temp.league_logo="",this.temp.league_type="0",this.temp.league_teams=[],this.fileListLogo=[],this.dialogTitle="添加聯賽",this.showDialog=!0},confirmAdd:function(){var e=g(o.a.mark((function e(){var t=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=g(o.a.mark((function e(a){var n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=14;break}return t.syncLoading=!0,e.next=4,c["LeagueModel"].setLeague("add",t.temp);case 4:if(n=e.sent,t.syncLoading=!1,0!==n.rc){e.next=13;break}return t.showDialog=!1,t.$message.success(n.msg),e.next=11,t.getList(t.cat,t.currentPage,t.pageCount);case 11:e.next=14;break;case 13:t.$message.error(n.msg);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleDelete:function(e,t,a){e.$confirm("此操作將永久刪除該聯賽,是否繼續?","提示",{confirmButtonText:"確定",cancelButtonText:"取消",type:"warning"}).then(g(o.a.mark((function t(){var n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,c["LeagueModel"].setLeague("delete",a);case 3:if(n=t.sent,0!==n.rc){t.next=11;break}return e.loading=!1,e.$message.success(n.msg),t.next=9,e.getList(e.cat,e.currentPage,e.pageCount);case 9:t.next=13;break;case 11:e.loading=!1,e.$message.error(n.msg);case 13:case"end":return t.stop()}}),t)}))))},confirmEdit:function(){var e=g(o.a.mark((function e(){var t=this;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$refs.form.validate(function(){var e=g(o.a.mark((function e(a){var n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=14;break}return t.syncLoading=!0,e.next=4,c["LeagueModel"].setLeague("update",t.temp);case 4:if(n=e.sent,t.syncLoading=!1,0!==n.rc){e.next=13;break}return t.showDialog=!1,t.$message.success(n.msg),e.next=11,t.getList(t.cat,t.currentPage,t.pageCount);case 11:e.next=14;break;case 13:t.$message.error(n.msg);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handlePreview:function(e){console.log(e)},handleUploadLogo:function(e,t,a){console.log("upload",e,t,a),0==e.rc?(this.fileListLogo=[t],this.temp.league_logo=e.id):(this.fileListLogo=[],this.temp.league_logo=0)},handleRemoveLogo:function(){var e=g(o.a.mark((function e(t,a){return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:console.log(t,a),this.fileListLogo=[],this.temp.league_logo=0;case 3:case"end":return e.stop()}}),e,this)})));function t(t,a){return e.apply(this,arguments)}return t}(),filterNfcChange:function(e){this.temp.nfc_code=e},onQueryChange:function(e){this.searchKeyword=e.trim(),this.currentPage=1,this.getList(this.cat,this.currentPage,this.pageCount)},handleChangeOptions:function(e){this.optionsValue=e;var t=e[e.length-1];this.cat=t,this.total_nums=0,this.getList(this.cat,this.currentPage,this.pageCount)},_generateOptionsData:function(e){var t=[];return e.forEach((function(e){0!=e.pid||t.push({value:e.id,label:e.title,children:[]})})),t.forEach((function(a,n){var i=[];e.forEach((function(e){e.pid===a.value&&i.push({value:e.id,label:e.title,disabled:!e.status})})),t[n].children=i})),t},resetForm:function(){this.$refs.form.resetFields(),this.optionsValue=[]}},watch:{"temp.file":{handler:function(){this.temp.title=decodeURI(this.temp.file).replace(/%2F/g,"/")}},fixedLeftList:function(){var e=this;this.filterTableColumn.map((function(t,a){return e.fixedLeftList.indexOf(t.label)>-1?e.$set(e.filterTableColumn[a],"fixed","left"):-1===e.fixedRightList.indexOf(t.label)&&e.$set(e.filterTableColumn[a],"fixed",!1),""}))},fixedRightList:function(){var e=this;this.filterTableColumn.map((function(t,a){return e.fixedRightList.indexOf(t.label)>-1?e.$set(e.filterTableColumn[a],"fixed","right"):-1===e.fixedLeftList.indexOf(t.label)&&e.$set(e.filterTableColumn[a],"fixed",!1),""}))},editRow:function(){return this.filterTableColumn[7]&&0===this.editRow&&this.$set(this.filterTableColumn[7],"width",200),""}}},m=f,b=(a("6927"),a("2877")),v=Object(b["a"])(m,n,i,!1,null,"2d5946c7",null);t["default"]=v.exports},"51bb":function(e,t,a){},6927:function(e,t,a){"use strict";var n=a("51bb"),i=a.n(n);i.a},f9b9:function(e,t,a){"use strict";a.r(t),a.d(t,"LeagueModel",(function(){return g}));var n=a("a34a"),i=a.n(n),l=a("ceda");a("4360");function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(a,!0).forEach((function(t){s(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function u(e,t,a,n,i,l,o){try{var r=e[l](o),s=r.value}catch(u){return void a(u)}r.done?t(s):Promise.resolve(s).then(n,i)}function c(e){return function(){var t=this,a=arguments;return new Promise((function(n,i){var l=e.apply(t,a);function o(e){u(l,n,i,o,r,"next",e)}function r(e){u(l,n,i,o,r,"throw",e)}o(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,a){return t&&d(e.prototype,t),a&&d(e,a),e}var g=function(){function e(){p(this,e)}return h(e,null,[{key:"getList",value:function(){var e=c(i.a.mark((function e(t){var a;return i.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=new Object,e.prev=1,e.next=4,Object(l["post"])("/api-data",{c:"League",a:"getList",pageLimit:t.count,cpage:t.start,keyword:t.keyword,filter_league_type:t.filter_league_type}).then((function(e){a=e})).catch((function(e){console.log(null==e?"網絡出錯":e),console.log("網絡出錯123")}));case 4:e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),console.log("網絡出錯");case 10:return e.abrupt("return",a);case 11:case"end":return e.stop()}}),e,null,[[1,7]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setLeague",value:function(){var e=c(i.a.mark((function e(t,a){var n;return i.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Object,e.prev=1,e.next=4,Object(l["post"])("/api-data",r({c:"League",a:t},a)).then((function(e){n=e})).catch((function(e){console.log(null==e?"網絡出錯":e)}));case 4:e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),console.log("網絡出錯");case 10:return e.abrupt("return",n);case 11:case"end":return e.stop()}}),e,null,[[1,7]])})));function t(t,a){return e.apply(this,arguments)}return t}()}]),e}()}}]);