diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue index 01dcab3ae..1c508cc7e 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue @@ -110,7 +110,7 @@ function emitSpuChange() { class="h-full w-full rounded-lg object-cover" /> - + - + diff --git a/apps/web-antd/src/views/mall/product/spu/form/index.vue b/apps/web-antd/src/views/mall/product/spu/form/index.vue index 7048776bb..c2f5e3061 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/index.vue +++ b/apps/web-antd/src/views/mall/product/spu/form/index.vue @@ -32,6 +32,7 @@ const spuId = ref(); const { params, name } = useRoute(); const { closeCurrentTab } = useTabs(); const activeTabName = ref('info'); +// TODO @puhui999:这个要不要类似 ele 里,直接写到 html 里? const tabList = ref([ { key: 'info', diff --git a/apps/web-antd/src/views/mall/product/spu/form/modules/product-property-add-form.vue b/apps/web-antd/src/views/mall/product/spu/form/modules/product-property-add-form.vue index f6b4f0548..f34a8d194 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/modules/product-property-add-form.vue +++ b/apps/web-antd/src/views/mall/product/spu/form/modules/product-property-add-form.vue @@ -130,7 +130,6 @@ const [Modal, modalApi] = useVbenModal({ await modalApi.close(); emit('success'); }, - async onOpenChange(isOpen: boolean) { if (!isOpen) { return; diff --git a/apps/web-ele/src/api/mall/product/spu/index.ts b/apps/web-ele/src/api/mall/product/spu/index.ts index 4b37151c6..0c9f4ce94 100644 --- a/apps/web-ele/src/api/mall/product/spu/index.ts +++ b/apps/web-ele/src/api/mall/product/spu/index.ts @@ -62,13 +62,6 @@ export namespace MallSpuApi { valueName?: string; // 属性值名称 } - // TODO @puhui999:这个还要么? - /** 优惠券模板 */ - export interface GiveCouponTemplate { - id?: number; // 优惠券编号 - name?: string; // 优惠券名称 - } - /** 商品状态更新请求 */ export interface SpuStatusUpdateReqVO { id: number; // 商品编号 diff --git a/apps/web-ele/src/store/mall/kefu.ts b/apps/web-ele/src/store/mall/kefu.ts index b9197d3e6..c30087375 100644 --- a/apps/web-ele/src/store/mall/kefu.ts +++ b/apps/web-ele/src/store/mall/kefu.ts @@ -5,7 +5,10 @@ import { isEmpty } from '@vben/utils'; import { acceptHMRUpdate, defineStore } from 'pinia'; -import * as KeFuConversationApi from '#/api/mall/promotion/kefu/conversation'; +import { + getConversation, + getConversationList, +} from '#/api/mall/promotion/kefu/conversation'; interface MallKefuInfoVO { conversationList: MallKefuConversationApi.Conversation[]; // 会话列表 @@ -41,9 +44,7 @@ export const useMallKefuStore = defineStore('mall-kefu', { // ======================= 会话相关 ======================= /** 加载会话缓存列表 */ async setConversationList() { - // TODO @jave:idea linter 告警,修复下; - // TODO @jave:不使用 KeFuConversationApi.,直接用 getConversationList - this.conversationList = await KeFuConversationApi.getConversationList(); + this.conversationList = await getConversationList(); this.conversationSort(); }, /** 更新会话缓存已读 */ @@ -51,8 +52,11 @@ export const useMallKefuStore = defineStore('mall-kefu', { if (isEmpty(this.conversationList)) { return; } - const conversation = this.conversationList.find( - (item) => item.id === conversationId, + const conversationList = this + .conversationList as MallKefuConversationApi.Conversation[]; + const conversation = conversationList.find( + (item: MallKefuConversationApi.Conversation) => + item.id === conversationId, ); conversation && (conversation.adminUnreadMessageCount = 0); }, @@ -62,10 +66,16 @@ export const useMallKefuStore = defineStore('mall-kefu', { return; } - const conversation = - await KeFuConversationApi.getConversation(conversationId); + const conversation = await getConversation(conversationId); this.deleteConversation(conversationId); - conversation && this.conversationList.push(conversation); + if (conversation && this.conversationList) { + const conversationList = this + .conversationList as MallKefuConversationApi.Conversation[]; + this.conversationList = [ + ...conversationList, + conversation as MallKefuConversationApi.Conversation, + ]; + } this.conversationSort(); }, /** 删除会话缓存 */ diff --git a/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue b/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue index efb3b0311..015345392 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue @@ -31,6 +31,7 @@ function handleRadioChange() { } } +// TODO @puhui999:这里的代码风格,对齐 antd 的;可以使用 idea 对比两个文件哈; const [Grid, gridApi] = useVbenVxeGrid({ gridOptions: { columns: useSkuGridColumns(), diff --git a/apps/web-ele/src/views/mall/product/spu/components/spu-and-sku-list.vue b/apps/web-ele/src/views/mall/product/spu/components/spu-and-sku-list.vue index edf1dd8cb..4f0369a3e 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/spu-and-sku-list.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/spu-and-sku-list.vue @@ -127,7 +127,7 @@ watch( - +