Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
hf
9 years ago
Commit
3607e5111e630d97bb465266620e4ae7a3a40000
1 parent
1a0b1251
fixes bug to category choose second sub
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
25 deletions
library/LibModels/Wap/Product/ListData.php
library/LibModels/Wap/Product/SearchData.php
library/Plugin/TemplateLayout.php
static/js/category/index.js
static/package.json
static/sass/category/_index.scss
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/m.yohobuy.com/configs/application.developer.ini
yohobuy/m.yohobuy.com/configs/application.preview.ini
yohobuy/m.yohobuy.com/configs/application.production.ini
yohobuy/m.yohobuy.com/configs/application.testing.ini
library/LibModels/Wap/Product/ListData.php
View file @
3607e51
...
...
@@ -16,6 +16,7 @@ use Api\Sign;
*/
class
ListData
{
const
URI_PRODUCT
=
'shops/service/v1/product'
;
/**
...
...
@@ -26,15 +27,22 @@ class ListData
*/
public
static
function
productInfoBySkns
(
$skns
)
{
// 调用搜索接口
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.search.li'
;
$param
[
'query'
]
=
implode
(
' '
,
$skns
);
$param
[
'limit'
]
=
count
(
$skns
);
$param
[
'order'
]
=
's_t_desc'
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
,
3600
);
// 有缓存1小时
// // 调用搜索接口
// $param = Yohobuy::param();
// $param['method'] = 'app.search.li';
// $param['query'] = implode(' ', $skns);
// $param['limit'] = count($skns);
// $param['order'] = 's_t_desc';
// $param['client_secret'] = Sign::getSign($param);
//
// return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
$condition
=
array
();
$condition
[
'query'
]
=
implode
(
' '
,
$skns
);
$condition
[
'limit'
]
=
count
(
$skns
);
$condition
[
'order'
]
=
's_t_desc'
;
return
SearchData
::
searchElasticByCondition
(
$condition
,
3600
);
// 有缓存1小时
}
/**
...
...
library/LibModels/Wap/Product/SearchData.php
View file @
3607e51
...
...
@@ -121,7 +121,7 @@ class SearchData
* @param integer $channel表示哪个频道,1表示男生,2表示女生,3表示潮童,4表示创意生活
* @return array 搜索到的数据
*/
public
static
function
searchElasticByCondition
(
$condition
)
public
static
function
searchElasticByCondition
(
$condition
,
$cache
=
false
)
{
// 排序数据映射表
$orderMaps
=
array
(
...
...
@@ -162,7 +162,7 @@ class SearchData
$param
+=
$condition
;
}
return
Yohobuy
::
get
(
self
::
getSearchUrl
(),
$param
);
return
Yohobuy
::
get
(
self
::
getSearchUrl
(),
$param
,
$cache
);
}
}
...
...
library/Plugin/TemplateLayout.php
View file @
3607e51
...
...
@@ -155,7 +155,7 @@ class TemplateLayout implements View_Interface
$template
=
file_get_contents
(
$viewName
,
false
,
null
);
$phpStr
=
LightnCandy
::
compile
(
$template
,
array
(
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
'flags'
=>
LightnCandy
::
FLAG_
ERROR_EXCEPTION
|
LightnCandy
::
FLAG_
MUSTACHE
|
LightnCandy
::
FLAG_HANDLEBARS
,
// 使用MUSTACHE和HANDLEBARS的模板格式
'flags'
=>
LightnCandy
::
FLAG_MUSTACHE
|
LightnCandy
::
FLAG_HANDLEBARS
,
// 使用MUSTACHE和HANDLEBARS的模板格式
'basedir'
=>
array
(
$config
->
template
->
partials
),
// 模板里使用 {{> partial_name}} 时查找的目录
'fileext'
=>
array
(
$tplExt
),
// 允许查找文件的后缀
'lcrun'
=>
'Plugin\LCRun3'
,
// 指定编译模板的runtime
...
...
static/js/category/index.js
View file @
3607e51
...
...
@@ -11,7 +11,8 @@ var $nav = $('.category-nav'),
$categoryContainer
=
$
(
'.category-container'
),
$contents
=
$categoryContainer
.
children
(
'.content'
);
var
$curContent
=
$contents
.
not
(
'.hide'
);
var
$curContent
=
$contents
.
not
(
'.hide'
),
$curClickSubLevel
;
var
navHammer
,
ccHammer
;
...
...
@@ -68,4 +69,15 @@ ccHammer.on('tap', function(e) {
$subLevel
.
not
(
'.hide'
).
addClass
(
'hide'
);
$subLevel
.
eq
(
index
).
removeClass
(
'hide'
);
}
});
$
(
'.sub-level'
).
bind
(
'touchend'
,
function
(
e
)
{
var
$cur
=
$
(
e
.
target
);
$cur
.
addClass
(
'a-highlight'
);
if
(
$curClickSubLevel
)
{
$curClickSubLevel
.
removeClass
(
'a-highlight'
);
}
$curClickSubLevel
=
$cur
;
});
\ No newline at end of file
...
...
static/package.json
View file @
3607e51
{
"name"
:
"yohobuy"
,
"version"
:
"1.1.
6
"
,
"version"
:
"1.1.
7
"
,
"description"
:
"yohobuy statics"
,
"keywords"
:
[],
"homepage"
:
""
,
...
...
static/sass/category/_index.scss
View file @
3607e51
...
...
@@ -99,7 +99,6 @@
background
:
#fff
;
width
:
60%
;
height
:
100%
;
overflow
:
auto
;
}
.sub-level
{
...
...
@@ -126,4 +125,8 @@
color
:
#000
;
}
}
.a-highlight
{
text-decoration
:
underline
;
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
3607e51
...
...
@@ -51,9 +51,11 @@ class IndexController extends AbstractAction
$this
->
setTitle
(
$name
);
$this
->
setNavHeader
(
$name
,
true
,
SITE_MAIN
);
$goodList
=
array
();
if
(
!
$condition
)
{
$condition
=
array
();
}
$goodList
=
$condition
;
$goodList
[
'cartUrl'
]
=
Helpers
::
url
(
'/cart/index/index'
,
null
);
$goodList
+=
$condition
;
// $goodList = Product\ListModel::getClassData($condition);
// if (!empty($condition) && !empty($goodList)) {
...
...
yohobuy/m.yohobuy.com/configs/application.developer.ini
View file @
3607e51
...
...
@@ -50,9 +50,9 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"1.1.
6
"
application.version
=
"1.1.
7
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货"
application.seo.title
=
"Yoho!Buy有货
| 年轻人潮流购物中心
"
application.seo.keywords
=
"Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
application.seo.description
=
"YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
...
...
yohobuy/m.yohobuy.com/configs/application.preview.ini
View file @
3607e51
...
...
@@ -50,10 +50,10 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"1.1.
6
"
application.version
=
"1.1.
7
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货"
application.seo.title
=
"Yoho!Buy有货
| 年轻人潮流购物中心
"
application.seo.keywords
=
"Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
application.seo.description
=
"YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
...
...
yohobuy/m.yohobuy.com/configs/application.production.ini
View file @
3607e51
...
...
@@ -50,10 +50,10 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"1.1.
6
"
application.version
=
"1.1.
7
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货"
application.seo.title
=
"Yoho!Buy有货
| 年轻人潮流购物中心
"
application.seo.keywords
=
"Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
application.seo.description
=
"YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
...
...
yohobuy/m.yohobuy.com/configs/application.testing.ini
View file @
3607e51
...
...
@@ -50,9 +50,9 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"1.1.
6
"
application.version
=
"1.1.
7
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货"
application.seo.title
=
"Yoho!Buy有货
| 年轻人潮流购物中心
"
application.seo.keywords
=
"Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款"
application.seo.description
=
"YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。"
...
...
Please
register
or
login
to post a comment