diff --git a/.env.dev b/.env.dev index 610924b8..3c41cc68 100644 --- a/.env.dev +++ b/.env.dev @@ -4,8 +4,8 @@ NODE_ENV=development VITE_DEV=true # 请求路径 -# VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' -VITE_BASE_URL='http://dofast.demo.huizhizao.vip:20001' +VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn' +# VITE_BASE_URL='http://dofast.demo.huizhizao.vip:20001' # 上传路径 VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload' @@ -35,4 +35,4 @@ VITE_OUT_DIR=dist VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn' # 验证码的开关 -VITE_APP_CAPTCHA_ENABLE=true +VITE_APP_CAPTCHA_ENABLE=false diff --git a/package.json b/package.json index 2bf975ca..5cdca2af 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "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", @@ -81,7 +80,6 @@ "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.10", - "@types/sortablejs": "^1.15.5", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "@unocss/transformer-variant-group": "^0.57.4", diff --git a/src/api/crm/product/index.ts b/src/api/crm/product/index.ts index c6d5dfdb..2d88cb09 100644 --- a/src/api/crm/product/index.ts +++ b/src/api/crm/product/index.ts @@ -41,3 +41,8 @@ export const deleteProduct = async (id: number) => { export const exportProduct = async (params) => { return await request.download({ url: `/crm/product/export-excel`, params }) } + +// 查询产品操作日志 +export const getOperateLogPage = async (params: any) => { + return await request.get({ url: '/crm/product/operate-log-page', params }) +} diff --git a/src/api/mall/product/category.ts b/src/api/mall/product/category.ts index 8158fc0f..7e80b76a 100644 --- a/src/api/mall/product/category.ts +++ b/src/api/mall/product/category.ts @@ -20,10 +20,6 @@ export interface CategoryVO { * 移动端分类图 */ picUrl: string - /** - * PC 端分类图 - */ - bigPicUrl?: string /** * 分类排序 */ diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts index ac8bac59..44dc663f 100644 --- a/src/api/mall/product/property.ts +++ b/src/api/mall/product/property.ts @@ -65,16 +65,6 @@ export const getPropertyPage = (params: PageParam) => { return request.get({ url: '/product/property/page', params }) } -// 获得属性项列表 -export const getPropertyList = (params: any) => { - return request.get({ url: '/product/property/list', params }) -} - -// 获得属性项列表 -export const getPropertyListAndValue = (data: any) => { - return request.post({ url: '/product/property/get-value-list', data }) -} - // ------------------------ 属性值 ------------------- // 获得属性值分页 diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index 8ccd02a5..eee632d5 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -33,14 +33,15 @@ export interface GiveCouponTemplate { export interface Spu { id?: number name?: string // 商品名称 - categoryId?: number | undefined // 商品分类 + categoryId?: number // 商品分类 keyword?: string // 关键字 unit?: number | undefined // 单位 picUrl?: string // 商品封面图 sliderPicUrls?: string[] // 商品轮播图 introduction?: string // 商品简介 + deliveryTypes?: number[] // 配送方式 deliveryTemplateId?: number | undefined // 运费模版 - brandId?: number | undefined // 商品品牌编号 + brandId?: number // 商品品牌编号 specType?: boolean // 商品规格 subCommissionType?: boolean // 分销类型 skus?: Sku[] // sku数组 @@ -48,11 +49,6 @@ export interface Spu { sort?: number // 商品排序 giveIntegral?: number // 赠送积分 virtualSalesCount?: number // 虚拟销量 - recommendHot?: boolean // 是否热卖 - recommendBenefit?: boolean // 是否优惠 - recommendBest?: boolean // 是否精品 - recommendNew?: boolean // 是否新品 - recommendGood?: boolean // 是否优品 price?: number // 商品价格 salesCount?: number // 商品销量 marketPrice?: number // 市场价 @@ -60,7 +56,6 @@ export interface Spu { stock?: number // 商品库存 createTime?: Date // 商品创建时间 status?: number // 商品状态 - activityOrders: number[] // 活动排序 } // 获得 Spu 列表 diff --git a/src/api/mall/promotion/diy/page.ts b/src/api/mall/promotion/diy/page.ts index 1cd34282..a834b240 100644 --- a/src/api/mall/promotion/diy/page.ts +++ b/src/api/mall/promotion/diy/page.ts @@ -5,7 +5,7 @@ export interface DiyPageVO { templateId?: number name: string remark: string - previewImageUrls: string[] + previewPicUrls: string[] property: string } diff --git a/src/api/mall/promotion/diy/template.ts b/src/api/mall/promotion/diy/template.ts index f8d4bc80..87134c95 100644 --- a/src/api/mall/promotion/diy/template.ts +++ b/src/api/mall/promotion/diy/template.ts @@ -7,7 +7,7 @@ export interface DiyTemplateVO { used: boolean usedTime?: Date remark: string - previewImageUrls: string[] + previewPicUrls: string[] property: string } diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts index 50c33564..691db476 100644 --- a/src/api/mall/promotion/reward/rewardActivity.ts +++ b/src/api/mall/promotion/reward/rewardActivity.ts @@ -1,17 +1,18 @@ import request from '@/config/axios' export interface DiscountActivityVO { - id?:number, + id?: number name?: string - startTime?:Date - endTime?:Date - remark?:string - conditionType?:number - productScope?:number - productSpuIds?:number[] - rules?:DiscountProductVO[] + startTime?: Date + endTime?: Date + remark?: string + conditionType?: number + productScope?: number + productSpuIds?: number[] + rules?: DiscountProductVO[] } -//优惠规则 + +// 优惠规则 export interface DiscountProductVO { limit: number discountPrice: number @@ -21,23 +22,26 @@ export interface DiscountProductVO { couponCounts: number[] } - // 新增满减送活动 export const createRewardActivity = async (data: DiscountActivityVO) => { return await request.post({ url: '/promotion/reward-activity/create', data }) } + // 更新满减送活动 export const updateRewardActivity = async (data: DiscountActivityVO) => { return await request.put({ url: '/promotion/reward-activity/update', data }) } + // 查询满减送活动列表 export const getRewardActivityPage = async (params) => { return await request.get({ url: '/promotion/reward-activity/page', params }) } + // 查询满减送活动详情 -export const getReward = async (id:number) => { - return await request.get({ url: '/promotion/reward-activity/get?id='+id, }) +export const getReward = async (id: number) => { + return await request.get({ url: '/promotion/reward-activity/get?id=' + id }) } + // 删除限时折扣活动 export const deleteRewardActivity = async (id: number) => { return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id }) diff --git a/src/components/DiyEditor/components/ComponentContainerProperty.vue b/src/components/DiyEditor/components/ComponentContainerProperty.vue index 4f48e204..9d0750da 100644 --- a/src/components/DiyEditor/components/ComponentContainerProperty.vue +++ b/src/components/DiyEditor/components/ComponentContainerProperty.vue @@ -23,7 +23,7 @@ - + - + diff --git a/src/components/DiyEditor/components/mobile/CouponCard/component.tsx b/src/components/DiyEditor/components/mobile/CouponCard/component.tsx index 1817428d..689690b0 100644 --- a/src/components/DiyEditor/components/mobile/CouponCard/component.tsx +++ b/src/components/DiyEditor/components/mobile/CouponCard/component.tsx @@ -2,15 +2,13 @@ import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate' import { CouponTemplateValidityTypeEnum, PromotionDiscountTypeEnum } from '@/utils/constants' import { floatToFixed2 } from '@/utils' import { formatDate } from '@/utils/formatTime' +import { object } from 'vue-types' // 优惠值 -// TODO @疯狂:idea 有告警 export const CouponDiscount = defineComponent({ name: 'CouponDiscount', props: { - coupon: { - type: CouponTemplateApi.CouponTemplateVO - } + coupon: object() }, setup(props) { const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO @@ -35,9 +33,7 @@ export const CouponDiscount = defineComponent({ export const CouponDiscountDesc = defineComponent({ name: 'CouponDiscountDesc', props: { - coupon: { - type: CouponTemplateApi.CouponTemplateVO - } + coupon: object() }, setup(props) { const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO @@ -61,9 +57,7 @@ export const CouponDiscountDesc = defineComponent({ export const CouponValidTerm = defineComponent({ name: 'CouponValidTerm', props: { - coupon: { - type: CouponTemplateApi.CouponTemplateVO - } + coupon: object() }, setup(props) { const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO diff --git a/src/components/DiyEditor/components/mobile/CouponCard/config.ts b/src/components/DiyEditor/components/mobile/CouponCard/config.ts index 40c6bed3..304533d1 100644 --- a/src/components/DiyEditor/components/mobile/CouponCard/config.ts +++ b/src/components/DiyEditor/components/mobile/CouponCard/config.ts @@ -24,7 +24,6 @@ export interface CouponCardProperty { } // 定义组件 -// TODO @疯狂:idea 有告警 export const component = { id: 'CouponCard', name: '优惠券', diff --git a/src/components/DiyEditor/components/mobile/MagicCube/config.ts b/src/components/DiyEditor/components/mobile/MagicCube/config.ts index d2edfddf..5e10ab55 100644 --- a/src/components/DiyEditor/components/mobile/MagicCube/config.ts +++ b/src/components/DiyEditor/components/mobile/MagicCube/config.ts @@ -31,7 +31,6 @@ export interface MagicCubeItemProperty { } // 定义组件 -// TODO @疯狂:有 idea 爆红告警 export const component = { id: 'MagicCube', name: '广告魔方', diff --git a/src/components/DiyEditor/components/mobile/ProductCard/config.ts b/src/components/DiyEditor/components/mobile/ProductCard/config.ts index fd4b21fc..735b6ba0 100644 --- a/src/components/DiyEditor/components/mobile/ProductCard/config.ts +++ b/src/components/DiyEditor/components/mobile/ProductCard/config.ts @@ -59,7 +59,6 @@ export interface ProductCardFieldProperty { } // 定义组件 -// TODO @疯狂:idea 有告警 export const component = { id: 'ProductCard', name: '商品卡片', diff --git a/src/components/DiyEditor/components/mobile/ProductList/config.ts b/src/components/DiyEditor/components/mobile/ProductList/config.ts index 6522a314..1f168323 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/config.ts +++ b/src/components/DiyEditor/components/mobile/ProductList/config.ts @@ -38,7 +38,6 @@ export interface ProductListFieldProperty { } // 定义组件 -// TODO @疯狂:idea 有告警 export const component = { id: 'ProductList', name: '商品栏', diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue index 3bca5da9..e003b081 100644 --- a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue @@ -1,17 +1,16 @@ diff --git a/src/views/crm/product/ProductForm.vue b/src/views/crm/product/ProductForm.vue index 0864c8d8..e12af4c8 100644 --- a/src/views/crm/product/ProductForm.vue +++ b/src/views/crm/product/ProductForm.vue @@ -62,13 +62,13 @@ - @@ -149,7 +149,7 @@ const open = async (type: string, id?: number) => { formLoading.value = true try { formData.value = await ProductApi.getProduct(id) - formData.value.price = fenToYuan(formData.value.price) + formData.value.price = Number(fenToYuan(formData.value.price)) } finally { formLoading.value = false } diff --git a/src/views/crm/product/detail/ProductDetailsHeader.vue b/src/views/crm/product/detail/ProductDetailsHeader.vue new file mode 100644 index 00000000..356f1dbc --- /dev/null +++ b/src/views/crm/product/detail/ProductDetailsHeader.vue @@ -0,0 +1,55 @@ + + diff --git a/src/views/crm/product/detail/ProductDetailsInfo.vue b/src/views/crm/product/detail/ProductDetailsInfo.vue new file mode 100644 index 00000000..85046b85 --- /dev/null +++ b/src/views/crm/product/detail/ProductDetailsInfo.vue @@ -0,0 +1,45 @@ + + diff --git a/src/views/crm/product/detail/index.vue b/src/views/crm/product/detail/index.vue new file mode 100644 index 00000000..847e9445 --- /dev/null +++ b/src/views/crm/product/detail/index.vue @@ -0,0 +1,62 @@ + + diff --git a/src/views/crm/product/index.vue b/src/views/crm/product/index.vue index 3f01455c..5100d7f4 100644 --- a/src/views/crm/product/index.vue +++ b/src/views/crm/product/index.vue @@ -28,8 +28,8 @@ - 搜索 - 重置 + 搜索 + 重置 新增 @@ -40,7 +40,8 @@ :loading="exportLoading" v-hasPermi="['crm:product:export']" > - 导出 + + 导出 @@ -49,8 +50,14 @@ - - + + + + @@ -124,7 +149,12 @@