Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
25bb4841
Commit
25bb4841
authored
Sep 22, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
65690df2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
15 deletions
+42
-15
index.html
public/index.html
+2
-2
avatorGroup.vue
src/components/avatorGroup.vue
+16
-4
countDown.vue
src/components/countDown.vue
+1
-1
index.vue
src/views/goodsDetail/index.vue
+9
-2
smallPic.less
src/views/goodsDetail/smallPic.less
+3
-2
smallPic.vue
src/views/goodsDetail/smallPic.vue
+9
-3
share-test.vue
src/views/test/share-test.vue
+2
-1
No files found.
public/index.html
View file @
25bb4841
...
...
@@ -105,12 +105,12 @@
</script>
</head>
<body>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"
></script>
<
!-- <
script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
</script>
-->
<noscript>
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
...
...
src/components/avatorGroup.vue
View file @
25bb4841
...
...
@@ -28,10 +28,10 @@
<cr-image
width=
"25px"
src=
"@/assets/images/new-user.png"
/>
</div>
</div>
<div
v-
if=
"avators.length
<
10
"
class=
"placeholder"
:style=
"widthStyle"
>
<div
v-
for=
"n in placeholderNum"
:key=
"n
"
class=
"placeholder"
:style=
"widthStyle"
>
<div
class=
"content"
>
?
</div>
</div>
<div
v-if=
"
avators.length > 9
"
class=
"more"
:style=
"widthStyle"
@
click=
"showMoreAvator"
>
<div
v-if=
"
groupHC >= 10
"
class=
"more"
:style=
"widthStyle"
@
click=
"showMoreAvator"
>
<div
class=
"content"
/>
</div>
<cr-dialog
v-model=
"showDialogSlot"
confirm-button-text=
"知道了"
confirm-button-color=
"#ec1500"
>
...
...
@@ -81,20 +81,32 @@ export default {
return
{
isLeader
:
true
,
// 标识是不是团长
showDialogSlot
:
false
,
// 查看参团人员
avators
:
[]
// 头像列表
avators
:
[],
// 头像列表
groupHC
:
0
// 团型(5人团则为5)
};
},
computed
:
{
placeholderNum
()
{
// 问号头像展位数量
if
(
this
.
groupHC
>=
10
)
{
// 用9去减是因为有个展示更多的按钮
return
9
-
this
.
avators
.
length
<
0
?
0
:
9
-
this
.
avators
.
length
;
}
else
{
return
this
.
groupHC
-
this
.
avators
.
length
<
0
?
0
:
this
.
groupHC
-
this
.
avators
.
length
;
}
},
widthStyle
()
{
// 用于单个头像不能占一排
return
this
.
avators
.
length
==
6
?
{
width
:
'
25%
'
}
:
{
width
:
'
20%
'
};
}
},
created
()
{
this
.
avators
=
this
.
groupInfo
.
groupBuyAllUserInfoList
||
[];
this
.
groupHC
=
this
.
groupInfo
.
groupBuyLimitUserCount
||
0
;
this
.
avators
=
this
.
groupInfo
.
groupBuyValidUserInfoList
||
[];
},
methods
:
{
showMoreAvator
()
{
if
(
this
.
avators
.
length
==
0
)
return
;
this
.
showDialogSlot
=
true
;
}
}
...
...
src/components/countDown.vue
View file @
25bb4841
...
...
@@ -2,7 +2,7 @@
<cr-count-down
:time=
"time"
>
<template
#default
="
timeData
"
>
<template
v-if=
"timeData.d != 0"
>
<span
:class=
"blockNoBg ? 'block-no-bg' : 'block'"
>
{{
timeData
.
d
}}
</span>
<span
:class=
"blockNoBg ? 'block-no-bg' : 'block'"
>
{{
fillZero
(
timeData
.
d
)
}}
</span>
<span
class=
"colon"
>
:
</span>
</
template
>
<span
:class=
"blockNoBg ? 'block-no-bg' : 'block'"
>
{{ fillZero(timeData.h) }}
</span>
...
...
src/views/goodsDetail/index.vue
View file @
25bb4841
...
...
@@ -60,7 +60,10 @@
<!-- {{ detailInfo.groupBuyInfo }} -->
<
template
v-if=
"inProgress == 1"
>
<avatorGroup
:group-info=
"detailInfo.groupBuyInfo ||
{}" />
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}" :timestemp="timestemp" />
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}"
:timestemp="groupTimestemp"
/>
<successInfo
:group-info=
"detailInfo.groupBuyInfo ||
{}" />
<cr-divider
hairline
...
...
@@ -209,7 +212,8 @@ export default {
},
data
()
{
return
{
timestemp
:
''
,
timestemp
:
''
,
// 大活动结束时间
groupTimestemp
:
''
,
// 小团结束时间
showInfo
:
false
,
inProgress
:
false
,
// 活动是否已经开始
countDownText
:
''
,
...
...
@@ -281,6 +285,9 @@ export default {
const
currentTime
=
new
Date
(
data
.
currentTime
).
getTime
();
const
activityStartTime
=
new
Date
(
data
.
startTime
).
getTime
();
const
activityEndTime
=
new
Date
(
data
.
endTime
).
getTime
();
this
.
groupTimestemp
=
data
.
currentGroupEndTime
?
new
Date
(
data
.
currentGroupEndTime
).
getTime
()
:
-
1
;
if
(
currentTime
<=
activityStartTime
)
{
// 当前时间小于活动开始时间
this
.
timestemp
=
activityStartTime
;
...
...
src/views/goodsDetail/smallPic.less
View file @
25bb4841
...
...
@@ -45,7 +45,7 @@
.goods {
&-red-bg{ // 用于小图详情页
position:
fixed
;
position:
absolute
;
left: -5%;
top: 0;
z-index: -1;
...
...
@@ -103,7 +103,7 @@
height: 18px;
line-height: 18px;
text-align: center;
background
-color
: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
background: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
border-radius: 6px 0 6px 0;
}
&-img{
...
...
@@ -111,6 +111,7 @@
height: 108px;
margin-right: @padding-x;
flex-shrink: 0;
position: relative;
}
&-desc{
flex: 1;
...
...
src/views/goodsDetail/smallPic.vue
View file @
25bb4841
...
...
@@ -45,7 +45,10 @@
</div>
<template
v-if=
"inProgress == 1"
>
<avatorGroup
:group-info=
"detailInfo.groupBuyInfo ||
{}" />
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}" :timestemp="timestemp" />
<group-desc-info
:group-info=
"detailInfo.groupBuyInfo ||
{}"
:timestemp="groupTimestemp"
/>
<successInfo
:group-info=
"detailInfo.groupBuyInfo ||
{}" />
<cr-divider
hairline
...
...
@@ -93,8 +96,8 @@ export default {
},
data
()
{
return
{
endTime
:
1631203200000
,
timestemp
:
''
,
timestemp
:
''
,
// 大活动结束时间
groupTimestemp
:
''
,
// 小团结束时间
showInfo
:
false
,
inProgress
:
false
,
// 活动是否已经开始
countDownText
:
''
,
...
...
@@ -166,6 +169,9 @@ export default {
const
currentTime
=
new
Date
(
data
.
currentTime
).
getTime
();
const
activityStartTime
=
new
Date
(
data
.
startTime
).
getTime
();
const
activityEndTime
=
new
Date
(
data
.
endTime
).
getTime
();
this
.
groupTimestemp
=
data
.
currentGroupEndTime
?
new
Date
(
data
.
currentGroupEndTime
).
getTime
()
:
-
1
;
if
(
currentTime
<=
activityStartTime
)
{
// 当前时间小于活动开始时间
this
.
timestemp
=
activityStartTime
;
...
...
src/views/test/share-test.vue
View file @
25bb4841
...
...
@@ -15,7 +15,8 @@ export default {
title
:
'
aaaa
'
,
desc
:
'
bbbb
'
,
link
:
`https://www.baidu.com`
,
// 页面地址
imgUrl
:
'
http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y
'
// 图片地址
imgUrl
:
'
http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y
'
,
// 图片地址
posterUrl
:
'
http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y
'
// 海报地址
}
}
};
...
...
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