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
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
b06ff1dc80c3233ffd222143a07d20ea929dd6bd
2 parents
2f520cd5
d195d6a2
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
12 deletions
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
template/m.yohobuy.com/actions/index/home/coupon_list.phtml
View file @
b06ff1d
...
...
@@ -5,4 +5,12 @@
<p>
{
{
couponValidity
}
}</p>
{
{#
used
}
}<i></i>
{
{/
used
}
}
</div>
{
{/coupons
}
}
\ No newline at end of file
{
{/coupons
}
}
{
{#
noRecord
}
}
<div
class=
"null"
>
<i></i>
<p>您还没有优惠券!</p>
<a
href=
"{{topURL}}"
>随便逛逛</a>
</div>
{
{/
noRecord
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
b06ff1d
...
...
@@ -249,12 +249,12 @@
{{#if onlineServicePage}}
<script>
seajs.use('js/me/online-service');
</script>
onlineServiceDetailPage
</script>
{{/if}}
{{#if onlineServiceDetailPage}}
<script>
seajs.use('js/index/footer');
</script>
onlineServiceDetailPage
</script>
{{/if}}
{{#if addressPage}}
<script>
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
b06ff1d
...
...
@@ -368,17 +368,33 @@ class UserModel
// 调用接口获取优惠券数据
$coupons
=
UserData
::
couponData
(
$uid
,
$status
,
$page
);
// 处理优惠券数据
if
(
isset
(
$coupons
[
'data'
])
&&
!
empty
(
$coupons
[
'data'
][
'total'
]))
{
$result
[
'coupons'
]
=
$coupons
[
'data'
][
'info'
];
// 没有获取到优惠券时
if
(
!
$coupons
)
{
$result
[
'topURL'
]
=
'/product/new'
;
$result
[
'noRecord'
]
=
true
;
return
$result
;
}
foreach
(
$result
[
'coupons'
]
as
&
$val
)
{
// 处理已使用的优惠券
if
(
$status
==
1
)
{
$val
[
'used'
]
=
true
;
// 处理优惠券数据
if
(
isset
(
$coupons
[
'data'
]))
{
// 不能再查到结果了
if
(
$page
==
1
&&
$coupons
[
'data'
][
'total'
]
===
0
)
{
$result
[
'walkwayUrl'
]
=
'/product/new'
;
$result
[
'noRecord'
]
=
true
;
}
else
{
$couponArr
=
array
();
isset
(
$coupons
[
'data'
][
'info'
])
&&
$couponArr
=
$coupons
[
'data'
][
'info'
];
foreach
(
$couponArr
as
&
$val
)
{
// 处理已使用的优惠券
if
(
$status
==
1
)
{
$val
[
'used'
]
=
true
;
}
}
}
!
empty
(
$couponArr
)
&&
$result
[
'coupons'
]
=
$couponArr
;
}
}
return
$result
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
b06ff1d
...
...
@@ -339,7 +339,7 @@ class DetailModel
// 详情配图
if
(
isset
(
$sizeInfo
[
'productIntroBo'
][
'productIntro'
]))
{
$productIntro
=
strstr
(
$sizeInfo
[
'productIntroBo'
][
'productIntro'
],
'<br />'
)
;
$productIntro
=
$sizeInfo
[
'productIntroBo'
][
'productIntro'
]
;
if
(
$productIntro
)
{
$result
[
'productDetail'
]
=
array
(
'title'
=>
'商品详情'
,
...
...
Please
register
or
login
to post a comment