|
@@ -205,7 +205,7 @@ Class Home extends Core
|
|
|
$user = Dever::db('active/user')->find($uid);
|
|
|
|
|
|
$info = Dever::db('active/info')->find($active_id);
|
|
|
- if ($info['status'] == 5 || time() >= $info['act_end']) {
|
|
|
+ if ($info['act_status'] == 5 || time() >= $info['act_end']) {
|
|
|
Dever::alert('活动已结束');
|
|
|
}
|
|
|
if ($info['status'] == 2) {
|
|
@@ -214,10 +214,10 @@ Class Home extends Core
|
|
|
Dever::alert('仅限代理商领取');
|
|
|
}
|
|
|
}
|
|
|
- $code = Dever::db('active/code')->find(array('order_id'=>$order_id,'active_id'=>$active_id,'join_uid'=>$uid));
|
|
|
- if ($code) {
|
|
|
- Dever::alert('您已领取过了,不可重复领取');
|
|
|
- }
|
|
|
+ // $code = Dever::db('active/code')->find(array('order_id'=>$order_id,'active_id'=>$active_id,'join_uid'=>$uid));
|
|
|
+ // if ($code) {
|
|
|
+ // Dever::alert('您已领取过了,不可重复领取');
|
|
|
+ // }
|
|
|
$code = Dever::db('active/code')->state(array('order_id'=>$order_id));
|
|
|
$data['info'] = Dever::db('active/order')->find($order_id);
|
|
|
if ($data['info']['status'] < 2) {
|
|
@@ -228,14 +228,14 @@ Class Home extends Core
|
|
|
} else {
|
|
|
$where['active_id'] = $active_id;
|
|
|
$where['join_uid'] = $uid;
|
|
|
- $where['act_status'] = $info['act_status'];
|
|
|
+
|
|
|
$code = Dever::db('active/code')->find($where);
|
|
|
if ($code) {
|
|
|
Dever::alert('您已领取过了,不可重复领取');
|
|
|
}
|
|
|
$where['buy_uid'] = $data['info']['uid'];
|
|
|
$where['order_id'] = $order_id;
|
|
|
-
|
|
|
+ $where['act_status'] = $info['act_status'];
|
|
|
$where['write_code'] = $this->getCode();
|
|
|
|
|
|
// $code = Dever::db('active/code')->find(array('write_code'=>$where['write_code']));
|
|
@@ -274,7 +274,7 @@ Class Home extends Core
|
|
|
// if (time() < $active['act_start']){
|
|
|
// Dever::alert('活动未开始');
|
|
|
// }
|
|
|
- if ($active['status'] == 5 || time() >= $active['act_end']) {
|
|
|
+ if ($active['act_status'] == 5 || time() >= $active['act_end']) {
|
|
|
Dever::alert('活动已结束');
|
|
|
}
|
|
|
if ($data['status'] == 2) {
|