浏览代码

封面图不显示

qifengquan 1 年之前
父节点
当前提交
9f40e405e2
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/data/controller/api/business/Goods.php

+ 3 - 0
app/data/controller/api/business/Goods.php

@@ -88,6 +88,9 @@ class Goods extends Controller
             if($v['stock_total'] == 0){
                 ShopGoods::mk()->where('id',$v['id'])->save(['status'=>2]);
             }
+//            $v['cover'] = explode('|',$v['cover']);
+            $index = strpos($v['cover'],"|");
+            $v['cover'] = substr($v['cover'],0,$index);
         }
         $data['count'] =$count;
         $data['list']=$result;