|
@@ -5,6 +5,33 @@ use Active\Lib\Core;
|
|
|
|
|
|
Class User extends Core
|
|
Class User extends Core
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ #再次发起支付
|
|
|
|
+ public function rpay(){
|
|
|
|
+ $id = Dever::input('id');#订单的id
|
|
|
|
+ $order = Dever::db('active/order')->find($id);
|
|
|
|
+
|
|
|
|
+ if (!$order) {
|
|
|
|
+ Dever::alert('订单信息错误');
|
|
|
|
+ }
|
|
|
|
+ if ($order['status'] > 1) {
|
|
|
|
+ Dever::alert('订单已支付或已取消');
|
|
|
|
+ }
|
|
|
|
+ $time = time();
|
|
|
|
+ if ($time-$order['cdate']>300){
|
|
|
|
+ Dever::alert('订单已关闭');
|
|
|
|
+ }
|
|
|
|
+ $info = Dever::db('active/order')->getNum(array('id'=>$this->uid,'active_id'=>$order['active_id']));
|
|
|
|
+ $active = Dever::db('active/info')->find($order['active_id']);
|
|
|
|
+ if ($info['total'] >= $active['num']) {
|
|
|
|
+ Dever::alert('您已超过限购数量');
|
|
|
|
+ }
|
|
|
|
+ $jump = Dever::input('jump');
|
|
|
|
+ if ($jump == 1) {
|
|
|
|
+ Dever::location($order['url']);
|
|
|
|
+ }
|
|
|
|
+ return $order;
|
|
|
|
+ }
|
|
#领取
|
|
#领取
|
|
public function recive()
|
|
public function recive()
|
|
{
|
|
{
|