bbde473.js 2.4 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[55],{675:function(e,t,n){"use strict";n.r(t);var r=n(7);n(40);t.default={data:function(){return{list:[],special_list_seo:{},special_list_seo_dialog:!1}},mounted:function(){this.getList(),this.getConfig()},methods:{getConfig:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,data;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$post("/uapi/pub/getConfig",{key:"special_list_seo"});case 2:(n=t.sent)&&1===n.status&&(data=n.data,e.special_list_seo=JSON.parse(data));case 4:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$post("/uapi/news/special_list");case 2:(n=t.sent)&&1===n.status&&(e.list=n.data||[]);case 4:case"end":return t.stop()}}),t)})))()},set_config:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.special_list_seo,t.next=3,e.$post("/uapi/pub/setConfig",{key:"special_list_seo",value:JSON.stringify(n)});case 3:(r=t.sent)&&1===r.status&&e.$message({type:"success",message:"操作成功!"});case 5:case"end":return t.stop()}}),t)})))()},del:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.$post("/uapi/news/special_del",{id:e});case 2:(r=n.sent)&&1===r.status&&(t.$message({type:"success",message:"操作成功!"}),t.getList());case 4:case"end":return n.stop()}}),n)})))()},status:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function r(){var c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.$post("/uapi/news/special_status",{status:t,id:e});case 2:(c=r.sent)&&1===c.status&&(n.$message({type:"success",message:"操作成功!"}),n.getList());case 4:case"end":return r.stop()}}),r)})))()},special_list_seo_dialog_show:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.special_list_seo_dialog=!0;case 1:case"end":return t.stop()}}),t)})))()}}}}}]);