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
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
049579b49cf0cf917df10c474dc4ed787bf45af4
2 parents
686b6101
cd78ef65
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/web-list
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
235 additions
and
88 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/Helpers.php
static/js/common.js
static/sass/layout/_header.scss
static/sass/me/_home.scss
template/m.yohobuy.com/actions/index/home/index.phtml
template/m.yohobuy.com/actions/index/home/logistic.phtml
template/m.yohobuy.com/partials/layout/page_header.phtml
web-static/js/common/logo-brand.js
web-static/js/passport/reset.js
web-static/js/passport/thirdlogin.js
web-static/js/product/brand.js
web-static/js/product/product.js
web-static/js/simple-header.js
yohobuy/www.yohobuy.com/application/Bootstrap.php
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale.php
library/WebPlugin/HelperSearch.php
View file @
049579b
...
...
@@ -8,6 +8,7 @@ use LibModels\Web\Product\SearchData;
use
Api\Yohobuy
;
use
Api\Sign
;
use
Configs\ChannelConfig
;
use
Index\HomeModel
;
/**
* 搜索辅助类
*/
...
...
@@ -32,7 +33,7 @@ class HelperSearch
private
static
function
setListNav
()
{
$options
=
self
::
$options
;
$c
ookieChannel
=
isset
(
$_COOKIE
[
'_Channel'
])
?
$_COOKIE
[
'_Channel'
]
:
'boys'
;
$c
hannel
=
HomeModel
::
getSwitchChannel
()
;
if
(
isset
(
$options
[
'brandName'
])
&&
!
empty
(
$options
[
'brandName'
]))
{
$initNav
=
$options
[
'brandNameEn'
]
.
$options
[
'brandNameCn'
];
}
else
{
...
...
@@ -40,7 +41,7 @@ class HelperSearch
}
self
::
$listNav
[
0
]
=
array
(
'href'
=>
''
,
'name'
=>
strtoupper
(
$c
ookieC
hannel
)
.
'首页'
'name'
=>
strtoupper
(
$channel
)
.
'首页'
);
self
::
$listNav
[
1
]
=
array
(
'href'
=>
''
,
...
...
@@ -1105,12 +1106,15 @@ class HelperSearch
$pattern = "/[img|IMG].*?src=['
|
\
"](.*?(?:[.gif|.jpg]))['|
\"
].*?[\/]?>/"
;
preg_match_all
(
$pattern
,
$string
,
$img
);
foreach
(
$href
[
1
]
as
$key
=>
$vo
){
$result
[
$key
][
'href'
]
=
$vo
;
$result
[
$key
][
'src'
]
=
$img
[
1
][
$key
];
foreach
(
$img
[
1
]
as
$key
=>
$vo
){
if
(
strrchr
(
$vo
,
'.swf'
)
==
'.swf'
){
$result
[
$key
][
'isVedio'
]
=
true
;
$result
[
$key
][
'src'
]
=
$vo
;
}
else{
$result[$key]['href']
=
$href[1][$key]
;
$result[$key]['src']
=
$vo
;
}
}
return
$result
;
}
}
...
...
library/WebPlugin/Helpers.php
View file @
049579b
...
...
@@ -799,7 +799,12 @@ class Helpers
*/
public
static
function
syncUserSession
(
$uid
,
$refer
=
''
,
$callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/index?callback='
.
$callback
if
(
APPLICATION_ENV
==
'production'
)
{
$domain
=
'http://mapi.yohobuy.com'
;
}
else
{
$domain
=
'http://m1.yohobuy.com'
;
}
return
$domain
.
'/Passport/session/index?callback='
.
$callback
.
'&sign='
.
md5
(
md5
(
$uid
.
'Js8Yn0!EwPM45-ws'
))
.
'&uid='
.
$uid
.
'&go='
.
$refer
;
}
...
...
@@ -815,7 +820,12 @@ class Helpers
*/
public
static
function
logoutSession
(
$token
,
$refer
=
''
,
$callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/logout?callback='
.
$callback
if
(
APPLICATION_ENV
==
'production'
)
{
$domain
=
'http://mapi.yohobuy.com'
;
}
else
{
$domain
=
'http://m1.yohobuy.com'
;
}
return
$domain
.
'/Passport/session/logout?callback='
.
$callback
.
'&sign='
.
md5
(
md5
(
'Js8Yn0!EwPM45-ws'
))
.
'&token='
.
$token
.
'&go='
.
$refer
;
}
...
...
static/js/common.js
View file @
049579b
...
...
@@ -219,9 +219,9 @@ $yohoPage.on('touchstart', '.tap-hightlight', function() {
$
(
this
).
removeClass
(
'highlight'
);
});
// $('.nav-home').on('touchstart', function() {
// $('.homebuttom').toggleClass('none');
// });
$
(
'.nav-home'
).
on
(
'touchstart'
,
function
()
{
$
(
'.homebuttom'
).
toggleClass
(
'none'
);
});
(
function
()
{
var
lastTime
=
0
,
...
...
static/sass/layout/_header.scss
View file @
049579b
...
...
@@ -144,6 +144,9 @@
overflow
:
hidden
;
float
:
left
;
text-align
:
center
;
a
{
color
:
#fff
;
}
i
{
width
:
100%
;
height
:
40%
;
...
...
static/sass/me/_home.scss
View file @
049579b
...
...
@@ -97,7 +97,7 @@
float
:
left
;
color
:
#fff
;
font-size
:
pxToRem
(
28px
);
width
:
pxToRem
(
320
px
);
width
:
pxToRem
(
212
px
);
// width: pxToRem(213px); 三栏宽度
&
.highlight
{
...
...
template/m.yohobuy.com/actions/index/home/index.phtml
View file @
049579b
...
...
@@ -28,14 +28,10 @@
{
{#isLogin
}
}
{
{brand_favorite_total
}
}
{
{/isLogin
}
}
<p>收藏的品牌</p>
</a>
{
{!
<a
class=
"link-item tap-hightlight"
href=
"/home/record"
>
<!--
product_browse
-->
{
{#isLogin
}
}
{
{product_browse
}
}
{
{/isLogin
}
}
<p>浏览记录</p>
</a>
}}
</div>
<div
class=
"my-order"
>
<a
class=
"order-title"
href=
"/home/orders"
>
...
...
template/m.yohobuy.com/actions/index/home/logistic.phtml
View file @
049579b
...
...
@@ -38,4 +38,13 @@
{
{/
logisticDetail
}
}
</div>
</div>
<div
class=
"banner"
>
{
{#banner
}
}
<a
href=
"{{url}}"
>
<img
src=
"{{img}}"
alt=
"img"
>
</a>
{
{/banner
}
}
</div>
{
{>
home/maybe_like
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/page_header.phtml
View file @
049579b
...
...
@@ -4,7 +4,7 @@
<a
href=
"{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}"
class=
"iconfont nav-back"
>
610
;</a>
{
{/navBack
}
}
{
{#navHome
}
}
<
a
href=
"{{.}}"
class=
"iconfont nav-home"
>
611
;</a
>
<
span
class=
"iconfont nav-home"
>
62
d;</span
>
{
{/navHome
}
}
{
{#currencyPage
}
}
<a
href=
"/home/helpDetail?code=20151230-102233&caption=YOHO币介绍"
class=
"iconfont nav-home"
>
639
;</a>
...
...
@@ -18,32 +18,34 @@
{
{#navTitle
}
}
<p
class=
"nav-title"
>
{
{.
}
}</p>
{
{/navTitle
}
}
{
{#
navBtn
}
}
<span
class=
"nav-btn"
>
{
{.
}
}</span>
{
{!--
<i
class=
"iconfont nav-home"
></i>
<div
class=
"homebuttom none"
>
<ul>
<li>
</header>
<div
class=
"homebuttom none"
>
<ul>
<li>
<a
href=
"/"
>
<i
class=
"iconfont"
>
62
a;</i>
<span>首页</span>
</li>
<li>
</a>
</li>
<li>
<a
href=
"cate"
>
<i
class=
"iconfont"
>
62
d;</i>
<span>分类</span>
</li>
<li>
</a>
</li>
<li>
<a
href=
"cart/index/index"
>
<i
class=
"iconfont"
>
62
c;</i>
<span>购物车</span>
</li>
<li>
</a>
</li>
<li>
<a
href=
"/home"
>
<i
class=
"iconfont"
>
62
b;</i>
<span>我的</span>
</li>
</ul>
</div>
--}}
{
{/
navBtn
}
}
</header>
</a>
</li>
</ul>
</div>
{
{/pageHeader
}
}
...
...
web-static/js/common/logo-brand.js
View file @
049579b
...
...
@@ -79,6 +79,10 @@ var $ = require('yoho.jquery'),
var
brandTpl
,
brandHtml
;
if
(
!
data
||
data
.
length
===
0
)
{
return
;
}
that
.
_createHelper
();
brandHtml
=
'\{{#brandList logoBrand}}'
+
'<a href="\{{href}}" target="_blank"><img class="lazy" data-original="\{{img}}" alt=""></a>'
+
...
...
web-static/js/passport/reset.js
View file @
049579b
...
...
@@ -174,6 +174,9 @@ $('.va').keyup(function() {
}
else
if
(
v
.
length
<
6
||
v
.
length
>
20
)
{
$
(
this
).
addClass
(
'error'
);
$pwdErr
.
removeClass
(
'hide'
).
find
(
'em'
).
text
(
'密码只支持6-20位'
);
}
else
if
(
/^
([
a-zA-Z0-9
\-\+
_!@
\#
$%
\^
&
\*\(\)\:\;\.
=
\[\]\\\'
,
\?]){6,20}
$/
.
test
(
v
))
{
$
(
this
).
addClass
(
'error'
);
$pwdErr
.
removeClass
(
'hide'
).
find
(
'em'
).
text
(
'密码不能包含特殊字符'
);
}
else
{
$pwdErr
.
addClass
(
'hide'
);
if
(
$repwd
.
val
()
!==
''
)
{
...
...
web-static/js/passport/thirdlogin.js
View file @
049579b
...
...
@@ -68,7 +68,7 @@ function closeMask() {
if
(
$target
.
hasClass
(
'mask'
)
||
$target
.
hasClass
(
'backdrop'
))
{
$
(
'#alreayregist'
).
hide
();
}
})
})
;
}
function
nextStep
()
{
...
...
web-static/js/product/brand.js
View file @
049579b
...
...
@@ -11,7 +11,7 @@ $('#brand-favor').on('click', function() {
uid
=
window
.
getUid
();
if
(
!
uid
)
{
location
.
href
=
'/signin.html?refer='
+
location
.
href
;
location
.
href
=
'/signin.html?refer='
+
encodeURIComponent
(
location
.
href
)
;
return
;
}
...
...
web-static/js/product/product.js
View file @
049579b
...
...
@@ -74,6 +74,14 @@ exports.init = function(num) {
};
}
function
removeHtmlFn
()
{
$goodInfoMain
.
html
(
''
);
$goodSelectColor
.
html
(
''
);
$goodItemWrapper
.
css
({
display
:
'none'
});
}
productList
.
addHandler
(
'MouseEnter'
,
function
(
event
)
{
var
itemMr
=
10
,
//list的右边距
itemMb
=
35
,
//list的下边距
...
...
@@ -150,16 +158,9 @@ exports.init = function(num) {
$goodItemWrapper
.
mouseleave
(
function
()
{
//
removeHtmlFn();
removeHtmlFn
();
});
function
removeHtmlFn
()
{
$goodInfoMain
.
html
(
''
);
$goodSelectColor
.
html
(
''
);
$goodItemWrapper
.
css
({
display
:
'none'
});
}
};
//鼠标放在颜色列表上效果
...
...
@@ -173,6 +174,11 @@ $(document).on('hover', '.good-select-color li', function() {
$goodInfoMain
.
on
(
'click'
,
'.col-btn'
,
function
()
{
var
$this
=
$
(
this
);
if
(
!
window
.
getUid
())
{
location
.
href
=
'/signin.html?refer='
+
encodeURIComponent
(
location
.
href
);
return
;
}
$
.
ajax
({
type
:
'POST'
,
url
:
'/product/list/changeFavorite'
,
...
...
web-static/js/simple-header.js
View file @
049579b
...
...
@@ -6,4 +6,96 @@ if ($('.simple-header').size() > 0) {
}).
on
(
'mouseleave'
,
function
()
{
$
(
this
).
find
(
'.tool-select'
).
fadeOut
();
});
}
\ No newline at end of file
}
/**
* 格式化用户名
* @return {[type]} [description]
*/
function
formatUsernName
(
userName
)
{
var
name
,
char
,
_num
=
0
,
_length
=
0
,
t
;
for
(
t
=
0
;
t
<
userName
.
length
;
t
++
)
{
char
=
userName
.
substr
(
t
,
1
);
if
(
/.*
[\u
4e00-
\u
9fa5
]
+.*$/
.
test
(
char
))
{
_length
+=
2
;
}
else
{
_length
+=
1
;
}
}
if
(
_length
<=
10
)
{
name
=
userName
;
}
else
{
_num
=
0
;
name
=
''
;
for
(
t
=
0
;
t
<
userName
.
length
;
t
++
)
{
if
(
_num
<
10
)
{
char
=
userName
.
substr
(
t
,
1
);
if
(
char
!==
'*'
)
{
if
(
/.*
[\u
4e00-
\u
9fa5
]
+.*$/
.
test
(
char
))
{
_num
+=
2
;
}
else
{
_num
+=
1
;
}
}
name
+=
char
;
}
}
if
(
name
.
length
<
userName
.
length
)
{
name
+=
'...'
;
}
}
return
name
;
}
/**
* 设置简单头部登陆状态
* @return {[type]} [description]
*/
function
setLoginStatus
(
_data
)
{
var
loginHtml
,
name
;
if
(
_data
&&
_data
.
href
&&
_data
.
href
.
user
)
{
name
=
formatUsernName
(
_data
.
href
.
user
);
loginHtml
=
'<span>Hi~</span><a href="">'
+
name
+
'</a> <a href="'
+
_data
.
href
.
logout
+
'">[退出]</a>'
;
}
else
{
name
=
formatUsernName
(
_data
.
user
);
loginHtml
=
'<span>Hi~</span><a href="">'
+
name
+
'</a> <a href="http://www.yohobuy.com/signin.html">[请登录]</a>'
+
'<a href="http://www.yohobuy.com/reg.html">[免费注册]</a>'
;
}
$
(
'.header-tool li'
).
eq
(
0
).
html
(
loginHtml
);
}
/**
* 获取登录信息
* @return {[type]} [description]
*/
function
actionLoginInfo
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/common/getSimpleHeader'
,
data
:
{},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
setLoginStatus
(
data
.
data
);
}
}
});
}
/**
* 初始化函数
* @return {[type]} [description]
*/
function
init
()
{
actionLoginInfo
();
//获取登录信息
}
init
();
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/Bootstrap.php
View file @
049579b
...
...
@@ -71,7 +71,7 @@ class Bootstrap extends Bootstrap_Abstract
$controller
=
'Index'
;
$action
=
'Index'
;
// 二级域名
if
(
2
===
$level
)
{
if
(
3
===
$level
)
{
$url
=
strtolower
(
$dispatcher
->
getRequest
()
->
getRequestUri
());
if
(
empty
(
$url
)
||
$url
==
'/index'
||
$url
==
'/'
)
{
$urlAction
=
'/index'
;
...
...
yohobuy/www.yohobuy.com/application/models/Product/Brands.php
View file @
049579b
...
...
@@ -76,8 +76,23 @@ class BrandsModel
);
}
//根据品牌域名处理相关品牌参数
public
static
function
getBrandByDomain
(
$domain
,
$fields
)
{
$brandInfo
=
BrandData
::
getBrandLogoByDomain
(
$domain
,
$fields
);
$result
=
array
();
if
(
!
empty
(
$brandInfo
[
'data'
])
&&
$brandInfo
[
'code'
]
==
200
)
{
$result
[
'brandId'
]
=
isset
(
$brandInfo
[
'data'
][
'id'
])
?
$brandInfo
[
'data'
][
'id'
]
:
''
;
$result
[
'node'
]
=
isset
(
$brandInfo
[
'data'
][
'static_content_code'
])
?
$brandInfo
[
'data'
][
'static_content_code'
]
:
false
;
$result
[
'brandBanner'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_banner'
])
?
$brandInfo
[
'data'
][
'brand_banner'
]
:
''
;
$result
[
'brandNameEn'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_name_en'
])
?
$brandInfo
[
'data'
][
'brand_name_en'
]
:
''
;
$result
[
'brandNameCn'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_name_cn'
])
?
$brandInfo
[
'data'
][
'brand_name_cn'
]
:
''
;
$result
[
'brandAbout'
]
=
isset
(
$brandInfo
[
'data'
][
'brand_intro'
])
?
$brandInfo
[
'data'
][
'brand_intro'
]
:
''
;
}
else
{
return
false
;
}
return
$result
;
}
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
049579b
<?php
use
Action\WebAction
;
use
LibModels\Web\Product\BrandData
;
use
LibModels\Web\Product\FavoriteData
;
use
Product\BrandsModel
;
use
LibModels\Web\Product\HotrankData
;
use
product\HotrankModel
;
...
...
@@ -13,29 +13,24 @@ class IndexController extends WebAction
*/
public
function
brandAction
()
{
//品牌域名
//品牌域名
,没有获取到品牌域名的跳转首页
$domain
=
$this
->
param
(
'named'
);
if
(
empty
(
$domain
))
{
$this
->
go
(
SITE_MAIN
);
}
$uid
=
$this
->
getUid
();
//根据品牌域名获取品牌id(同时判断品牌域名是否有效)
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$fields
=
'id,brand_name,brand_name_cn,brand_name_en,brand_domain,brand_alif,brand_banner,brand_ico,static_content_code'
;
$brandInfo
=
BrandData
::
getBrandLogoByDomain
(
$domain
,
$fields
);
if
(
!
empty
(
$brandInfo
[
'data'
])
&&
$brandInfo
[
'code'
]
==
200
)
{
$brandId
=
$brandInfo
[
'data'
][
'id'
];
$node
=
isset
(
$brandInfo
[
'data'
][
'static_content_code'
])
?
$brandInfo
[
'data'
][
'static_content_code'
]
:
false
;
$brandBanner
=
$brandInfo
[
'data'
][
'brand_banner'
];
$brandNameEn
=
$brandInfo
[
'data'
][
'brand_name_en'
];
$brandNameCn
=
$brandInfo
[
'data'
][
'brand_name_cn'
];
}
else
{
$result
=
BrandsModel
::
getBrandByDomain
(
$domain
,
$fields
);
if
(
!
$result
)
{
$this
->
go
(
SITE_MAIN
);
}
//品牌ID参数
//获取uid
$uid
=
$this
->
getUid
();
//传品牌ID参数
$condition
=
array
();
$condition
[
'brand'
]
=
$brandId
;
$condition
[
'brand'
]
=
isset
(
$result
[
'brandId'
])
?
$result
[
'brandId'
]
:
''
;
//品牌系列参数
$folderId
=
$this
->
get
(
'folder_id'
);
...
...
@@ -45,15 +40,17 @@ class IndexController extends WebAction
$options
=
array
();
$options
[
'brandName'
]
=
$domain
;
$options
[
'uid'
]
=
$uid
;
$options
[
'brandId'
]
=
$brandId
;
$options
[
'node'
]
=
$node
;
$options
[
'brandBanner'
]
=
$brandBanner
;
$options
[
'brandNameEn'
]
=
$brandNameEn
;
$options
[
'brandNameCn'
]
=
$brandNameCn
;
$options
[
'brandId'
]
=
isset
(
$result
[
'brandId'
])
?
$result
[
'brandId'
]
:
''
;
$options
[
'node'
]
=
isset
(
$result
[
'node'
])
?
$result
[
'node'
]
:
''
;
$options
[
'brandBanner'
]
=
isset
(
$result
[
'brandBanner'
])
?
$result
[
'brandBanner'
]
:
''
;
$options
[
'brandNameEn'
]
=
isset
(
$result
[
'brandNameEn'
])
?
$result
[
'brandNameEn'
]
:
''
;
$options
[
'brandNameCn'
]
=
isset
(
$result
[
'brandNameCn'
])
?
$result
[
'brandNameCn'
]
:
''
;
$options
[
'reviewNum'
]
=
6
;
$options
[
'controller'
]
=
$this
->
_request
->
controller
;
$options
[
'action'
]
=
$this
->
_request
->
action
;
//调用模型获得数据
$data
=
Product\
BrandsModel
::
getBrandSearchData
(
$condition
,
$options
);
$data
=
BrandsModel
::
getBrandSearchData
(
$condition
,
$options
);
$data
=
array
(
//初始化js
...
...
@@ -75,29 +72,28 @@ class IndexController extends WebAction
$this
->
go
(
SITE_MAIN
);
}
$uid
=
$this
->
getUid
();
//根据品牌域名获取品牌id(同时判断品牌域名是否有效)
$fields
=
'id,brand_name,brand_name_cn,brand_banner,brand_ico,brand_intro'
;
$brandInfo
=
BrandData
::
getBrandLogoByDomain
(
$domain
,
$fields
);
if
(
!
empty
(
$brandInfo
[
'data'
])
&&
$brandInfo
[
'code'
]
==
200
)
{
$brandId
=
$brandInfo
[
'data'
][
'id'
];
$brandBanner
=
$brandInfo
[
'data'
][
'brand_banner'
];
$brandAbout
=
$brandInfo
[
'data'
][
'brand_intro'
];
}
else
{
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$fields
=
'id,brand_name,brand_name_cn,brand_banner,brand_ico,brand_intro'
;
$result
=
BrandsModel
::
getBrandByDomain
(
$domain
,
$fields
);
if
(
!
$result
)
{
$this
->
go
(
SITE_MAIN
);
}
//品牌ID参数
$condition
=
array
();
$condition
[
'brand'
]
=
$brandId
;
$condition
[
'brand'
]
=
isset
(
$result
[
'brandId'
])
?
$result
[
'brandId'
]
:
''
;
//$options参数数组
$options
=
array
();
$options
[
'brandName'
]
=
$domain
;
$options
[
'uid'
]
=
$uid
;
$options
[
'brandId'
]
=
$brandId
;
$options
[
'brandBanner'
]
=
$brandBanner
;
$options
[
'brandAbout'
]
=
$brandAbout
;
$options
[
'brandId'
]
=
isset
(
$result
[
'brandId'
])
?
$result
[
'brandId'
]
:
''
;
$options
[
'brandBanner'
]
=
isset
(
$result
[
'brandBanner'
])
?
$result
[
'brandBanner'
]
:
''
;
$options
[
'brandAbout'
]
=
isset
(
$result
[
'brandAbout'
])
?
$result
[
'brandAbout'
]
:
''
;
$options
[
'controller'
]
=
$this
->
_request
->
controller
;
$options
[
'action'
]
=
$this
->
_request
->
action
;
//调用模型获得数据
$data
=
Product\BrandsModel
::
getBrandIntro
(
$condition
,
$options
);
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/List.php
View file @
049579b
...
...
@@ -12,7 +12,9 @@ class ListController extends WebAction
$condition
=
array
();
$options
=
array
(
'positionId'
=>
$positionId
,
'reviewNum'
=>
6
'reviewNum'
=>
6
,
'controller'
=>
$this
->
_request
->
controller
,
'action'
=>
$this
->
_request
->
action
);
$indexData
=
Product\IndexModel
::
getIndexData
(
$condition
,
$options
);
...
...
@@ -41,7 +43,9 @@ class ListController extends WebAction
$newData
=
Product\NewModel
::
getNewSearchData
(
$condition
,
$options
);
$data
=
array
(
'productListPage'
=>
true
,
'newSale'
=>
$newData
'newSale'
=>
$newData
,
'controller'
=>
$this
->
_request
->
controller
,
'action'
=>
$this
->
_request
->
action
);
$this
->
setWebNavHeader
();
//渲染模板
...
...
@@ -61,7 +65,9 @@ class ListController extends WebAction
$data
=
array
(
//初始化js
'productListPage'
=>
true
,
'list'
=>
$list
'list'
=>
$list
,
'controller'
=>
$this
->
_request
->
controller
,
'action'
=>
$this
->
_request
->
action
);
$this
->
setWebNavHeader
();
$this
->
_view
->
display
(
'list'
,
$data
);
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale.php
View file @
049579b
...
...
@@ -41,6 +41,7 @@ class SaleController extends WebAction
$options
=
array
(
'controller'
=>
$this
->
_request
->
controller
,
'action'
=>
$this
->
_request
->
action
,
'reviewNum'
=>
6
);
...
...
Please
register
or
login
to post a comment