| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- export default {
- data() {
- return {
- list: [],
- special_list_seo:{},
- special_list_seo_dialog:false,
- }
- },
- mounted() {
- this.getList();
- this.getConfig();
- },
- methods: {
- async getConfig() {
- let res = await this.$post("/uapi/pub/getConfig",{key:"special_list_seo"});
- if (res && res.status === 1) {
- let data=res.data;
- this.special_list_seo =JSON.parse(data);
- }
- },
- async getList() {
- let res = await this.$post("/uapi/news/special_list");
- if (res && res.status === 1) {
- this.list = res.data || [];
- }
- },
- async set_config()
- {
- let value=this.special_list_seo;
- let res = await this.$post("/uapi/pub/setConfig",{key:"special_list_seo",value:JSON.stringify(value)});
- if (res && res.status === 1) {
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- }
- },
- async del(id) {
- let res = await this.$post("/uapi/news/special_del",{id:id});
- if (res && res.status === 1) {
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.getList();
- }
- },
- async status(id,status) {
- let res = await this.$post("/uapi/news/special_status",{status:status,id:id});
- if (res && res.status === 1) {
- this.$message({
- type: 'success',
- message: '操作成功!'
- });
- this.getList();
- }
- },
- async special_list_seo_dialog_show() {
- this.special_list_seo_dialog=true;
- },
- }
- }
|