+ 上架
+ 下架
+
+
+
+
+ 图片展示
+
+
+
+
+
+ 图{{index}}
+
+
+
+
+
+
+
@@ -271,6 +321,7 @@ export default {
return {
dataForm: {
key: "",
+ status:'',
},
dataList: [],
pageIndex: 1,
@@ -280,7 +331,9 @@ export default {
dataListSelections: [],
addOrUpdateVisible: false,
dialogVisible: false,
- videoUrl:""
+ dialogVisible2: false,
+ videoUrl:"",
+ media: [],
};
},
components: {
@@ -299,7 +352,8 @@ export default {
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
- key: this.dataForm.key,
+ // key: this.dataForm.key,
+ // status:this.dataForm.status
}),
}).then(({ data }) => {
if (data && data.code === 0) {
@@ -370,7 +424,77 @@ export default {
});
});
},
-
+ statusDownHandle(id){
+ var ids = id
+ ? [id]
+ : this.dataListSelections.map((item) => {
+ return item.id;
+ });
+ this.$confirm(
+ `确定对[id=${ids.join(",")}]进行[${id ? "下架" : "批量下架"}]操作?`,
+ "提示",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ ).then(() => {
+ this.$http({
+ url: this.$http.adornUrl("/admin/post/down"),
+ method: "post",
+ data: this.$http.adornData(ids, false),
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ } else {
+ this.$message.error(data.msg);
+ }
+ });
+ });
+ },
+ // 审核
+ statusHandle(id) {
+ var ids = id
+ ? [id]
+ : this.dataListSelections.map((item) => {
+ return item.id;
+ });
+ this.$confirm(
+ `确定对[id=${ids.join(",")}]进行[${id ? "上架" : "批量上架"}]操作?`,
+ "提示",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }
+ ).then(() => {
+ this.$http({
+ url: this.$http.adornUrl("/admin/post/up"),
+ method: "post",
+ data: this.$http.adornData(ids, false),
+ }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.$message({
+ message: "操作成功",
+ type: "success",
+ duration: 1500,
+ onClose: () => {
+ this.getDataList();
+ },
+ });
+ } else {
+ this.$message.error(data.msg);
+ }
+ });
+ });
+ },
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
@@ -381,13 +505,47 @@ export default {
openVideo(url){
this.dialogVisible=true;
this.videoUrl=url;
+ },
+ openPic(media){
+ this.dialogVisible2=true;
+ this.media=media;
+ },
+ goPic(url){
+ console.log('==>',url);
+ window.open(url);
}
+
+
},
};
\ No newline at end of file
diff --git a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/topic-add-or-update.vue b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/topic-add-or-update.vue
index 66ae3f1..1041237 100644
--- a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/topic-add-or-update.vue
+++ b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/topic-add-or-update.vue
@@ -58,17 +58,17 @@
建议尺寸:100*100像素,jpg、png图片类型
-
+
- 正常
- 禁用
+ 正常
+ 禁用
-
-
+ -->