diff --git a/service/Application/Admin/Model/SlideModel.class.php b/service/Application/Admin/Model/SlideModel.class.php index 54abe94d171b662350bf46a81b2bccf502e57be0..43cef6adcfe66e8ec56ef8ee5288ef7d591b1194 100755 --- a/service/Application/Admin/Model/SlideModel.class.php +++ b/service/Application/Admin/Model/SlideModel.class.php @@ -16,7 +16,7 @@ class SlideModel extends CommonModel protected $_validate = array( // 添加,编辑 array('name', '0,60', '{%slide_name_format}', 1, 'length', 3), - array('platform', array('pc','h5','alipay','wechat'), '{%common_platform_format}', 1, 'in', 3), + array('platform', array('pc','h5','alipay','wechat','baidu'), '{%common_platform_format}', 1, 'in', 3), array('jump_url', '0,255', '{%common_jump_url_format}', 2, 'length', 3), array('jump_url_type', array(0,1,2), '{%common_jump_url_type_format}', 1, 'in', 3), array('images_url', 'require', '{%slide_images_url_format}', 1, '', 3), diff --git a/service/Application/Api/Controller/GoodsSearchController.class.php b/service/Application/Api/Controller/GoodsSearchController.class.php index 6b5381596aedffb4ec653de63cafb8a086ca8e74..1bfebac61f0e2a4a5336577498286f6106727a60 100755 --- a/service/Application/Api/Controller/GoodsSearchController.class.php +++ b/service/Application/Api/Controller/GoodsSearchController.class.php @@ -52,11 +52,22 @@ class GoodsSearchController extends CommonController $field = 'g.id, g.title, g.title_color, g.original_price, g.price, g.images, g.buy_min_number, g.buy_max_number, g.inventory, g.access_count, g.give_integral, gc.name AS category_name'; $data = $m->alias('g')->join('INNER JOIN __GOODS_CATEGORY_JOIN__ AS gcj ON g.id=gcj.goods_id INNER JOIN __GOODS_CATEGORY__ AS gc ON gcj.category_id=gc.id')->where($where)->field($field)->limit($start, $number)->group('g.id')->order('g.id desc')->select(); + // 分类信息 + $category = M('GoodsCategory')->field('id,name,icon,big_images')->where(['id'=>$this->data_post['category_id']])->find(); + if(!empty($category)) + { + $image_host = C('IMAGE_HOST'); + $category['icon'] = empty($category['icon']) ? null : $image_host.$category['icon']; + $category['big_images'] = empty($category['big_images']) ? null : $image_host.$category['big_images']; + } + + // 返回数据 $result = [ 'total' => $total, 'page_total' => $page_total, 'data' => $this->SetGoodsData($data), + 'category' => $category, ]; $this->ajaxReturn(L('common_operation_success'), 0, $result); } diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index d560d416d1bcfd511848fe56a1c00a10f091dfa2..8562bca54955ebbbc8589fccad33dc20c33c4752 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -406,6 +406,7 @@ return array( 'h5' => array('value' => 'h5', 'name' => 'H5手机网站'), 'alipay' => array('value' => 'alipay', 'name' => '支付宝小程序'), 'wechat' => array('value' => 'wechat', 'name' => '微信小程序'), + 'baidu' => array('value' => 'baidu', 'name' => '百度小程序'), ), // 小程序url跳转类型