Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
xuqi
9 years ago
Commit
b284d1abaaa916cf4509454511fea4cf05e7522f
2 parents
601d0aed
2cd13375
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
22 deletions
framework
library/LibModels/Wap/Product/NewsaleData.php
library/Plugin/Helpers.php
static/js/category/brand.js
static/js/home/home.js
yohobuy/m.yohobuy.com/application/models/Product/Search.php
framework
@
119c247f
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
...
...
library/LibModels/Wap/Product/NewsaleData.php
View file @
b284d1a
...
...
@@ -112,7 +112,7 @@ class NewsaleData
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
,
600
);
// 缓存1
0分钟
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
,
1800
);
// 缓存3
0分钟
}
/**
...
...
library/Plugin/Helpers.php
View file @
b284d1a
...
...
@@ -201,8 +201,8 @@ class Helpers
$result
[
'product_id'
]
=
$productData
[
'product_id'
];
$result
[
'thumb'
]
=
Images
::
getImageUrl
(
$productData
[
'default_images'
],
$width
,
$height
);
$result
[
'name'
]
=
$productData
[
'product_name'
];
$result
[
'price'
]
=
$productData
[
'market_price'
];
$result
[
'salePrice'
]
=
$productData
[
'sales_price'
];
$result
[
'price'
]
=
$productData
[
'market_price'
]
.
'.00'
;
$result
[
'salePrice'
]
=
$productData
[
'sales_price'
]
.
'.00'
;
$result
[
'is_soon_sold_out'
]
=
(
$productData
[
'is_soon_sold_out'
]
===
'Y'
);
$result
[
'url'
]
=
SITE_MAIN
.
'/product/pro_'
.
$productData
[
'product_id'
]
.
'_'
.
$productData
[
'goods_list'
][
0
][
'goods_id'
]
...
...
static/js/category/brand.js
View file @
b284d1a
...
...
@@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(),
headerH
=
$
(
'.yoho-header'
).
outerHeight
(),
brandSwipe
=
parseInt
(
searchH
)
+
parseInt
(
headerH
)
-
1
;
var
myHammer
,
brandsData
,
var
brandsData
,
$keyword
,
searchBtnHammer
,
clearTextHammer
;
var
$rightBarCon
=
$
(
'#right-bar .con'
).
find
(
'b'
).
unbind
();
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
loop
:
true
,
...
...
@@ -56,27 +53,18 @@ $(window).scroll(function() {
});
});
function
rightBarBindClick
()
{
$rightBarCon
=
$
(
'#right-bar .con'
).
find
(
'b'
).
unbind
();
myHammer
=
new
Hammer
(
$rightBarCon
[
0
]);
myHammer
.
on
(
'tap'
,
function
(
e
)
{
var
index
=
$rightBarCon
.
index
();
$
(
'#right-bar .con'
).
find
(
'b'
).
unbind
().
on
(
'touchstart'
,
function
(
e
)
{
var
index
=
$
(
this
).
index
();
if
(
$
(
'.bar-'
+
index
).
size
()
>
0
)
{
document
.
body
.
scrollTop
=
parseInt
(
$
(
'.bar-'
+
index
)[
0
].
offsetTop
)
-
parseInt
(
brandSwipe
-
1
);
}
e
.
s
rcEvent
.
s
topPropagation
();
e
.
stopPropagation
();
});
}
if
(
$rightBarCon
[
0
])
{
rightBarBindClick
();
}
/**
* 品牌搜索
*/
rightBarBindClick
();
function
searchResult
()
{
var
keyword
=
(
$keyword
.
val
()
+
''
).
toLowerCase
();
...
...
static/js/home/home.js
View file @
b284d1a
...
...
@@ -73,6 +73,7 @@ $sideNav.on('touchend', 'li', function () {
$
(
'.sub-nav'
).
removeClass
(
'show'
);
$
(
this
).
find
(
'.sub-nav'
).
addClass
(
'show'
);
}
return
false
;
});
//返回一级导航,收起二级导航
...
...
yohobuy/m.yohobuy.com/application/models/Product/Search.php
View file @
b284d1a
...
...
@@ -55,7 +55,7 @@ class SearchModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
600
);
// 缓存1
0分钟
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存3
0分钟
}
}
...
...
Please
register
or
login
to post a comment