Your Name 3 gadi atpakaļ
vecāks
revīzija
c5d80152f7
1 mainītis faili ar 8 papildinājumiem un 10 dzēšanām
  1. 8 10
      learn/active/lib/Active.php

+ 8 - 10
learn/active/lib/Active.php

@@ -50,17 +50,15 @@ class Active
 				Dever::alert('本活动只能是代理商报名');
 			}
 		}
-		if ($title && $member) {
+		if ($title && $member && $member['title_id']) {
 			foreach ($title as $k => $v) {
-				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('您已超过限购数量');
-						}
+				$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('您已超过限购数量');
 					}
 				}
 			}