Laravel-admin: 1.5语言切换遗留问题,关于地图加载源

Created on 15 Sep 2017  ·  2Comments  ·  Source: z-song/laravel-admin

1.5版本中locale应该是zh-CN
对应的地图资源MAP.php应该修改为

public static function getAssets()
    {
        if (config('app.locale') == 'zh-CN') {
            $js = 'http://map.qq.com/api/js?v=2.exp';
        } else {
            $js = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key='.env('GOOGLE_API_KEY');
        }

        return compact('js');
    }

Most helpful comment

还要考虑到 http 还是 https 的问题。

All 2 comments

还要考虑到 http 还是 https 的问题。

已经修复,谢谢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greentornado picture greentornado  ·  3Comments

fokoz picture fokoz  ·  3Comments

zhenyangze picture zhenyangze  ·  3Comments

vlongen picture vlongen  ·  3Comments

joernroeder picture joernroeder  ·  3Comments