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
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
44234ea196829a271c77727ed3f4f3376ab15975
1 parent
2f18a3ac
修复热销排行榜返回数据中goods_list的数据键值是从1开始,导致数据处理不正常的bug
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
library/Plugin/DataProcess/NewSaleProcess.php
library/Plugin/DataProcess/NewSaleProcess.php
View file @
44234ea
...
...
@@ -83,6 +83,13 @@ class NewSaleProcess
$count
=
count
(
$products
[
'product_list'
]);
$one
=
array
();
foreach
(
$products
[
'product_list'
]
as
$key
=>
$single
)
{
if
(
!
isset
(
$single
[
'goods_list'
]))
{
continue
;
}
// 重置键值
$single
[
'goods_list'
]
=
array_values
(
$single
[
'goods_list'
]);
$one
=
Helpers
::
formatProduct
(
$single
,
true
,
false
,
false
,
75
,
114
);
$one
[
'rank'
]
=
$limit
*
(
$page
-
1
)
+
$key
+
1
;
!
empty
(
$single
[
'sales_phrase'
])
&&
$one
[
'sales_phrase'
]
=
$single
[
'sales_phrase'
];
...
...
Please
register
or
login
to post a comment