dever 6 years ago
parent
commit
73db69f21e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      buy/src/Buy.php

+ 2 - 1
buy/src/Buy.php

@@ -29,7 +29,7 @@ class Buy extends Base
 
 
         if ($data) {
         if ($data) {
             foreach ($data as $k => $v) {
             foreach ($data as $k => $v) {
-                if ($v['cash'] > 0) {
+                if ($v['buy'] == 1 && $v['cash'] > 0) {
                     $data[$k]['price'] = '¥' . number_format($v['cash'], 2);
                     $data[$k]['price'] = '¥' . number_format($v['cash'], 2);
                 } else {
                 } else {
                     $data[$k]['price'] = '免费';
                     $data[$k]['price'] = '免费';
@@ -60,6 +60,7 @@ class Buy extends Base
     {
     {
         $where['cate_id'] = $this->cate;
         $where['cate_id'] = $this->cate;
         $where['uid'] = $this->user['id'];
         $where['uid'] = $this->user['id'];
+        $where['status'] = 2;
         $where['type'] = 3;
         $where['type'] = 3;
         $data = Dever::db('act/order')->getMyAll($where);
         $data = Dever::db('act/order')->getMyAll($where);