|
@@ -2,18 +2,39 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
list: [],
|
|
list: [],
|
|
|
|
|
+ special_list_seo:{},
|
|
|
|
|
+ special_list_seo_dialog:false,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
|
|
+ this.getConfig();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
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() {
|
|
async getList() {
|
|
|
let res = await this.$post("/uapi/news/special_list");
|
|
let res = await this.$post("/uapi/news/special_list");
|
|
|
if (res && res.status === 1) {
|
|
if (res && res.status === 1) {
|
|
|
this.list = res.data || [];
|
|
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) {
|
|
async del(id) {
|
|
|
let res = await this.$post("/uapi/news/special_del",{id:id});
|
|
let res = await this.$post("/uapi/news/special_del",{id:id});
|
|
|
if (res && res.status === 1) {
|
|
if (res && res.status === 1) {
|
|
@@ -34,8 +55,8 @@ export default {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async add() {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ async special_list_seo_dialog_show() {
|
|
|
|
|
+ this.special_list_seo_dialog=true;
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
|
|
|