两处bug小程序分类状态关闭、菜单不显示及商品查询filter中select自定义无效

bug问题 · johocn · 于 3年前 发布 · 1330 次阅读

1、小程序分类状态关闭、菜单不显示

文件位置:fecshop\services\category\CategoryMysqldb

374行下添加

$where['status']= $this->getCategoryEnableStatus();
$where['menu_show']= $this->getCategoryMenuShowStatus();

2、商品查询filter中select自定义无效

文件位置:fecshop/services/product/ProductMysqldb

第1049行只1056行替换如下内容(原因filter被重新赋值, $filter['select']被覆盖)

 $select = $filter['select'];
        $filter = [
		     'select' 	=> $select,//新增行
		     'numPerPage' 	=> $numPerPage,
     		'pageNum'		    => $pageNum,
      		'orderBy'	        => $orderBy,
      		'where'			    => $where,
      	    'asArray'           => true,
        ];
共收到 3 条回复
Fecmall#13年前 0 个赞

收到。

感谢把解决的代码都贴出来!多谢分享。

Fecmall#23年前 0 个赞

您好,最近才挪出来时间处理这个问题

仔细看了一下,您处理的还有点问题,category services函数,除了appserver调用了,后台部分也调用了,因此需要加个判断

if ($appserver) {
	$where['status']= $this->getCategoryEnableStatus();
	$where['menu_show']= $this->getCategoryMenuShowStatus();
}

git代码提交: https://github.com/fecshop/yii2_fecshop/commit/116b032d52e2db299e8e40baf499682f59ac9dca

Fecmall#33年前 0 个赞

fecmall-2.9.4+版本将会更新上去,请等待几天。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics