fix: bug修复

This commit is contained in:
2024-10-29 17:38:47 +08:00
parent 48bf3e6f33
commit cadb9dbcc4
31 changed files with 1032 additions and 662 deletions

View File

@@ -16,7 +16,13 @@ class BaseController extends Controller {
protected $member_id;
protected $lang;
public function __construct() {
protected $module;
protected $controller;
protected $action;
protected $langid;
public function __construct()
{
parent::__construct();
}
@@ -24,7 +30,8 @@ class BaseController extends Controller {
* 初始化操作
* @access protected
*/
protected function _initialize() {
protected function _initialize()
{
//parent::_initialize();
//$this->siteid = Config::get('siteid', 0);
$this->module = $this->request->module();

View File

@@ -133,7 +133,7 @@ class Product extends Model {
public function getNewItemLists($where = null, $order = null, $field = null, $limit = null) {
$this->alias('p')->join('product_category c', 'p.cid=c.id', 'INNER')->join('product_category t', 'c.pid=t.id', 'INNER');
if (is_array($where)) {
$where = array_merge(['p.stat' => ['eq', '0'],'p.isnew' => ['eq', '1'],'p.is_show' => ['eq', '0'],'t.isshow' => ['eq', '1'],'p.country_code' => ['eq', 'ZH']], $where);
$where = array_merge(['p.stat' => ['eq', '0'],'p.isnew' => ['eq', '1'], 'p.is_show' => ['eq', '0'],'t.isshow' => ['eq', '1'],'p.country_code' => ['eq', 'ZH']], $where);
}
if ($where) {
$this->where($where);