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
Plain Diff
Browse Files
Authored by
陈峰
8 years ago
Commit
9e0d5ea54b07137eb0982c5ac4a89ad69c563a3e
2 parents
0addd0f9
1e904ca3
Merge branch 'master' into grey
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
126 additions
and
109 deletions
apps/activity/controllers/annual-account.js
apps/activity/router.js
apps/activity/views/action/annual-account/index.hbs
apps/activity/views/action/annual-account/share.hbs
package.json
public/js/activity/annual-account.page.js
public/scss/activity/annual-account/_index.css
public/scss/channel/_brand.css
public/scss/product/new/_good-tags.css
apps/activity/controllers/annual-account.js
View file @
9e0d5ea
...
...
@@ -14,6 +14,11 @@ const index = (req, res, next) => {
let
uid
=
+
req
.
query
.
uid
||
+
req
.
user
.
uid
;
let
curUrl
=
'http://m.yohobuy.com/activity/annual-account'
;
if
(
!
uid
)
{
res
.
redirect
(
'/signin.html?refer=http://m.yohobuy.com/activity/annual-account'
);
return
;
}
annualAccountModel
.
getAccountData
({
uid
:
uid
,
year
:
'2016'
...
...
@@ -98,7 +103,7 @@ const share = (req, res) => {
title
:
title
,
localCss
:
true
,
data
:
Object
.
assign
({
sUrl
:
req
.
originalUrl
sUrl
:
'http://m.yohobuy.com'
+
req
.
originalUrl
},
q
)
});
};
...
...
apps/activity/router.js
View file @
9e0d5ea
...
...
@@ -8,13 +8,13 @@
const
router
=
require
(
'express'
).
Router
();
// eslint-disable-line
const
cRoot
=
'./controllers'
;
const
auth
=
require
(
'../../doraemon/middleware/auth'
);
const
demo
=
require
(
`
$
{
cRoot
}
/demo`
)
;
const
coupon
=
require
(
`
$
{
cRoot
}
/coupon`
)
;
const
wechat
=
require
(
`
$
{
cRoot
}
/wechat`
)
;
const
student
=
require
(
`
$
{
cRoot
}
/student`
)
;
const
live
=
require
(
`
$
{
cRoot
}
/live`
)
;
const
invite
=
require
(
`
$
{
cRoot
}
/invite`
)
;
const
auth
=
require
(
'../../doraemon/middleware/auth'
);
const
couponFloor
=
require
(
`
$
{
cRoot
}
/coupon-floor`
)
;
const
vipDay
=
require
(
`
$
{
cRoot
}
/vipDay`
)
;
...
...
@@ -162,7 +162,7 @@ router.get('/redbag/2017', redbag.index);
router
.
get
(
'/individuation'
,
individuation
.
productLst
);
// 2016 年度账单
router
.
get
(
'/annual-account'
,
a
uth
,
a
nnualAccount
.
index
);
router
.
get
(
'/annual-account'
,
annualAccount
.
index
);
router
.
get
(
'/annual-account/share'
,
annualAccount
.
share
);
router
.
get
(
'/app-downloads'
,
appDownloads
.
index
);
...
...
apps/activity/views/action/annual-account/index.hbs
View file @
9e0d5ea
{{#
data
}}
<div
class=
"annual-account-page ch"
data-login=
"
{{
loginUrl
}}
"
data-is-app=
"
{{
isApp
}}
"
>
<div
class=
"annual-bg ch"
></div>
<input
type=
"hidden"
value=
"
{{
sUrl
}}
"
id=
"s-url"
>
<div
class=
"audio-btn"
></div>
<audio
preload=
"auto"
loop=
"loop"
id=
"audio"
>
...
...
apps/activity/views/action/annual-account/share.hbs
View file @
9e0d5ea
...
...
@@ -3,7 +3,7 @@
<input
type=
"hidden"
value=
"
{{
sUrl
}}
"
id=
"s-url"
>
<div
class=
"account-bg3"
>
<div
class=
"share-txt"
>
<span
class=
"name"
>
{{
name
}}
</span>
<br>
的潮流分为
<span
class=
"red-color"
>
{{
score
}}
</span><br>
击败了
<span
class=
"red-color"
>
{{
beat
}}
%
</span>
的潮人
<br>
获得
<span
class=
"name"
>
{{
name
}}
</span>
的潮流分为
<span
class=
"red-color"
>
{{
score
}}
</span><br>
击败了
<span
class=
"red-color"
>
{{
beat
}}
%
</span>
的潮人
<br>
获得
</div>
<div
class=
"portrait-
{{
n
}}
"
></div>
<div
class=
"share-txt"
>
称号
</div>
...
...
package.json
View file @
9e0d5ea
{
"name"
:
"m-yohobuy-node"
,
"version"
:
"5.4.
1
"
,
"version"
:
"5.4.
3
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/js/activity/annual-account.page.js
View file @
9e0d5ea
...
...
@@ -54,6 +54,9 @@ function listenVideo() {
}
});
}
$
(
'body'
).
css
({
height
:
$
(
window
).
height
()
});
$
(
function
()
{
var
$purdah1
=
$
(
'.purdah1'
),
...
...
@@ -72,8 +75,9 @@ $(function() {
$commonH
.
css
({
height
:
$
(
window
).
height
()});
audioAction
();
listenVideo
();
setTimeout
(
function
()
{
$
(
'.top-downloadbar'
).
css
({
zIndex
:
9
});
},
400
);
share
({
imgUrl
:
'https://feature.yoho.cn/300x300.png'
,
...
...
@@ -82,103 +86,108 @@ $(function() {
desc
:
'YOHO!BUY有货2016潮流轨迹'
});
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
direction
:
'vertical'
,
onTransitionEnd
:
function
(
swiper
)
{
var
aIndex
=
swiper
.
activeIndex
;
var
i
=
1
;
if
(
aIndex
===
1
)
{
setTimeout
(
function
()
{
$nav2Img
.
addClass
(
'n2-img-animation'
);
$purdah1
.
addClass
(
'purdah1-animation'
);
},
300
);
}
if
(
$
(
'.account-share-page'
).
length
===
0
)
{
audioAction
();
listenVideo
();
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
direction
:
'vertical'
,
onTransitionEnd
:
function
(
swiper
)
{
var
aIndex
=
swiper
.
activeIndex
;
var
i
=
1
;
if
(
aIndex
===
1
)
{
setTimeout
(
function
()
{
$nav2Img
.
addClass
(
'n2-img-animation'
);
$purdah1
.
addClass
(
'purdah1-animation'
);
},
300
);
}
if
(
aIndex
===
2
)
{
$purdahLeft
.
addClass
(
'purdah-l-animation'
);
$purdahRight
.
addClass
(
'purdah-r-animation'
);
if
(
$monthList
.
find
(
'li'
).
length
===
0
)
{
for
(
i
;
i
<=
32
;
i
++
)
{
if
(
i
===
7
)
{
$monthList
.
find
(
'ul'
).
append
(
'<li class="goods-'
+
i
+
'"><div class="goods-gif-'
+
i
+
'"></div></li>'
);
}
else
{
$monthList
.
find
(
'ul'
).
append
(
'<li class="goods-'
+
i
+
'"></li>'
);
if
(
aIndex
===
2
)
{
$purdahLeft
.
addClass
(
'purdah-l-animation'
);
$purdahRight
.
addClass
(
'purdah-r-animation'
);
if
(
$monthList
.
find
(
'li'
).
length
===
0
)
{
for
(
i
;
i
<=
32
;
i
++
)
{
if
(
i
===
7
)
{
$monthList
.
find
(
'ul'
).
append
(
'<li class="goods-'
+
i
+
'"><div class="goods-gif-'
+
i
+
'"></div></li>'
);
}
else
{
$monthList
.
find
(
'ul'
).
append
(
'<li class="goods-'
+
i
+
'"></li>'
);
}
}
}
$monthList
.
fadeIn
();
}
$monthList
.
fadeIn
();
}
if
(
aIndex
===
3
)
{
$runMen
.
fadeIn
();
}
if
(
aIndex
===
3
)
{
$runMen
.
fadeIn
();
}
if
(
aIndex
!==
4
)
{
$video
[
0
].
pause
();
if
(
audioStatus
)
{
$audio
[
0
].
play
();
if
(
aIndex
!==
4
)
{
$video
[
0
].
pause
();
if
(
audioStatus
)
{
$audio
[
0
].
play
();
}
}
}
if
(
aIndex
===
4
)
{
$videoBox
.
addClass
(
'video-animation'
);
setTimeout
(
function
()
{
$
(
'#video'
).
show
();
},
600
);
}
if
(
aIndex
===
4
)
{
$videoBox
.
addClass
(
'video-animation'
);
setTimeout
(
function
()
{
$
(
'#video'
).
show
();
},
600
);
}
if
(
aIndex
===
5
)
{
$spokesman
.
addClass
(
'spokesman-animation'
);
tbTime
=
setTimeout
(
function
()
{
$tB
.
addClass
(
'txt-animation'
);
},
500
);
handTime
=
setTimeout
(
function
()
{
$hand
.
addClass
(
'hand-animation'
);
},
1000
);
twTime
=
setTimeout
(
function
()
{
$tW
.
addClass
(
'txt-animation'
);
},
1500
);
}
},
onSlideChangeStart
:
function
(
swiper
)
{
var
aIndex
=
swiper
.
activeIndex
;
if
(
aIndex
===
1
||
aIndex
===
3
)
{
$purdahLeft
.
removeClass
(
'purdah-l-animation'
);
$purdahRight
.
removeClass
(
'purdah-r-animation'
);
$monthList
.
fadeOut
();
$monthList
.
find
(
'ul'
).
scrollLeft
(
0
);
}
if
(
aIndex
===
5
)
{
$spokesman
.
addClass
(
'spokesman-animation'
);
tbTime
=
setTimeout
(
function
()
{
$tB
.
addClass
(
'txt-animation'
);
},
500
);
handTime
=
setTimeout
(
function
()
{
$hand
.
addClass
(
'hand-animation'
);
},
1000
);
twTime
=
setTimeout
(
function
()
{
$tW
.
addClass
(
'txt-animation'
);
},
1500
);
}
},
onSlideChangeStart
:
function
(
swiper
)
{
var
aIndex
=
swiper
.
activeIndex
;
if
(
aIndex
===
1
||
aIndex
===
3
)
{
$purdahLeft
.
removeClass
(
'purdah-l-animation'
);
$purdahRight
.
removeClass
(
'purdah-r-animation'
);
$monthList
.
fadeOut
();
$monthList
.
find
(
'ul'
).
scrollLeft
(
0
);
}
if
(
aIndex
===
0
||
aIndex
===
2
)
{
$nav2Img
.
removeClass
(
'n2-img-animation'
);
$purdah1
.
removeClass
(
'purdah1-animation'
);
}
if
(
aIndex
===
0
||
aIndex
===
2
)
{
$nav2Img
.
removeClass
(
'n2-img-animation'
);
$purdah1
.
removeClass
(
'purdah1-animation'
);
}
if
(
aIndex
===
2
||
aIndex
===
4
)
{
$runMen
.
hide
();
}
if
(
aIndex
===
2
||
aIndex
===
4
)
{
$runMen
.
hide
();
}
if
(
aIndex
===
3
||
aIndex
===
5
)
{
$videoBox
.
removeClass
(
'video-animation'
);
$
(
'#video'
).
hide
();
}
if
(
aIndex
===
3
||
aIndex
===
5
)
{
$videoBox
.
removeClass
(
'video-animation'
);
$
(
'#video'
).
hide
();
}
if
(
aIndex
===
4
||
aIndex
===
6
)
{
clearTimeout
(
tbTime
);
clearTimeout
(
twTime
);
clearTimeout
(
handTime
);
$spokesman
.
removeClass
(
'spokesman-animation'
);
$tB
.
removeClass
(
'txt-animation'
);
$hand
.
removeClass
(
'hand-animation'
);
$tW
.
removeClass
(
'txt-animation'
);
if
(
aIndex
===
4
||
aIndex
===
6
)
{
clearTimeout
(
tbTime
);
clearTimeout
(
twTime
);
clearTimeout
(
handTime
);
$spokesman
.
removeClass
(
'spokesman-animation'
);
$tB
.
removeClass
(
'txt-animation'
);
$hand
.
removeClass
(
'hand-animation'
);
$tW
.
removeClass
(
'txt-animation'
);
}
}
}
});
});
// 开启2016潮流轨迹按钮
$
(
'.start-btn'
).
on
(
'click'
,
function
()
{
mySwiper
.
slideTo
(
1
,
1000
,
true
);
});
// 开启2016潮流轨迹按钮
$
(
'.start-btn'
).
on
(
'click'
,
function
()
{
mySwiper
.
slideTo
(
1
,
1000
,
true
);
});
}
});
...
...
public/scss/activity/annual-account/_index.css
View file @
9e0d5ea
.annual-account-page
{
width
:
640px
;
overflow
:
hidden
;
background-image
:
resolve
(
"activity/annual-account/bg.gif"
);
background-size
:
cover
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
1
;
.audio-btn
{
width
:
49px
;
...
...
@@ -10,7 +16,7 @@
position
:
fixed
;
top
:
30px
;
right
:
30px
;
z-index
:
99
;
z-index
:
8
;
}
.audio-f
{
...
...
@@ -18,16 +24,6 @@
background-size
:
contain
;
}
.annual-bg
{
width
:
100%
;
background-image
:
resolve
(
"activity/annual-account/bg.gif"
);
background-size
:
cover
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
-1
;
}
.nav-1
{
width
:
100%
;
background
:
resolve
(
"activity/annual-account/account-bg.png"
)
no-repeat
;
...
...
@@ -595,9 +591,8 @@
}
.account-2-consume
{
position
:
absolute
;
left
:
70px
;
top
:
100px
;
max-width
:
550px
;
margin
:
100px
auto
0
;
.chop-hand
{
width
:
349px
;
...
...
@@ -711,12 +706,20 @@
line-height
:
60px
;
font-weight
:
bold
;
text-align
:
center
;
margin
:
0
auto
;
max-width
:
85%
;
}
.name
{
font-size
:
50px
;
margin-top
:
50px
;
display
:
inline-block
;
max-height
:
120px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.create-btn
{
...
...
public/scss/channel/_brand.css
View file @
9e0d5ea
...
...
@@ -177,7 +177,7 @@
padding
:
14px
3.125%
;
background-color
:
#f8f8f8
;
left
:
0
;
top
:
40
PX
;
top
:
90px
;
position
:
fixed
;
z-index
:
2
;
...
...
public/scss/product/new/_good-tags.css
View file @
9e0d5ea
...
...
@@ -39,8 +39,8 @@
height
:
50px
;
line-height
:
50px
;
width
:
130px
;
padding-left
:
20px
;
padding-right
:
20px
;
padding-left
:
2px
;
padding-right
:
2px
;
border-radius
:
8px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
...
...
Please
register
or
login
to post a comment