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
yangyang
9 years ago
Commit
4b564c66d43848709ad17605526712541588e22d
1 parent
98b1e9f8
修改模型和接口位置
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
21 deletions
library/LibModels/Web/Product/SearchData.php
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
yohobuy/www.yohobuy.com/application/models/Product/Index.php
yohobuy/www.yohobuy.com/application/models/Product/New.php
yohobuy/www.yohobuy.com/application/models/Product/Sale.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
library/LibModels/Web/Product/SearchData.php
View file @
4b564c6
...
...
@@ -2,6 +2,7 @@
namespace
LibModels\Web\Product
;
use
Api\Yohobuy
;
use
Api\Sign
;
class
SearchData
extends
\LibModels\Wap\Product\SearchData
{
/**
...
...
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
View file @
4b564c6
...
...
@@ -124,17 +124,14 @@ class BrandsModel
$searchCondition
=
SearchModel
::
searchCondition
(
$customCondition
,
$customOptions
);
// 组合搜索商品url
$urlList
[
'product'
]
=
HelperSearch
::
getProductUrl
(
$searchCondition
[
'condition'
]);
$urlList
[
'product'
]
=
SearchData
::
getProductUrl
(
$searchCondition
[
'condition'
]);
// 组合搜索分类url
$urlList
[
'sort'
]
=
HelperSearch
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
$urlList
[
'sort'
]
=
SearchData
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
//组合搜索品牌url
$urlList
[
'brand'
]
=
HelperSearch
::
getBrandUrl
(
$customOptions
);
$urlList
[
'brand'
]
=
SearchData
::
getBrandUrl
(
$customOptions
);
//组合用户浏览记录url
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
//批量调接口
$result
=
Yohobuy
::
getMulti
(
$urlList
,
array
(),
true
);
...
...
yohobuy/www.yohobuy.com/application/models/Product/Index.php
View file @
4b564c6
...
...
@@ -4,6 +4,7 @@ namespace Product;
use
WebPlugin\HelperSearch
;
use
Product\SearchModel
;
use
LibModels\Web\Product\SearchData
;
use
Api\Yohobuy
;
/**
...
...
@@ -19,13 +20,10 @@ class IndexModel
$urlList
=
array
();
$searchCondition
=
SearchModel
::
searchCondition
(
$customCondition
,
$customOptions
);
// 组合搜索商品url
$urlList
[
'product'
]
=
HelperSearch
::
getProductUrl
(
$searchCondition
[
'condition'
]);
$urlList
[
'product'
]
=
SearchData
::
getProductUrl
(
$searchCondition
[
'condition'
]);
// 组合搜索分类url
$urlList
[
'sort'
]
=
HelperSearch
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
//用户浏览记录
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$urlList
[
'sort'
]
=
SearchData
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
//批量调接口获取数据
$result
=
Yohobuy
::
getMulti
(
$urlList
,
array
(),
true
);
...
...
yohobuy/www.yohobuy.com/application/models/Product/New.php
View file @
4b564c6
...
...
@@ -2,6 +2,7 @@
namespace
Product
;
use
LibModels\Web\Product\SearchData
;
use
WebPlugin\HelperSearch
;
use
Product\SearchModel
;
use
Api\Yohobuy
;
...
...
@@ -18,11 +19,11 @@ class NewModel
$urlList
=
array
();
$searchCondition
=
SearchModel
::
searchCondition
(
$customCondition
,
$customOptions
);
// 组合搜索商品url
$urlList
[
'product'
]
=
HelperSearch
::
getProductUrl
(
$searchCondition
[
'condition'
]);
$urlList
[
'product'
]
=
SearchData
::
getProductUrl
(
$searchCondition
[
'condition'
]);
// 组合搜索分类url
$urlList
[
'sort'
]
=
HelperSearch
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
$urlList
[
'sort'
]
=
SearchData
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
// 组合搜索最新上架url
$urlList
[
'recent'
]
=
HelperSearch
::
getRecentShelveUrl
(
$searchCondition
[
'condition'
]);
$urlList
[
'recent'
]
=
SearchData
::
getRecentShelveUrl
(
$searchCondition
[
'condition'
]);
//用户浏览记录
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
...
...
yohobuy/www.yohobuy.com/application/models/Product/Sale.php
View file @
4b564c6
...
...
@@ -5,6 +5,7 @@ namespace Product;
use
Api\Yohobuy
;
use
WebPlugin\HelperSearch
;
use
WebPlugin\Images
;
use
LibModels\Web\Product\SearchData
;
/**
* sale首页模板数据模型
*
...
...
@@ -20,13 +21,10 @@ class SaleModel
$searchCondition
=
SearchModel
::
searchCondition
(
$customCondition
,
$customOptions
);
// 组合搜索商品url
$urlList
[
'product'
]
=
HelperSearch
::
getProductUrl
(
$searchCondition
[
'condition'
]);
$urlList
[
'product'
]
=
SearchData
::
getProductUrl
(
$searchCondition
[
'condition'
]);
// 组合搜索分类url
$urlList
[
'sort'
]
=
HelperSearch
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
//组合用户浏览记录url
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$urlList
[
'sort'
]
=
SearchData
::
getClassesUrl
(
$searchCondition
[
'sortCondition'
]);
//批量调接口
$result
=
Yohobuy
::
getMulti
(
$urlList
,
array
(),
true
);
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
View file @
4b564c6
...
...
@@ -2,6 +2,8 @@
use
Action\WebAction
;
use
Product\SearchModel
;
use
LibModels\Web\Product\FavoriteData
;
use
Product\IndexModel
;
use
Product\NewModel
;
class
ListController
extends
WebAction
{
...
...
@@ -17,7 +19,7 @@ class ListController extends WebAction
'action'
=>
$this
->
_request
->
action
);
$indexData
=
Product\
IndexModel
::
getIndexData
(
$condition
,
$options
);
$indexData
=
IndexModel
::
getIndexData
(
$condition
,
$options
);
$data
=
array
(
//初始化js
...
...
@@ -42,7 +44,7 @@ class ListController extends WebAction
'action'
=>
'new'
);
$newData
=
Product\
NewModel
::
getNewSearchData
(
$condition
,
$options
);
$newData
=
NewModel
::
getNewSearchData
(
$condition
,
$options
);
$data
=
array
(
'productListPage'
=>
true
,
'newSale'
=>
$newData
...
...
Please
register
or
login
to post a comment