void) {
diff --git a/apps/web-antd/src/views/mall/promotion/components/magic-cube-editor/util.ts b/apps/web-antd/src/views/mall/promotion/components/magic-cube-editor/util.ts
index 6e3eb7cd2..d55cd4b65 100644
--- a/apps/web-antd/src/views/mall/promotion/components/magic-cube-editor/util.ts
+++ b/apps/web-antd/src/views/mall/promotion/components/magic-cube-editor/util.ts
@@ -57,10 +57,10 @@ export function isContains(hotArea: Rect, point: Point): boolean {
*/
export function createRect(a: Point, b: Point): Rect {
// 计算矩形的范围
- let [left, left2] = [a.x, b.x].sort();
+ let [left, left2] = [a.x, b.x].toSorted();
left = left ?? 0;
left2 = left2 ?? 0;
- let [top, top2] = [a.y, b.y].sort();
+ let [top, top2] = [a.y, b.y].toSorted();
top = top ?? 0;
top2 = top2 ?? 0;
const right = left2 + 1;
diff --git a/apps/web-antd/src/views/mall/promotion/kefu/modules/conversation-list.vue b/apps/web-antd/src/views/mall/promotion/kefu/modules/conversation-list.vue
index c9484317b..174d845a3 100644
--- a/apps/web-antd/src/views/mall/promotion/kefu/modules/conversation-list.vue
+++ b/apps/web-antd/src/views/mall/promotion/kefu/modules/conversation-list.vue
@@ -159,7 +159,7 @@ onBeforeUnmount(() => {
会话记录
@@ -213,7 +213,7 @@ onBeforeUnmount(() => {
- {
// 使用展开运算符创建新数组,避免直接修改原数组
- return [...messageList.value].sort(
+ return [...messageList.value].toSorted(
(a: any, b: any) => a.createTime - b.createTime,
);
});
@@ -261,7 +261,7 @@ function showTime(item: MallKefuMessageApi.Message, index: number) {
@@ -415,7 +415,7 @@ function showTime(item: MallKefuMessageApi.Message, index: number) {
-
+
diff --git a/apps/web-antd/src/views/mall/promotion/kefu/modules/message/order-item.vue b/apps/web-antd/src/views/mall/promotion/kefu/modules/message/order-item.vue
index 8e73ac8ae..ff0ecd986 100644
--- a/apps/web-antd/src/views/mall/promotion/kefu/modules/message/order-item.vue
+++ b/apps/web-antd/src/views/mall/promotion/kefu/modules/message/order-item.vue
@@ -78,7 +78,7 @@ function formatOrderStatus(order: any) {
订单号:
{{ getMessageContent.no }}
diff --git a/apps/web-antd/src/views/mall/promotion/kefu/modules/tools/emoji-select-popover.vue b/apps/web-antd/src/views/mall/promotion/kefu/modules/tools/emoji-select-popover.vue
index a7a1027de..c1dcf8a2c 100644
--- a/apps/web-antd/src/views/mall/promotion/kefu/modules/tools/emoji-select-popover.vue
+++ b/apps/web-antd/src/views/mall/promotion/kefu/modules/tools/emoji-select-popover.vue
@@ -32,7 +32,7 @@ function handleSelect(item: Emoji) {
v-for="(item, index) in emojiList"
:key="index"
:title="item.name"
- class="w-1/10 border-primary m-2 flex cursor-pointer items-center justify-center border border-solid p-2"
+ class="w-1/10 m-2 flex cursor-pointer items-center justify-center border border-solid border-primary p-2"
@click="handleSelect(item)"
>
diff --git a/apps/web-antd/src/views/mall/trade/delivery/pickUpOrder/data.ts b/apps/web-antd/src/views/mall/trade/delivery/pickUpOrder/data.ts
index 19c9ac5f1..f9c8823a1 100644
--- a/apps/web-antd/src/views/mall/trade/delivery/pickUpOrder/data.ts
+++ b/apps/web-antd/src/views/mall/trade/delivery/pickUpOrder/data.ts
@@ -12,7 +12,9 @@ import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */
const userStore = useUserStore();
-const pickUpStoreList = ref([]);
+const pickUpStoreList = ref(
+ [],
+);
getSimpleDeliveryPickUpStoreList().then((res) => {
pickUpStoreList.value = res;
// 移除自己无法核销的门店
diff --git a/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/modules/form.vue b/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/modules/form.vue
index 767fbc73e..bd73fb5e3 100644
--- a/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/modules/form.vue
+++ b/apps/web-antd/src/views/mall/trade/delivery/pickUpStore/modules/form.vue
@@ -113,7 +113,8 @@ const [Modal, modalApi] = useVbenModal({
return;
}
// 加载数据
- const data = modalApi.getData();
+ const data =
+ modalApi.getData();
if (!data || !data.id) {
// 初始化地图
await initTencentLbsMap();
diff --git a/apps/web-antd/src/views/mp/autoReply/modules/form.vue b/apps/web-antd/src/views/mp/autoReply/modules/form.vue
index 18ab3e8a1..09a64c66e 100644
--- a/apps/web-antd/src/views/mp/autoReply/modules/form.vue
+++ b/apps/web-antd/src/views/mp/autoReply/modules/form.vue
@@ -111,20 +111,22 @@ const [Modal, modalApi] = useVbenModal({
if (data.row?.id) {
// 编辑:加载数据
const rowData = data.row;
- const formValues: any = { ...rowData };
- formValues.reply = {
- type: rowData.responseMessageType,
- accountId: data.accountId || -1,
- content: rowData.responseContent,
- mediaId: rowData.responseMediaId,
- url: rowData.responseMediaUrl,
- title: rowData.responseTitle,
- description: rowData.responseDescription,
- thumbMediaId: rowData.responseThumbMediaId,
- thumbMediaUrl: rowData.responseThumbMediaUrl,
- articles: rowData.responseArticles,
- musicUrl: rowData.responseMusicUrl,
- hqMusicUrl: rowData.responseHqMusicUrl,
+ const formValues: any = {
+ ...rowData,
+ reply: {
+ type: rowData.responseMessageType,
+ accountId: data.accountId || -1,
+ content: rowData.responseContent,
+ mediaId: rowData.responseMediaId,
+ url: rowData.responseMediaUrl,
+ title: rowData.responseTitle,
+ description: rowData.responseDescription,
+ thumbMediaId: rowData.responseThumbMediaId,
+ thumbMediaUrl: rowData.responseThumbMediaUrl,
+ articles: rowData.responseArticles,
+ musicUrl: rowData.responseMusicUrl,
+ hqMusicUrl: rowData.responseHqMusicUrl,
+ },
};
await formApi.setValues(formValues);
} else {
diff --git a/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue b/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue
index 494c41e12..981839e03 100644
--- a/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue
+++ b/apps/web-antd/src/views/mp/components/wx-msg/wx-msg.vue
@@ -106,7 +106,7 @@ async function getPage(page: any, params: any = null) {
const scrollHeight = msgDivRef.value?.scrollHeight ?? 0;
// 处理数据
- const data = dataTemp.list.reverse();
+ const data = dataTemp.list.toReversed();
list.value = [...data, ...list.value];
loading.value = false;
if (data.length < queryParams.pageSize || data.length === 0) {
diff --git a/apps/web-antd/src/views/mp/draft/index.vue b/apps/web-antd/src/views/mp/draft/index.vue
index cce7fdddc..ea3a87094 100644
--- a/apps/web-antd/src/views/mp/draft/index.vue
+++ b/apps/web-antd/src/views/mp/draft/index.vue
@@ -72,12 +72,12 @@ async function handleDelete(row: MpDraftApi.DraftArticle) {
return;
}
const hideLoading = message.loading({
- content: '删除中...',
+ content: $t('ui.actionMessage.deleting'),
duration: 0,
});
try {
await deleteDraft(accountId, row.mediaId);
- message.success('删除成功');
+ message.success($t('ui.actionMessage.deleteSuccess'));
handleRefresh();
} finally {
hideLoading();
diff --git a/apps/web-antd/src/views/mp/freePublish/data.ts b/apps/web-antd/src/views/mp/freePublish/data.ts
new file mode 100644
index 000000000..cfcac30be
--- /dev/null
+++ b/apps/web-antd/src/views/mp/freePublish/data.ts
@@ -0,0 +1,59 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeGridPropTypes } from '#/adapter/vxe-table';
+import type { MpAccountApi } from '#/api/mp/account';
+
+import { formatDateTime } from '@vben/utils';
+
+import { getSimpleAccountList } from '#/api/mp/account';
+
+let accountList: MpAccountApi.AccountSimple[] = [];
+getSimpleAccountList().then((data) => (accountList = data));
+
+/** 搜索表单配置 */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'accountId',
+ label: '公众号',
+ component: 'Select',
+ componentProps: {
+ options: accountList.map((item) => ({
+ label: item.name,
+ value: item.id,
+ })),
+ placeholder: '请选择公众号',
+ clearable: true,
+ },
+ },
+ ];
+}
+
+/** 表格列配置 */
+export function useGridColumns(): VxeGridPropTypes.Columns {
+ return [
+ {
+ field: 'cover',
+ title: '图片',
+ width: 360,
+ slots: { default: 'cover' },
+ },
+ {
+ field: 'title',
+ title: '标题',
+ slots: { default: 'title' },
+ },
+ {
+ field: 'updateTime',
+ title: '修改时间',
+ formatter: ({ row }) => {
+ return formatDateTime(row.updateTime * 1000);
+ },
+ },
+ {
+ title: '操作',
+ width: 120,
+ fixed: 'right',
+ slots: { default: 'actions' },
+ },
+ ];
+}
diff --git a/apps/web-antd/src/views/mp/freePublish/index.vue b/apps/web-antd/src/views/mp/freePublish/index.vue
index 89f457302..77c46e070 100644
--- a/apps/web-antd/src/views/mp/freePublish/index.vue
+++ b/apps/web-antd/src/views/mp/freePublish/index.vue
@@ -1,29 +1,173 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+ {{ item.title }}
+
+
+
+ -
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/mp/menu/index.vue b/apps/web-antd/src/views/mp/menu/index.vue
index 615c631a6..5669ae4b4 100644
--- a/apps/web-antd/src/views/mp/menu/index.vue
+++ b/apps/web-antd/src/views/mp/menu/index.vue
@@ -134,20 +134,20 @@ function menuListToFrontend(list: any[]) {
list.forEach((item: RawMenu) => {
const menu: any = {
...item,
- };
- menu.reply = {
- type: item.replyMessageType,
- accountId: item.accountId,
- content: item.replyContent,
- mediaId: item.replyMediaId,
- url: item.replyMediaUrl,
- title: item.replyTitle,
- description: item.replyDescription,
- thumbMediaId: item.replyThumbMediaId,
- thumbMediaUrl: item.replyThumbMediaUrl,
- articles: item.replyArticles,
- musicUrl: item.replyMusicUrl,
- hqMusicUrl: item.replyHqMusicUrl,
+ reply: {
+ type: item.replyMessageType,
+ accountId: item.accountId,
+ content: item.replyContent,
+ mediaId: item.replyMediaId,
+ url: item.replyMediaUrl,
+ title: item.replyTitle,
+ description: item.replyDescription,
+ thumbMediaId: item.replyThumbMediaId,
+ thumbMediaUrl: item.replyThumbMediaUrl,
+ articles: item.replyArticles,
+ musicUrl: item.replyMusicUrl,
+ hqMusicUrl: item.replyHqMusicUrl,
+ },
};
result.push(menu as RawMenu);
});
@@ -275,23 +275,22 @@ function menuListToBackend() {
/** 将前端的 menu,转换成后端接收的 menu */
// TODO: @芋艿,需要根据后台 API 删除不需要的字段
function menuToBackend(menu: any) {
- const result = {
+ return {
...menu,
children: undefined, // 不处理子节点
reply: undefined, // 稍后复制
+ replyMessageType: menu.reply.type,
+ replyContent: menu.reply.content,
+ replyMediaId: menu.reply.mediaId,
+ replyMediaUrl: menu.reply.url,
+ replyTitle: menu.reply.title,
+ replyDescription: menu.reply.description,
+ replyThumbMediaId: menu.reply.thumbMediaId,
+ replyThumbMediaUrl: menu.reply.thumbMediaUrl,
+ replyArticles: menu.reply.articles,
+ replyMusicUrl: menu.reply.musicUrl,
+ replyHqMusicUrl: menu.reply.hqMusicUrl,
};
- result.replyMessageType = menu.reply.type;
- result.replyContent = menu.reply.content;
- result.replyMediaId = menu.reply.mediaId;
- result.replyMediaUrl = menu.reply.url;
- result.replyTitle = menu.reply.title;
- result.replyDescription = menu.reply.description;
- result.replyThumbMediaId = menu.reply.thumbMediaId;
- result.replyThumbMediaUrl = menu.reply.thumbMediaUrl;
- result.replyArticles = menu.reply.articles;
- result.replyMusicUrl = menu.reply.musicUrl;
- result.replyHqMusicUrl = menu.reply.hqMusicUrl;
- return result;
}
diff --git a/apps/web-antd/src/views/mp/message/index.vue b/apps/web-antd/src/views/mp/message/index.vue
index 1d6be08fd..832bafbb1 100644
--- a/apps/web-antd/src/views/mp/message/index.vue
+++ b/apps/web-antd/src/views/mp/message/index.vue
@@ -108,7 +108,7 @@ function showTotal(total: number) {
- |