mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-11 03:18:56 +08:00
feat(promotion): 新增满折满赠活动及阶梯优惠规则支持
- 满额活动列表页支持满减、满折、满赠三种类型筛选与标签展示 - 新增阶梯优惠规则列,按活动类型格式化展示各级优惠详情 - 活动详情页支持1至3级阶梯优惠配置及满赠赠品选择 - 页面装修组件增加满折、满赠活动类型标签展示 - 隐藏"添加活动优惠券"按钮入口 - 优化活动类型、状态、时间等表格列宽与样式
This commit is contained in:
@@ -45,3 +45,16 @@ test('搜索清空与空权限账号正确处理', () => {
|
||||
assert.deepEqual(searchNavigation(flattenNavigation([]), ''), []);
|
||||
assert.equal(findNavigationItem(items, 'unknown-detail'), null);
|
||||
});
|
||||
test('满减/满折/满赠详情页按 activityType 定位对应左侧菜单', () => {
|
||||
const promoMenus = [
|
||||
{ name: 'promotion', title: '营销', children: [{ title: '店铺活动', children: [
|
||||
{ name: 'full-discount', path: 'full-discount', title: '满减活动', component },
|
||||
{ name: 'store-full-rate', path: 'full-rate', title: '满折活动', component },
|
||||
{ name: 'store-full-gift', path: 'full-gift', title: '满赠活动', component },
|
||||
] }] },
|
||||
];
|
||||
const promoItems = flattenNavigation(promoMenus);
|
||||
assert.equal(findNavigationItem(promoItems, 'full-discount-detail', { activityType: 'FULL_GIFT' })?.name, 'store-full-gift');
|
||||
assert.equal(findNavigationItem(promoItems, 'full-discount-detail', { activityType: 'FULL_RATE' })?.name, 'store-full-rate');
|
||||
assert.equal(findNavigationItem(promoItems, 'full-discount-detail', { activityType: 'FULL_MINUS' })?.name, 'full-discount');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user