@@ -47,12 +47,24 @@ public function doIndex()
4747 $ sampleFileName = dirname (__FILE__ ) . "/../ " . $ this ->sampleConfigName ;
4848
4949 if (file_exists ($ configFileName )) {
50+ $ newConfig = require ($ configFileName );
51+ $ dbType = $ newConfig ['dbType ' ];
52+ $ sqliteName = $ newConfig ['sqlite ' ]['sqliteDBName ' ];
53+ if ($ dbType == "sqlite " && $ sqliteName ) {
54+ $ sqliteName = $ this ->_dbPath . "/ " . $ sqliteName ;
55+ $ fileExists = file_exists ($ sqliteName );
56+ if ($ newConfig ['dbType ' ] == "sqlite " && !$ fileExists ) {
57+ echo "sqlite DB 文件不存在, 请删除config.php文件,初始化站点 " ;
58+ return ;
59+ }
60+ }
5061 $ apiPageIndex = ZalyConfig::getConfig ("apiPageIndex " );
5162 header ("Location: " . $ apiPageIndex );
5263 exit ();
5364 }
5465
5566 $ config = require ($ sampleFileName );
67+
5668 $ sqliteName = "" ;
5769
5870 $ this ->lang = $ _GET ['lang ' ];
@@ -417,30 +429,30 @@ private function initPluginMiniProgram()
417429 'permissionType ' => Zaly \Proto \Core \PluginPermissionType::PluginPermissionAll,
418430 'authKey ' => "" ,
419431 ],
420- // [
421- // 'pluginId' => 104,
422- // 'name' => "gif小程序",
423- // 'logo' => "",
424- // 'sort' => 2, //order = 2
425- // 'landingPageUrl' => "index.php?action=miniProgram.gif.index",
426- // 'landingPageWithProxy' => 1, //1 表示走site代理
427- // 'usageType' => Zaly\Proto\Core\PluginUsageType::PluginUsageU2Message,
428- // 'loadingType' => Zaly\Proto\Core\PluginLoadingType::PluginLoadingChatbox,
429- // 'permissionType' => Zaly\Proto\Core\PluginPermissionType::PluginPermissionAll,
430- // 'authKey' => "",
431- // ],
432- // [
433- // 'pluginId' => 104,
434- // 'name' => "gif小程序",
435- // 'logo' => "",
436- // 'sort' => 2, //order = 2
437- // 'landingPageUrl' => "index.php?action=miniProgram.gif.index",
438- // 'landingPageWithProxy' => 1, //1 表示走site代理
439- // 'usageType' => Zaly\Proto\Core\PluginUsageType::PluginUsageGroupMessage,
440- // 'loadingType' => Zaly\Proto\Core\PluginLoadingType::PluginLoadingChatbox,
441- // 'permissionType' => Zaly\Proto\Core\PluginPermissionType::PluginPermissionAll,
442- // 'authKey' => "",
443- // ],
432+ [
433+ 'pluginId ' => 104 ,
434+ 'name ' => "gif小程序 " ,
435+ 'logo ' => "" ,
436+ 'sort ' => 2 , //order = 2
437+ 'landingPageUrl ' => "index.php?action=miniProgram.gif.index " ,
438+ 'landingPageWithProxy ' => 1 , //1 表示走site代理
439+ 'usageType ' => Zaly \Proto \Core \PluginUsageType::PluginUsageU2Message,
440+ 'loadingType ' => Zaly \Proto \Core \PluginLoadingType::PluginLoadingChatbox,
441+ 'permissionType ' => Zaly \Proto \Core \PluginPermissionType::PluginPermissionAll,
442+ 'authKey ' => "" ,
443+ ],
444+ [
445+ 'pluginId ' => 104 ,
446+ 'name ' => "gif小程序 " ,
447+ 'logo ' => "" ,
448+ 'sort ' => 2 , //order = 2
449+ 'landingPageUrl ' => "index.php?action=miniProgram.gif.index " ,
450+ 'landingPageWithProxy ' => 1 , //1 表示走site代理
451+ 'usageType ' => Zaly \Proto \Core \PluginUsageType::PluginUsageGroupMessage,
452+ 'loadingType ' => Zaly \Proto \Core \PluginLoadingType::PluginLoadingChatbox,
453+ 'permissionType ' => Zaly \Proto \Core \PluginPermissionType::PluginPermissionAll,
454+ 'authKey ' => "" ,
455+ ],
444456 [
445457 'pluginId ' => 105 ,
446458 'name ' => "账户密码管理小程序 " ,
0 commit comments