Commit 0d3dafb4 by 杨树贤

更多的商品信息

parent 66ee30a9
......@@ -27,8 +27,8 @@ REDIS_READ_PORT=6379
GOODS_SERVER_URL=http://lc_server_goods.cc
NOTICE_TYPE_ID=
CASE_TYPE_ID=
NOTICE_TYPE_ID=37
CASE_TYPE_ID=35
CACHE_DRIVER=redis
CACHE_DRIVER=file
QUEUE_DRIVER=sync
......@@ -59,6 +59,7 @@ class ArticleModel extends BaseModel
$query->select(['type_id', 'type_name']);
},
])
->where('status', 1)
->where($map);
$total = $query->count();
......@@ -66,7 +67,7 @@ class ArticleModel extends BaseModel
->orderBy('art_id', 'desc')
->get()->toArray();
return compact('data','total');
return compact('data', 'total');
}
public function getCase($map)
......@@ -125,6 +126,7 @@ class ArticleModel extends BaseModel
->with([
'type',
])->where('top_type_id', $noticeTypeId)
->where('status', 1)
->orderBy('art_id', 'desc')
->page($page, $pageSize)
->get();
......
......@@ -72,6 +72,11 @@ class CaseService extends BaseService
$goodsInfo = $this->getGoodsInfo($item['goods_id']);
if ($goodsInfo) {
$item['goods_info'] = [
'class_id1' => $goodsInfo['class_id1'],
'class_id1_name' => $goodsInfo['class_id1_name'],
'class_id2' => $goodsInfo['class_id2'],
'class_id2_name' => $goodsInfo['class_id2_name'],
'brand_logo' => $goodsInfo['brand_logo'],
'goods_id' => $goodsInfo['goods_id'],
'goods_name' => $goodsInfo['goods_name'],
'goods_image' => is_array($goodsInfo['goods_images']) ? $goodsInfo['goods_images'][0] : $goodsInfo['goods_images'],
......
......@@ -12,7 +12,7 @@ class NoticeService extends BaseService
{
public function getNoticeList($page, $pageSize)
{
return Cache::remember("noticeListCache_$page"."_$pageSize", 5, function () use ($page, $pageSize) {
return Cache::remember("noticeListCache_$page"."_$pageSize", 1, function () use ($page, $pageSize) {
$model = new ArticleModel();
//获取所有faq相关的文章,50应该差不多了
$list = $model->getNoticeList($page, $pageSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment