|
@@ -144,10 +144,13 @@ class Api extends Core
|
|
|
Dever::alert('礼品卡卡号错误或礼品卡已兑换');
|
|
|
}
|
|
|
} else {
|
|
|
- $data = Dever::db('card/code')->find(array('card' => $card, 'status' => 1));
|
|
|
+ $data = Dever::db('card/code')->find(array('card' => $card));
|
|
|
if (!$data) {
|
|
|
Dever::alert('礼品卡卡号错误或礼品卡已兑换');
|
|
|
}
|
|
|
+ if ($data['status'] > 2) {
|
|
|
+ Dever::alert('礼品卡卡号错误或礼品卡已兑换');
|
|
|
+ }
|
|
|
$update['where_id'] = $data['id'];
|
|
|
$update['dh_uid'] = $this->uid;
|
|
|
$update['status'] = 3;
|