diff --git a/.env.dev b/.env.dev index a52eec30..9249ced8 100644 --- a/.env.dev +++ b/.env.dev @@ -19,13 +19,13 @@ VITE_API_URL=/admin-api VITE_BASE_PATH=/ # 是否删除debugger -VITE_DROP_DEBUGGER=false +VITE_DROP_DEBUGGER=true # 是否删除console.log VITE_DROP_CONSOLE=false # 是否sourcemap -VITE_SOURCEMAP=true +VITE_SOURCEMAP=false # 输出路径 VITE_OUT_DIR=dist-dev diff --git a/package.json b/package.json index 7a00c122..8cdf9380 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,9 @@ "qs": "^6.11.1", "steady-xml": "^0.1.0", "url": "^0.11.0", - "video.js": "^8.0.4", - "vue": "3.2.47", + "video.js": "^8.3.0", + "vue": "3.3.4", + "vue-dompurify-html": "^4.1.4", "vue-i18n": "9.2.2", "vue-router": "^4.1.6", "vue-types": "^5.0.2", diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index fd55e126..e0d4ec83 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -7,8 +7,7 @@ export interface Property { valueName?: string // 属性值名称 } -// TODO puhui999:是不是直接叫 Sku 更简洁一点哈。type 待后面,总感觉有个类型? -export interface SkuType { +export interface Sku { id?: number // 商品 SKU 编号 spuId?: number // SPU 编号 properties?: Property[] // 属性数组 @@ -25,8 +24,7 @@ export interface SkuType { salesCount?: number // 商品销量 } -// TODO puhui999:是不是直接叫 Spu 更简洁一点哈。type 待后面,总感觉有个类型? -export interface SpuType { +export interface Spu { id?: number name?: string // 商品名称 categoryId?: number | null // 商品分类 @@ -39,9 +37,9 @@ export interface SpuType { brandId?: number | null // 商品品牌编号 specType?: boolean // 商品规格 subCommissionType?: boolean // 分销类型 - skus: SkuType[] // sku数组 + skus?: Sku[] // sku数组 description?: string // 商品详情 - sort?: string // 商品排序 + sort?: number // 商品排序 giveIntegral?: number // 赠送积分 virtualSalesCount?: number // 虚拟销量 recommendHot?: boolean // 是否热卖 @@ -62,12 +60,12 @@ export const getTabsCount = () => { } // 创建商品 Spu -export const createSpu = (data: SpuType) => { +export const createSpu = (data: Spu) => { return request.post({ url: '/product/spu/create', data }) } // 更新商品 Spu -export const updateSpu = (data: SpuType) => { +export const updateSpu = (data: Spu) => { return request.put({ url: '/product/spu/update', data }) } diff --git a/src/api/mall/trade/delivery/expressTemplate/index.ts b/src/api/mall/trade/delivery/expressTemplate/index.ts index be3da96e..9ed23bc1 100644 --- a/src/api/mall/trade/delivery/expressTemplate/index.ts +++ b/src/api/mall/trade/delivery/expressTemplate/index.ts @@ -33,6 +33,11 @@ export const getDeliveryExpressTemplate = async (id: number) => { return await request.get({ url: '/trade/delivery/express-template/get?id=' + id }) } +// 查询快递运费模板详情 +export const getSimpleTemplateList = async () => { + return await request.get({ url: '/trade/delivery/express-template/list-all-simple' }) +} + // 新增快递运费模板 export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { return await request.post({ url: '/trade/delivery/express-template/create', data }) diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index c1121641..3dca6c94 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -1,16 +1,16 @@ diff --git a/src/views/mall/product/spu/components/DescriptionForm.vue b/src/views/mall/product/spu/components/DescriptionForm.vue index fbae9a86..f7597006 100644 --- a/src/views/mall/product/spu/components/DescriptionForm.vue +++ b/src/views/mall/product/spu/components/DescriptionForm.vue @@ -1,28 +1,49 @@ diff --git a/src/views/mall/product/spu/components/spu.data.ts b/src/views/mall/product/spu/components/spu.data.ts new file mode 100644 index 00000000..41c43df9 --- /dev/null +++ b/src/views/mall/product/spu/components/spu.data.ts @@ -0,0 +1,105 @@ +import { CrudSchema } from '@/hooks/web/useCrudSchemas' + +export const basicInfoSchema = reactive([ + { + label: '商品名称', + field: 'name' + }, + { + label: '关键字', + field: 'keyword' + }, + { + label: '商品简介', + field: 'introduction' + }, + { + label: '商品分类', + field: 'categoryId' + }, + { + label: '商品品牌', + field: 'brandId' + }, + { + label: '商品封面图', + field: 'picUrl' + }, + { + label: '商品轮播图', + field: 'sliderPicUrls' + }, + { + label: '商品视频', + field: 'videoUrl' + }, + { + label: '单位', + field: 'unit', + dictType: DICT_TYPE.PRODUCT_UNIT + }, + { + label: '规格类型', + field: 'specType' + }, + { + label: '分销类型', + field: 'subCommissionType' + }, + { + label: '物流模版', + field: 'deliveryTemplateId' + }, + { + label: '商品属性列表', + field: 'skus' + } +]) +export const descriptionSchema = reactive([ + { + label: '商品详情', + field: 'description' + } +]) +export const otherSettingsSchema = reactive([ + { + label: '商品排序', + field: 'sort' + }, + { + label: '赠送积分', + field: 'giveIntegral' + }, + { + label: '虚拟销量', + field: 'virtualSalesCount' + }, + { + label: '是否热卖推荐', + field: 'recommendHot' + }, + { + label: '是否优惠推荐', + field: 'recommendBenefit' + }, + { + label: '是否精品推荐', + field: 'recommendBest' + }, + { + label: '是否新品推荐', + field: 'recommendNew' + }, + { + label: '是否优品推荐', + field: 'recommendGood' + }, + { + label: '赠送的优惠劵', + field: 'giveCouponTemplateIds' + }, + { + label: '活动显示排序', + field: 'activityOrders' + } +]) diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue index 539171b0..47a9c8d5 100644 --- a/src/views/mall/product/spu/index.vue +++ b/src/views/mall/product/spu/index.vue @@ -8,18 +8,16 @@ class="-mb-15px" label-width="68px" > - - + - - + @@ -80,31 +79,60 @@ /> - +虚拟销量:999 --> @@ -143,8 +171,13 @@