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
毕凯
7 years ago
Commit
72b16ab21489530668378c22a953bd7a4c83c32d
2 parents
8becef39
033e9421
Merge branch 'hotfix/classtip' into 'gray'
Hotfix/classtip See merge request
!1347
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
8 deletions
apps/product/controllers/seckill.js
package.json
public/hbs/activity/trend/class.hbs
public/js/product/seckill.page.js
apps/product/controllers/seckill.js
View file @
72b16ab
...
...
@@ -11,6 +11,7 @@ const moment = require('moment');
const
mRoot
=
'../models'
;
const
headerModel
=
require
(
'../../../doraemon/models/header'
);
const
seckillModel
=
require
(
`
$
{
mRoot
}
/seckill`
)
;
const
_
=
require
(
'lodash'
);
let
headerData
=
headerModel
.
setNav
({
navTitle
:
'秒杀活动'
,
...
...
@@ -18,6 +19,16 @@ let headerData = headerModel.setNav({
});
/**
* hotfix ios 6.5.5 版本隐藏设置提醒按钮
*/
const
_iosHideRemindBtn
=
(
products
)
=>
{
return
_
.
map
(
products
,
goods
=>
{
goods
.
hideRemind
=
true
;
return
goods
;
});
};
/**
* [时间缺0补0]
*/
const
_timeFormat
=
(
tick
)
=>
{
...
...
@@ -228,6 +239,10 @@ const indexData = (req, res, next) => {
return
fetchProductList
(
activityInfo
,
uid
).
then
((
resultProducts
)
=>
{
result
.
products
=
resultProducts
;
if
(
/^6.5.5/
.
test
(
req
.
query
.
app_version
)
&&
req
.
query
.
client_type
===
'iphone'
)
{
result
.
products
=
_iosHideRemindBtn
(
resultProducts
);
}
res
.
json
(
result
);
});
});
...
...
@@ -256,6 +271,9 @@ const getProductList = (req, res, next) => {
};
return
fetchProductList
(
activityInfo
,
uid
).
then
(
resultProducts
=>
{
if
(
/^6.5.5/
.
test
(
req
.
query
.
app_version
)
&&
req
.
query
.
client_type
===
'iphone'
)
{
resultProducts
=
_iosHideRemindBtn
(
resultProducts
);
}
res
.
json
({
products
:
resultProducts
});
}).
catch
(
error
=>
{
logger
.
error
(
error
);
...
...
package.json
View file @
72b16ab
{
"name"
:
"yohobuywap-node"
,
"version"
:
"6.5.5
2
"
,
"version"
:
"6.5.5
3
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/hbs/activity/trend/class.hbs
View file @
72b16ab
...
...
@@ -4,7 +4,7 @@
<span
class=
"tag"
>
{{
tag
}}
</span>
<img
src=
"
{{
image2
image
mode
=
2
q
=
60
}}
"
>
<div
class=
"info"
>
<span
class=
"name"
>
{{
name
}}
</span>
<span
class=
"name
eps
"
>
{{
name
}}
</span>
{{#if
free
}}
<span
class=
"free"
>
免费
</span>
{{else}}
...
...
@@ -32,4 +32,4 @@
</div>
</a>
</div>
</div>
\ No newline at end of file
</div>
...
...
public/js/product/seckill.page.js
View file @
72b16ab
...
...
@@ -11,6 +11,7 @@ let $ = require('yoho-jquery'),
loading
=
require
(
'plugin/loading'
),
lazyload
=
require
(
'yoho-jquery-lazyload'
),
tip
=
require
(
'plugin/tip'
);
let
qs
=
require
(
'yoho-qs'
);
loading
.
init
(
$
(
document
.
body
));
...
...
@@ -243,16 +244,22 @@ seckillObj = {
refreshProductList
:
function
(
activityId
,
startTime
)
{
let
self
=
this
;
let
url
=
'/product/seckill/get-product-list'
;
let
reqData
=
{
uid
:
yoho
.
isLogin
(),
// only app use;
activityId
:
activityId
,
startTime
:
startTime
};
if
(
qs
.
app_version
&&
qs
.
client_type
)
{
reqData
.
app_version
=
qs
.
app_version
;
reqData
.
client_type
=
qs
.
client_type
;
}
loading
.
showLoading
();
self
.
el
.
$navList
.
toggleClass
(
'fix-top'
,
false
);
$
.
ajax
({
url
:
url
,
data
:
{
uid
:
yoho
.
isLogin
(),
// only app use;
activityId
:
activityId
,
startTime
:
startTime
},
data
:
reqData
,
success
:
function
(
data
)
{
data
=
$
.
extend
(
data
,
{
isApp
:
yoho
.
isApp
});
$
(
'.product-list'
).
html
(
self
.
listTemplate
(
data
));
...
...
Please
register
or
login
to post a comment