diff --git a/src/api/infra/demo/demo01/index.ts b/src/api/infra/demo/demo01/index.ts index 1a4b01ca..e34a05d1 100644 --- a/src/api/infra/demo/demo01/index.ts +++ b/src/api/infra/demo/demo01/index.ts @@ -37,4 +37,4 @@ export const deleteDemo01Contact = async (id: number) => { // 导出示例联系人 Excel export const exportDemo01Contact = async (params) => { return await request.download({ url: `/infra/demo01-contact/export-excel`, params }) -} \ No newline at end of file +} diff --git a/src/api/infra/demo/demo02/index.ts b/src/api/infra/demo/demo02/index.ts index 21e45c90..30e16863 100644 --- a/src/api/infra/demo/demo02/index.ts +++ b/src/api/infra/demo/demo02/index.ts @@ -34,4 +34,4 @@ export const deleteDemo02Category = async (id: number) => { // 导出示例分类 Excel export const exportDemo02Category = async (params) => { return await request.download({ url: `/infra/demo02-category/export-excel`, params }) -} \ No newline at end of file +} diff --git a/src/api/infra/demo/demo03/erp/index.ts b/src/api/infra/demo/demo03/erp/index.ts index d408b630..a2ab5398 100644 --- a/src/api/infra/demo/demo03/erp/index.ts +++ b/src/api/infra/demo/demo03/erp/index.ts @@ -88,4 +88,4 @@ export const deleteDemo03Grade = async (id: number) => { // 获得学生班级 export const getDemo03Grade = async (id: number) => { return await request.get({ url: `/infra/demo03-student/demo03-grade/get?id=` + id }) -} \ No newline at end of file +} diff --git a/src/api/infra/demo/demo03/inner/index.ts b/src/api/infra/demo/demo03/inner/index.ts index f15ee1dc..e3663078 100644 --- a/src/api/infra/demo/demo03/inner/index.ts +++ b/src/api/infra/demo/demo03/inner/index.ts @@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => { // 获得学生课程列表 export const getDemo03CourseListByStudentId = async (studentId) => { - return await request.get({ url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId }) + return await request.get({ + url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId + }) } // ==================== 子表(学生班级) ==================== // 获得学生班级 export const getDemo03GradeByStudentId = async (studentId) => { - return await request.get({ url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId }) -} \ No newline at end of file + return await request.get({ + url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId + }) +} diff --git a/src/api/infra/demo/demo03/normal/index.ts b/src/api/infra/demo/demo03/normal/index.ts index f15ee1dc..e3663078 100644 --- a/src/api/infra/demo/demo03/normal/index.ts +++ b/src/api/infra/demo/demo03/normal/index.ts @@ -42,12 +42,16 @@ export const exportDemo03Student = async (params) => { // 获得学生课程列表 export const getDemo03CourseListByStudentId = async (studentId) => { - return await request.get({ url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId }) + return await request.get({ + url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId + }) } // ==================== 子表(学生班级) ==================== // 获得学生班级 export const getDemo03GradeByStudentId = async (studentId) => { - return await request.get({ url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId }) -} \ No newline at end of file + return await request.get({ + url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId + }) +} diff --git a/src/api/mall/promotion/article/index.ts b/src/api/mall/promotion/article/index.ts index 824958ad..9184c7af 100644 --- a/src/api/mall/promotion/article/index.ts +++ b/src/api/mall/promotion/article/index.ts @@ -17,7 +17,7 @@ export interface ArticleVO { } // 查询文章管理列表 -export const getArticlePage = async (params) => { +export const getArticlePage = async (params: any) => { return await request.get({ url: `/promotion/article/page`, params }) } diff --git a/src/components/AppLinkInput/AppLinkSelectDialog.vue b/src/components/AppLinkInput/AppLinkSelectDialog.vue new file mode 100644 index 00000000..a536ac13 --- /dev/null +++ b/src/components/AppLinkInput/AppLinkSelectDialog.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/components/AppLinkInput/data.ts b/src/components/AppLinkInput/data.ts new file mode 100644 index 00000000..fd7780f1 --- /dev/null +++ b/src/components/AppLinkInput/data.ts @@ -0,0 +1,246 @@ +// APP 链接类型(需要特殊处理,例如商品详情) +export const enum APP_LINK_TYPE_ENUM { + // 拼团活动 + ACTIVITY_COMBINATION, + // 秒杀活动 + ACTIVITY_SECKILL, + // 文章详情 + ARTICLE_DETAIL, + // 优惠券详情 + COUPON_DETAIL, + // 自定义页面详情 + DIY_PAGE_DETAIL, + // 品类列表 + PRODUCT_CATEGORY_LIST, + // 商品列表 + PRODUCT_LIST, + // 商品详情 + PRODUCT_DETAIL_NORMAL, + // 拼团商品详情 + PRODUCT_DETAIL_COMBINATION, + // 积分商品详情 + PRODUCT_DETAIL_POINT, + // 秒杀商品详情 + PRODUCT_DETAIL_SECKILL +} + +// APP 链接列表(做一下持久化?) +export const APP_LINK_GROUP_LIST = [ + { + name: '商城', + links: [ + { + name: '首页', + path: '/pages/index/index' + }, + { + name: '商品分类', + path: '/pages/index/category', + type: APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST + }, + { + name: '购物车', + path: '/pages/index/cart' + }, + { + name: '个人中心', + path: '/pages/index/user' + }, + { + name: '商品搜索', + path: '/pages/index/search' + }, + { + name: '自定义页面', + path: '/pages/index/page', + type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL + }, + { + name: '客服', + path: '/pages/chat/index' + }, + { + name: '系统设置', + path: '/pages/public/setting' + }, + { + name: '问题反馈', + path: '/pages/public/feedback' + }, + { + name: '常见问题', + path: '/pages/public/faq' + } + ] + }, + { + name: '商品', + links: [ + { + name: '商品列表', + path: '/pages/goods/list', + type: APP_LINK_TYPE_ENUM.PRODUCT_LIST + }, + { + name: '商品详情', + path: '/pages/goods/index', + type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_NORMAL + }, + { + name: '拼团商品详情', + path: '/pages/goods/groupon', + type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_COMBINATION + }, + { + name: '秒杀商品详情', + path: '/pages/goods/seckill', + type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL + }, + { + name: '积分商品详情', + path: '/pages/goods/score', + type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_POINT + } + ] + }, + { + name: '营销活动', + links: [ + { + name: '拼团订单', + path: '/pages/activity/groupon/order' + }, + { + name: '营销商品', + path: '/pages/activity/index' + }, + { + name: '拼团活动', + path: '/pages/activity/groupon/list', + type: APP_LINK_TYPE_ENUM.ACTIVITY_COMBINATION + }, + { + name: '秒杀活动', + path: '/pages/activity/seckill/list', + type: APP_LINK_TYPE_ENUM.ACTIVITY_SECKILL + }, + { + name: '签到中心', + path: '/pages/app/sign' + }, + { + name: '积分商城', + path: '/pages/app/score-shop' + }, + { + name: '优惠券中心', + path: '/pages/coupon/list' + }, + { + name: '优惠券详情', + path: '/pages/coupon/detail', + type: APP_LINK_TYPE_ENUM.COUPON_DETAIL + }, + { + name: '文章详情', + path: '/pages/public/richtext', + type: APP_LINK_TYPE_ENUM.ARTICLE_DETAIL + } + ] + }, + { + name: '分销商城', + links: [ + { + name: '分销中心', + path: '/pages/commission/index' + }, + { + name: '申请分销商', + path: '/pages/commission/apply' + }, + { + name: '推广商品', + path: '/pages/commission/goods' + }, + { + name: '分销订单', + path: '/pages/commission/order' + }, + { + name: '分享记录', + path: '/pages/commission/share-log' + }, + { + name: '我的团队', + path: '/pages/commission/team' + } + ] + }, + { + name: '支付', + links: [ + { + name: '充值余额', + path: '/pages/pay/recharge' + }, + { + name: '充值记录', + path: '/pages/pay/recharge-log' + }, + { + name: '申请提现', + path: '/pages/pay/withdraw' + }, + { + name: '提现记录', + path: '/pages/pay/withdraw-log' + } + ] + }, + { + name: '用户中心', + links: [ + { + name: '用户信息', + path: '/pages/user/info' + }, + { + name: '用户订单', + path: '/pages/order/list' + }, + { + name: '售后订单', + path: '/pages/order/aftersale/list' + }, + { + name: '商品收藏', + path: '/pages/user/goods-collect' + }, + { + name: '浏览记录', + path: '/pages/user/goods-log' + }, + { + name: '地址管理', + path: '/pages/user/address/list' + }, + { + name: '发票管理', + path: '/pages/user/invoice/list' + }, + { + name: '用户佣金', + path: '/pages/user/wallet/commission' + }, + { + name: '用户余额', + path: '/pages/user/wallet/money' + }, + { + name: '用户积分', + path: '/pages/user/wallet/score' + } + ] + } +] diff --git a/src/components/AppLinkInput/index.vue b/src/components/AppLinkInput/index.vue new file mode 100644 index 00000000..a01386b9 --- /dev/null +++ b/src/components/AppLinkInput/index.vue @@ -0,0 +1,43 @@ + + diff --git a/src/components/DiyEditor/components/ComponentContainerProperty.vue b/src/components/DiyEditor/components/ComponentContainerProperty.vue index d6540354..a8187898 100644 --- a/src/components/DiyEditor/components/ComponentContainerProperty.vue +++ b/src/components/DiyEditor/components/ComponentContainerProperty.vue @@ -1,6 +1,6 @@ - + diff --git a/src/components/DiyEditor/components/mobile/ImageBar/property.vue b/src/components/DiyEditor/components/mobile/ImageBar/property.vue index 58af1bc8..d8163615 100644 --- a/src/components/DiyEditor/components/mobile/ImageBar/property.vue +++ b/src/components/DiyEditor/components/mobile/ImageBar/property.vue @@ -13,7 +13,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/MagicCube/property.vue b/src/components/DiyEditor/components/mobile/MagicCube/property.vue index 57c0af79..fe938e5b 100644 --- a/src/components/DiyEditor/components/mobile/MagicCube/property.vue +++ b/src/components/DiyEditor/components/mobile/MagicCube/property.vue @@ -17,7 +17,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/MenuGrid/property.vue b/src/components/DiyEditor/components/mobile/MenuGrid/property.vue index e09dd318..b92e2099 100644 --- a/src/components/DiyEditor/components/mobile/MenuGrid/property.vue +++ b/src/components/DiyEditor/components/mobile/MenuGrid/property.vue @@ -38,7 +38,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/MenuList/property.vue b/src/components/DiyEditor/components/mobile/MenuList/property.vue index 270ca261..0ed6035c 100644 --- a/src/components/DiyEditor/components/mobile/MenuList/property.vue +++ b/src/components/DiyEditor/components/mobile/MenuList/property.vue @@ -31,7 +31,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue b/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue index 2175d57e..31e158ce 100644 --- a/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue +++ b/src/components/DiyEditor/components/mobile/MenuSwiper/property.vue @@ -48,7 +48,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/NoticeBar/property.vue b/src/components/DiyEditor/components/mobile/NoticeBar/property.vue index 11e7f4b7..a3eefebe 100644 --- a/src/components/DiyEditor/components/mobile/NoticeBar/property.vue +++ b/src/components/DiyEditor/components/mobile/NoticeBar/property.vue @@ -35,7 +35,7 @@
- +
diff --git a/src/components/DiyEditor/components/mobile/ProductList/config.ts b/src/components/DiyEditor/components/mobile/ProductList/config.ts index 436de405..1f168323 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/config.ts +++ b/src/components/DiyEditor/components/mobile/ProductList/config.ts @@ -1,6 +1,6 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' -/** 商品卡片属性 */ +/** 商品栏属性 */ export interface ProductListProperty { // 布局类型:双列 | 三列 | 水平滑动 layoutType: 'twoCol' | 'threeCol' | 'horizSwiper' diff --git a/src/components/DiyEditor/components/mobile/ProductList/index.vue b/src/components/DiyEditor/components/mobile/ProductList/index.vue index 8a35628e..3ba63677 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/index.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/index.vue @@ -66,7 +66,7 @@ import { ProductListProperty } from './config' import * as ProductSpuApi from '@/api/mall/product/spu' -/** 商品卡片 */ +/** 商品栏 */ defineOptions({ name: 'ProductList' }) // 定义属性 const props = defineProps<{ property: ProductListProperty }>() diff --git a/src/components/DiyEditor/components/mobile/ProductList/property.vue b/src/components/DiyEditor/components/mobile/ProductList/property.vue index 872affc3..e9cf7c01 100644 --- a/src/components/DiyEditor/components/mobile/ProductList/property.vue +++ b/src/components/DiyEditor/components/mobile/ProductList/property.vue @@ -88,7 +88,7 @@ import { ProductListProperty } from './config' import { usePropertyForm } from '@/components/DiyEditor/util' import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue' -// 商品卡片属性面板 +// 商品栏属性面板 defineOptions({ name: 'ProductListProperty' }) const props = defineProps<{ modelValue: ProductListProperty }>() diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts b/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts new file mode 100644 index 00000000..c6270c2a --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/config.ts @@ -0,0 +1,25 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 营销文章属性 */ +export interface PromotionArticleProperty { + // 文章编号 + id: number + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'PromotionArticle', + name: '营销文章', + icon: 'ph:article-medium', + property: { + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue new file mode 100644 index 00000000..cca3635d --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/index.vue @@ -0,0 +1,27 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue new file mode 100644 index 00000000..c3bcb21b --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts b/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts new file mode 100644 index 00000000..3ec2a75b --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionCombination/config.ts @@ -0,0 +1,64 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 拼团属性 */ +export interface PromotionCombinationProperty { + // 布局类型:单列 | 三列 + layoutType: 'oneCol' | 'threeCol' + // 商品字段 + fields: { + // 商品名称 + name: PromotionCombinationFieldProperty + // 商品价格 + price: PromotionCombinationFieldProperty + } + // 角标 + badge: { + // 是否显示 + show: boolean + // 角标图片 + imgUrl: string + } + // 上圆角 + borderRadiusTop: number + // 下圆角 + borderRadiusBottom: number + // 间距 + space: number + // 拼团活动编号 + activityId: number + // 组件样式 + style: ComponentStyle +} +// 商品字段 +export interface PromotionCombinationFieldProperty { + // 是否显示 + show: boolean + // 颜色 + color: string +} + +// 定义组件 +export const component = { + id: 'PromotionCombination', + name: '拼团', + icon: 'mdi:account-group', + property: { + activityId: undefined, + layoutType: 'oneCol', + fields: { + name: { show: true, color: '#000' }, + price: { show: true, color: '#ff3000' } + }, + badge: { show: false, imgUrl: '' }, + borderRadiusTop: 8, + borderRadiusBottom: 8, + space: 8, + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue b/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue new file mode 100644 index 00000000..fe6f3a83 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionCombination/index.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue b/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue new file mode 100644 index 00000000..ec09dc45 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionCombination/property.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts b/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts new file mode 100644 index 00000000..800398be --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts @@ -0,0 +1,64 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 秒杀属性 */ +export interface PromotionSeckillProperty { + // 布局类型:单列 | 三列 + layoutType: 'oneCol' | 'threeCol' + // 商品字段 + fields: { + // 商品名称 + name: PromotionSeckillFieldProperty + // 商品价格 + price: PromotionSeckillFieldProperty + } + // 角标 + badge: { + // 是否显示 + show: boolean + // 角标图片 + imgUrl: string + } + // 上圆角 + borderRadiusTop: number + // 下圆角 + borderRadiusBottom: number + // 间距 + space: number + // 秒杀活动编号 + activityId: number + // 组件样式 + style: ComponentStyle +} +// 商品字段 +export interface PromotionSeckillFieldProperty { + // 是否显示 + show: boolean + // 颜色 + color: string +} + +// 定义组件 +export const component = { + id: 'PromotionSeckill', + name: '秒杀', + icon: 'mdi:calendar-time', + property: { + activityId: undefined, + layoutType: 'oneCol', + fields: { + name: { show: true, color: '#000' }, + price: { show: true, color: '#ff3000' } + }, + badge: { show: false, imgUrl: '' }, + borderRadiusTop: 8, + borderRadiusBottom: 8, + space: 8, + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue new file mode 100644 index 00000000..1b4113b6 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue new file mode 100644 index 00000000..87537822 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/TabBar/property.vue b/src/components/DiyEditor/components/mobile/TabBar/property.vue index eefdf54a..a7634a5b 100644 --- a/src/components/DiyEditor/components/mobile/TabBar/property.vue +++ b/src/components/DiyEditor/components/mobile/TabBar/property.vue @@ -88,7 +88,7 @@
- + diff --git a/src/components/DiyEditor/components/mobile/TitleBar/property.vue b/src/components/DiyEditor/components/mobile/TitleBar/property.vue index 3e4dac2d..941e6d92 100644 --- a/src/components/DiyEditor/components/mobile/TitleBar/property.vue +++ b/src/components/DiyEditor/components/mobile/TitleBar/property.vue @@ -92,7 +92,7 @@ - + diff --git a/src/components/DiyEditor/components/mobile/UserCard/config.ts b/src/components/DiyEditor/components/mobile/UserCard/config.ts new file mode 100644 index 00000000..7b337761 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCard/config.ts @@ -0,0 +1,21 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 用户卡片属性 */ +export interface UserCardProperty { + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'UserCard', + name: '用户卡片', + icon: 'mdi:user-card-details', + property: { + style: { + bgType: 'color', + bgColor: '', + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserCard/index.vue b/src/components/DiyEditor/components/mobile/UserCard/index.vue new file mode 100644 index 00000000..14b447c6 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCard/index.vue @@ -0,0 +1,29 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/UserCard/property.vue b/src/components/DiyEditor/components/mobile/UserCard/property.vue new file mode 100644 index 00000000..43dfad2c --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCard/property.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/config.ts b/src/components/DiyEditor/components/mobile/UserCoupon/config.ts new file mode 100644 index 00000000..92eba9b6 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCoupon/config.ts @@ -0,0 +1,23 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 用户卡券属性 */ +export interface UserCouponProperty { + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'UserCoupon', + name: '用户卡券', + icon: 'ep:ticket', + property: { + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/index.vue b/src/components/DiyEditor/components/mobile/UserCoupon/index.vue new file mode 100644 index 00000000..27ad310a --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCoupon/index.vue @@ -0,0 +1,15 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/UserCoupon/property.vue b/src/components/DiyEditor/components/mobile/UserCoupon/property.vue new file mode 100644 index 00000000..f902e04e --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserCoupon/property.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/UserOrder/config.ts b/src/components/DiyEditor/components/mobile/UserOrder/config.ts new file mode 100644 index 00000000..f9c5a6db --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserOrder/config.ts @@ -0,0 +1,23 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 用户订单属性 */ +export interface UserOrderProperty { + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'UserOrder', + name: '用户订单', + icon: 'ep:list', + property: { + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserOrder/index.vue b/src/components/DiyEditor/components/mobile/UserOrder/index.vue new file mode 100644 index 00000000..450ae548 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserOrder/index.vue @@ -0,0 +1,13 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/UserOrder/property.vue b/src/components/DiyEditor/components/mobile/UserOrder/property.vue new file mode 100644 index 00000000..42df7410 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserOrder/property.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/UserWallet/config.ts b/src/components/DiyEditor/components/mobile/UserWallet/config.ts new file mode 100644 index 00000000..4e0955f5 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserWallet/config.ts @@ -0,0 +1,23 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 用户资产属性 */ +export interface UserWalletProperty { + // 组件样式 + style: ComponentStyle +} + +// 定义组件 +export const component = { + id: 'UserWallet', + name: '用户资产', + icon: 'ep:wallet-filled', + property: { + style: { + bgType: 'color', + bgColor: '', + marginLeft: 8, + marginRight: 8, + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/UserWallet/index.vue b/src/components/DiyEditor/components/mobile/UserWallet/index.vue new file mode 100644 index 00000000..0efc9371 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserWallet/index.vue @@ -0,0 +1,15 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/UserWallet/property.vue b/src/components/DiyEditor/components/mobile/UserWallet/property.vue new file mode 100644 index 00000000..549367e3 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/UserWallet/property.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/DiyEditor/util.ts b/src/components/DiyEditor/util.ts index a8d0e095..606e53a2 100644 --- a/src/components/DiyEditor/util.ts +++ b/src/components/DiyEditor/util.ts @@ -109,13 +109,19 @@ export const PAGE_LIBS = [ }, { name: '商品组件', extended: true, components: ['ProductCard', 'ProductList'] }, { - name: '会员组件', + name: '用户组件', extended: true, components: ['UserCard', 'UserOrder', 'UserWallet', 'UserCoupon'] }, { name: '营销组件', extended: true, - components: ['CombinationCard', 'SeckillCard', 'PointCard', 'CouponCard'] + components: [ + 'PromotionCombination', + 'PromotionSeckill', + 'PromotionPoint', + 'CouponCard', + 'PromotionArticle' + ] } ] as DiyComponentLibrary[] diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue index 2499dafe..e9310b8f 100644 --- a/src/components/RouterSearch/index.vue +++ b/src/components/RouterSearch/index.vue @@ -29,7 +29,12 @@ :class="showTopSearch ? 'w-220px ml2' : 'w-0'" @change="handleChange" > - + @@ -73,7 +78,7 @@ function remoteMethod(data) { function handleChange(path) { router.push({ path }) - hiddenTopSearch(); + hiddenTopSearch() } function hiddenTopSearch() { diff --git a/src/layout/components/ToolHeader.vue b/src/layout/components/ToolHeader.vue index 8eae6855..0b8d00d5 100644 --- a/src/layout/components/ToolHeader.vue +++ b/src/layout/components/ToolHeader.vue @@ -65,7 +65,7 @@ export default defineComponent({ {screenfull.value ? ( ) : undefined} - {search.value ? () : undefined} + {search.value ? : undefined} {size.value ? ( ) : undefined} diff --git a/src/utils/index.ts b/src/utils/index.ts index 10f57567..6ee53e71 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,3 +1,5 @@ +import { toNumber } from 'lodash-es' + /** * * @param component 需要注册的组件 @@ -263,3 +265,23 @@ export const calculateRelativeRate = (value?: number, reference?: number) => { return ((100 * ((value || 0) - reference)) / reference).toFixed(0) } + +/** + * 获取链接的参数值 + * @param key 参数键名 + * @param urlStr 链接地址,默认为当前浏览器的地址 + */ +export const getUrlValue = (key: string, urlStr: string = location.href): string => { + if (!urlStr || !key) return '' + const url = new URL(decodeURIComponent(urlStr)) + return url.searchParams.get(key) ?? '' +} + +/** + * 获取链接的参数值(值类型) + * @param key 参数键名 + * @param urlStr 链接地址,默认为当前浏览器的地址 + */ +export const getUrlNumberValue = (key: string, urlStr: string = location.href): number => { + return toNumber(getUrlValue(key, urlStr)) +} diff --git a/src/views/crm/businessStatusType/index.vue b/src/views/crm/businessStatusType/index.vue index 7b2725f3..3f7389be 100644 --- a/src/views/crm/businessStatusType/index.vue +++ b/src/views/crm/businessStatusType/index.vue @@ -95,7 +95,7 @@ const list = ref([]) // 列表的数据 const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, - pageSize: 10, + pageSize: 10 }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 diff --git a/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue b/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue index e7dee69f..da37e556 100644 --- a/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue +++ b/src/views/crm/config/customerLimitConfig/CustomerLimitConfigForm.vue @@ -12,9 +12,9 @@ v-model="formData.userIds" :data="userTree" :props="defaultProps" - check-on-click-node multiple filterable + check-on-click-node node-key="id" placeholder="请选择规则适用人群" /> @@ -25,8 +25,8 @@ :data="deptTree" :props="defaultProps" multiple - check-strictly filterable + check-strictly node-key="id" placeholder="请选择规则适用部门" /> diff --git a/src/views/infra/codegen/EditTable.vue b/src/views/infra/codegen/EditTable.vue index c94e0da6..f8473e36 100644 --- a/src/views/infra/codegen/EditTable.vue +++ b/src/views/infra/codegen/EditTable.vue @@ -8,7 +8,11 @@ - + diff --git a/src/views/infra/demo/demo01/Demo01ContactForm.vue b/src/views/infra/demo/demo01/Demo01ContactForm.vue index 0452a3c0..5d28112a 100644 --- a/src/views/infra/demo/demo01/Demo01ContactForm.vue +++ b/src/views/infra/demo/demo01/Demo01ContactForm.vue @@ -123,4 +123,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo02/Demo02CategoryForm.vue b/src/views/infra/demo/demo02/Demo02CategoryForm.vue index 9002d5ee..f4c5f8e2 100644 --- a/src/views/infra/demo/demo02/Demo02CategoryForm.vue +++ b/src/views/infra/demo/demo02/Demo02CategoryForm.vue @@ -111,4 +111,4 @@ const getDemo02CategoryTree = async () => { root.children = handleTree(data, 'id', 'parentId') demo02CategoryTree.value.push(root) } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue index 29f1370d..758c7e5d 100644 --- a/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue +++ b/src/views/infra/demo/demo03/erp/Demo03StudentForm.vue @@ -118,4 +118,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue b/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue index de1c06de..9d3888d8 100644 --- a/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue +++ b/src/views/infra/demo/demo03/erp/components/Demo03CourseForm.vue @@ -96,4 +96,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue index 7e06ee64..9d5e2705 100644 --- a/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue +++ b/src/views/infra/demo/demo03/erp/components/Demo03CourseList.vue @@ -11,7 +11,7 @@ - + - - + + \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue b/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue index abba0032..56872949 100644 --- a/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue +++ b/src/views/infra/demo/demo03/erp/components/Demo03GradeForm.vue @@ -96,4 +96,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue b/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue index b12f1889..e57cb3a4 100644 --- a/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue +++ b/src/views/infra/demo/demo03/erp/components/Demo03GradeList.vue @@ -11,7 +11,7 @@ - + - - + + \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue index fe9327b9..98c1b7bf 100644 --- a/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue +++ b/src/views/infra/demo/demo03/inner/Demo03StudentForm.vue @@ -150,4 +150,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue b/src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue index 87057513..77da45ff 100644 --- a/src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue +++ b/src/views/infra/demo/demo03/inner/components/Demo03CourseForm.vue @@ -9,7 +9,7 @@ > - +