Fecmall2.10.0安装FA后,后台管理界面登录出错

bug问题 · hanmingshi · 于 3年前 发布 · 1142 次阅读

全新宝塔下安装Fecmall2.10.0,安装应用FecRo后,登录后台管理界面一切正常。

此后继续在应用市场安装FA系统,安装显示正常。此后刷新后台登录界面就会报错,不显示后台管理界面了。

报错信息如下: PHP Warning – yii\base\ErrorException Declaration of fecfa\services\admin\Menu::getConfigMenu() should be compatible with fecshop\services\admin\Menu::getConfigMenu($menu = '')

  1. in /www/wwwroot/(此处隐藏域名)/addons/fecmall/fecfa/services/admin/Menu.php at line 20 11121314151617181920212223242526272829use fec\helpers\CUrl; use fecshop\services\Service; use Yii;

/**

  • Page Menu services.
  • @author Terry Zhao 2358269014@qq.com
  • @since 1.0 */ class Menu extends \fecshop\services\admin\Menu { public $isHideFecMenu = false;

    public function init() {

     parent::init();
     $isHideFecMenu = Yii::$app->store->get('fasystem_info', 'hide_fecmall_menu');
     if ($isHideFecMenu == Yii::$app->store->enable) {
    
  1. in /www/wwwroot/(此处隐藏域名)/addons/fecmall/fecfa/services/admin/Menu.php at line 20 – yii\base\ErrorHandler::handleError(2, 'Declaration of fecfa\services\ad...', '/www/wwwroot/www.dblwin.com/addo...', 20, ...)
共收到 2 条回复
Fecmall#13年前 0 个赞

把排版弄好:http://www.fecmall.com/markdown

Fecmall#23年前 0 个赞

将文件addons/fecmall/fecfa/services/admin/Menu.php

用下面的内容替换掉

<?php
/*
 * FecShop file.
 *
 * @link http://www.fecshop.com/
 * @copyright Copyright (c) 2016 FecShop Software LLC
 * @license http://www.fecshop.com/license/
 */
namespace fecfa\services\admin;

use fec\helpers\CUrl;
use fecshop\services\Service;
use Yii;

/**
 * Page Menu services.
 * @author Terry Zhao <2358269014@qq.com>
 * @since 1.0
 */
class Menu extends \fecshop\services\admin\Menu
{
    public $isHideFecMenu = false;
    
    public function init()
    {
        parent::init();
        $isHideFecMenu = Yii::$app->store->get('fasystem_info', 'hide_fecmall_menu');
        if ($isHideFecMenu == Yii::$app->store->enable) {
            
            $this->isHideFecMenu = true;
        }
    }
    /**
     * @return Array , 得到后台菜单配置。
     */
    public function getConfigMenu($menu=''){
        if (empty($menu)) {
            $menu = $this->menuConfig;
        }
        if ($this->isHideFecMenu){
            $arr = [];
            if (is_array($menu['fa']['child']) && !empty($menu['fa']['child'])) {
                foreach ($menu['fa']['child'] as $k=>$v) {
                    $arr[$k] = $v; 
                }
            }
            $arr['dashboard'] = $menu['dashboard'];
            
            return $arr;
        } else {
            /**
         * 进行sort_order排序,以及enable处理
         */
        if (is_array($menu) && !empty($menu)) {
            $menu = $this->arraySortAndRemoveDisableMenu($menu, 'sort_order', 'desc');
                foreach ($menu as $k=>$one) {
                    if (isset($one['child']) && is_array($one['child']) && !empty($one['child'])) {
                        $menu[$k]['child'] = $this->getConfigMenu($one['child']);
                    }
                }
            }

            return $menu;
        }
    }
    
    
}

周末发新版FA

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