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
Rock Zhang
9 years ago
Commit
22bf77aa38a7cbe6d6114c10793991e06f446e6c
1 parent
896d31f0
修改优惠券页面的错误,目前优惠券还缺少没有获取到优惠券的显示内容
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
template/m.yohobuy.com/actions/index/home/coupon_list.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 @
22bf77a
...
...
@@ -5,4 +5,12 @@
<p>
{
{
couponValidity
}
}</p>
{
{#
used
}
}<i></i>
{
{/
used
}
}
</div>
{
{/coupons
}
}
\ No newline at end of file
{
{/coupons
}
}
{
{#if
noRecord
}
}
<div
class=
"no-record"
>
<div
class=
"icon"
></div>
<span>暂无优惠券</span>
<a
class=
"walk-way"
href=
"{{walkwayUrl}}"
>随便逛逛</a>
</div>
{
{/if
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
22bf77a
...
...
@@ -368,17 +368,30 @@ class UserModel
// 调用接口获取优惠券数据
$coupons
=
UserData
::
couponData
(
$uid
,
$status
,
$page
);
// 没有获取到优惠券时
if
(
!
$coupons
)
{
$result
[
'topURL'
]
=
'/product/new'
;
$result
[
'noRecord'
]
=
true
;
return
$result
;
}
// 处理优惠券数据
if
(
isset
(
$coupons
[
'data'
])
&&
!
empty
(
$coupons
[
'data'
][
'total'
]))
{
$result
[
'coupons'
]
=
$coupons
[
'data'
][
'info'
];
if
(
isset
(
$coupons
[
'data'
]))
{
// 不能再查到结果了
if
(
$page
==
1
&&
$coupons
[
'data'
][
'total'
]
===
0
)
{
$result
[
'walkwayUrl'
]
=
'/product/new'
;
$result
[
'noRecord'
]
=
true
;
}
else
{
$result
[
'coupons'
]
=
$coupons
[
'data'
][
'info'
];
foreach
(
$result
[
'coupons'
]
as
&
$val
)
{
// 处理已使用的优惠券
if
(
$status
==
1
)
{
$val
[
'used'
]
=
true
;
foreach
(
$result
[
'coupons'
]
as
&
$val
)
{
// 处理已使用的优惠券
if
(
$status
==
1
)
{
$val
[
'used'
]
=
true
;
}
}
}
}
return
$result
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
22bf77a
...
...
@@ -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