qifengquan 1 year ago
parent
commit
a5732da46e
2 changed files with 13 additions and 2 deletions
  1. 5 2
      app/data/controller/shop/Goods.php
  2. 8 0
      app/data/view/shop/goods/index.html

+ 5 - 2
app/data/controller/shop/Goods.php

@@ -11,6 +11,7 @@ use app\data\model\ShopGoodsCate;
 use app\data\model\ShopGoodsItem;
 use app\data\model\ShopGoodsMark;
 use app\data\model\ShopGoodsStock;
+use app\data\model\SystemUser;
 use app\data\service\ExpressService;
 use app\data\service\GoodsService;
 use think\admin\Controller;
@@ -63,8 +64,10 @@ class Goods extends Controller
 
     protected function _index_page_filter(&$data)
     {
-
-       // dump($data);die;
+        foreach ($data as &$v){
+            $users = SystemUser::mk()->whereIn('id', $v['admin_id'])->column('contact_phone,nickname', 'id');
+            $v['user'] = $users[$v['admin_id']];
+        }
     }
 
     /**

+ 8 - 0
app/data/view/shop/goods/index.html

@@ -44,6 +44,8 @@
                 </th>
                 <th class='text-left nowrap'>商品信息</th>
                 <th class='text-left nowrap'>商品分类</th>
+                <th class='text-left nowrap'>商家名称</th>
+                <th class='text-left nowrap'>商家电话</th>
                 <th class='text-left nowrap'>商品状态</th>
                 <th class='text-left nowrap'>审核状态</th>
                 {if $admin_id !=10000}
@@ -83,6 +85,12 @@
                         {/notempty}
                     </div>
                 </td>
+                <td>
+                    {$vo.user.nickname}
+                </td>
+                <td>
+                    {$vo.user.contact_phone}
+                </td>
                 <td class='nowrap'>
                     库存 <b>{$vo.stock_total}</b> 件;
                     <div class="notselect margin-top-5">