Skip to content

Commit b1ce267

Browse files
committed
review 秒杀活动
1 parent a6fc5f7 commit b1ce267

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

src/views/mall/product/spu/components/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SkuList from './SkuList.vue'
77

88
import { Spu } from '@/api/mall/product/spu'
99

10+
// TODO @puhui999:Properties 改成 Property 更合适?
1011
interface Properties {
1112
id: number
1213
name: string
@@ -30,8 +31,10 @@ interface RuleConfig {
3031
}
3132

3233
/**
33-
* 商品通用函数
34+
* 获得商品的规格列表
35+
*
3436
* @param spu
37+
* @return Property 规格列表
3538
*/
3639
const getPropertyList = (spu: Spu): Properties[] => {
3740
// 直接拿返回的 skus 属性逆向生成出 propertyList

src/views/mall/product/spu/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ const categoryList = ref() // 分类树
437437
const categoryString = (categoryId) => {
438438
return treeToString(categoryList.value, categoryId)
439439
}
440+
440441
/**
441442
* 校验所选是否为二级及以下节点
442443
*/
@@ -446,6 +447,7 @@ const nodeClick = () => {
446447
message.warning('必须选择二级及以下节点!!')
447448
}
448449
}
450+
449451
/** 初始化 **/
450452
onMounted(async () => {
451453
await getTabsCount()

src/views/mall/promotion/components/SpuSelect.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ const imagePreview = (imgUrl: string) => {
256256
257257
const categoryList = ref() // 分类树
258258
259-
// TODO @puhui999:商品搜索的时候,可以通过一级搜二级;所以这个校验可以去掉哈;也就是说,只允许挂在二级,但是一级可搜索到
260259
/** 初始化 **/
261260
onMounted(async () => {
262261
await getList()

src/views/mall/promotion/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type SpuProperty<T> = {
77
spuDetail: T
88
propertyList: Properties[]
99
}
10+
1011
/**
1112
* 提供商品活动商品选择通用组件
1213
*/

src/views/mall/promotion/seckill/activity/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@ const openForm = (type: string, id?: number) => {
8989
const handleDelete = (id: number) => {
9090
tableMethods.delList(id, false)
9191
}
92+
93+
// TODO @puhui:是不是直接叫 configList 就好啦
9294
const seckillConfigAllSimple = ref([]) // 时段配置精简列表
9395
const convertSeckillConfigNames = computed(
9496
() => (row) =>
9597
seckillConfigAllSimple.value
9698
?.filter((item) => row.configIds.includes(item.id))
9799
?.map((config) => config.name)
98100
)
101+
99102
const expandChange = (row, expandedRows) => {
100103
// TODO puhui:等 CRUD 完事后弄
101104
console.log(row, expandedRows)

src/views/mall/promotion/seckill/activity/seckillActivity.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const crudSchemas = reactive<CrudSchema[]>([
219219
},
220220
{
221221
label: '状态',
222-
field: 'status', // TODO @puhui999:状态在 table 格式化不对;建表插入的数据状态值不对,改为 0 或 1 就好了
222+
field: 'status',
223223
dictType: DICT_TYPE.COMMON_STATUS,
224224
dictClass: 'number',
225225
isForm: false,

0 commit comments

Comments
 (0)