diff --git a/app/api/model/Article.php b/app/api/model/Article.php index 55c0d1f6..937415b8 100644 --- a/app/api/model/Article.php +++ b/app/api/model/Article.php @@ -109,7 +109,7 @@ class Article extends ArticleModel public function helpCenter() { - $cat = CategoryModel::where(['status' => 1])->with(['catImg'])->order('sort desc')->select()->toArray(); + $cat = CategoryModel::where(['status' => 1])->with(['catImg'])->order('sort asc')->select()->toArray(); foreach ($cat as $k => $v) { $cat[$k]['child'] = $this->where('status', '=', 1) ->where('is_delete', '=', 0) diff --git a/app/api/service/Goods.php b/app/api/service/Goods.php index ed517c8d..84d997cf 100644 --- a/app/api/service/Goods.php +++ b/app/api/service/Goods.php @@ -219,30 +219,21 @@ class Goods extends GoodsService 'store_id' => $storeid, 'is_main' => 1, ])->field('shop_name,star,shop_hours,summary,phone, - province_id,city_id,region_id,shop_id,address,latitude,longitude,wechat_img_id,history1,history2,history3,remark,history,parking_name,parking_desc,parking_latitude,parking_longitude,shop_image_id')->find()->toArray(); + province_id,city_id,region_id,shop_id,address,latitude,longitude,wechat_img_id,history1,history2,history3,remark,history,parking_name,parking_desc,parking_latitude,parking_longitude,shop_image_id,fuwu_hours,fuwu_num')->find()->toArray(); //todo wmc $info['remark'] = json_decode($info['remark'],true); - $info['fuwu_hours'] = 5; - $info['fuwu_num'] = 15; + // $info['fuwu_hours'] = 5; + // $info['fuwu_num'] = 15; // $info['wechat'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240127/12bb1b1747e652d258443247a5c4777c.png'; $info['history'] = json_decode($info['history'], true); -// $info['evaluate'][] = [ -// 'image' => 'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg', -// 'nickname' => 'wmc', -// 'content' => '很好', -// ]; + $info['evaluate'] = Comment::with('file') ->field(['nickname,content,image_id']) ->hidden(['file']) ->where('is_delete', '=', 0) ->where('shop_id','=', $info['shop_id']) ->select(); -// $info['imageList'] = [ -// 'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg', -// 'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg' -// -// ]; $file = UploadFile::whereIn('file_id', explode(',', $info['shop_image_id']))->select(); $info['imageList'] = helper::getArrayColumn($file, 'preview_url'); return $info; diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index f5dadeef..a2b75a25 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -294,7 +294,7 @@ class Goods extends BaseModel // $query->where('goods_category_rel.category_id', '=', (int)$params['categoryId']); $query->where([ 'goods_category_rel.category_id' => (int)$params['categoryId'], - 'goods.store_id' => (int)$params['store_id'], + //'goods.store_id' => (int)$params['store_id'], ]); $a = 1;