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
郝肖肖
9 years ago
Commit
886544759413292fd27d587c8722661638e23477
1 parent
91e74371
h5 购物车 刷新页面 默认选中对应项
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
8865447
...
...
@@ -370,7 +370,7 @@ class CartModel
// cookie保存的数据
if
(
!
empty
(
$orderInfo
))
{
$orderCompute
=
self
::
orderCompute
(
$uid
,
$cartType
,
$orderInfo
[
'deliveryId'
],
$orderInfo
[
'paymentType
Id
'
],
$orderInfo
[
'couponCode'
],
$orderInfo
[
'yohoCoin'
],
$skuList
);
$orderCompute
=
self
::
orderCompute
(
$uid
,
$cartType
,
$orderInfo
[
'deliveryId'
],
$orderInfo
[
'paymentType'
],
$orderInfo
[
'couponCode'
],
$orderInfo
[
'yohoCoin'
],
$skuList
);
}
// 根据地址id查询地址信息
...
...
@@ -394,10 +394,9 @@ class CartModel
// 配送方式
if
(
isset
(
$payReturn
[
'delivery_way'
]))
{
$idArr
=
array
();
$defaultKey
=
0
;
$oneDeliv
=
array
();
$isDeliveryId
=
true
;
$deliveries
=
$payReturn
[
'delivery_way'
];
if
(
isset
(
$orderCompute
[
'delivery_way'
])
&&
!
empty
(
$orderCompute
[
'delivery_way'
]))
{
$deliveries
=
$orderCompute
[
'delivery_way'
];
...
...
@@ -414,15 +413,15 @@ class CartModel
$oneDeliv
[
'cost'
]
=
$val
[
'delivery_way_cost'
];
(
$val
[
'default'
]
===
'Y'
)
&&
$defaultKey
=
$key
;
$idArr
[
$key
]
=
$oneDeliv
[
'id'
];
if
(
isset
(
$orderInfo
[
'deliveryId'
])
&&
$orderInfo
[
'deliveryId'
]
===
$oneDeliv
[
'id'
])
{
$oneDeliv
[
'isSelected'
]
=
true
;
$isDeliveryId
=
false
;
}
$result
[
'dispatchMode'
][
$key
]
=
$oneDeliv
;
}
if
(
isset
(
$orderInfo
[
'deliveryId'
])
&&
isset
(
$idArr
[
$orderInfo
[
'deliveryId'
]]))
{
$flag
=
array_search
(
$orderInfo
[
'deliveryId'
],
$idArr
);
$flag
!==
false
&&
$result
[
'dispatchMode'
][
$flag
][
'isSelected'
]
=
true
;
}
else
{
if
(
$isDeliveryId
)
{
$result
[
'dispatchMode'
][
$defaultKey
][
'isSelected'
]
=
true
;
}
}
...
...
@@ -499,7 +498,7 @@ class CartModel
$onePay
[
'name'
]
=
$pay
[
'payment_type_name'
];
$onePay
[
'isSupport'
]
=
$pay
[
'is_support'
]
===
'Y'
;
// $onePay['default'] = ($pay['default'] === 'Y');
if
(
$onePay
[
'paymentType'
]
==
1
)
{
if
(
isset
(
$orderInfo
[
'paymentType'
])
&&
$onePay
[
'paymentType'
]
===
$orderInfo
[
'paymentType'
]
)
{
$onePay
[
'recommend'
]
=
true
;
}
...
...
Please
register
or
login
to post a comment