dever 6 years ago
parent
commit
8ec63ddf34
1 changed files with 3 additions and 1 deletions
  1. 3 1
      service/src/Buy.php

+ 3 - 1
service/src/Buy.php

@@ -99,7 +99,9 @@ class Buy extends Base
 
         if ($data) {
             foreach ($data as $k => $v) {
-                if ($info['cash'] > 0) {
+                if ($v['price'] > 0) {
+                    $data[$k]['price'] = '¥' . number_format($v['price'], 2);
+                } elseif ($info['cash'] > 0) {
                     $data[$k]['price'] = '¥' . number_format($info['cash'] * $v['num'], 2);
                 } else {
                     $data[$k]['price'] = '免费';