Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
d4e35913
Commit
d4e35913
authored
Sep 18, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车数据
parent
c0d3ea76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Cart.php
application/controllers/Cart.php
+1
-1
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+4
-4
No files found.
application/controllers/Cart.php
View file @
d4e35913
...
@@ -121,7 +121,7 @@ class CartController extends \Our\Controller_AbstractApi{
...
@@ -121,7 +121,7 @@ class CartController extends \Our\Controller_AbstractApi{
$storeCartData
=
$cartService
->
getDeliveryTypeForCart
(
$address
,
$storeCartData
);
$storeCartData
=
$cartService
->
getDeliveryTypeForCart
(
$address
,
$storeCartData
);
$data
=
$cartService
->
getFormatCartListForOrder
(
$storeCartData
,
$address
);
$data
=
$cartService
->
getFormatCartListForOrder
(
$storeCartData
,
$address
);
$this
->
success
(
$data
);
$this
->
success
(
$data
);
}
}
/**
/**
...
...
application/models/Business/Goods/GroupSaleService.php
View file @
d4e35913
...
@@ -188,7 +188,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -188,7 +188,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
}
$tempObj
[
'goodsAttr'
]
=
$goodsDao
->
getFormatGoodsAttr
(
$tempCart
[
'goods_spec'
]);
$tempObj
[
'goodsAttr'
]
=
$goodsDao
->
getFormatGoodsAttr
(
$tempCart
[
'goods_spec'
]);
$tempObj
[
'goodsMid'
]
=
$tempCart
[
'goods_mid'
];
$tempObj
[
'goodsMid'
]
=
$tempCart
[
'goods_mid'
];
$storeCarts
[]
=
$tempObj
;
array_push
(
$storeCarts
,
$tempObj
)
;
}
}
}
}
if
(
isset
(
$storeCarts
)
&&
count
(
$storeCarts
)
>
\Our\ApiConst
::
zero
){
if
(
isset
(
$storeCarts
)
&&
count
(
$storeCarts
)
>
\Our\ApiConst
::
zero
){
...
@@ -196,7 +196,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -196,7 +196,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$newstoreCarts
=
array
();
$newstoreCarts
=
array
();
foreach
(
$storeCarts
as
$row
){
foreach
(
$storeCarts
as
$row
){
if
(
$row
[
'goodsState'
]
==
\Our\ApiConst
::
cartGoodsOnline
){
if
(
$row
[
'goodsState'
]
==
\Our\ApiConst
::
cartGoodsOnline
){
$newstoreCarts
[]
=
$row
;
array_push
(
$newstoreCarts
,
$row
)
;
}
else
{
}
else
{
$offlineCarts
[]
=
$row
;
$offlineCarts
[]
=
$row
;
}
}
...
@@ -207,10 +207,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -207,10 +207,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
}
array_multisort
(
$goodsState
,
SORT_DESC
,
$offlineCarts
);
array_multisort
(
$goodsState
,
SORT_DESC
,
$offlineCarts
);
foreach
(
$offlineCarts
as
$temp
){
foreach
(
$offlineCarts
as
$temp
){
$newstoreCarts
[]
=
$temp
;
array_push
(
$newstoreCarts
,
$temp
)
;
}
}
}
}
$storeCarts
=
$newstoreCarts
;
//
$storeCarts = $newstoreCarts;
$store
=
$storeDao
->
get
(
$storeId
,
false
);
$store
=
$storeDao
->
get
(
$storeId
,
false
);
$temp
[
'storeName'
]
=
$store
[
'store_name'
];
$temp
[
'storeName'
]
=
$store
[
'store_name'
];
$temp
[
'storeId'
]
=
$storeId
;
$temp
[
'storeId'
]
=
$storeId
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment