fix: 冲突
This commit is contained in:
@@ -8,7 +8,7 @@ import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { getSimpleAccountList } from '#/api/mp/account';
|
||||
import { ReplySelect } from '#/views/mp/components';
|
||||
import { WxReply } from '#/views/mp/components';
|
||||
|
||||
import { MsgType } from './types';
|
||||
|
||||
@@ -147,11 +147,11 @@ export function useFormSchema(msgType: MsgType): VbenFormSchema[] {
|
||||
schema.push({
|
||||
fieldName: 'reply',
|
||||
label: '回复消息',
|
||||
component: markRaw(ReplySelect),
|
||||
component: markRaw(WxReply),
|
||||
// componentProps: {
|
||||
// modelValue: { type: 'video', content: '12456' },
|
||||
// },
|
||||
// modelPropName: 'modelValue',
|
||||
modelPropName: 'modelValue',
|
||||
});
|
||||
return schema;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,11 @@ import { IconifyIcon } from '@vben/icons';
|
||||
import { message, Row, Tabs } from 'ant-design-vue';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import * as MpAutoReplyApi from '#/api/mp/autoReply';
|
||||
import {
|
||||
deleteAutoReply,
|
||||
getAutoReply,
|
||||
getAutoReplyPage,
|
||||
} from '#/api/mp/autoReply';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -22,7 +26,7 @@ defineOptions({ name: 'MpAutoReply' });
|
||||
const msgType = ref<string>(String(MsgType.Keyword)); // 消息类型
|
||||
|
||||
/** 切换回复类型 */
|
||||
async function onTabChange(tabName: string) {
|
||||
async function onTabChange(tabName: any) {
|
||||
msgType.value = tabName;
|
||||
await nextTick();
|
||||
// 更新 columns
|
||||
@@ -50,7 +54,7 @@ async function handleCreate() {
|
||||
|
||||
/** 修改按钮操作 */
|
||||
async function handleEdit(row: any) {
|
||||
const data = (await MpAutoReplyApi.getAutoReply(row.id)) as any;
|
||||
const data = (await getAutoReply(row.id)) as any;
|
||||
formModalApi
|
||||
.setData({
|
||||
msgType: Number(msgType.value) as MsgType,
|
||||
@@ -68,7 +72,7 @@ async function handleDelete(row: any) {
|
||||
duration: 0,
|
||||
});
|
||||
try {
|
||||
await MpAutoReplyApi.deleteAutoReply(row.id);
|
||||
await deleteAutoReply(row.id);
|
||||
message.success('删除成功');
|
||||
handleRefresh();
|
||||
} finally {
|
||||
@@ -93,7 +97,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues) => {
|
||||
return await MpAutoReplyApi.getAutoReplyPage({
|
||||
return await getAutoReplyPage({
|
||||
pageNo: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
type: Number(msgType.value) as MsgType,
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { Music, News, VideoPlayer, VoicePlayer } from '#/views/mp/components';
|
||||
// DONE @hw:迁移到 /apps/web-antd/src/views/mp/autoReply/modules 里;组件名可能要换一个,= = 之前写的不太好;类似 content.vue ?本质是内容~
|
||||
import {
|
||||
WxMusic,
|
||||
WxNews,
|
||||
WxVideoPlayer,
|
||||
WxVoicePlayer,
|
||||
} from '#/views/mp/components';
|
||||
|
||||
defineOptions({ name: 'ReplyContentCell' });
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -14,7 +19,7 @@ const props = defineProps<{
|
||||
{{ props.row.responseContent }}
|
||||
</div>
|
||||
<div v-else-if="props.row.responseMessageType === 'voice'">
|
||||
<VoicePlayer
|
||||
<WxVoicePlayer
|
||||
v-if="props.row.responseMediaUrl"
|
||||
:url="props.row.responseMediaUrl"
|
||||
/>
|
||||
@@ -30,17 +35,17 @@ const props = defineProps<{
|
||||
props.row.responseMessageType === 'shortvideo'
|
||||
"
|
||||
>
|
||||
<VideoPlayer
|
||||
<WxVideoPlayer
|
||||
v-if="props.row.responseMediaUrl"
|
||||
:url="props.row.responseMediaUrl"
|
||||
style="margin-top: 10px"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="props.row.responseMessageType === 'news'">
|
||||
<News :articles="props.row.responseArticles" />
|
||||
<WxNews :articles="props.row.responseArticles" />
|
||||
</div>
|
||||
<div v-else-if="props.row.responseMessageType === 'music'">
|
||||
<Music
|
||||
<WxMusic
|
||||
:title="props.row.responseTitle"
|
||||
:description="props.row.responseDescription"
|
||||
:thumb-media-url="props.row.responseThumbMediaUrl"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Reply } from '#/views/mp/components/reply/types';
|
||||
import type { Reply } from '#/views/mp/components';
|
||||
|
||||
import { computed, nextTick, ref } from 'vue';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { message } from 'ant-design-vue';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { createAutoReply, updateAutoReply } from '#/api/mp/autoReply';
|
||||
import { $t } from '#/locales';
|
||||
import { ReplyType } from '#/views/mp/components/reply/types';
|
||||
import { ReplyType } from '#/views/mp/components/constants';
|
||||
|
||||
import { useFormSchema } from '../data';
|
||||
import { MsgType } from '../types';
|
||||
|
||||
Reference in New Issue
Block a user