diff --git a/src/views/mp/autoReply/components/ReplyTable.vue b/src/views/mp/autoReply/components/ReplyTable.vue new file mode 100644 index 00000000..ef17dfe8 --- /dev/null +++ b/src/views/mp/autoReply/components/ReplyTable.vue @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + {{ scope.row.responseContent }} + + + + + + + + + + + + + + + + + + + + + + + + 修改 + + + 删除 + + + + + + + + + diff --git a/src/views/mp/autoReply/components/types.ts b/src/views/mp/autoReply/components/types.ts new file mode 100644 index 00000000..d4d79ca4 --- /dev/null +++ b/src/views/mp/autoReply/components/types.ts @@ -0,0 +1,47 @@ +// 消息类型(Follow: 关注时回复;Message: 消息回复;Keyword: 关键词回复) +// 作为tab.name,enum的数字不能随意修改,与api参数相关 +export enum MsgType { + Follow = 1, + Message = 2, + Keyword = 3 +} + +type ReplyType = 'text' | 'image' | 'voice' | 'video' | 'shortvideo' | 'location' | 'link' + +export interface ReplyForm { + // relation: + id?: number + accountId?: number + type?: MsgType + // request: + requestMessageType?: ReplyType + requestMatch?: number + requestKeyword?: string + // response: + responseMessageType?: ReplyType + responseContent?: string + responseMediaId?: number + responseMediaUrl?: string + responseTitle?: string + responseDescription?: number + responseThumbMediaId?: string + responseThumbMediaUrl?: string + responseArticles?: any[] + responseMusicUrl?: string + responseHqMusicUrl?: string +} + +export interface ObjData { + type: ReplyType + accountId?: number + content?: string + mediaId?: number + url?: string + title?: string + description?: string + thumbMediaId?: number + thumbMediaUrl?: string + articles?: any[] + musicUrl?: string + hqMusicUrl?: string +} diff --git a/src/views/mp/autoReply/index.vue b/src/views/mp/autoReply/index.vue index 0fd6001d..a28d23d5 100644 --- a/src/views/mp/autoReply/index.vue +++ b/src/views/mp/autoReply/index.vue @@ -12,14 +12,14 @@ - + @@ -30,117 +30,31 @@ - 关注时回复 + 关注时回复 - 消息回复 + 消息回复 - 关键词回复 + 关键词回复 - - - - - - - - - - - - - - - - {{ scope.row.responseContent }} - - - - - - - - - - - - - - - - - - - - - - - - 修改 - - - 删除 - - - - + onUpdate(id)" + @on-delete="(id) => onDelete(id)" + /> - + @@ -172,35 +86,25 @@ 取 消 - 确 定 + 确 定