(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1c310fe0"],{"3e1c":function(t,e,a){"use strict";a.r(e);var n=a("85f4"),l={data:()=>({table:{currentPage:2,pageSizes:[10],total:0,data:null}}),methods:{calcTime(t){const e=Math.floor(t/86400);t%=86400;const a=Math.floor(t/3600);t%=3600;return`${e}天 ${a}时 ${Math.floor(t/60)}分 ${t%=60}秒`},handleSizeChange(t){},handleCurrentChange(t){this.getData(10,t)},getData(t,e){Object(n.d)({}).then(t=>{this.table.data=t.data})},jumpToEdit(t){this.$router.push({path:"/plugin/PinPackageDetail",query:{id:t}})},addPin(){this.$router.push({path:"/plugin/PinPackageAdd",query:{}})},delItem(t){this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(n.b)({id:t}).then(t=>{this.getData(10,1),this.$message.success("删除成功!")}).catch(t=>{this.$message.error("删除失败!")})}).catch(()=>{})}},mounted(){this.getData(10,1)}},i=a("2877"),o=Object(i.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"m-b-12 ls-card"},[a("el-alert",{attrs:{title:"温馨提示：本页面可以管理你的套餐,套餐用来实现推广,需要收费,可以通过套餐进行推广。",type:"info","show-icon":"",closable:!1}}),a("el-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"primary",size:"mini"},on:{click:t.addPin}},[t._v("新增套餐")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),a("el-table-column",{attrs:{prop:"name",label:"标题"}}),a("el-table-column",{attrs:{prop:"description",label:"描述"}}),a("el-table-column",{attrs:{label:"位置"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.position.name))])]}}])}),a("el-table-column",{attrs:{label:"启用"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{label:"套餐时长"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.calcTime(e.row.time)))])]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.jumpToEdit(e.row.id)}}},[t._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.delItem(e.row.id)}}},[t._v("删除")])]}}])})],1)],1)}),[],!1,null,null,null);e.default=o.exports},"85f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return l})),a.d(e,"d",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"e",(function(){return r})),a.d(e,"f",(function(){return s})),a.d(e,"g",(function(){return c})),a.d(e,"b",(function(){return u}));var n=a("6b2d");const l=t=>n.a.post("pin.PinPackage/add",t),i=t=>n.a.get("pin.PinPackage/list",{params:t}),o=t=>n.a.get("pin.PinPackage/detail",{params:t}),r=t=>n.a.post("pin.PinPackage/update",t),s=t=>n.a.get("pin.PinPosition/list",{params:t}),c=t=>n.a.post("pin.PinPosition/update",t),u=t=>n.a.get("pin.PinPackage/del",{params:t})}}]);