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
Hide 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
...
...
@@ -30,7 +30,7 @@
</view>
</view>
</view>
<!--
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==1"
>
<!--
<view
class=
"sku-item"
v-for=
"(x, i) in g.attr_groups"
v-if=
"x.isdateformat==1"
>
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</view>
<view>
<view
class=
"sku-chi"
:style=
"
{
...
...
@@ -47,7 +47,8 @@
<!--x.isdateformat=1 改成日历模式 -->
<view
class=
"sku-title"
>
{{
x
.
attr_group_name
}}
</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>
</scroll-view>
...
...
@@ -245,6 +246,16 @@
);
},
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
)
{
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
++
)
{
...
...
@@ -486,13 +497,12 @@
}
});
}
if
(
this
.
g
.
attr_groups
&&
this
.
g
.
attr_groups
.
length
>
0
)
{
this
.
g
.
attr_groups
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
isdateformat
==
1
)
{
if
(
x
.
attr_list
&&
x
.
attr_list
.
length
>
0
)
{
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
)
{
this
.
g
.
attr
.
forEach
(
y
=>
{
if
(
y
.
sign_id
==
newSign
)
{
...
...
@@ -506,7 +516,7 @@
}
});
}
console
.
log
(
"this.g.attr_groups"
,
this
.
g
.
attr_groups
)
if
(
this
.
g
.
attr
&&
this
.
g
.
attr
.
length
)
{
this
.
g
.
attr
.
forEach
(
x
=>
{
if
(
x
.
sign_id
==
sign
)
{
...
...
components/goods/sign/index.vue
View file @
bc534b47
...
...
@@ -6,9 +6,16 @@
<view
v-for=
"(item,index) in d"
class=
"fontw100"
:class=
"[active==item.Id?'active':'']"
:style=
"
{'color':active==item.Id?mainColor:''}"
@click="changeHandler(item.Id)">
<view>
{{
item
.
Name
}}
</view>
<text
class=
"fontw100"
:style=
"
{'color':mainColor}">¥
{{
item
.
minprices
}}
<text>
起
</text>
</text>
<template
v-if=
"item.minprices"
>
<text
class=
"fontw100"
:style=
"
{'color':mainColor}">¥
{{
item
.
minprices
}}
<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>
</view>
...
...
@@ -218,6 +225,7 @@
watch
:
{
defaultDate
(
newVal
)
{
console
.
log
(
"newVal"
,
newVal
)
this
.
userDefaultDate
=
newVal
;
if
(
this
.
userDefaultDate
!=
""
)
{
this
.
start
=
this
.
setDefaultDate
(
this
.
userDefaultDate
);
...
...
@@ -271,19 +279,19 @@
}
},
methods
:
{
getMinPrice
(){
this
.
d
.
forEach
(
x
=>
{
getMinPrice
()
{
this
.
d
.
forEach
(
x
=>
{
x
.
prices
=
[]
})
for
(
let
i
=
0
;
i
<
this
.
priceList
.
length
;
i
++
)
{
let
datas
=
this
.
priceList
[
i
].
attr_name
.
split
(
'-'
)
for
(
let
j
=
0
;
j
<
this
.
d
.
length
;
j
++
)
{
let
m
=
this
.
d
[
j
].
Month
>
9
?
this
.
d
[
j
].
Month
:
'0'
+
this
.
d
[
j
].
Month
if
(
datas
[
1
]
==
m
)
{
this
.
d
[
j
].
prices
.
push
(
this
.
priceList
[
i
].
newPrice
)
let
datas
=
this
.
priceList
[
i
].
attr_name
.
split
(
'-'
)
for
(
let
j
=
0
;
j
<
this
.
d
.
length
;
j
++
)
{
let
m
=
this
.
d
[
j
].
Month
>
9
?
this
.
d
[
j
].
Month
:
'0'
+
this
.
d
[
j
].
Month
if
(
datas
[
1
]
==
m
)
{
this
.
d
[
j
].
prices
.
push
(
this
.
priceList
[
i
].
newPrice
)
}
}
}
}
this
.
d
.
forEach
(
x
=>
{
x
.
minprices
=
Math
.
min
.
apply
(
null
,
x
.
prices
)
})
...
...
node_modules/uview-ui/components/u-tabs/u-tabs.vue
View file @
bc534b47
...
...
@@ -3,12 +3,12 @@
background: bgColor
}">
<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)"
:style=
"[tabItemStyle(index)]"
>
{{
item
[
name
]
||
item
[
'name'
]
}}
</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>
</scroll-view>
</view>
...
...
@@ -42,6 +42,11 @@
export
default
{
name
:
"u-tabs"
,
props
:
{
// 是否换行
isWrap
:
{
type
:
Boolean
,
default
:
false
},
// 导航菜单是否需要滚动,如只有2或者3个的时候,就不需要滚动了,此时使用flex平分tab的宽度
isScroll
:
{
type
:
Boolean
,
...
...
@@ -193,7 +198,7 @@
return
(
index
)
=>
{
let
style
=
{
height
:
this
.
height
+
'rpx'
,
'line-height'
:
this
.
height
+
'rpx'
,
//
'line-height': this.height + 'rpx',
fontSize
:
this
.
fontSize
+
'rpx'
,
'transition-duration'
:
`
${
this
.
duration
}
s`
,
padding
:
this
.
isScroll
?
`0
${
this
.
gutter
}
rpx`
:
''
,
...
...
@@ -335,4 +340,7 @@
display
:
flex
;
justify-content
:
space-between
;
}
.u-tabs-scorll-flexWrap
{
flex-wrap
:
wrap
;
}
</
style
>
pages/goods/comment-list.vue
View file @
bc534b47
<
template
>
<view
class=
"comment-list"
>
<u-tabs
name=
"name"
: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"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"comment"
>
<view
class=
"content"
v-for=
"(x, i) in comments"
:key=
"i"
>
<view
class=
"u-box"
>
<view
class=
"user"
>
<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>
<u-rate
:current=
"x.CommentScore"
active-color=
"#FA3534"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
</view>
<view
class=
"timer"
>
{{
x
.
CreateDate
}}
</view>
</view>
<view
class=
"ucontent"
>
{{
x
.
Content
}}
</view>
<view
class=
"imagebox"
v-for=
"(y, yi) in x.formatPic"
:key=
"yi"
>
<view
class=
"item"
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)"
>
<image
:src=
"z"
mode=
"aspectFill"
class=
"image"
/>
<view
class=
"more"
v-if=
"
<view
class=
"comment-list"
>
<u-tabs
name=
"name"
:list=
"list"
:is-scroll=
"false"
:is-wrap=
"true"
:active-color=
"mc"
:current=
"current"
:item-style=
"activeItemStyle"
:height=
"60"
@
change=
"tabsChange"
></u-tabs>
<view
class=
"comment-details"
style=
"heigh: calc(100% - 40px);"
v-if=
"comments.length>0"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"comment"
>
<view
class=
"content"
v-for=
"(x, i) in comments"
:key=
"i"
>
<view
class=
"u-box"
>
<view
class=
"user"
>
<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>
<u-rate
:current=
"x.CommentScore"
active-color=
"#FA3534"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"20"
:disabled=
"true"
></u-rate>
</view>
<view
class=
"timer"
>
{{
x
.
CreateDate
}}
</view>
</view>
<view
class=
"ucontent"
>
{{
x
.
Content
}}
</view>
<view
class=
"imagebox"
v-for=
"(y, yi) in x.formatPic"
:key=
"yi"
>
<view
class=
"item"
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)"
>
<image
:src=
"z"
mode=
"aspectFill"
class=
"image"
/>
<view
class=
"more"
v-if=
"
x.pic_url.length > 4 &&
(yi + 1) * (zi + 1) == x.pic_url.length
"
>
<view
style=
"width: 100%;"
>
<view
class=
"big"
>
5图
</view>
\n\r
<view
class=
"small"
>
查看全部
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"reply"
v-if=
"x.Reply!=''"
>
<view
style=
"font-size: 12px;color: #121212;"
>
回复:
</view>
<view
style=
"font-size: 12px;color: #9A9A9A;margin-top: 3px;"
>
{{
x
.
Reply
}}
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#fff"
/>
</scroll-view>
</view>
<u-empty
text=
"没有找到相关评论"
mode=
"news"
v-else
></u-empty>
</view>
"
>
<view
style=
"width: 100%;"
>
<view
class=
"big"
>
5图
</view>
\n\r
<view
class=
"small"
>
查看全部
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"reply"
v-if=
"x.Reply!=''"
>
<view
style=
"font-size: 12px;color: #121212;"
>
回复:
</view>
<view
style=
"font-size: 12px;color: #9A9A9A;margin-top: 3px;"
>
{{
x
.
Reply
}}
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#fff"
/>
</scroll-view>
</view>
<u-empty
text=
"没有找到相关评论"
mode=
"news"
v-else
></u-empty>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
page
:
1
,
pageCount
:
0
,
id
:
0
,
comments
:
[],
commentCount
:
[],
loading
:
false
,
mc
:
""
,
pageTitle
:
"全部评论"
,
status
:
"loadmore"
,
isover
:
false
,
list
:[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多评论了"
,
},
msg
:{
pageIndex
:
1
,
pageSize
:
20
,
GoodsId
:
0
,
CommentGrade
:
0
}
};
},
onLoad
(
option
)
{
uni
.
showNavigationBarLoading
();
this
.
id
=
option
.
id
||
46942
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
initPage
();
this
.
getCommentStatistics
()
},
methods
:
{
previewImage
(
i
,
i2
,
images
)
{
let
current
=
(
i2
)
*
3
+
i
uni
.
previewImage
({
urls
:
images
,
current
:
current
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{
console
.
log
(
"选中了第"
+
(
data
.
tapIndex
+
1
)
+
"个按钮,第"
+
(
data
.
index
+
1
)
+
"张图片"
);
},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
initPage
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
getCommentStatistics
(){
this
.
request2
(
{
url
:
"/api/AppletOrder/GetAppletGoodsCommentStatistics"
,
data
:
{
GoodsId
:
this
.
id
export
default
{
data
()
{
return
{
current
:
0
,
// tabs组件的current值,表示当前活动的tab选项
page
:
1
,
pageCount
:
0
,
id
:
0
,
comments
:
[],
commentCount
:
[],
loading
:
false
,
mc
:
""
,
pageTitle
:
"全部评论"
,
status
:
"loadmore"
,
isover
:
false
,
list
:
[],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多评论了"
,
},
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
GoodsId
:
0
,
CommentGrade
:
0
,
CommentLabelId
:
0
,
},
activeItemStyle
:{
'flex-wrap'
:
'wrap'
,
}
};
},
onLoad
(
option
)
{
uni
.
showNavigationBarLoading
();
this
.
id
=
option
.
id
||
46942
;
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
initPage
();
this
.
getCommentStatistics
()
},
methods
:
{
previewImage
(
i
,
i2
,
images
)
{
let
current
=
(
i2
)
*
3
+
i
uni
.
previewImage
({
urls
:
images
,
current
:
current
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{
console
.
log
(
"选中了第"
+
(
data
.
tapIndex
+
1
)
+
"个按钮,第"
+
(
data
.
index
+
1
)
+
"张图片"
);
},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
initPage
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
getCommentStatistics
()
{
this
.
request2
({
url
:
"/api/AppletOrder/GetAppletGoodsCommentStatistics"
,
data
:
{
GoodsId
:
this
.
id
},
},
(
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
.
msg
.
CommentLabelId
=
0
this
.
init
();
}
);
},
init
()
{
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
this
.
msg
.
GoodsId
=
this
.
id
;
this
.
request2
({
url
:
"/api/AppletOrder/GetAppletGoodsCommentPageList"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
this
.
comments
=
res
.
data
.
pageData
;
this
.
comments
.
forEach
((
x
)
=>
{
x
.
formatPic
=
this
.
formatPic
(
x
.
CommentImgList
);
});
//TODO 缺陷待处理
// this.commentCount = res.data.comment_count;
this
.
commentCount
=
res
.
data
.
pageData
;
this
.
pageCount
=
Math
.
ceil
(
// parseFloat(this.commentCount[0].count) / 10.0
parseFloat
(
res
.
data
.
count
)
/
10.0
);
this
.
commentCount
.
forEach
((
x
)
=>
{
x
.
name
=
x
.
UserName
+
"("
+
x
.
Content
+
")"
;
});
this
.
showLoading
=
true
;
if
(
this
.
pageCount
==
1
)
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
}
this
.
loading
=
false
;
uni
.
hideNavigationBarLoading
();
}
);
},
formatPic
(
pics
)
{
let
arr
=
[];
let
temp
=
[];
pics
.
forEach
((
x
,
i
)
=>
{
temp
.
push
(
x
);
if
(
i
==
2
)
{
arr
.
push
(
temp
);
temp
=
[];
}
else
if
(
i
==
5
)
{
arr
.
push
(
temp
);
temp
=
[];
}
else
if
(
i
==
pics
.
length
-
1
)
{
arr
.
push
(
temp
);
}
});
return
arr
;
},
},
(
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
();
}
);
},
init
()
{
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
this
.
msg
.
GoodsId
=
this
.
id
;
this
.
request2
(
{
url
:
"/api/AppletOrder/GetAppletGoodsCommentPageList"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
this
.
comments
=
res
.
data
.
pageData
;
this
.
comments
.
forEach
((
x
)
=>
{
x
.
formatPic
=
this
.
formatPic
(
x
.
CommentImgList
);
});
//TODO 缺陷待处理
// this.commentCount = res.data.comment_count;
this
.
commentCount
=
res
.
data
.
pageData
;
this
.
pageCount
=
Math
.
ceil
(
// parseFloat(this.commentCount[0].count) / 10.0
parseFloat
(
res
.
data
.
count
)
/
10.0
);
this
.
commentCount
.
forEach
((
x
)
=>
{
x
.
name
=
x
.
UserName
+
"("
+
x
.
Content
+
")"
;
});
this
.
showLoading
=
true
;
if
(
this
.
pageCount
==
1
)
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
}
this
.
loading
=
false
;
uni
.
hideNavigationBarLoading
();
}
);
},
formatPic
(
pics
)
{
let
arr
=
[];
let
temp
=
[];
pics
.
forEach
((
x
,
i
)
=>
{
temp
.
push
(
x
);
if
(
i
==
2
)
{
arr
.
push
(
temp
);
temp
=
[];
}
else
if
(
i
==
5
)
{
arr
.
push
(
temp
);
temp
=
[];
}
else
if
(
i
==
pics
.
length
-
1
)
{
arr
.
push
(
temp
);
}
});
return
arr
;
},
tabsChange
(
index
)
{
this
.
current
=
index
;
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
CommentGrade
=
this
.
list
[
index
].
Id
this
.
init
()
this
.
page
=
1
},
lower
(
e
)
{
if
(
this
.
page
<
this
.
pageCount
)
{
if
(
!
this
.
loading
)
{
this
.
status
=
"loading"
;
this
.
page
++
;
this
.
init
();
}
}
else
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
},
},
};
tabsChange
(
index
)
{
this
.
current
=
index
;
this
.
msg
.
pageIndex
=
1
;
if
(
this
.
list
[
index
].
Type
==
1
)
{
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
.
page
=
1
},
lower
(
e
)
{
if
(
this
.
page
<
this
.
pageCount
)
{
if
(
!
this
.
loading
)
{
this
.
status
=
"loading"
;
this
.
page
++
;
this
.
init
();
}
}
else
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
},
},
};
</
script
>
<
style
>
.comment-list
{
width
:
100vw
;
height
:
100vh
;
overflow
:
hidden
;
font-family
:
aa
;
}
.comment-list
.comment-details
{
height
:
calc
(
100%
-
40px
);
padding
:
10px
0
0
0
;
}
.comment-list
.comment-details
.comment
{
/* margin: 10px 0;
.comment-list
{
width
:
100vw
;
height
:
100vh
;
overflow
:
hidden
;
font-family
:
aa
;
}
.comment-list
.comment-details
{
height
:
calc
(
100%
-
40px
);
padding
:
10px
0
0
0
;
}
.comment-list
.comment-details
.comment
{
/* margin: 10px 0;
background: #fff;
padding: 10px; */
}
.comment-list
.comment-details
.comment
.chead
{
padding-bottom
:
10px
;
border-bottom
:
1px
solid
#f1f1f1
;
}
.comment-list
.comment-details
.comment
.content
{
display
:
flex
;
flex-direction
:
column
;
margin-bottom
:
10p
x
;
padding
:
10px
;
background
:
#fff
;
}
.comment-list
.comment-details
.comment
.content
.u-box
{
display
:
flex
;
margin-bottom
:
10px
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.user
{
flex
:
1
;
font-size
:
12px
;
color
:
gray
;
align-items
:
center
;
display
:
flex
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.timer
{
font-size
:
12px
;
color
:
gray
;
text-align
:
right
;
flex
:
1
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.ucontent
{
font-size
:
12px
;
color
:
#000
;
margin-top
:
10px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
{
display
:
flex
;
/* justify-content:space-evenly; */
margin-right
:
-5px
;
margin-bottom
:
-5
px
;
margin-top
:
5px
;
/* flex-wrap: wrap; */
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
{
flex
:
1
;
max-width
:
70vw
;
margin-right
:
5px
;
margin-bottom
:
5px
;
min-width
:
31.9%
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
{
width
:
100%
;
padding-bottom
:
100%
;
height
:
0
;
position
:
relative
;
overflow
:
hidden
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.image
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
1
;
height
:
100%
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:first-child
.scal
{
border-top-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:last-child
.scal
{
border-top-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
2
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
)
;
color
:
#fff
;
display
:
flex
;
align-items
:
center
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.big
{
font-size
:
18px
;
font-weight
:
500
;
text-align
:
center
;
margin-bottom
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.small
{
font-size
:
14px
;
text-align
:
center
;
}
.comment-list
.reply
{
width
:
100%
;
padding
:
1
0px
;
background
:
#F5F6F7
;
border-radius
:
3px
;
margin-top
:
10
px
;
}
</
style
>
}
.comment-list
.comment-details
.comment
.chead
{
padding-bottom
:
10px
;
border-bottom
:
1px
solid
#f1f1f1
;
}
.comment-list
.comment-details
.comment
.content
{
display
:
fle
x
;
flex-direction
:
column
;
margin-bottom
:
10px
;
padding
:
10px
;
background
:
#fff
;
}
.comment-list
.comment-details
.comment
.content
.u-box
{
display
:
flex
;
margin-bottom
:
10px
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.user
{
flex
:
1
;
font-size
:
12px
;
color
:
gray
;
align-items
:
center
;
display
:
flex
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.timer
{
font-size
:
12px
;
color
:
gray
;
text-align
:
right
;
flex
:
1
;
}
.comment-list
.comment-details
.comment
.content
.u-box
.ucontent
{
font-size
:
12px
;
color
:
#000
;
margin-top
:
10
px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
{
display
:
flex
;
/* justify-content:space-evenly; */
margin-right
:
-5px
;
margin-bottom
:
-
5px
;
margin-top
:
5px
;
/* flex-wrap: wrap; */
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
{
flex
:
1
;
max-width
:
70vw
;
margin-right
:
5px
;
margin-bottom
:
5px
;
min-width
:
31.9%
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
{
width
:
100%
;
padding-bottom
:
100%
;
height
:
0
;
position
:
relative
;
overflow
:
hidden
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.image
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
1
;
height
:
100%
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:first-child
.scal
{
border-top-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
:last-child
.scal
{
border-top-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
2
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
)
;
color
:
#fff
;
display
:
flex
;
align-items
:
center
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.big
{
font-size
:
18px
;
font-weight
:
500
;
text-align
:
center
;
margin-bottom
:
5px
;
}
.comment-list
.comment-details
.comment
.content
.imagebox
.item
.scal
.more
.small
{
font-size
:
14px
;
text-align
:
center
;
}
.comment-list
.reply
{
width
:
100%
;
padding
:
10px
;
background
:
#F5F6F7
;
border-radius
:
3px
;
margin-top
:
10px
;
}
/
deep
/
.comment-list
.u-tab-item
{
margin
:
5px
;
padding
:
5px
10px
;
background-color
:
#f5f5f5
;
border
:
1px
solid
#ddd
;
border-radius
:
5
0px
;
font-size
:
12px
;
color
:
#666
;
height
:
32
px
;
line-height
:
20px
;
}
</
style
>
\ No newline at end of file
pages/goods/goods.vue
View file @
bc534b47
...
...
@@ -306,7 +306,10 @@
<view
class=
"label"
>
选择
</view>
<view
class=
"content"
>
<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"
>
<u-icon
name=
"arrow"
:size=
"32"
color=
"#111"
></u-icon>
</view>
...
...
@@ -613,16 +616,7 @@
let
basedata
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
)
:
''
;
this
.
AppletID
=
basedata
.
home_pages
.
id
?
basedata
.
home_pages
.
id
:
0
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// if (!this.u) {
// this.u = {
// nickName: "未登录",
// avatarUrl: "",
// };
// this.showAuth = true;
// } else {
// this.init();
// this.initPage();
// }
this
.
initPage
();
this
.
getVipId
();
...
...
@@ -701,9 +695,7 @@
this
.
init
();
},
methods
:
{
// counter() {
// document.querySelector("#productId");
// },
// tob切换
change
(
index
)
{
this
.
current
=
index
;
...
...
@@ -712,26 +704,7 @@
console
.
log
(
e
);
},
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
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
...
...
@@ -772,7 +745,6 @@
if
(
res
.
data
)
{
this
.
vipState
=
res
.
data
.
VIPModel
;
}
// this.initRecommend();
}
);
},
...
...
@@ -795,20 +767,21 @@
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
goods
;
// 报名限制数组
res
.
data
.
goods
.
edu_data
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
.
forEach
(
item2
=>
{
if
(
item2
.
ItemType
==
1
)
{
this
.
ItemType1
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
2
)
{
this
.
ItemType2
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
3
)
{
this
.
ItemType3
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
4
)
{
this
.
ItemType4
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
5
)
{
this
.
ItemType5
.
push
(
item2
)
}
})
res
.
data
.
goods
.
edu_data
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
.
forEach
(
item2
=>
{
if
(
item2
.
ItemType
==
1
)
{
this
.
ItemType1
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
2
)
{
this
.
ItemType2
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
3
)
{
this
.
ItemType3
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
4
)
{
this
.
ItemType4
.
push
(
item2
)
}
else
if
(
item2
.
ItemType
==
5
)
{
this
.
ItemType5
.
push
(
item2
)
}
})
// 报名限制数组结束
this
.
g
.
totalStock
=
0
;
this
.
g
.
attr
.
forEach
((
x
)
=>
{
...
...
@@ -909,8 +882,8 @@
},
(
res
)
=>
{
this
.
comments
=
res
.
data
.
pageData
;
console
.
log
(
"1111"
,
this
.
comments
)
// this.initRecommend();
},
(
err
)
=>
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
...
...
@@ -1273,7 +1246,7 @@
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
/* -webkit-line-clamp: 2;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
font-size
:
16px
;
/* height: 45px; */
...
...
pages/order/order-commit-details.vue
View file @
bc534b47
...
...
@@ -13,6 +13,12 @@
</view>
<view
class=
"content-box"
>
<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-icon"
>
<u-icon
name=
"edit"
size=
"36"
></u-icon>
...
...
@@ -54,13 +60,17 @@
Content
:
""
,
OrderDetailId
:
0
,
CommentImgList
:
[],
CommentScore
:
5
CommentScore
:
5
,
LabelIds
:
''
,
},
submitStatus
:
false
,
goodsName
:
""
,
goodsPic
:
""
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
fileList
:
[],
LabelIdList
:
[],
selected
:
[],
selectedLabelId
:
[],
};
},
onLoad
(
option
)
{
...
...
@@ -71,6 +81,7 @@
this
.
goodsName
=
param
.
GoodsName
;
this
.
goodsPic
=
param
.
CoverImage
;
}
this
.
GetCommentLabel
()
},
mounted
()
{
uni
.
setNavigationBarTitle
({
...
...
@@ -78,10 +89,21 @@
});
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
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
},
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
)
{
let
r
=
JSON
.
parse
(
data
);
this
.
msg
.
CommentImgList
.
push
(
r
.
data
);
...
...
@@ -89,8 +111,21 @@
change
(
val
)
{
this
.
msg
.
CommentScore
=
val
},
GetCommentLabel
()
{
this
.
request2
({
url
:
"/api/order/GetCommentLabelList"
,
data
:
{},
},
(
res
)
=>
{
this
.
LabelIdList
=
res
.
data
;
}
);
},
submitForm
()
{
this
.
submitStatus
=
true
;
if
(
this
.
selectedLabelId
){
this
.
msg
.
LabelIds
=
this
.
selectedLabelId
.
join
(
','
)
}
if
(
this
.
msg
.
CommentScore
>
0
)
{
this
.
request2
({
url
:
"/api/AppletOrder/SetGoodsCommentInfo"
,
...
...
@@ -134,6 +169,52 @@
</
script
>
<
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
{
background
:
#faf8f9
;
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