this domain is not config in store component

bug问题 · surjur · 于 6年前 发布 · 3136 次阅读

已经按照教程更改了配置,appfront是可以访问的,不会报这个错误,但是apphtml5还是会报错误

'm.fecshop.surjur.com' => [
                'language'         => 'zh_CN',
                'languageName'     => '中文',
                'localThemeDir'    => '@apphtml5/theme/terry/theme01',
                'thirdThemeDir'    => [],
                'currency'         => 'CNY',
                // 第三方账号登录配置
                'thirdLogin' => [
                    // facebook账号登录
                    'facebook' => [       //fb api配置 ,fb可以一个app设置pc和手机web两个域名
                        'facebook_app_id'     => '108618299786621',
                        'facebook_app_secret' => '420b56da4f4664a4d1065a1d31e5ec73',
                    ],
                    // google账号登录
                    'google' => [       //谷歌api visit https://code.google.com/apis/console to generate your google api
                        'CLIENT_ID'      => '380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com',
                        'CLIENT_SECRET'  => 'ei8RaoCDoAlIeh1nHYm0rrwO',
                    ],
                ],
                'sitemapDir' => '@apphtml5/web/cn/sitemap.xml',
            ],
共收到 7 条回复
Fecmall#16年前 0 个赞

你配置文件是 @apphtml5/config/fecshop_local_services/Store.php 吗?

surjur#26年前 0 个赞

@Terry #1楼 是的

Fecmall#36年前 0 个赞

如果是在这个文件里面配置的,那么你打印一下看看:

Fecmall#46年前 0 个赞

你打印一下 $host[1]$stores, 如果 $host[1] 不存在于 $stores,就会报错

if (!$init_compelte) {
	throw new InvalidValueException('this domain is not config in store component');
}
surjur#56年前 0 个赞

打印出来确实不存在


string(20) "m.fecshop.surjur.com"
array(1) {
  ["fecshop.surjur.com"]=>
  array(8) {
    ["language"]=>
    string(5) "zh_CN"
    ["languageName"]=>
    string(6) "中文"
    ["localThemeDir"]=>
    string(29) "@appfront/theme/terry/theme01"
    ["thirdThemeDir"]=>
    array(0) {
    }
    ["currency"]=>
    string(3) "CNY"
    ["mobile"]=>
    array(3) {
      ["enable"]=>
      bool(false)
      ["condition"]=>
      array(2) {
        [0]=>
        string(5) "phone"
        [1]=>
        string(6) "tablet"
      }
      ["redirectDomain"]=>
      string(38) "fecshop.apphtml5.fancyecommerce.com/cn"
    }
    ["thirdLogin"]=>
    array(2) {
      ["facebook"]=>
      array(2) {
        ["facebook_app_id"]=>
        string(15) "108618299786621"
        ["facebook_app_secret"]=>
        string(32) "420b56da4f4664a4d1065a1d31e5ec73"
      }
      ["google"]=>
      array(2) {
        ["CLIENT_ID"]=>
        string(72) "380372364773-qdj1seag9bh2n0pgrhcv2r5uoc58ltp3.apps.googleusercontent.com"
        ["CLIENT_SECRET"]=>
        string(24) "ei8RaoCDoAlIeh1nHYm0rrwO"
      }
    }
    ["sitemapDir"]=>
    string(28) "@appfront/web/cn/sitemap.xml"
  }
}

但是你也看到截图 我确实配置了

Fecmall#66年前 0 个赞

添加这行代码,打印一下看看配置

var_dump($config['services']['store']['stores']);

surjur#76年前 0 个赞

原来是nginx里的域名配置问题

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