diff --git a/.env b/.env index 3c5303b5..c079b153 100644 --- a/.env +++ b/.env @@ -11,7 +11,7 @@ VITE_OPEN=true VITE_APP_TENANT_ENABLE=true # 验证码的开关 -VITE_APP_CAPTCHA_ENABLE=true +VITE_APP_CAPTCHA_ENABLE=false # 百度统计 VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc diff --git a/package.json b/package.json index 1fb585f3..e81fe550 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "pinia": "^2.1.7", "qrcode": "^1.5.3", "qs": "^6.11.2", + "sortablejs": "^1.15.0", "steady-xml": "^0.1.0", "url": "^0.11.3", "video.js": "^7.21.5", @@ -82,6 +83,7 @@ "@types/nprogress": "^0.2.1", "@types/qrcode": "^1.5.2", "@types/qs": "^6.9.8", + "@types/sortablejs": "^1.15.4", "@typescript-eslint/eslint-plugin": "^6.7.5", "@typescript-eslint/parser": "^6.7.5", "@unocss/transformer-variant-group": "^0.56.5", diff --git a/src/api/mall/market/banner/index.ts b/src/api/mall/market/banner/index.ts new file mode 100644 index 00000000..af96b8f9 --- /dev/null +++ b/src/api/mall/market/banner/index.ts @@ -0,0 +1,36 @@ +import request from '@/config/axios' + +export interface BannerVO { + id: number + title: string + picUrl: string + status: number + url: string + sort: number + memo: string +} + +// 查询Banner管理列表 +export const getBannerPage = async (params) => { + return await request.get({ url: `/market/banner/page`, params }) +} + +// 查询Banner管理详情 +export const getBanner = async (id: number) => { + return await request.get({ url: `/market/banner/get?id=` + id }) +} + +// 新增Banner管理 +export const createBanner = async (data: BannerVO) => { + return await request.post({ url: `/market/banner/create`, data }) +} + +// 修改Banner管理 +export const updateBanner = async (data: BannerVO) => { + return await request.put({ url: `/market/banner/update`, data }) +} + +// 删除Banner管理 +export const deleteBanner = async (id: number) => { + return await request.delete({ url: `/market/banner/delete?id=` + id }) +} diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 5cc4d8fe..0d0d5b00 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -25,17 +25,22 @@ export interface Sku { salesCount?: number // 商品销量 } +export interface GiveCouponTemplate { + id?: number + name?: string // 优惠券名称 +} + export interface Spu { id?: number name?: string // 商品名称 - categoryId?: number | null // 商品分类 + categoryId?: number | undefined // 商品分类 keyword?: string // 关键字 - unit?: number | null // 单位 + unit?: number | undefined // 单位 picUrl?: string // 商品封面图 sliderPicUrls?: string[] // 商品轮播图 introduction?: string // 商品简介 - deliveryTemplateId?: number | null // 运费模版 - brandId?: number | null // 商品品牌编号 + deliveryTemplateId?: number | undefined // 运费模版 + brandId?: number | undefined // 商品品牌编号 specType?: boolean // 商品规格 subCommissionType?: boolean // 分销类型 skus?: Sku[] // sku数组 @@ -55,6 +60,8 @@ export interface Spu { stock?: number // 商品库存 createTime?: Date // 商品创建时间 status?: number // 商品状态 + activityOrders: number[] // 活动排序 + giveCouponTemplates: GiveCouponTemplate[] // 优惠卷 } // 获得 Spu 列表 diff --git a/src/api/mall/trade/delivery/pickUpStore/index.ts b/src/api/mall/trade/delivery/pickUpStore/index.ts index 82ba66c4..c3175021 100644 --- a/src/api/mall/trade/delivery/pickUpStore/index.ts +++ b/src/api/mall/trade/delivery/pickUpStore/index.ts @@ -26,7 +26,7 @@ export const getDeliveryPickUpStore = async (id: number) => { } // 查询自提门店精简列表 -export const getListAllSimple = async () => { +export const getListAllSimple = async (): Promise => { return await request.get({ url: '/trade/delivery/pick-up-store/list-all-simple' }) } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 1fc0ab27..15d35b8e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -155,6 +155,7 @@ export enum DICT_TYPE { // ========== MALL - 商品模块 ========== PRODUCT_UNIT = 'product_unit', // 商品单位 PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态 + PROMOTION_TYPE_ENUM = 'promotion_type_enum', // 营销类型枚举 // ========== MALL - 交易模块 ========== EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式 diff --git a/src/views/mall/product/spu/form/ActivityOrdersSort.vue b/src/views/mall/product/spu/form/ActivityOrdersSort.vue new file mode 100644 index 00000000..eb524860 --- /dev/null +++ b/src/views/mall/product/spu/form/ActivityOrdersSort.vue @@ -0,0 +1,59 @@ + + diff --git a/src/views/mall/product/spu/form/CouponSelect.vue b/src/views/mall/product/spu/form/CouponSelect.vue new file mode 100644 index 00000000..e0f32af2 --- /dev/null +++ b/src/views/mall/product/spu/form/CouponSelect.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/views/mall/product/spu/form/OtherSettingsForm.vue b/src/views/mall/product/spu/form/OtherSettingsForm.vue index a2f2afc6..24498860 100644 --- a/src/views/mall/product/spu/form/OtherSettingsForm.vue +++ b/src/views/mall/product/spu/form/OtherSettingsForm.vue @@ -41,18 +41,23 @@ - - 默认 - 秒杀 - 砍价 - 拼团 + - - 选择优惠券 + + {{ coupon.name }} + + 选择优惠券 @@ -61,27 +66,41 @@ - diff --git a/src/views/mall/promotion/market/banner/index.vue b/src/views/mall/promotion/market/banner/index.vue new file mode 100644 index 00000000..6050abb5 --- /dev/null +++ b/src/views/mall/promotion/market/banner/index.vue @@ -0,0 +1,199 @@ + + + diff --git a/src/views/mall/trade/order/components/OrderTableColumn.vue b/src/views/mall/trade/order/components/OrderTableColumn.vue new file mode 100644 index 00000000..5d1e25ee --- /dev/null +++ b/src/views/mall/trade/order/components/OrderTableColumn.vue @@ -0,0 +1,263 @@ + + + diff --git a/src/views/mall/trade/order/components/index.ts b/src/views/mall/trade/order/components/index.ts new file mode 100644 index 00000000..9cce9fac --- /dev/null +++ b/src/views/mall/trade/order/components/index.ts @@ -0,0 +1,3 @@ +import OrderTableColumn from './OrderTableColumn.vue' + +export { OrderTableColumn } diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index 4a85a30e..e08715df 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -164,177 +164,42 @@ - -