From febd9dab4050c1b2f2ebc1db48541220d3ce056d Mon Sep 17 00:00:00 2001
From: hehang <1165868871@qq.com>
Date: Thu, 16 Jan 2025 13:35:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/cjy/columninfo/index.vue | 31 +++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/views/cjy/columninfo/index.vue b/src/views/cjy/columninfo/index.vue
index c05ce16..eaae193 100644
--- a/src/views/cjy/columninfo/index.vue
+++ b/src/views/cjy/columninfo/index.vue
@@ -43,6 +43,18 @@
+
+
+
+
+
+
{{ parseTime(scope.row.createTime) }}
@@ -109,13 +121,30 @@ export default {
async getList() {
try {
this.loading = true;
- const res = await ColumnInfoApi.getColumnInfoPage(this.queryParams);
+ const res = await ColumnInfoApi.getColumnInfoPage(this.queryParams);
+ console.log(res);
this.list = res.data.list;
this.total = res.data.total;
} finally {
this.loading = false;
}
},
+ // 推荐切换
+ async handleRecommendChange(row) {
+ try {
+ let data = {
+ id: row.id,
+ type: row.type,
+ recommend: row.recommend
+ }
+ await ColumnInfoApi.updateColumnInfo(data);
+ this.$modal.msgSuccess("修改成功");
+ this.dialogVisible = false;
+ this.$emit('success');
+ } catch (error) {
+ row.recommend = !row.recommend;
+ }
+ },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;