Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
9bb2cf7d
Commit
9bb2cf7d
authored
Sep 21, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论列表
parent
a16a0685
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
377 additions
and
20 deletions
+377
-20
pages.json
pages.json
+2
-0
guidecarGoodsdetails.vue
pages/guidecar/guidecarGoodsdetails.vue
+93
-20
guidercarCommentList.vue
pages/guidecar/guidercarCommentList.vue
+282
-0
No files found.
pages.json
View file @
9bb2cf7d
...
...
@@ -333,6 +333,8 @@
"path"
:
"order-commit-detail"
},{
"path"
:
"components/guidecarDraw"
},{
"path"
:
"guidercarCommentList"
}]
},
{
...
...
pages/guidecar/guidecarGoodsdetails.vue
View file @
9bb2cf7d
...
...
@@ -164,8 +164,8 @@
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment == 1"
>
<view
class=
"label"
>
暂无评论信息
</view>
</view>
<view
class=
"comment"
v-if=
"comments.length > 0"
>
<view
class=
"chead"
>
<view
v-if=
"comments.length > 0"
>
<view
class=
"chead"
style=
"padding: 0 10px;"
>
<u-section
:bold=
"false"
:sub-color=
"secondary"
...
...
@@ -176,24 +176,67 @@
font-size="24"
>
</u-section>
</view>
<view
class=
"content"
>
<view
class=
"u-box"
>
<view
class=
"user"
>
<u-avatar
:src=
"comments[0].UserPhotoPath"
:size=
"50"
></u-avatar>
<text
style=
"margin-left: 10px;"
>
{{
comments
[
0
].
UserName
}}
</text>
<u-rate
:current=
"comments[0].CommentScore"
active-color=
"#FA3534"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
<view
class=
"comment"
>
<view
class=
"comment-dao"
style=
"justify-content: space-between;"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<u-avatar
:src=
"comments[0].UserPhotoPath"
:size=
"50"
></u-avatar>
<span
style=
'font-size: 14px;color: #000000;width: 200rpx; margin-left: 10px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: bold;'
>
{{
comments
[
0
].
UserName
}}
</span>
</view>
<span
style=
'font-size: 12px;color: #AAAAAA;'
>
{{
comments
[
0
].
CommentList
[
0
].
CreateDate
}}
</span>
</view>
<view
class=
"comment-dao"
>
<u-rate
:current=
"comments[0].CommentList[0].CommentScore"
active-color=
"#FF4442"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
<span
style=
'font-size: 11px;color: #565656;margin-left: 15px;'
>
{{
comments
[
0
].
CommentList
[
0
].
CarBrandName
}}
,
{{
comments
[
0
].
CommentList
[
0
].
CarColorName
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"padding: 10px 0;"
>
<span>
{{
comments
[
0
].
CommentList
[
0
].
Content
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"flex-wrap: wrap;"
>
<image
v-for=
"(item, index) in comments[0].CommentList[0].CommentImgList"
:key=
"index"
mode=
"aspectFill"
:src=
"item"
:style=
"
{'width':san,'height':san}"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: rgba(0, 0, 0, 0.1);margin: 10px 0;"
></view>
<view
class=
"comment-dao"
>
<u-rate
:current=
"comments[0].CommentList[0].CommentScore"
active-color=
"#FF4442"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
<span
style=
'font-size: 11px;color: #565656;margin-left: 15px;'
>
导游:
{{
comments
[
0
].
CommentList
[
1
].
GuideName
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"padding: 10px 0;"
>
<span>
{{
comments
[
0
].
CommentList
[
1
].
Content
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"flex-wrap: wrap;"
>
<image
v-for=
"(item, index) in comments[0].CommentList[1].CommentImgList"
:key=
"index"
mode=
"aspectFill"
:src=
"item"
:style=
"
{'width':san,'height':san}"
/>
</view>
<view
class=
"timer"
>
{{
comments
[
0
].
CreateDate
}}
</view>
</view>
<view
class=
"ucontent"
>
{{
comments
[
0
].
Content
}}
</view>
</view>
</view>
<view
class=
"actionsheet"
:style=
"
{ 'padding-bottom': bian ? '28px' : '0px' }">
...
...
@@ -281,6 +324,7 @@
uid
:
0
,
//分享的上级id
RideNum
:
1
,
//出行人数
contentHeight
:
0
,
san
:
'100px'
,
}
},
onLoad
(
option
){
...
...
@@ -345,6 +389,7 @@
this
.
init
()
//商品详情
this
.
getAppletGoodsCommentPageList
()
//获取商品评论数
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
this
.
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
...
...
@@ -414,6 +459,13 @@
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
;
this
.
bian
=
this
.
$uiConfig
.
is_bang
let
that
=
this
uni
.
getSystemInfo
({
success
(
res
)
{
console
.
log
(
res
)
that
.
san
=
(
res
.
windowWidth
-
20
)
/
3
+
'px'
}
})
},
mounted
()
{
...
...
@@ -502,7 +554,7 @@
data: {
GoodsId:this.GoodsId,
pageIndex:1,
pageSize:
10
,
pageSize:
99
,
CommentGrade:0,
}
},
...
...
@@ -511,6 +563,7 @@
}
);
},
clickDescription(e) {
console.log(e);
},
...
...
@@ -550,6 +603,11 @@
url:'
/
pages
/
guidecar
/
guidedetails
?
g
=
'+encodeURIComponent(JSON.stringify(this.g))+'
&
type
=
'+type
})
},
clickCommentHandler(){//跳转评论列表
uni.navigateTo({
url:'
/
pages
/
guidecar
/
guidercarCommentList
?
GoodsId
=
'+this.GoodsId
})
},
//跳转
goUrl(){
uni.navigateTo({
...
...
@@ -827,4 +885,19 @@
font-size
:
28
rpx
;
color
:
#1C1E1F
;
}
.guidecarOrderdetails
.comment
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background
:
#FFF
;
padding
:
10px
;
}
.guidecarOrderdetails
.comment-dao
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
</
style
>
pages/guidecar/guidercarCommentList.vue
0 → 100644
View file @
9bb2cf7d
<
template
>
<view
class=
"guidercarCommentList"
:style=
"
{ height: contentHeight }">
<u-tabs
name=
"name"
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
"mainColor"
></u-tabs>
<u-empty
v-if=
"g.length == 0"
text=
"暂无评论"
mode=
"list"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }"
>
<view
class=
"interDList"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"comment-dao"
style=
"justify-content: space-between;"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<u-avatar
:src=
"x.UserPhotoPath"
:size=
"50"
></u-avatar>
<span
style=
'font-size: 14px;color: #000000;width: 200rpx; margin-left: 10px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: bold;'
>
{{
x
.
UserName
}}
</span>
</view>
<span
style=
'font-size: 12px;color: #AAAAAA;'
>
{{
x
.
CommentList
[
0
].
CreateDate
}}
</span>
</view>
<view
class=
"comment-dao"
>
<u-rate
:current=
"x.CommentList[0].CommentScore"
active-color=
"#FF4442"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
<span
style=
'font-size: 11px;color: #565656;margin-left: 15px;'
>
{{
x
.
CommentList
[
0
].
CarBrandName
}}
,
{{
x
.
CommentList
[
0
].
CarColorName
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"padding: 10px 0;"
>
<span>
{{
x
.
CommentList
[
0
].
Content
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"flex-wrap: wrap;"
>
<image
v-for=
"(item, index) in x.CommentList[0].CommentImgList"
:key=
"index"
mode=
"aspectFill"
:src=
"item"
:style=
"
{'width':san,'height':san}"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: rgba(0, 0, 0, 0.1);margin: 10px 0;"
></view>
<view
class=
"comment-dao"
>
<u-rate
:current=
"x.CommentList[0].CommentScore"
active-color=
"#FF4442"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
<span
style=
'font-size: 11px;color: #565656;margin-left: 15px;'
>
导游:
{{
x
.
CommentList
[
1
].
GuideName
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"padding: 10px 0;"
>
<span>
{{
x
.
CommentList
[
1
].
Content
}}
</span>
</view>
<view
class=
"comment-dao"
style=
"flex-wrap: wrap;"
>
<image
v-for=
"(item, index) in x.CommentList[1].CommentImgList"
:key=
"index"
mode=
"aspectFill"
:src=
"item"
:style=
"
{'width':san,'height':san}"
/>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx;"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"评论"
,
current
:
0
,
list
:
[
],
msg
:{
GoodsId
:
0
,
pageIndex
:
1
,
pageSize
:
10
,
CommentGrade
:
0
,
},
mainColor
:
""
,
secondary
:
''
,
contentHeight
:
0
,
page
:
1
,
page_count
:
1
,
g
:
[],
loading
:
false
,
san
:
'100px'
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
san
=
(
res
.
windowWidth
-
20
)
/
3
+
'px'
}
})
},
onLoad
(
options
){
if
(
options
&&
options
.
GoodsId
){
this
.
msg
.
GoodsId
=
options
.
GoodsId
;
// this.init();
this
.
getAppletGoodsCommentStatistics
();
//获取商品评论数
}
},
methods
:
{
change
(
index
)
{
this
.
current
=
index
;
this
.
msg
.
CommentGrade
=
this
.
list
[
index
].
Id
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
loading
=
true
;
this
.
init
();
},
init
()
{
this
.
loading
=
true
;
this
.
request2
(
{
url
:
'/api/AppletGuideCar/GetAppletGoodsCommentPageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
getAppletGoodsCommentStatistics
(){
this
.
request2
(
{
url
:
"/api/AppletGuideCar/GetAppletGoodsCommentStatistics"
,
data
:
{
GoodsId
:
this
.
msg
.
GoodsId
},
},
(
res
)
=>
{
let
data
=
res
.
data
.
List
data
.
forEach
(
x
=>
{
x
.
name
=
x
.
Name
+
'('
+
x
.
Count
+
')'
})
data
.
unshift
({
name
:
'全部'
,
Id
:
0
})
this
.
list
=
data
this
.
msg
.
CommentGrade
=
data
[
0
].
Id
this
.
init
();
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
},
};
</
script
>
<
style
>
.guidercarCommentList
{
width
:
100%
;
height
:
100%
;
background
:
#f3f4f6
;
}
.guidercarCommentList
.loading
{
width
:
200
rpx
;
height
:
200
rpx
;
background
:
#000000
;
opacity
:
0.7
;
border-radius
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
left
:
50%
;
top
:
30%
;
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.guidercarCommentList
.interDList
{
width
:
100%
;
padding
:
20px
15px
;
display
:
flex
;
flex-direction
:
column
;
background
:
#fff
;
margin-top
:
10px
;
}
.guidercarCommentList
.comment-dao
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
</
style
>
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