Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
84c5eb99
authored
Aug 26, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:商品评论
parent
343b6bbf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
1 deletions
+8
-1
src/views/mall/product/comment/CommentForm.vue
+1
-0
src/views/mall/product/comment/components/SkuTableSelect.vue
+1
-0
src/views/mall/product/comment/components/SpuTableSelect.vue
+1
-0
src/views/mall/product/comment/index.vue
+3
-1
src/views/mall/product/spu/addForm.vue
+2
-0
No files found.
src/views/mall/product/comment/CommentForm.vue
View file @
84c5eb99
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
<el-form-item
label=
"评论内容"
prop=
"content"
>
<el-form-item
label=
"评论内容"
prop=
"content"
>
<el-input
type=
"textarea"
v-model=
"formData.content"
/>
<el-input
type=
"textarea"
v-model=
"formData.content"
/>
</el-form-item>
</el-form-item>
<!-- TODO @疯狂:formData.scores 是通过后端计算的哈,不要前端传递 -->
<el-form-item
label=
"评分星级"
prop=
"scores"
>
<el-form-item
label=
"评分星级"
prop=
"scores"
>
<el-rate
v-model=
"formData.scores"
/>
<el-rate
v-model=
"formData.scores"
/>
</el-form-item>
</el-form-item>
...
...
src/views/mall/product/comment/components/SkuTableSelect.vue
View file @
84c5eb99
...
@@ -37,6 +37,7 @@ import { ElTable } from 'element-plus'
...
@@ -37,6 +37,7 @@ import { ElTable } from 'element-plus'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
import
{
propTypes
}
from
'@/utils/propTypes'
import
{
propTypes
}
from
'@/utils/propTypes'
// TODO @疯狂:是不是挪到 spu 的 components 下哈
defineOptions
({
name
:
'SkuTableSelect'
})
defineOptions
({
name
:
'SkuTableSelect'
})
const
props
=
defineProps
({
const
props
=
defineProps
({
...
...
src/views/mall/product/comment/components/SpuTableSelect.vue
View file @
84c5eb99
...
@@ -86,6 +86,7 @@ import { defaultProps, handleTree } from '@/utils/tree'
...
@@ -86,6 +86,7 @@ import { defaultProps, handleTree } from '@/utils/tree'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
// TODO @疯狂:是不是挪到 spu 的 components 下哈
defineOptions
({
name
:
'SpuTableSelect'
})
defineOptions
({
name
:
'SpuTableSelect'
})
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
...
...
src/views/mall/product/comment/index.vue
View file @
84c5eb99
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"false"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"false"
>
<el-table-column
label=
"评论编号"
align=
"center"
prop=
"id"
min-width=
"60"
/>
<el-table-column
label=
"评论编号"
align=
"center"
prop=
"id"
min-width=
"60"
/>
<!-- TODO @疯狂:后端貌似没读取? -->
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userNickname"
width=
"80"
/>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userNickname"
width=
"80"
/>
<el-table-column
label=
"商品信息"
align=
"center"
min-width=
"210"
>
<el-table-column
label=
"商品信息"
align=
"center"
min-width=
"210"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
...
@@ -210,7 +211,7 @@ const getList = async () => {
...
@@ -210,7 +211,7 @@ const getList = async () => {
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
CommentApi
.
getCommentPage
(
queryParams
)
const
data
=
await
CommentApi
.
getCommentPage
(
queryParams
)
// visible 如果为 null,会导致刷新的时候触发
e-switch的change
事件
// visible 如果为 null,会导致刷新的时候触发
e-switch 的 change
事件
data
.
list
.
forEach
((
item
)
=>
{
data
.
list
.
forEach
((
item
)
=>
{
if
(
!
item
.
visible
)
{
if
(
!
item
.
visible
)
{
item
.
visible
=
false
item
.
visible
=
false
...
@@ -241,6 +242,7 @@ const openForm = (type: string, id?: number) => {
...
@@ -241,6 +242,7 @@ const openForm = (type: string, id?: number) => {
formRef
.
value
.
open
(
type
,
id
)
formRef
.
value
.
open
(
type
,
id
)
}
}
// TODO @疯狂:要不回复,也搞一个组件出去?
/** 回复 **/
/** 回复 **/
const
replyFormRef
=
ref
()
const
replyFormRef
=
ref
()
const
replyDialog
=
reactive
({
const
replyDialog
=
reactive
({
...
...
src/views/mall/product/spu/addForm.vue
View file @
84c5eb99
...
@@ -44,6 +44,8 @@ import { BasicInfoForm, DescriptionForm, OtherSettingsForm } from './components'
...
@@ -44,6 +44,8 @@ import { BasicInfoForm, DescriptionForm, OtherSettingsForm } from './components'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
import
*
as
ProductSpuApi
from
'@/api/mall/product/spu'
import
{
convertToInteger
,
formatToFraction
}
from
'@/utils'
import
{
convertToInteger
,
formatToFraction
}
from
'@/utils'
// TODO @芋艿:后续稍微调整下;
defineOptions
({
name
:
'ProductSpuForm'
})
defineOptions
({
name
:
'ProductSpuForm'
})
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment