Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
6 years ago
Commit
3c7bc52a9ee0941f03d60d99e2b13897368d17b1
1 parent
b3c14099
活动秒杀楼层
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
13 deletions
apps/activity/views/partial/feature/seckill.hbs
public/img/activity/seckill/seckill-0.png
public/img/activity/seckill/seckill-1.png
public/img/activity/seckill/seckill-2.png
public/img/activity/seckill/seckill-3.png
public/js/activity/feature.page.js
public/scss/feature/seckill.scss
apps/activity/views/partial/feature/seckill.hbs
View file @
3c7bc52
...
...
@@ -10,7 +10,7 @@
</div>
</div>
<div
class=
"out-product-list"
>
<div
class=
"out-product-list
less-than-3
"
>
<div
class=
"product-list"
>
<div
class=
"product"
>
<a
href=
""
>
...
...
@@ -19,12 +19,12 @@
<div
class=
"product-brand"
>
MADNESS
</div>
</div>
<div
class=
"product-info"
>
<div
class=
"seckill-status
"
style=
"background: url()
"
>
<div
class=
"seckill-status
status-0
"
>
<div
class=
"price"
>
<span
class=
"seckill-price"
>
9元
</span>
<span
class=
"market-price"
>
¥199
</span>
</div>
<
span
class=
"status"
>
立即抢
</span
>
<
div
class=
"status-type"
>
立即抢
</div
>
</div>
</div>
</a>
...
...
@@ -41,7 +41,7 @@
<span
class=
"seckill-price"
>
9元
</span>
<span
class=
"market-price"
>
¥199
</span>
</div>
<
span
class=
"status"
>
立即抢
</span
>
<
div
class=
"status-type"
>
立即抢
</div
>
</div>
</div>
</a>
...
...
@@ -53,17 +53,17 @@
<div
class=
"product-brand"
>
MADNESS
</div>
</div>
<div
class=
"product-info"
>
<div
class=
"seckill-status
"
style=
"background: url()
"
>
<div
class=
"seckill-status
status-0
"
>
<div
class=
"price"
>
<span
class=
"seckill-price"
>
9元
</span>
<span
class=
"market-price"
>
¥199
</span>
</div>
<
span
class=
"status"
>
立即抢
</span
>
<
div
class=
"status-type"
>
立即抢
</div
>
</div>
</div>
</a>
</div>
<div
class=
"product"
>
{{!--
<div class="product">
<a href="">
<div class="img-box">
<img src="//img13.static.yhbimg.com/goodsimg/2011/07/28/09/02489383d3937a4ee4706ab7f516482e7b.jpg?imageMogr2/thumbnail/160x216/position/center/quality/85/format/webp" alt="">
...
...
@@ -75,12 +75,11 @@
<span class="seckill-price">9元</span>
<span class="market-price">¥199</span>
</div>
<
span
class=
"status"
>
立即抢
</span
>
<
div class="status-type">立即抢</div
>
</div>
</div>
</a>
</div>
</div>
--}}
</div>
</div>
</div>
\ No newline at end of file
...
...
public/img/activity/seckill/seckill-0.png
0 → 100644
View file @
3c7bc52
509 Bytes
public/img/activity/seckill/seckill-1.png
View file @
3c7bc52
412 Bytes
|
W:
|
H:
614 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
public/img/activity/seckill/seckill-2.png
View file @
3c7bc52
528 Bytes
|
W:
|
H:
465 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
public/img/activity/seckill/seckill-3.png
deleted
100644 → 0
View file @
b3c1409
437 Bytes
public/js/activity/feature.page.js
View file @
3c7bc52
...
...
@@ -700,6 +700,26 @@ function miniProgramHandleInit() {
}
}
function
loadSeckillList
()
{
$
.
ajax
({
url
:
'/product/seckill/list'
}).
done
(
function
(
result
)
{
console
.
log
(
result
);
}).
error
(
function
()
{
}).
always
(
function
()
{
});
}
function
seckillInit
()
{
loadSeckillList
();
$
(
document
).
on
(
'click'
,
'.seckill-tab .tab-item'
,
function
()
{
$
(
this
).
addClass
(
'actived'
).
siblings
().
removeClass
(
'actived'
);
});
}
$
(
function
()
{
if
(
$
(
'.over'
).
length
)
{
// 过期/删除 状态的 活动
...
...
@@ -758,6 +778,9 @@ $(function() {
// 点赞楼层
likedActivityInit
();
// 秒杀
seckillInit
();
// 小程序相关处理
if
(
!
window
.
WeixinJSBridge
||
!
window
.
WeixinJSBridge
.
invoke
)
{
document
.
addEventListener
(
'WeixinJSBridgeReady'
,
miniProgramHandleInit
,
false
);
...
...
public/scss/feature/seckill.scss
View file @
3c7bc52
...
...
@@ -5,7 +5,7 @@
width
:
100%
;
overflow-x
:
scroll
;
white-space
:
nowrap
;
height
:
4
8px
;
height
:
5
8px
;
.tab-item
{
background
:
#ef8e88
;
...
...
@@ -47,10 +47,10 @@
.out-product-list
{
height
:
248px
;
overflow
:
hidden
;
margin-top
:
15px
;
}
.product-list
{
margin-top
:
15px
;
overflow-x
:
scroll
;
white-space
:
nowrap
;
height
:
258px
;
...
...
@@ -89,11 +89,20 @@
.seckill-status
{
height
:
28px
;
color
:
#fff
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
padding-left
:
7px
;
box-sizing
:
border-box
;
}
.status-0
{
background-image
:
url("img/activity/seckill/seckill-0.png")
;
}
.price
{
display
:
inline-block
;
font-size
:
12px
;
float
:
left
;
width
:
50%
;
}
.market-price
{
...
...
@@ -101,6 +110,40 @@
transform
:
scale
(
0
.9
);
display
:
inline-block
;
}
.status-type
{
width
:
50%
;
text-align
:
center
;
display
:
inline-block
;
border
:
none
;
}
}
}
.less-than-3
{
height
:
280px
;
.product-list
{
height
:
280px
;
}
.product
{
width
:
192px
;
margin-right
:
7px
;
&
:last-child
{
margin-right
:
0
;
}
.img-box
{
width
:
192px
;
height
:
244px
;
}
.seckill-status
{
height
:
36px
;
line-height
:
36px
;
}
}
}
}
...
...
Please
register
or
login
to post a comment