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
uedxwg
9 years ago
Commit
f3832b904104b8032734a6c66b558af9f74a7f27
2 parents
16b6c891
de6038ac
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
119 additions
and
116 deletions
library/Configs/CacheConfig.php
library/LibModels/Wap/Product/NewsaleData.php
library/Plugin/DataProcess/FloorProcess.php
static/js/home/maybe-like.js
static/js/passport/login/international.js
static/js/passport/login/login.js
static/js/passport/register/password.js
static/js/product/detail/detail.js
static/js/product/list.js
static/sass/me/_order.scss
static/sass/product/_detail.scss
template/m.yohobuy.com/actions/category/brand/index.phtml
template/m.yohobuy.com/partials/me/order/good.phtml
template/m.yohobuy.com/partials/product/feedback-tab.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
yohobuy/m.yohobuy.com/application/models/Home/Online.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
library/Configs/CacheConfig.php
View file @
f3832b9
...
...
@@ -22,9 +22,15 @@ class CacheConfig
const
KEY_ACTION_BOYS_BOTTOM_BANNER
=
'key_action_boys_bottom_banner'
;
// 男生首页底部banner
const
KEY_ACTION_GRILS_BOTTOM_BANNER
=
'key_action_girls_bottom_banner'
;
// 女生首页底部banner
const
KEY_ACTION_PRODUCT_NEWSALE_INDEX
=
'key_action_product_newsale_index'
;
// 新品到着
const
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
=
'key_action_product_newsale_discount'
;
// 热卖排行
const
KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS
=
'key_action_product_newsale_index_boys'
;
// 男生新品到着
const
KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS
=
'key_action_product_newsale_index_girls'
;
// 女生新品到着
const
KEY_ACTION_PRODUCT_NEWSALE_INDEX_KIDS
=
'key_action_product_newsale_index_kids'
;
// 潮童新品到着
const
KEY_ACTION_PRODUCT_NEWSALE_INDEX_LIFESTYLE
=
'key_action_product_newsale_index_lifestyle'
;
// 创意生活新品到着
const
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_BOYS
=
'key_action_product_newsale_discount_boys'
;
// 男生热卖排行
const
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_GIRLS
=
'key_action_product_newsale_discount_girls'
;
// 女生热卖排行
const
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_KIDS
=
'key_action_product_newsale_discount_kids'
;
// 潮童热卖排行
const
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT_LIFESTYLE
=
'key_action_product_newsale_discount_lifestyle'
;
// 创意生活热卖排行
const
KEY_ACTION_PRODUCT_INDEX
=
'key_action_product_index'
;
// 品类商品列表
const
KEY_ACTION_PRODUCT_BRAND
=
'key_action_product_brand'
;
// 品类商品列表
const
KEY_ACTION_PRODUCT_BRAND_DOMAINS
=
'key_action_product_brand_domains'
;
// 所有品牌域名列表
...
...
library/LibModels/Wap/Product/NewsaleData.php
View file @
f3832b9
...
...
@@ -99,6 +99,7 @@ class NewsaleData
$param
[
'method'
]
=
'app.search.newProduct'
;
}
else
{
$param
[
'method'
]
=
'app.search.sales'
;
$param
[
'p_d'
]
=
'0.1,0.9'
;
}
$param
[
'page'
]
=
$page
;
$param
[
'limit'
]
=
$limit
;
...
...
library/Plugin/DataProcess/FloorProcess.php
View file @
f3832b9
...
...
@@ -269,7 +269,9 @@ class FloorProcess
foreach
(
$data
as
$key
=>
&
$value
)
{
if
(
$key
==
'title'
)
{
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
array
(
'id'
=>
4
,
'gender'
=>
self
::
$channel
[
$type
]),
'guang'
);
$urlParam
=
array
(
'id'
=>
4
);
isset
(
self
::
$channel
[
$type
])
&&
$urlParam
[
'gender'
]
=
self
::
$channel
[
$type
];
$value
[
'more_url'
]
=
Helpers
::
url
(
''
,
$urlParam
,
'guang'
);
}
if
(
$key
==
'list'
)
{
foreach
(
$value
as
&
$one
)
{
...
...
static/js/home/maybe-like.js
View file @
f3832b9
...
...
@@ -138,7 +138,7 @@ $('.maybe-like p').on('touchstart', function(e) {
});
function
scrollHandler
()
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
5
0
)
{
if
(
$
(
window
).
scrollTop
()
+
winH
>=
$
(
document
).
height
()
-
20
0
)
{
search
();
}
}
...
...
static/js/passport/login/international.js
View file @
f3832b9
...
...
@@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/passport/login/login.js
View file @
f3832b9
...
...
@@ -86,12 +86,21 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/passport/register/password.js
View file @
f3832b9
...
...
@@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() {
token
:
$
(
'#token'
).
val
()
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'注册成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/product/detail/detail.js
View file @
f3832b9
...
...
@@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
$
(
'.goodsDiscount
.dropdown
'
).
on
(
'touchend'
,
function
(
e
)
{
$
(
'.goodsDiscount'
).
on
(
'touchend'
,
function
(
e
)
{
if
(
$discountFolder
.
is
(
':hidden'
))
{
$discountArrow
.
removeClass
(
'icon-down'
).
addClass
(
'icon-up'
).
html
(
''
);
$discountFolder
.
slideDown
();
...
...
static/js/product/list.js
View file @
f3832b9
...
...
@@ -425,6 +425,13 @@ if ($brandHeader.length > 0) {
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$this
.
toggleClass
(
'coled'
);
//提示
if
(
opt
===
'ok'
)
{
tip
.
show
(
'添加收藏成功'
);
}
else
{
tip
.
show
(
'取消收藏成功'
);
}
}
else
if
(
data
.
code
===
400
)
{
location
.
href
=
data
.
data
;
//未登录跳转登录页
}
else
{
...
...
static/sass/me/_order.scss
View file @
f3832b9
...
...
@@ -204,6 +204,7 @@
position
:
absolute
;
top
:
20rem
/
$pxConvertRem
;
right
:
30rem
/
$pxConvertRem
;
text-align
:
right
;
}
.price
{
...
...
@@ -216,4 +217,8 @@
text-align
:
right
;
line-height
:
45rem
/
$pxConvertRem
;
}
.appear-date
{
color
:
#f00
;
}
}
\ No newline at end of file
...
...
static/sass/product/_detail.scss
View file @
f3832b9
...
...
@@ -31,6 +31,8 @@ $basicBtnC:#eb0313;
margin-bottom
:
pxToRem
(
20px
);
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
36px
);
display
:
flex
;
flex-wrap
:
wrap
;
&
.table
{
width
:
100%
;
.column
{
...
...
@@ -42,6 +44,8 @@ $basicBtnC:#eb0313;
font-size
:
pxToRem
(
24px
);
background-color
:
$tableCellC
;
float
:
left
;
display
:
flex
;
align-items
:
center
;
}
}
}
...
...
@@ -135,10 +139,13 @@ $basicBtnC:#eb0313;
// overflow: hidden;
}
.banner-top-single
{
width
:
pxToRem
(
448px
);
margin
:pxToRem
(
30px
)
pxToRem
(
72px
)
;
margin
:
0
auto
;
overflow
:
hidden
;
img
{
width
:
pxToRem
(
448px
);
margin-top
:pxToRem
(
30px
)
;
margin-bottom
:pxToRem
(
30px
)
;
}
}
.banner-top
{
// width: 100%;
...
...
template/m.yohobuy.com/actions/category/brand/index.phtml
View file @
f3832b9
...
...
@@ -9,25 +9,17 @@
</div>
</div>
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{#
topData
}
}
{
{!
头部banner
}
}
{
{#
bannerTop
}
}
{
{>
home/banner_top
}
}
{
{/
bannerTop
}
}
{
{#
hotBrand
}
}
<div
class=
"hot-brand"
>
<ul
class=
"hot-brand-list clearfix"
>
{
{#
list
}
}
<li>
<a
href=
"{{url}}"
>
<div
class=
"img-box"
>
<img
class=
"lazy"
data-original=
"{{img}}"
alt=
""
>
</div>
</a>
</li>
{
{/
list
}
}
</ul>
</div>
{
{/
hotBrand
}
}
{
{!
热门品牌可滑动
}
}
{
{#
hotBrandsScroll
}
}
{
{>
home/hot_brands_swipe
}
}
{
{/
hotBrandsScroll
}
}
{
{/
topData
}
}
{
{#
brandList
}
}
<div
class=
"brand-list bar-{{@index}}"
>
...
...
template/m.yohobuy.com/partials/me/order/good.phtml
View file @
f3832b9
<div class="order-good" data-id=
{{id}}
>
<div class="order-good" data-id=
"{{id}}"
>
<div class="thumb-wrap">
<img class="thumb lazy" data-original=
{{thumb}}
>
<img class="thumb lazy" data-original=
"{{thumb}}"
>
<p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p>
</div>
<div class="deps">
...
...
@@ -25,6 +25,9 @@
<span class="count">
×{{count}}
</span>
{{#if appearDate}}
<span class="appear-date">上市期:{{appearDate}}</span>
{{/if}}
</p>
</div>
</div>
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/product/feedback-tab.phtml
View file @
f3832b9
...
...
@@ -50,7 +50,7 @@
{{/ consults}}
</div>
<div class="consult-content-footer">
<a href="
/product/detail/consults
">
<a href="
{{link}}
">
查看更多
<span class="iconfont"></span></a>
</div>
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
f3832b9
...
...
@@ -462,12 +462,18 @@ class HomeController extends AbstractAction
*/
public
function
onlineServiceDetailAction
()
{
$service
=
array
();
$service
=
array
();
$cateId
=
$this
->
get
(
'cateId'
,
0
);
$cateName
=
$this
->
get
(
'cateName'
,
''
);
if
(
$cateId
>
0
)
{
$service
=
Home\OnlineModel
::
getOnlineServiceDetail
(
$cateId
);
}
$service
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'service'
=>
$service
);
$this
->
setTitle
(
'在线客服'
);
$this
->
setNavHeader
(
$cateName
,
true
,
''
);
$this
->
_view
->
display
(
'online-service-detail'
,
$service
);
...
...
yohobuy/m.yohobuy.com/application/models/Category/Brand.php
View file @
f3832b9
...
...
@@ -3,6 +3,7 @@
namespace
Category
;
use
LibModels\Wap\Category\BrandData
;
use
Plugin\DataProcess\FloorProcess
;
use
Plugin\Helpers
;
/**
...
...
@@ -60,55 +61,8 @@ class BrandModel
// 搜索链接地址
$result
[
'searchUrl'
]
=
Helpers
::
url
(
'/brands/search'
,
null
);
/* 顶部的轮翻广告或热门品牌列表(当没有轮翻广告的情况下会是这个样子的! 此处是根据接口改造成的逻辑) */
if
(
!
empty
(
$brand
[
'brandTop'
][
0
][
'data'
][
'list'
]))
{
$build
=
array
();
foreach
(
$brand
[
'brandTop'
][
0
][
'data'
][
'list'
]
as
$value
)
{
if
(
isset
(
$value
[
'url'
]))
{
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$value
[
'url'
]);
}
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
144
,
144
);
$build
[
'name'
]
=
$value
[
'name'
];
$result
[
'hotBrand'
][
'list'
][]
=
$build
;
}
}
// 顶部的轮翻广告列表
elseif
(
!
empty
(
$brand
[
'brandTop'
][
0
][
'data'
]))
{
$build
=
array
();
foreach
(
$brand
[
'brandTop'
][
0
][
'data'
]
as
$value
)
{
if
(
isset
(
$value
[
'url'
]))
{
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$value
[
'url'
]);
}
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
640
,
310
);
$build
[
'title'
]
=
$value
[
'title'
];
$result
[
'bannerTop'
][
'list'
][]
=
$build
;
}
}
// 顶部的轮翻广告列表
elseif
(
!
empty
(
$brand
[
'brandTop'
][
'list'
][
0
][
'data'
]))
{
$build
=
array
();
foreach
(
$brand
[
'brandTop'
][
'list'
][
0
][
'data'
]
as
$value
)
{
if
(
isset
(
$value
[
'url'
]))
{
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$value
[
'url'
]);
}
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
640
,
310
);
$build
[
'title'
]
=
$value
[
'title'
];
$result
[
'bannerTop'
][
'list'
][]
=
$build
;
}
}
/* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */
if
(
!
empty
(
$brand
[
'brandTop'
][
1
][
'data'
][
'list'
]))
{
$build
=
array
();
foreach
(
$brand
[
'brandTop'
][
1
][
'data'
][
'list'
]
as
$value
)
{
if
(
isset
(
$value
[
'url'
]))
{
$build
[
'url'
]
=
Helpers
::
getFilterUrl
(
$value
[
'url'
]);
}
$build
[
'img'
]
=
Helpers
::
getImageUrl
(
$value
[
'src'
],
144
,
144
);
$build
[
'name'
]
=
$value
[
'name'
];
$result
[
'hotBrand'
][
'list'
][]
=
$build
;
}
}
// 资源位处理
$result
[
'topData'
]
=
FloorProcess
::
getContent
(
array
(
'list'
=>
$brand
[
'brandTop'
]),
$channel
);
/* 按字母'A-Z'分组的品牌列表 */
if
(
!
empty
(
$brand
[
'brandList'
][
'brands'
]))
{
...
...
yohobuy/m.yohobuy.com/application/models/Home/Online.php
View file @
f3832b9
...
...
@@ -70,21 +70,17 @@ class OnlineModel
return
$result
;
}
$res
=
OnlineData
::
getOnlineServiceDetail
(
$cateId
,
$clinetType
);
$questionInfo
=
$res
[
'data'
];
if
(
$questionInfo
)
{
if
(
isset
(
$res
[
'code'
])
&&
$res
[
'code'
]
===
200
)
{
$questionInfo
=
$res
[
'data'
];
$list
=
array
();
if
(
$questionInfo
)
{
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
foreach
(
$questionInfo
as
$qk
=>
$qv
)
{
$list
[
$qk
][
'q'
]
=
$qv
[
'title'
];
$list
[
$qk
][
'a'
]
=
$qv
[
'content'
];
}
//处理返回信息
$result
=
array
(
'header'
=>
array
(
'title'
=>
'在线客服'
),
'list'
=>
$list
);
!
empty
(
$list
)
&&
$result
[
'list'
]
=
$list
;
}
return
$result
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
f3832b9
...
...
@@ -27,7 +27,7 @@ class HomeModel
/* 女生楼层资源的位置码 */
const
CODE_FLOOR_GIRLS
=
'189b6686065dbd6755dd6906cf03c002'
;
/* 潮童楼层资源的位置码 */
const
CODE_FLOOR_KIDS
=
'
b8c1bff53d4ea60f978926d538620636'
;
// '66cad79d93e055ad6fc5c8744086066d';
const
CODE_FLOOR_KIDS
=
'
66cad79d93e055ad6fc5c8744086066d'
;
// '66cad79d93e055ad6fc5c8744086066d';
/* 创意生活楼层资源的位置码 */
const
CODE_FLOOR_LIFESTYLE
=
'61cd852c6afcf60660196154f66a3a62'
;
...
...
@@ -98,8 +98,8 @@ class HomeModel
// 调用接口获取数据
$banner
=
IndexData
::
getBannerStart
(
self
::
CODE_BG
);
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
$banner
[
'data'
][
'total'
]
>
0
)
{
$result
=
Helpers
::
getImageUrl
(
$banner
[
'data'
][
'list'
][
0
][
'data'
][
'list'
][
0
][
'src'
],
640
,
800
,
2
);
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
!
empty
(
$banner
[
'data'
]))
{
$result
=
Helpers
::
getImageUrl
(
$banner
[
'data'
][
0
][
'data'
][
'list'
][
0
][
'src'
],
640
,
800
,
2
);
}
if
(
USE_CACHE
)
{
...
...
@@ -142,10 +142,10 @@ class HomeModel
// 调用接口获取数据
$banner
=
IndexData
::
getBannerStart
(
$resource
);
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
$banner
[
'data'
][
'total'
]
>
0
)
{
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
!
empty
(
$banner
[
'data'
])
)
{
$result
=
array
();
// 处理数据
foreach
(
$banner
[
'data'
]
[
'list'
]
as
$val
)
{
foreach
(
$banner
[
'data'
]
as
$val
)
{
foreach
(
$val
[
'data'
]
as
$single
)
{
$result
[
'url'
]
=
(
$channel
===
2
)
?
Helpers
::
url
(
'/boys'
)
:
Helpers
::
url
(
'/girls'
);
$result
[
'img'
]
=
Helpers
::
getImageUrl
(
$single
[
'src'
],
640
,
200
);
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
f3832b9
...
...
@@ -178,7 +178,7 @@ class UserModel
foreach
(
$favProduct
[
'data'
][
'product_list'
]
as
$val
)
{
$product
=
array
();
$product
[
'fav_id'
]
=
$val
[
'product_id'
];
$product
[
'link'
]
=
isset
(
$val
[
'goodsId'
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_
skn
'
]
.
'_'
.
$val
[
'goodsId'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'link'
]
=
isset
(
$val
[
'goodsId'
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_
id
'
]
.
'_'
.
$val
[
'goodsId'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'imgUrl'
]
=
Helpers
::
getImageUrl
(
$val
[
'image'
],
447
,
596
);
;
$product
[
'title'
]
=
$val
[
'product_name'
];
...
...
@@ -231,13 +231,13 @@ class UserModel
$brand
[
'brandName'
]
=
$val
[
'brand_name'
];
$brand
[
'update'
]
=
$val
[
'new_product_num'
];
$brand
[
'discount'
]
=
$val
[
'product_discount_num'
];
$brand
[
'link'
]
=
Helpers
::
url
(
''
,
array
(
'query'
=>
$val
[
'brand_name'
]),
'search'
);
$brand
[
'link'
]
=
Helpers
::
url
(
''
,
array
(
),
$val
[
'brand_domain'
]
);
// 处理品牌产品
$product
=
array
();
foreach
(
$val
[
'new_product'
]
as
$one
)
{
$product
=
array
();
$product
[
'link'
]
=
isset
(
$val
[
'goodsId'
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_
skn
'
]
.
'_'
.
$val
[
'goodsId'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'link'
]
=
isset
(
$val
[
'goodsId'
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_
id
'
]
.
'_'
.
$val
[
'goodsId'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'imgUrl'
]
=
(
isset
(
$one
[
'default_images'
])
&&
!
empty
(
$one
[
'default_images'
]))
?
Images
::
getImageUrl
(
$one
[
'default_images'
],
235
,
314
)
:
''
;
$product
[
'price'
]
=
!
empty
(
$one
[
'market_price'
])
?
'¥'
.
$one
[
'market_price'
]
:
0
;
$product
[
'discount'
]
=
!
empty
(
$one
[
'sales_price'
])
?
'¥'
.
$one
[
'sales_price'
]
:
0
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
f3832b9
...
...
@@ -380,7 +380,6 @@ class DetailModel
'desc'
=>
strtr
(
$productIntro
,
array
(
'\r\n\t'
=>
''
,
'</p>'
=>
''
,
'<br />'
=>
"
\r\n
"
,
'<img src='
=>
"<img class=
\"
lazy
\"
src=
\"
data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==
\"
data-original="
,
)),
);
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
f3832b9
...
...
@@ -46,16 +46,16 @@ class NewsaleModel
/* 根据频道调用接口 */
switch
(
intval
(
$channel
))
{
case
1
:
// 男生
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
,
self
::
CODE_TOP_NEW_BOYS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
_BOYS
,
self
::
CODE_TOP_NEW_BOYS
);
break
;
case
2
:
// 女生
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
,
self
::
CODE_TOP_NEW_GIRLS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
_GIRLS
,
self
::
CODE_TOP_NEW_GIRLS
);
break
;
case
3
:
// 潮童
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
,
self
::
CODE_TOP_NEW_KIDS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
_KIDS
,
self
::
CODE_TOP_NEW_KIDS
);
break
;
case
4
:
// 创意生活
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
,
self
::
CODE_TOP_NEW_LIFESTYLE
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_INDEX
_LIFESTYLE
,
self
::
CODE_TOP_NEW_LIFESTYLE
);
break
;
}
...
...
@@ -74,16 +74,16 @@ class NewsaleModel
/* 根据频道调用接口 */
switch
(
intval
(
$channel
))
{
case
1
:
// 男生
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
,
self
::
CODE_TOP_SALE_BOYS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
_BOYS
,
self
::
CODE_TOP_SALE_BOYS
);
break
;
case
2
:
// 女生
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
,
self
::
CODE_TOP_SALE_GIRLS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
_GIRLS
,
self
::
CODE_TOP_SALE_GIRLS
);
break
;
case
3
:
// 潮童
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
,
self
::
CODE_TOP_SALE_KIDS
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
_KIDS
,
self
::
CODE_TOP_SALE_KIDS
);
break
;
case
4
:
// 创意生活
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
,
self
::
CODE_TOP_SALE_LIFESTYLE
);
$result
=
self
::
cacheControl
(
CacheConfig
::
KEY_ACTION_PRODUCT_NEWSALE_DISCOUNT
_LIFESTYLE
,
self
::
CODE_TOP_SALE_LIFESTYLE
);
break
;
}
...
...
@@ -183,11 +183,11 @@ class NewsaleModel
$newsale
=
NewsaleData
::
getNewsaleFocus
(
$codeKey
);
// 调用接口获取数据并封装
if
(
isset
(
$newsale
[
'code'
])
&&
!
empty
(
$newsale
[
'data'
][
'list'
]))
{
if
(
count
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
])
===
1
)
{
$result
=
Helpers
::
formatBanner
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
][
0
],
640
,
240
);
if
(
isset
(
$newsale
[
'code'
])
&&
!
empty
(
$newsale
[
'data'
]))
{
if
(
count
(
$newsale
[
'data'
][
0
][
'data'
])
===
1
)
{
$result
=
Helpers
::
formatBanner
(
$newsale
[
'data'
][
0
][
'data'
][
0
],
640
,
240
);
}
else
{
foreach
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
]
as
$one
)
{
foreach
(
$newsale
[
'data'
][
0
][
'data'
]
as
$one
)
{
$result
[
'list'
][]
=
Helpers
::
formatBanner
(
$one
,
640
,
240
);
}
}
...
...
Please
register
or
login
to post a comment