Skip to content

Commit 84c5eb9

Browse files
committed
code review:商品评论
1 parent 343b6bb commit 84c5eb9

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

src/views/mall/product/comment/CommentForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<el-form-item label="评论内容" prop="content">
3737
<el-input type="textarea" v-model="formData.content" />
3838
</el-form-item>
39+
<!-- TODO @疯狂:formData.scores 是通过后端计算的哈,不要前端传递 -->
3940
<el-form-item label="评分星级" prop="scores">
4041
<el-rate v-model="formData.scores" />
4142
</el-form-item>

src/views/mall/product/comment/components/SkuTableSelect.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { ElTable } from 'element-plus'
3737
import * as ProductSpuApi from '@/api/mall/product/spu'
3838
import { propTypes } from '@/utils/propTypes'
3939
40+
// TODO @疯狂:是不是挪到 spu 的 components 下哈
4041
defineOptions({ name: 'SkuTableSelect' })
4142
4243
const props = defineProps({

src/views/mall/product/comment/components/SpuTableSelect.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ import { defaultProps, handleTree } from '@/utils/tree'
8686
import * as ProductCategoryApi from '@/api/mall/product/category'
8787
import * as ProductSpuApi from '@/api/mall/product/spu'
8888
89+
// TODO @疯狂:是不是挪到 spu 的 components 下哈
8990
defineOptions({ name: 'SpuTableSelect' })
9091
9192
const message = useMessage() // 消息弹窗

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<ContentWrap>
6161
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="false">
6262
<el-table-column label="评论编号" align="center" prop="id" min-width="60" />
63+
<!-- TODO @疯狂:后端貌似没读取? -->
6364
<el-table-column label="用户名称" align="center" prop="userNickname" width="80" />
6465
<el-table-column label="商品信息" align="center" min-width="210">
6566
<template #default="scope">
@@ -210,7 +211,7 @@ const getList = async () => {
210211
loading.value = true
211212
try {
212213
const data = await CommentApi.getCommentPage(queryParams)
213-
// visible 如果为 null,会导致刷新的时候触发e-switch的change事件
214+
// visible 如果为 null,会导致刷新的时候触发 e-switch 的 change 事件
214215
data.list.forEach((item) => {
215216
if (!item.visible) {
216217
item.visible = false
@@ -241,6 +242,7 @@ const openForm = (type: string, id?: number) => {
241242
formRef.value.open(type, id)
242243
}
243244
245+
// TODO @疯狂:要不回复,也搞一个组件出去?
244246
/** 回复 **/
245247
const replyFormRef = ref()
246248
const replyDialog = reactive({

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import { BasicInfoForm, DescriptionForm, OtherSettingsForm } from './components'
4444
import * as ProductSpuApi from '@/api/mall/product/spu'
4545
import { convertToInteger, formatToFraction } from '@/utils'
4646
47+
// TODO @芋艿:后续稍微调整下;
48+
4749
defineOptions({ name: 'ProductSpuForm' })
4850
4951
const { t } = useI18n() // 国际化

0 commit comments

Comments
 (0)