提交 1f799b97 编写于 作者: T Terry

category filter attribute select

上级 af4566b6
......@@ -308,6 +308,7 @@ class CategoryController extends AppserverController
$frontNumPerPage = [];
$frontSort = [];
$hasSelect = false;
if (is_array($sort) && !empty($sort)) {
$attrUrlStr = $this->_sort;
$dirUrlStr = $this->_direction;
......@@ -317,6 +318,7 @@ class CategoryController extends AppserverController
if($current_sort == $np){
$selected = true;
$hasSelect = true;
}else{
$selected = false;
}
......@@ -328,6 +330,9 @@ class CategoryController extends AppserverController
];
}
}
if (!$hasSelect ){ // 默认第一个为选中的排序方式
$frontSort[0]['selected'] = true;
}
$data = [
'frontNumPerPage' => $frontNumPerPage,
'frontSort' => $frontSort,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册