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
bc534b47
Commit
bc534b47
authored
Feb 19, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交小程序评价标签以及规格日期选择
parent
050875fa
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
532 additions
and
470 deletions
+532
-470
goodsku.vue
components/goods/goodsku.vue
+15
-5
index.vue
components/goods/sign/index.vue
+19
-11
u-tabs.vue
node_modules/uview-ui/components/u-tabs/u-tabs.vue
+11
-3
comment-list.vue
pages/goods/comment-list.vue
+380
-398
goods.vue
pages/goods/goods.vue
+24
-51
order-commit-details.vue
pages/order/order-commit-details.vue
+83
-2
No files found.
components/goods/goodsku.vue
View file @
bc534b47
...
@@ -47,7 +47,8 @@
...
@@ -47,7 +47,8 @@
<!--x.isdateformat=1 改成日历模式 -->
<!--x.isdateformat=1 改成日历模式 -->
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
<view>
<calendar
@
finish=
"chosenDateResult"
:defaultDate=
"x.attr_list[0].attr_name"
:immediately=
"true"
:priceList=
"x.attr_list"
></calendar>
<calendar
@
finish=
"chosenDateResult"
:defaultDate=
"getDefaultDate(x.attr_list[0].attr_name)"
:immediately=
"true"
:priceList=
"x.attr_list"
></calendar>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
...
@@ -245,6 +246,16 @@
...
@@ -245,6 +246,16 @@
);
);
},
},
methods
:
{
methods
:
{
getDefaultDate
(
item
)
{
var
result
=
item
;
if
(
this
.
skuObj
&&
this
.
skuObj
.
attr_list
&&
this
.
skuObj
.
attr_list
.
length
>
0
&&
this
.
g
.
mall_id
==
19
&&
this
.
g
.
mch_id
==
29
)
{
var
tempItem
=
this
.
skuObj
.
attr_list
[
0
];
if
(
tempItem
&&
tempItem
.
attr_name
)
{
result
=
tempItem
.
attr_name
;
}
}
return
result
;
},
chosenDateResult
(
result
)
{
chosenDateResult
(
result
)
{
for
(
let
index
=
0
;
index
<
this
.
g
.
attr_groups
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
this
.
g
.
attr_groups
.
length
;
index
++
)
{
for
(
let
j
=
0
;
j
<
this
.
g
.
attr_groups
[
index
].
attr_list
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
g
.
attr_groups
[
index
].
attr_list
.
length
;
j
++
)
{
...
@@ -486,13 +497,12 @@
...
@@ -486,13 +497,12 @@
}
}
});
});
}
}
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
g
.
attr_groups
.
forEach
((
x
,
index
)
=>
{
this
.
g
.
attr_groups
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
isdateformat
==
1
)
{
if
(
x
.
isdateformat
==
1
)
{
if
(
x
.
attr_list
&&
x
.
attr_list
.
length
>
0
)
{
if
(
x
.
attr_list
&&
x
.
attr_list
.
length
>
0
)
{
x
.
attr_list
.
forEach
((
subItem
,
subIndex
)
=>
{
x
.
attr_list
.
forEach
((
subItem
,
subIndex
)
=>
{
var
newSign
=
(
subIndex
+
1
)
+
":"
+
priceSign
;
var
newSign
=
subItem
.
attr_id
+
":"
+
priceSign
;
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
this
.
g
.
attr
.
forEach
(
y
=>
{
this
.
g
.
attr
.
forEach
(
y
=>
{
if
(
y
.
sign_id
==
newSign
)
{
if
(
y
.
sign_id
==
newSign
)
{
...
@@ -506,7 +516,7 @@
...
@@ -506,7 +516,7 @@
}
}
});
});
}
}
console
.
log
(
"this.g.attr_groups"
,
this
.
g
.
attr_groups
)
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
this
.
g
.
attr
.
forEach
(
x
=>
{
this
.
g
.
attr
.
forEach
(
x
=>
{
if
(
x
.
sign_id
==
sign
)
{
if
(
x
.
sign_id
==
sign
)
{
...
...
components/goods/sign/index.vue
View file @
bc534b47
...
@@ -6,9 +6,16 @@
...
@@ -6,9 +6,16 @@
<view
v-for=
"(item,index) in d"
class=
"fontw100"
:class=
"[active==item.Id?'active':'']"
:style=
"
{'color':active==item.Id?mainColor:''}"
<view
v-for=
"(item,index) in d"
class=
"fontw100"
:class=
"[active==item.Id?'active':'']"
:style=
"
{'color':active==item.Id?mainColor:''}"
@click="changeHandler(item.Id)">
@click="changeHandler(item.Id)">
<view>
{{
item
.
Name
}}
</view>
<view>
{{
item
.
Name
}}
</view>
<template
v-if=
"item.minprices"
>
<text
class=
"fontw100"
:style=
"
{'color':mainColor}">¥
{{
item
.
minprices
}}
<text
class=
"fontw100"
:style=
"
{'color':mainColor}">¥
{{
item
.
minprices
}}
<text>
起
</text>
<text>
起
</text>
</text>
</text>
</
template
>
<
template
v-else
>
<text
class=
"fontw100"
:style=
"
{'color':mainColor}">
<text>
暂无团期
</text>
</text>
</
template
>
<view
class=
"tabsLine"
:style=
"{'background':active==item.Id?mainColor:''}"
></view>
<view
class=
"tabsLine"
:style=
"{'background':active==item.Id?mainColor:''}"
></view>
</view>
</view>
</view>
</view>
...
@@ -218,6 +225,7 @@
...
@@ -218,6 +225,7 @@
watch
:
{
watch
:
{
defaultDate
(
newVal
)
{
defaultDate
(
newVal
)
{
console
.
log
(
"newVal"
,
newVal
)
this
.
userDefaultDate
=
newVal
;
this
.
userDefaultDate
=
newVal
;
if
(
this
.
userDefaultDate
!=
""
)
{
if
(
this
.
userDefaultDate
!=
""
)
{
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
...
@@ -271,8 +279,8 @@
...
@@ -271,8 +279,8 @@
}
}
},
},
methods
:
{
methods
:
{
getMinPrice
(){
getMinPrice
()
{
this
.
d
.
forEach
(
x
=>
{
this
.
d
.
forEach
(
x
=>
{
x
.
prices
=
[]
x
.
prices
=
[]
})
})
for
(
let
i
=
0
;
i
<
this
.
priceList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
priceList
.
length
;
i
++
)
{
...
...
node_modules/uview-ui/components/u-tabs/u-tabs.vue
View file @
bc534b47
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
background: bgColor
background: bgColor
}">
}">
<scroll-view
scroll-x
class=
"u-scroll-view"
:scroll-left=
"scrollLeft"
scroll-with-animation
>
<scroll-view
scroll-x
class=
"u-scroll-view"
:scroll-left=
"scrollLeft"
scroll-with-animation
>
<view
class=
"u-scroll-box"
:class=
"
{'u-tabs-scorll-flex': !isScroll}">
<view
class=
"u-scroll-box"
:class=
"
{'u-tabs-scorll-flex': !isScroll
,'u-tabs-scorll-flexWrap': isWrap
}">
<view
class=
"u-tab-item"
:id=
"'u-tab-item-' + index"
v-for=
"(item, index) in list"
:key=
"index"
@
tap=
"clickTab(index)"
<view
class=
"u-tab-item"
:id=
"'u-tab-item-' + index"
v-for=
"(item, index) in list"
:key=
"index"
@
tap=
"clickTab(index)"
:style=
"[tabItemStyle(index)]"
>
:style=
"[tabItemStyle(index)]"
>
{{
item
[
name
]
||
item
[
'name'
]
}}
{{
item
[
name
]
||
item
[
'name'
]
}}
</view>
</view>
<view
v-if=
"showBar"
class=
"u-tab-bar"
:style=
"[tabBarStyle]"
></view>
<view
v-if=
"showBar
&&!isWrap
"
class=
"u-tab-bar"
:style=
"[tabBarStyle]"
></view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
...
@@ -42,6 +42,11 @@
...
@@ -42,6 +42,11 @@
export
default
{
export
default
{
name
:
"u-tabs"
,
name
:
"u-tabs"
,
props
:
{
props
:
{
// 是否换行
isWrap
:
{
type
:
Boolean
,
default
:
false
},
// 导航菜单是否需要滚动,如只有2或者3个的时候,就不需要滚动了,此时使用flex平分tab的宽度
// 导航菜单是否需要滚动,如只有2或者3个的时候,就不需要滚动了,此时使用flex平分tab的宽度
isScroll
:
{
isScroll
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -193,7 +198,7 @@
...
@@ -193,7 +198,7 @@
return
(
index
)
=>
{
return
(
index
)
=>
{
let
style
=
{
let
style
=
{
height
:
this
.
height
+
'rpx'
,
height
:
this
.
height
+
'rpx'
,
'line-height'
:
this
.
height
+
'rpx'
,
//
'line-height': this.height + 'rpx',
fontSize
:
this
.
fontSize
+
'rpx'
,
fontSize
:
this
.
fontSize
+
'rpx'
,
'transition-duration'
:
`
${
this
.
duration
}
s`
,
'transition-duration'
:
`
${
this
.
duration
}
s`
,
padding
:
this
.
isScroll
?
`0
${
this
.
gutter
}
rpx`
:
''
,
padding
:
this
.
isScroll
?
`0
${
this
.
gutter
}
rpx`
:
''
,
...
@@ -335,4 +340,7 @@
...
@@ -335,4 +340,7 @@
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.u-tabs-scorll-flexWrap
{
flex-wrap
:
wrap
;
}
</
style
>
</
style
>
pages/goods/comment-list.vue
View file @
bc534b47
<
template
>
<
template
>
<view
class=
"comment-list"
>
<view
class=
"comment-list"
>
<u-tabs
<u-tabs
name=
"name"
:list=
"list"
:is-scroll=
"false"
:is-wrap=
"true"
:active-color=
"mc"
:current=
"current"
name=
"name"
:item-style=
"activeItemStyle"
:height=
"60"
@
change=
"tabsChange"
></u-tabs>
:list=
"list"
:is-scroll=
"false"
:active-color=
"mc"
:current=
"current"
@
change=
"tabsChange"
></u-tabs>
<view
class=
"comment-details"
style=
"heigh: calc(100% - 40px);"
v-if=
"comments.length>0"
>
<view
class=
"comment-details"
style=
"heigh: calc(100% - 40px);"
v-if=
"comments.length>0"
>
<scroll-view
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-y=
"true"
style=
"height: 100%; padding-bottom: 0px;"
>
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"comment"
>
<view
class=
"comment"
>
<view
class=
"content"
v-for=
"(x, i) in comments"
:key=
"i"
>
<view
class=
"content"
v-for=
"(x, i) in comments"
:key=
"i"
>
<view
class=
"u-box"
>
<view
class=
"u-box"
>
<view
class=
"user"
>
<view
class=
"user"
>
<u-avatar
:src=
"x.UserPhotoPath"
:size=
"50"
></u-avatar>
<u-avatar
:src=
"x.UserPhotoPath"
:size=
"50"
></u-avatar>
<text
style=
"margin:0 10px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;max-width: 130px;"
>
{{
x
.
UserName
}}
</text>
<text
<u-rate
style=
"margin:0 10px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;max-width: 130px;"
>
{{
x
.
UserName
}}
</text>
:current=
"x.CommentScore"
<u-rate
:current=
"x.CommentScore"
active-color=
"#FA3534"
inactive-color=
"#b2b2b2"
active-color=
"#FA3534"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
</view>
</view>
<view
class=
"timer"
>
{{
x
.
CreateDate
}}
</view>
<view
class=
"timer"
>
{{
x
.
CreateDate
}}
</view>
</view>
</view>
<view
class=
"ucontent"
>
{{
x
.
Content
}}
</view>
<view
class=
"ucontent"
>
{{
x
.
Content
}}
</view>
<view
class=
"imagebox"
v-for=
"(y, yi) in x.formatPic"
:key=
"yi"
>
<view
class=
"imagebox"
v-for=
"(y, yi) in x.formatPic"
:key=
"yi"
>
<view
<view
class=
"item"
v-for=
"(z, zi) in y"
:key=
"zi"
class=
"item"
:style=
"
{ 'max-width': yi == 0 ? 'unset' : '31.9%' }">
v-for=
"(z, zi) in y"
:key=
"zi"
:style=
"
{ 'max-width': yi == 0 ? 'unset' : '31.9%' }"
>
<view
class=
"scal"
@
click=
"previewImage(zi,yi,x.CommentImgList)"
>
<view
class=
"scal"
@
click=
"previewImage(zi,yi,x.CommentImgList)"
>
<image
:src=
"z"
mode=
"aspectFill"
class=
"image"
/>
<image
:src=
"z"
mode=
"aspectFill"
class=
"image"
/>
<view
<view
class=
"more"
v-if=
"
class=
"more"
v-if=
"
x.pic_url.length > 4 &&
x.pic_url.length > 4 &&
(yi + 1) * (zi + 1) == x.pic_url.length
(yi + 1) * (zi + 1) == x.pic_url.length
"
"
>
>
<view
style=
"width: 100%;"
>
<view
style=
"width: 100%;"
>
<view
class=
"big"
>
5图
</view>
\n\r
<view
class=
"big"
>
5图
</view>
\n\r
<view
class=
"small"
>
查看全部
</view>
<view
class=
"small"
>
查看全部
</view>
...
@@ -66,26 +42,16 @@
...
@@ -66,26 +42,16 @@
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
:status=
"status"
bg-color=
"#fff"
/>
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#fff"
/>
</scroll-view>
</scroll-view>
</view>
</view>
<u-empty
<u-empty
text=
"没有找到相关评论"
mode=
"news"
v-else
></u-empty>
text=
"没有找到相关评论"
mode=
"news"
v-else
></u-empty>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
...
@@ -99,17 +65,22 @@ export default {
...
@@ -99,17 +65,22 @@ export default {
pageTitle
:
"全部评论"
,
pageTitle
:
"全部评论"
,
status
:
"loadmore"
,
status
:
"loadmore"
,
isover
:
false
,
isover
:
false
,
list
:
[],
list
:
[],
loadText
:
{
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多评论了"
,
nomore
:
"没有更多评论了"
,
},
},
msg
:{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
20
,
pageSize
:
20
,
GoodsId
:
0
,
GoodsId
:
0
,
CommentGrade
:
0
CommentGrade
:
0
,
CommentLabelId
:
0
,
},
activeItemStyle
:{
'flex-wrap'
:
'wrap'
,
}
}
};
};
},
},
...
@@ -122,14 +93,14 @@ export default {
...
@@ -122,14 +93,14 @@ export default {
this
.
getCommentStatistics
()
this
.
getCommentStatistics
()
},
},
methods
:
{
methods
:
{
previewImage
(
i
,
i2
,
images
)
{
previewImage
(
i
,
i2
,
images
)
{
let
current
=
(
i2
)
*
3
+
i
let
current
=
(
i2
)
*
3
+
i
uni
.
previewImage
({
uni
.
previewImage
({
urls
:
images
,
urls
:
images
,
current
:
current
,
current
:
current
,
longPressActions
:
{
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
console
.
log
(
"选中了第"
+
"选中了第"
+
(
data
.
tapIndex
+
1
)
+
(
data
.
tapIndex
+
1
)
+
...
@@ -138,7 +109,7 @@ export default {
...
@@ -138,7 +109,7 @@ export default {
"张图片"
"张图片"
);
);
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
console
.
log
(
err
.
errMsg
);
},
},
},
},
...
@@ -147,9 +118,8 @@ export default {
...
@@ -147,9 +118,8 @@ export default {
initPage
()
{
initPage
()
{
let
currentPages
=
getCurrentPages
();
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
:
[];
pages
.
forEach
((
x
)
=>
{
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
...
@@ -159,23 +129,26 @@ export default {
...
@@ -159,23 +129,26 @@ export default {
title
:
this
.
pageTitle
,
title
:
this
.
pageTitle
,
});
});
},
},
getCommentStatistics
(){
getCommentStatistics
()
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/AppletOrder/GetAppletGoodsCommentStatistics"
,
url
:
"/api/AppletOrder/GetAppletGoodsCommentStatistics"
,
data
:
{
data
:
{
GoodsId
:
this
.
id
GoodsId
:
this
.
id
},
},
},
},
(
res
)
=>
{
(
res
)
=>
{
let
data
=
res
.
data
.
List
let
data
=
res
.
data
.
List
data
.
forEach
(
x
=>
{
data
.
forEach
(
x
=>
{
x
.
name
=
x
.
Name
+
'('
+
x
.
Count
+
')'
x
.
name
=
x
.
Name
+
'('
+
x
.
Count
+
')'
})
data
.
unshift
({
name
:
'全部'
,
Id
:
0
})
})
data
.
unshift
({
name
:
'全部'
,
Id
:
0
})
this
.
list
=
data
this
.
list
=
data
this
.
msg
.
CommentGrade
=
data
[
0
].
Id
this
.
msg
.
CommentGrade
=
data
[
0
].
Id
this
.
msg
.
CommentLabelId
=
0
this
.
init
();
this
.
init
();
}
}
);
);
...
@@ -184,9 +157,8 @@ export default {
...
@@ -184,9 +157,8 @@ export default {
this
.
isover
=
false
;
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
this
.
showLoading
=
this
.
page
!=
1
;
this
.
msg
.
GoodsId
=
this
.
id
;
this
.
msg
.
GoodsId
=
this
.
id
;
this
.
request2
(
this
.
request2
({
{
url
:
"/api/AppletOrder/GetAppletGoodsCommentPageList"
,
url
:
"/api/AppletOrder/GetAppletGoodsCommentPageList"
,
data
:
this
.
msg
,
data
:
this
.
msg
,
},
},
...
@@ -238,9 +210,17 @@ export default {
...
@@ -238,9 +210,17 @@ export default {
tabsChange
(
index
)
{
tabsChange
(
index
)
{
this
.
current
=
index
;
this
.
current
=
index
;
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
pageIndex
=
1
;
if
(
this
.
list
[
index
].
Type
==
1
)
{
this
.
msg
.
CommentGrade
=
this
.
list
[
index
].
Id
this
.
msg
.
CommentGrade
=
this
.
list
[
index
].
Id
this
.
msg
.
CommentLabelId
=
0
}
else
if
(
this
.
list
[
index
].
Type
==
2
)
{
this
.
msg
.
CommentLabelId
=
this
.
list
[
index
].
Id
this
.
msg
.
CommentGrade
=
0
}
this
.
init
()
this
.
init
()
this
.
page
=
1
this
.
page
=
1
},
},
lower
(
e
)
{
lower
(
e
)
{
if
(
this
.
page
<
this
.
pageCount
)
{
if
(
this
.
page
<
this
.
pageCount
)
{
...
@@ -255,113 +235,116 @@ export default {
...
@@ -255,113 +235,116 @@ export default {
}
}
},
},
},
},
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.comment-list
{
.comment-list
{
width
:
100vw
;
width
:
100vw
;
height
:
100vh
;
height
:
100vh
;
overflow
:
hidden
;
overflow
:
hidden
;
font-family
:
aa
;
font-family
:
aa
;
}
}
.comment-list
.comment-details
{
.comment-list
.comment-details
{
height
:
calc
(
100%
-
40px
);
height
:
calc
(
100%
-
40px
);
padding
:
10px
0
0
0
;
padding
:
10px
0
0
0
;
}
}
.comment-list
.comment-details
.comment
{
.comment-list
.comment-details
.comment
{
/* margin: 10px 0;
/* margin: 10px 0;
background: #fff;
background: #fff;
padding: 10px; */
padding: 10px; */
}
}
.comment-list
.comment-details
.comment
.chead
{
.comment-list
.comment-details
.comment
.chead
{
padding-bottom
:
10px
;
padding-bottom
:
10px
;
border-bottom
:
1px
solid
#f1f1f1
;
border-bottom
:
1px
solid
#f1f1f1
;
}
}
.comment-list
.comment-details
.comment
.content
{
.comment-list
.comment-details
.comment
.content
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
padding
:
10px
;
padding
:
10px
;
background
:
#fff
;
background
:
#fff
;
}
}
.comment-list
.comment-details
.comment
.content
.u-box
{
.comment-list
.comment-details
.comment
.content
.u-box
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
}
}
.comment-list
.comment-details
.comment
.content
.u-box
.user
{
.comment-list
.comment-details
.comment
.content
.u-box
.user
{
flex
:
1
;
flex
:
1
;
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
align-items
:
center
;
align-items
:
center
;
display
:
flex
;
display
:
flex
;
}
}
.comment-list
.comment-details
.comment
.content
.u-box
.timer
{
.comment-list
.comment-details
.comment
.content
.u-box
.timer
{
font-size
:
12px
;
font-size
:
12px
;
color
:
gray
;
color
:
gray
;
text-align
:
right
;
text-align
:
right
;
flex
:
1
;
flex
:
1
;
}
}
.comment-list
.comment-details
.comment
.content
.u-box
.ucontent
{
.comment-list
.comment-details
.comment
.content
.u-box
.ucontent
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#000
;
color
:
#000
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.comment-list
.comment-details
.comment
.content
.imagebox
{
.comment-list
.comment-details
.comment
.content
.imagebox
{
display
:
flex
;
display
:
flex
;
/* justify-content:space-evenly; */
/* justify-content:space-evenly; */
margin-right
:
-5px
;
margin-right
:
-5px
;
margin-bottom
:
-5px
;
margin-bottom
:
-5px
;
margin-top
:
5px
;
margin-top
:
5px
;
/* flex-wrap: wrap; */
/* flex-wrap: wrap; */
}
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
{
.comment-list
.comment-details
.comment
.content
.imagebox
.item
{
flex
:
1
;
flex
:
1
;
max-width
:
70vw
;
max-width
:
70vw
;
margin-right
:
5px
;
margin-right
:
5px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
min-width
:
31.9%
;
min-width
:
31.9%
;
}
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
{
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
{
width
:
100%
;
width
:
100%
;
padding-bottom
:
100%
;
padding-bottom
:
100%
;
height
:
0
;
height
:
0
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.image
{
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.image
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
z-index
:
1
;
z-index
:
1
;
height
:
100%
;
height
:
100%
;
}
}
.comment-list
.comment-details
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:first-child
.scal
{
.comment
.content
.imagebox
.item
:first-child
.scal
{
border-top-left-radius
:
5px
;
border-top-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
}
}
.comment-list
.comment-details
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:last-child
.scal
{
.comment
.content
.imagebox
.item
:last-child
.scal
{
border-top-right-radius
:
5px
;
border-top-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
}
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
{
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
...
@@ -372,39 +355,38 @@ export default {
...
@@ -372,39 +355,38 @@ export default {
color
:
#fff
;
color
:
#fff
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.comment-list
.comment-details
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.big
{
.comment
.content
.imagebox
.item
.scal
.more
.big
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
500
;
font-weight
:
500
;
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.comment-list
.comment-details
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.small
{
.comment
.content
.imagebox
.item
.scal
.more
.small
{
font-size
:
14px
;
font-size
:
14px
;
text-align
:
center
;
text-align
:
center
;
}
}
.comment-list
.reply
{
.comment-list
.reply
{
width
:
100%
;
width
:
100%
;
padding
:
10px
;
padding
:
10px
;
background
:
#F5F6F7
;
background
:
#F5F6F7
;
border-radius
:
3px
;
border-radius
:
3px
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
/
deep
/
.comment-list
.u-tab-item
{
margin
:
5px
;
padding
:
5px
10px
;
background-color
:
#f5f5f5
;
border
:
1px
solid
#ddd
;
border-radius
:
50px
;
font-size
:
12px
;
color
:
#666
;
height
:
32px
;
line-height
:
20px
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/goods/goods.vue
View file @
bc534b47
...
@@ -306,7 +306,10 @@
...
@@ -306,7 +306,10 @@
<view
class=
"label"
>
选择
</view>
<view
class=
"label"
>
选择
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"sku-chosen"
@
click=
"chosenSku"
>
<view
class=
"sku-chosen"
@
click=
"chosenSku"
>
<view
class=
"sku"
>
{{ currentSku.attr_list.length > 0 ? '已' : '请' }}选择 {{ sku }}
</view>
<view
class=
"sku"
>
<
template
v-if=
"currentSku&¤tSku.attr_list && currentSku.attr_list.length > 0"
>
已选择
{{
sku
}}
</
template
>
<
template
v-else
>
请选择
{{
sku
}}
</
template
>
</view>
<view
class=
"arrow"
>
<view
class=
"arrow"
>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
></u-icon>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
></u-icon>
</view>
</view>
...
@@ -613,16 +616,7 @@
...
@@ -613,16 +616,7 @@
let
basedata
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
)
:
''
;
let
basedata
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
)
:
''
;
this
.
AppletID
=
basedata
.
home_pages
.
id
?
basedata
.
home_pages
.
id
:
0
;
this
.
AppletID
=
basedata
.
home_pages
.
id
?
basedata
.
home_pages
.
id
:
0
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
// this.init();
// this.initPage();
// }
this
.
initPage
();
this
.
initPage
();
this
.
getVipId
();
this
.
getVipId
();
...
@@ -701,9 +695,7 @@
...
@@ -701,9 +695,7 @@
this
.
init
();
this
.
init
();
},
},
methods
:
{
methods
:
{
// counter() {
// document.querySelector("#productId");
// },
// tob切换
// tob切换
change
(
index
)
{
change
(
index
)
{
this
.
current
=
index
;
this
.
current
=
index
;
...
@@ -712,26 +704,7 @@
...
@@ -712,26 +704,7 @@
console
.
log
(
e
);
console
.
log
(
e
);
},
},
initImages
()
{
initImages
()
{
// let that = this;
// let info = uni.createSelectorQuery().in(this);
// info
// .select(".goods")
// .boundingClientRect((data) => {
// console.log("得到布局位置信息" + JSON.stringify(data));
// })
// .exec();
// info
// .boundingClientRect(function (data) {
// console.log(data)
// })
// .exec();
// wx.createSelectorQuery()
// .selectAll("#goodpic")
// .fields({ rect: true })
// .exec(res => {
// console.log(res);
// });
},
},
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
...
@@ -772,7 +745,6 @@
...
@@ -772,7 +745,6 @@
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
vipState
=
res
.
data
.
VIPModel
;
this
.
vipState
=
res
.
data
.
VIPModel
;
}
}
// this.initRecommend();
}
}
);
);
},
},
...
@@ -795,7 +767,8 @@
...
@@ -795,7 +767,8 @@
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
goods
;
this
.
g
=
res
.
data
.
goods
;
// 报名限制数组
// 报名限制数组
res
.
data
.
goods
.
edu_data
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
.
forEach
(
res
.
data
.
goods
.
edu_data
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
.
forEach
(
item2
=>
{
item2
=>
{
if
(
item2
.
ItemType
==
1
)
{
if
(
item2
.
ItemType
==
1
)
{
this
.
ItemType1
.
push
(
item2
)
this
.
ItemType1
.
push
(
item2
)
...
@@ -909,8 +882,8 @@
...
@@ -909,8 +882,8 @@
},
},
(
res
)
=>
{
(
res
)
=>
{
this
.
comments
=
res
.
data
.
pageData
;
this
.
comments
=
res
.
data
.
pageData
;
console
.
log
(
"1111"
,
this
.
comments
)
// this.initRecommend();
},
},
(
err
)
=>
{
(
err
)
=>
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
...
@@ -1273,7 +1246,7 @@
...
@@ -1273,7 +1246,7 @@
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
display
:
-webkit-box
;
/* -webkit-line-clamp: 2;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
-webkit-box-orient: vertical; */
font-size
:
16px
;
font-size
:
16px
;
/* height: 45px; */
/* height: 45px; */
...
...
pages/order/order-commit-details.vue
View file @
bc534b47
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
</view>
</view>
<view
class=
"content-box"
>
<view
class=
"content-box"
>
<view
class=
"title-box"
>
输入评价内容
</view>
<view
class=
"title-box"
>
输入评价内容
</view>
<view
class=
"classifyBigBox"
>
<view
class=
"oneClassify flex"
:class=
"
{selectActive:selected[item.Id]==true}" v-for="(item,i) in LabelIdList"
@click="onSelectClassify(item.Id)">
{{
item
.
Name
}}
</view>
</view>
<view
class=
"editor-box"
>
<view
class=
"editor-box"
>
<view
class=
"editor-icon"
>
<view
class=
"editor-icon"
>
<u-icon
name=
"edit"
size=
"36"
></u-icon>
<u-icon
name=
"edit"
size=
"36"
></u-icon>
...
@@ -54,13 +60,17 @@
...
@@ -54,13 +60,17 @@
Content
:
""
,
Content
:
""
,
OrderDetailId
:
0
,
OrderDetailId
:
0
,
CommentImgList
:
[],
CommentImgList
:
[],
CommentScore
:
5
CommentScore
:
5
,
LabelIds
:
''
,
},
},
submitStatus
:
false
,
submitStatus
:
false
,
goodsName
:
""
,
goodsName
:
""
,
goodsPic
:
""
,
goodsPic
:
""
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
fileList
:
[],
fileList
:
[],
LabelIdList
:
[],
selected
:
[],
selectedLabelId
:
[],
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -71,6 +81,7 @@
...
@@ -71,6 +81,7 @@
this
.
goodsName
=
param
.
GoodsName
;
this
.
goodsName
=
param
.
GoodsName
;
this
.
goodsPic
=
param
.
CoverImage
;
this
.
goodsPic
=
param
.
CoverImage
;
}
}
this
.
GetCommentLabel
()
},
},
mounted
()
{
mounted
()
{
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
...
@@ -78,10 +89,21 @@
...
@@ -78,10 +89,21 @@
});
});
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
:
1
;
let
MallBaseId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
.
MallBaseId
:
1
;
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
this
.
action
=
this
.
host2
+
'/api/File/UploadTencent?MallBaseId='
+
MallBaseId
},
},
methods
:
{
methods
:
{
onSelectClassify
(
id
)
{
this
.
$set
(
this
.
selected
,
id
,
!
this
.
selected
[
id
])
//动态更新视图数据
let
index
=
this
.
selectedLabelId
.
findIndex
(
item
=>
item
==
id
)
if
(
index
==
-
1
)
{
this
.
selectedLabelId
.
push
(
id
)
}
else
{
this
.
selectedLabelId
=
this
.
selectedLabelId
.
filter
(
item
=>
item
!==
id
);
}
},
uploadSuccessHandler
(
data
,
index
,
lists
)
{
uploadSuccessHandler
(
data
,
index
,
lists
)
{
let
r
=
JSON
.
parse
(
data
);
let
r
=
JSON
.
parse
(
data
);
this
.
msg
.
CommentImgList
.
push
(
r
.
data
);
this
.
msg
.
CommentImgList
.
push
(
r
.
data
);
...
@@ -89,8 +111,21 @@
...
@@ -89,8 +111,21 @@
change
(
val
)
{
change
(
val
)
{
this
.
msg
.
CommentScore
=
val
this
.
msg
.
CommentScore
=
val
},
},
GetCommentLabel
()
{
this
.
request2
({
url
:
"/api/order/GetCommentLabelList"
,
data
:
{},
},
(
res
)
=>
{
this
.
LabelIdList
=
res
.
data
;
}
);
},
submitForm
()
{
submitForm
()
{
this
.
submitStatus
=
true
;
this
.
submitStatus
=
true
;
if
(
this
.
selectedLabelId
){
this
.
msg
.
LabelIds
=
this
.
selectedLabelId
.
join
(
','
)
}
if
(
this
.
msg
.
CommentScore
>
0
)
{
if
(
this
.
msg
.
CommentScore
>
0
)
{
this
.
request2
({
this
.
request2
({
url
:
"/api/AppletOrder/SetGoodsCommentInfo"
,
url
:
"/api/AppletOrder/SetGoodsCommentInfo"
,
...
@@ -134,6 +169,52 @@
...
@@ -134,6 +169,52 @@
</
script
>
</
script
>
<
style
>
<
style
>
.commit-detail
.classifyBigBox
{
margin
:
27
rpx
0
;
display
:
grid
;
grid-template-columns
:
repeat
(
4
,
1
fr
);
grid-gap
:
30
rpx
;
font-size
:
10px
;
}
.commit-detail
.oneClassify
{
display
:
flex
;
align-items
:
center
;
padding
:
17
rpx
;
justify-content
:
center
;
background
:
F7F7F7
;
border-radius
:
13
rpx
;
background
:
#F5F5F5
;
color
:
#696969
;
border
:
2
rpx
solid
#dedede
;
}
.commit-detail
.selectActive
{
background
:
#ff547b
;
color
:
#FFFFFF
;
}
.commit-detail
.tl-btn-120
{
width
:
180
rpx
;
padding
:
17
rpx
;
background
:
F7F7F7
;
color
:
#999
;
border-radius
:
13
rpx
;
border
:
2
rpx
solid
#dedede
;
text-align
:
center
;
}
.commit-detail
.onConfirmFiltrate
{
width
:
180
rpx
;
padding
:
17
rpx
;
background
:
#2851F3
;
color
:
#FFFFFF
;
border-radius
:
13
rpx
;
text-align
:
center
;
margin-left
:
20
rpx
;
}
.commit-detail
{
.commit-detail
{
background
:
#faf8f9
;
background
:
#faf8f9
;
height
:
100vh
;
height
:
100vh
;
...
...
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