diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts
index 0d0d5b00..8ccd02a5 100644
--- a/src/api/mall/product/spu.ts
+++ b/src/api/mall/product/spu.ts
@@ -61,7 +61,6 @@ export interface Spu {
createTime?: Date // 商品创建时间
status?: number // 商品状态
activityOrders: number[] // 活动排序
- giveCouponTemplates: GiveCouponTemplate[] // 优惠卷
}
// 获得 Spu 列表
diff --git a/src/views/mall/product/spu/form/ActivityOrdersSort.vue b/src/views/mall/product/spu/form/ActivityOrdersSort.vue
index eb524860..3a41b3c5 100644
--- a/src/views/mall/product/spu/form/ActivityOrdersSort.vue
+++ b/src/views/mall/product/spu/form/ActivityOrdersSort.vue
@@ -54,6 +54,13 @@ const initSortable = () => {
}
onMounted(async () => {
await nextTick()
+ // 如果活动排序为空也就是新增的时候加入活动
+ if (props.activityOrders && props.activityOrders.length === 0) {
+ emit(
+ 'update:activityOrders',
+ props.promotionTypes.map((item) => item.value as number)
+ )
+ }
initSortable()
})
diff --git a/src/views/mall/product/spu/form/OtherSettingsForm.vue b/src/views/mall/product/spu/form/OtherSettingsForm.vue
index 42e61ba1..d574ae78 100644
--- a/src/views/mall/product/spu/form/OtherSettingsForm.vue
+++ b/src/views/mall/product/spu/form/OtherSettingsForm.vue
@@ -42,25 +42,12 @@
-
-
-
-
- {{ coupon.name }}
-
- 选择优惠券
-
-
@@ -91,17 +78,7 @@
{{ promotionTypes.find((item) => item.value === activityType)?.label }}
-
-
- {{ coupon.name }}
-
-
-