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
ad318d2ae745a752abf8090c8e8f62dd15f0762f
1 parent
e897c90f
添加对浏览记录和收藏的商品中下架商品的处理
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
ad318d2
...
...
@@ -218,6 +218,7 @@ class UserModel
$product
[
'discountPrice'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
'¥'
.
Helpers
::
transPrice
(
$val
[
'sales_price'
])
:
false
;
$product
[
'savePrice'
]
=
(
$val
[
'price_down'
]
>
0
)
?
'¥'
.
Helpers
::
transPrice
(
$val
[
'price_down'
])
:
false
;
$product
[
'sellOut'
]
=
(
$val
[
'storage'
]
<=
0
);
$product
[
'invalidGoods'
]
=
(
$val
[
'status'
]
==
0
);
// 下架商品
$datas
[]
=
$product
;
}
...
...
@@ -358,9 +359,9 @@ class UserModel
$record
=
array
();
foreach
(
$data
as
&
$val
)
{
// 排除下架的商品
if
(
$val
[
'status'
]
==
0
)
{
/*
if ($val['status'] == 0) {
continue;
}
}
*/
$record
=
array
();
$record
[
'product_name'
]
=
$val
[
'product_name'
];
...
...
@@ -369,6 +370,7 @@ class UserModel
$record
[
'image'
]
=
!
empty
(
$val
[
'image'
])
?
Helpers
::
getImageUrl
(
$val
[
'image'
],
447
,
596
)
:
''
;
$record
[
'sales_price'
]
=
Helpers
::
transPrice
(
$val
[
'sales_price'
]);
$record
[
'market_price'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
Helpers
::
transPrice
(
$val
[
'market_price'
])
:
false
;
$record
[
'invalidGoods'
]
=
(
$val
[
'status'
]
==
0
);
// 下架商品
$record
[
'storage'
]
=
$val
[
'storage'
];
$allRecords
[]
=
$record
;
}
...
...
Please
register
or
login
to post a comment