(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0ca5cd2d"],{"3e1c":function(t,e,a){"use strict";a.r(e);var n=a("85f4"),s={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"),r=Object(i.a)(s,(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=r.exports},"6b2d":function(t,e,a){"use strict";var n=a("0613"),s=a("bc3a"),i=a.n(s),r=a("d70b"),o=a("afbc"),c=a("5c96"),l=a("6ddb");const u={baseURL:r.a.baseURL+"/adminapi",headers:{"content-type":"application/json"}},d=(Object(l.g)(()=>(n.a.commit("setToken",""),n.a.commit("setUserInfo",{}),n.a.commit("setPermission",{}),o.b.push("/account/login"),Promise.reject())),i.a.create(u));d.interceptors.request.use(t=>{const e=n.a.getters.token;return e&&(t.headers.token=e),t.headers.version=r.a.version,t},t=>Promise.reject(t)),d.interceptors.response.use(t=>t.data,t=>(Object(c.Message)({type:"error",message:"系统错误，请稍候再试"}),Promise.reject(t))),e.a=d},"85f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"d",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"f",(function(){return c})),a.d(e,"g",(function(){return l})),a.d(e,"b",(function(){return u}));var n=a("6b2d");const s=t=>n.a.post("pin.PinPackage/add",t),i=t=>n.a.get("pin.PinPackage/list",{params:t}),r=t=>n.a.get("pin.PinPackage/detail",{params:t}),o=t=>n.a.post("pin.PinPackage/update",t),c=t=>n.a.get("pin.PinPosition/list",{params:t}),l=t=>n.a.post("pin.PinPosition/update",t),u=t=>n.a.get("pin.PinPackage/del",{params:t})}}]);