@@ -127,4 +127,7 @@ class mfcode
public function can_use() {
return ($this->commonid() > 0 && $this->expired() == false && $this->used() == false && $this->locked() == false);
}
+ public function un_used() {
+ return ($this->commonid() > 0 && $this->expired() == false && $this->used() == false);
+ }
@@ -69,7 +69,7 @@ class common_sumary extends common_base
if(isset($lock_num) && $lock_num > 0) {
$ret['fcode_desc'] = "F码处于锁定状态,激活后可以购买";
} else {
- $ret['fcode_desc'] = "你有该商品的F码";
+ $ret['fcode_desc'] = "你没有该商品的F码";
@@ -72,7 +72,7 @@ class fcode
foreach ($codes as $item)
{
$fcoder = new mfcode($item);
- if($fcoder->can_use()) {
+ if($fcoder->un_used()) {
$this->mCodes[$fcoder->commonid()][] = $item;