dever %!s(int64=6) %!d(string=hai) anos
pai
achega
11540ff977
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      code/database/info.php
  2. 2 2
      service/src/Buy.php

+ 1 - 1
code/database/info.php

@@ -171,7 +171,7 @@ return array
             'desc'      => '付款订单id',
             'desc'      => '付款订单id',
             'match'     => 'is_string',
             'match'     => 'is_string',
             'update'    => 'text',
             'update'    => 'text',
-            //'list'        => true,
+            'list'        => true,
             //'list'        => '"{order_id}" ? "{order_id}" : "{code}"',
             //'list'        => '"{order_id}" ? "{order_id}" : "{code}"',
         ), 
         ), 
 
 

+ 2 - 2
service/src/Buy.php

@@ -151,7 +151,7 @@ class Buy extends Base
         $config = Dever::db('main/config')->one(1);
         $config = Dever::db('main/config')->one(1);
 
 
         $id = Dever::input('id');
         $id = Dever::input('id');
-        $buy_id = Dever::input('buy_id');
+        $buy_id = Dever::input('buy');
         $config['list'] = $this->url('list');
         $config['list'] = $this->url('list');
         $config['buy'] = $this->url('pay', array('id' => $id));
         $config['buy'] = $this->url('pay', array('id' => $id));
 
 
@@ -187,7 +187,7 @@ class Buy extends Base
             $buy = Dever::db('journal/buy_num')->one($buy_id);
             $buy = Dever::db('journal/buy_num')->one($buy_id);
             if ($buy && $buy['code'] > 1) {
             if ($buy && $buy['code'] > 1) {
                 $uid = $this->user['id'];
                 $uid = $this->user['id'];
-                $code = Dever::db('code/info')->state(array('uid' => $uid, 'order_id' => $order_id));
+                $code = Dever::db('code/info')->state(array('create_uid' => $uid, 'order_id' => $order_id));
                 $config['code'] = '<p>兑换码</p>';
                 $config['code'] = '<p>兑换码</p>';
                 foreach ($code as $k => $v) {
                 foreach ($code as $k => $v) {
                     $config['code'] .= '<p>'.$v['code'].'</p>';
                     $config['code'] .= '<p>'.$v['code'].'</p>';