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
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
6f2f3b1c337d4e55b2bf00a159f663444cd3e943
1 parent
2a711a11
do fixes bug to home order bugs
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
4 deletions
library/Plugin/Helpers.php
yohobuy/m.yohobuy.com/application/models/Home/Order.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/.LCKDetail.php~
library/Plugin/Helpers.php
View file @
6f2f3b1
...
...
@@ -515,4 +515,32 @@ class Helpers
return
$arr
;
}
/**
* 获取会员的级别
*
* @param string $vipInfo
* @return int
*/
public
static
function
getVipLevel
(
$vipInfo
)
{
$vipLevel
=
0
;
switch
(
$vipInfo
)
{
case
'普通会员'
:
$vipLevel
=
0
;
break
;
case
'银卡会员'
:
$vipLevel
=
1
;
break
;
case
'金卡会员'
:
$vipLevel
=
2
;
break
;
case
'白金会员'
:
$vipLevel
=
3
;
break
;
}
return
$vipLevel
;
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
6f2f3b1
...
...
@@ -23,7 +23,7 @@ class OrderModel
{
$result
=
array
();
//调用接口获得数据
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
7394907
);
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
// 判断是否还有数据, 没有数据则返回空
if
(
isset
(
$data
[
'data'
][
'page_total'
])
&&
$page
>
$data
[
'data'
][
'page_total'
])
{
return
$result
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
6f2f3b1
...
...
@@ -25,13 +25,13 @@ class DetailModel
* @param int $uid 当前登录用户ID, 未登录为0
* @return array
*/
public
static
function
getBaseInfo
(
$productId
,
$goodsId
,
$uid
)
public
static
function
getBaseInfo
(
$productId
,
$goodsId
,
$uid
,
$vipLevel
)
{
$result
=
array
();
if
(
is_numeric
(
$productId
)
&&
is_numeric
(
$goodsId
))
{
// 调用服务
$baseInfo
=
DetailData
::
baseInfo
(
$productId
,
$uid
);
var_dump
(
$baseInfo
);
$baseInfo
=
DetailData
::
baseInfo
(
$productId
,
$uid
);
// 判断商品是否在架
if
(
empty
(
$baseInfo
[
'status'
]))
{
...
...
@@ -42,6 +42,11 @@ class DetailModel
if
(
isset
(
$baseInfo
[
'productName'
]))
{
$result
[
'goodsName'
]
=
$baseInfo
[
'productName'
];
}
// 商品促销短语
if
(
!
empty
(
$baseInfo
[
'salesPhrase'
]))
{
$result
[
'goodsSubtitle'
]
=
$baseInfo
[
'salesPhrase'
];
}
// 商品标签
if
(
!
empty
(
$baseInfo
[
'productTagBoList'
]))
{
...
...
@@ -83,7 +88,7 @@ class DetailModel
foreach
(
$baseInfo
[
'productPriceBo'
][
'vipPrices'
]
as
$value
)
{
$build
[
'level'
]
=
$value
[
'vipLevel'
];
$build
[
'text'
]
=
$value
[
'vipPrice'
];
$build
[
'currentLevel'
]
=
false
;
$build
[
'currentLevel'
]
=
(
$value
[
'vipLevel'
]
==
$vipLevel
)
?
true
:
false
;
$result
[
'vipLevel'
][
'list'
][]
=
$build
;
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/.LCKDetail.php~
0 → 100644
View file @
6f2f3b1
D:\workspace\yohobuy.git.dev.yoho.cn\yohobuy\m.yohobuy.com\application\modules\Product\controllers\Detail.php
\ No newline at end of file
...
...
Please
register
or
login
to post a comment