|
@@ -52,12 +52,15 @@ class Active
|
|
|
}
|
|
|
if ($title && $member) {
|
|
|
foreach ($title as $k => $v) {
|
|
|
- if($v['id'] == $member['title_id']) {
|
|
|
- if ($v['num'] > 0 && $num > $v['num']) {
|
|
|
- Dever::alert('您已超过限购数量');
|
|
|
- }
|
|
|
- if ($order && $order['total'] && $v['num'] > 0 && $order['total'] > $v['num']) {
|
|
|
- Dever::alert('您已超过限购数量');
|
|
|
+ if ($member['title_id']) {
|
|
|
+ $title_id = explode(',',$member['title_id']);
|
|
|
+ if($title_id && in_array($v['id'],$title_id)) {
|
|
|
+ if ($v['num'] > 0 && $num > $v['num']) {
|
|
|
+ Dever::alert('您已超过限购数量');
|
|
|
+ }
|
|
|
+ if ($order && $order['total'] && $v['num'] > 0 && $order['total'] > $v['num']) {
|
|
|
+ Dever::alert('您已超过限购数量');
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|