Your Name 3 years ago
parent
commit
5caab21751
1 changed files with 3 additions and 0 deletions
  1. 3 0
      learn/active/src/Home.php

+ 3 - 0
learn/active/src/Home.php

@@ -89,6 +89,9 @@ Class Home extends Core
 				if ($count['total']  && $count['total'] > 0){
 					
 					$no_num = $count['total'] - $code;
+					if ($no_num < 0) {
+						$no_num = 0;					
+					}
 					$this->data['user']['content'] = '已购核销码'.$count['total'].'张,未使用'.$no_num.'张';
 				}
 			}