afa 7 months ago
parent
commit
c44d2406d6

+ 4 - 4
application/admin/controller/user/Userpledge.php

@@ -71,11 +71,11 @@ class Userpledge extends Backend
         if ($this->request->isAjax()) {
             $this->success("Ajax请求成功", null, ['id' => $ids]);
         }
-        $product = new ProductLists();
+        //$product = new ProductLists();
         $details = json_decode($row->details, true);
-        foreach ($details as &$detail) {
-            $detail['name'] = $product::where('id', $detail['id'])->value('zh_name');
-        }
+        // foreach ($details as &$detail) {
+        //     $detail['name'] = $product::where('id', $detail['id'])->value('zh_name');
+        // }
         $this->view->assign("row", $details);
         return $this->view->fetch();
     }

+ 1 - 1
application/admin/view/user/userpledge/detail.html

@@ -10,7 +10,7 @@
         {volist name="row" id="vo"  }
         <tr>
             <td>{$vo.order_no}</td>
-            <td >{$vo.name|htmlentities}</td>
+            <td >{$vo.zh_name|htmlentities}</td>
             <td ><img src="{$vo.thum|htmlentities}" width="100px" height="80px"></td>
         </tr>
         {/volist}

+ 3 - 1
application/common/logic/PledgeLogic.php

@@ -43,7 +43,7 @@ class PledgeLogic
             ->join('product_list b', 'a.product_id = b.id', 'left')
             ->where('a.user_id', $user_id)
             ->where('a.status', $model::Paid)
-            ->whereIn('a.order_no', $order_no)->field('b.id,b.thum,a.order_no')->select();
+            ->whereIn('a.order_no', $order_no)->field('b.id,b.zh_name,b.thum,a.order_no')->select();
 
         if(empty($product) || count($product) != count($order_no))  throw new Exception('订单不存在');
         $pledge_num = 1;
@@ -139,6 +139,8 @@ class PledgeLogic
         return Loader::model('LedgerWalletModel')->changeWalletAccount($user_id, Asset::TEAC, $total, LedgerTeacChangeModel::Pledge, 0);  
     }
 
+
+
     //判断请求限制
     public static function getCheckRequestApi(string $key, int $user_id, int $time = 300)
     {