Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
0c1679403da663525af2fccb1ef28f794b35ae21
1 parent
866b43e0
fixes bug to guang detail page brand link click
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
38 deletions
library/Api/Yohobuy.php
static/package.json
yohobuy/m.yohobuy.com/application/controllers/Search.php
yohobuy/m.yohobuy.com/application/models/Guang/Plusstar.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
yohobuy/m.yohobuy.com/configs/application.developer.ini
yohobuy/m.yohobuy.com/configs/application.production.ini
yohobuy/m.yohobuy.com/configs/application.testing.ini
yohobuy/m.yohobuy.com/configs/routes.guang.ini
library/Api/Yohobuy.php
View file @
0c16794
...
...
@@ -17,16 +17,16 @@ use Plugin\Cache;
class
Yohobuy
{
/* 正式环境 */
const
API_URL
=
'http://api2.open.yohobuy.com/'
;
const
SERVICE_URL
=
'http://service.api.yohobuy.com/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
// /* 测试环境 */
// const API_URL = 'http://test2.open.yohobuy.com/';
// const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
// /* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const
API_URL
=
'http://test2.open.yohobuy.com/'
;
const
SERVICE_URL
=
'http://test.service.api.yohobuy.com/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
/**
* 私钥列表
*
...
...
static/package.json
View file @
0c16794
{
"name"
:
"yohobuy"
,
"version"
:
"0.0.
2
"
,
"version"
:
"0.0.
3
"
,
"description"
:
"yohobuy statics"
,
"keywords"
:
[],
"homepage"
:
""
,
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
0c16794
...
...
@@ -73,7 +73,6 @@ class SearchController extends AbstractAction
'discount'
=>
FILTER_VALIDATE_INT
,
'gender'
=>
FILTER_DEFAULT
,
'p_d'
=>
FILTER_DEFAULT
,),
false
);
$query
=
isset
(
$condition
[
'query'
])
?
strtolower
(
trim
(
$condition
[
'query'
]))
:
null
;
// 标识用户是否有输入搜索内容
...
...
@@ -117,10 +116,10 @@ class SearchController extends AbstractAction
// 跳转到品牌商品列表页
if
(
$domain
!==
null
)
{
$url
=
Helpers
::
url
(
''
,
array
(
'from'
=>
'search'
,
'query'
=>
$query
,
'gender'
=>
$condition
[
'gender'
]
),
$domain
);
'from'
=>
'search'
,
'query'
=>
$query
,
'gender'
=>
$condition
[
'gender'
]
),
$domain
);
$this
->
go
(
$url
);
}
}
...
...
@@ -234,14 +233,15 @@ class SearchController extends AbstractAction
}
$data
=
array
();
// 查询数据
// 查询
品类
数据
if
(
!
isset
(
$condition
[
'query'
]))
{
$data
+=
Product\ListModel
::
getClassData
(
$condition
);
$data
+=
Product\ListModel
::
getClassData
(
$condition
,
$order
,
$page
);
if
(
isset
(
$data
[
'filter'
]))
{
unset
(
$data
[
'filter'
]);
}
}
else
{
// 查询数据
}
// 查询数据
else
{
$listData
=
SearchData
::
searchByCondition
(
$condition
,
$order
,
$page
);
// 处理返回的数据
if
(
isset
(
$listData
[
'data'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Guang/Plusstar.php
View file @
0c16794
...
...
@@ -150,7 +150,7 @@ class PlusstarModel
if
(
isset
(
$value
[
'data'
][
1
]))
{
$imgs
=
array
();
foreach
(
$value
[
'data'
]
as
$ps
)
{
$build
[
'url'
]
=
'/guang/plusstar/detail?id='
.
$value
[
'id'
]
.
'&gender='
.
$gender
;
$build
[
'url'
]
=
Helpers
::
url
(
'/plustar/brandinfo'
,
array
(
'id'
=>
$value
[
'id'
],
'gender'
=>
$gender
),
'guang'
)
;
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$ps
[
'src'
],
640
,
310
);
$build
[
'deps'
]
=
$showSummary
?
$value
[
'brand_title'
]
:
false
;
$imgs
[]
=
$build
;
...
...
@@ -159,7 +159,7 @@ class PlusstarModel
}
// 情况2: 单张图
elseif
(
isset
(
$value
[
'data'
][
0
]))
{
$build
[
'url'
]
=
'/guang/plusstar/detail?id='
.
$value
[
'id'
]
.
'&gender='
.
$gender
;
$build
[
'url'
]
=
Helpers
::
url
(
'/plustar/brandinfo'
,
array
(
'id'
=>
$value
[
'id'
],
'gender'
=>
$gender
),
'guang'
)
;
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'data'
][
0
][
'src'
],
640
,
310
);
$build
[
'deps'
]
=
$showSummary
?
$value
[
'brand_title'
]
:
false
;
$result
[]
=
$build
;
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Plusstar.php
View file @
0c16794
...
...
@@ -82,9 +82,18 @@ class PlusstarController extends AbstractAction
if
(
empty
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_id'
]))
{
break
;
}
$brandId
=
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_id'
];
/* 获取更多品牌的链接 */
$url
=
'/brands'
;
$brandDomains
=
Product\ListModel
::
getAllBrandDomains
();
if
(
isset
(
$brandDomains
[
$brandId
]))
{
// 构建成 品牌域名.xxx.com
$url
=
Helpers
::
url
(
''
,
null
,
$brandDomains
[
$brandId
]);
}
$data
[
'psDetail'
]
=
true
;
$data
[
'ps'
][
'id'
]
=
$brandI
nfo
[
'getBrandInfo'
][
'data'
][
'brand_id'
]
;
$data
[
'ps'
][
'id'
]
=
$brandI
d
;
$data
[
'ps'
][
'banner'
]
=
Helpers
::
getImageUrl
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'cover_img'
],
640
,
309
);
$data
[
'ps'
][
'logo'
]
=
Helpers
::
getImageUrl
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_ico'
],
160
,
160
);
$data
[
'ps'
][
'name'
]
=
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_name'
];
...
...
@@ -92,7 +101,7 @@ class PlusstarController extends AbstractAction
$data
[
'ps'
][
'likeUrl'
]
=
false
;
//"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo","param":{"id":285}},"requesturl":{"url":"\/guang\/api\/v1\/favorite\/togglebrand","param":{"brand_id":"701"}},"priority":"Y"}}";
$data
[
'ps'
][
'intro'
]
=
empty
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_intro'
])
?
''
:
strtr
(
strip_tags
(
$brandInfo
[
'getBrandInfo'
][
'data'
][
'brand_intro'
]),
array
(
' '
=>
' '
));
$data
[
'ps'
][
'newArrival'
]
=
array
();
$data
[
'ps'
][
'newArrival'
][
'moreUrl'
]
=
'/product/list/brand?brand='
.
$id
;
// @todo 品牌列表页面
$data
[
'ps'
][
'newArrival'
][
'moreUrl'
]
=
$url
;
$data
[
'ps'
][
'newArrival'
][
'naList'
]
=
$brandInfo
[
'getNewProduct'
];
$data
[
'ps'
][
'infos'
]
=
array
();
...
...
yohobuy/m.yohobuy.com/configs/application.developer.ini
View file @
0c16794
...
...
@@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"0.0.2"
\ No newline at end of file
application.version
=
"0.0.3"
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/application.production.ini
View file @
0c16794
...
...
@@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"0.0.2"
\ No newline at end of file
application.version
=
"0.0.3"
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/application.testing.ini
View file @
0c16794
...
...
@@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"0.0.2"
\ No newline at end of file
application.version
=
"0.0.3"
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/routes.guang.ini
View file @
0c16794
...
...
@@ -12,17 +12,17 @@ routes.author.route.module = Guang
routes.author.route.controller
=
Index
routes.author.route.action
=
Editor
; 国际优选
routes.author.type
=
"rewrite"
routes.author.match
=
"/plustar"
routes.author.route.module
=
Guang
routes.author.route.controller
=
Plusstar
routes.author.route.action
=
Index
; 国际优选/明星原创
routes.plusstar.type
=
"rewrite"
routes.plusstar.match
=
"/(plustar|plustar/index)$"
routes.plusstar.route.module
=
Guang
routes.plusstar.route.controller
=
Plusstar
routes.plusstar.route.action
=
Index
; 明星原创
routes.author.type
=
"rewrite"
routes.author.match
=
"/(plustar|plustar/index)"
routes.author.route.module
=
Guang
routes.author.route.controller
=
Plusstar
routes.author.route.action
=
Index
; 国际优选/明星原创详情
routes.brandinfo.type
=
"rewrite"
routes.brandinfo.match
=
"/(plustar/brandinfo)$"
routes.brandinfo.route.module
=
Guang
routes.brandinfo.route.controller
=
Plusstar
routes.brandinfo.route.action
=
detail
...
...
Please
register
or
login
to post a comment