From 29f68781e521403153854da1afe6be188a5761fd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 19 Apr 2023 19:07:45 +0800 Subject: [PATCH] =?UTF-8?q?REVIEW=20=E5=85=AC=E4=BC=97=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=9B=9E=E5=A4=8D=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 48e50190e0bcb6f7676a1e4cfd298ee142669ff8) --- .../mp/autoReply/components/ReplyTable.vue | 3 -- src/views/mp/autoReply/components/types.ts | 3 +- src/views/mp/autoReply/index.vue | 40 +++++++------------ 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/views/mp/autoReply/components/ReplyTable.vue b/src/views/mp/autoReply/components/ReplyTable.vue index ef17dfe8..0b739cef 100644 --- a/src/views/mp/autoReply/components/ReplyTable.vue +++ b/src/views/mp/autoReply/components/ReplyTable.vue @@ -93,7 +93,6 @@ - - - diff --git a/src/views/mp/autoReply/components/types.ts b/src/views/mp/autoReply/components/types.ts index d4d79ca4..0d78fd85 100644 --- a/src/views/mp/autoReply/components/types.ts +++ b/src/views/mp/autoReply/components/types.ts @@ -1,5 +1,5 @@ // 消息类型(Follow: 关注时回复;Message: 消息回复;Keyword: 关键词回复) -// 作为tab.name,enum的数字不能随意修改,与api参数相关 +// 作为 tab.name,enum 的数字不能随意修改,与 api 参数相关 export enum MsgType { Follow = 1, Message = 2, @@ -31,6 +31,7 @@ export interface ReplyForm { responseHqMusicUrl?: string } +// TODO @Dhb52:ObjData 这个类名可以在看看,ObjData 有点通用 export interface ObjData { type: ReplyType accountId?: number diff --git a/src/views/mp/autoReply/index.vue b/src/views/mp/autoReply/index.vue index a28d23d5..2d9b492d 100644 --- a/src/views/mp/autoReply/index.vue +++ b/src/views/mp/autoReply/index.vue @@ -49,11 +49,12 @@ :loading="loading" :list="list" :msg-type="msgType" - @on-update="(id) => onUpdate(id)" - @on-delete="(id) => onDelete(id)" + @on-update="onUpdate" + @on-delete="onDelete" /> + @@ -70,7 +71,7 @@ (MsgType.Keyword) -// 允许选择的请求消息类型 -const RequestMessageTypes = ['text', 'image', 'voice', 'video', 'shortvideo', 'location', 'link'] -// 遮罩层 -const loading = ref(true) -// 总条数 -const total = ref(0) -// 自动回复列表 -const list = ref([]) - +const msgType = ref(MsgType.Keyword) // 消息类型 +const RequestMessageTypes = ['text', 'image', 'voice', 'video', 'shortvideo', 'location', 'link'] // 允许选择的请求消息类型 +const loading = ref(true) // 遮罩层 +const total = ref(0) // 总条数 +const list = ref([]) // 自动回复列表 +const formRef = ref() // 表单 ref // 查询参数 interface QueryParams { pageNo: number @@ -127,13 +121,9 @@ const queryParams: QueryParams = reactive({ accountId: undefined }) -// 弹出层标题 -const dialogTitle = ref('') -// 是否显示弹出层 -const showFormDialog = ref(false) -// 表单参数 - -const replyForm = ref({}) +const dialogTitle = ref('') // 弹出层标题 +const showFormDialog = ref(false) // 是否显示弹出层 +const replyForm = ref({}) // 表单参数 // 回复消息 const objData = ref({ type: 'text',