Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

global.php 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * 配置常量
  4. */
  5. $other_rele_menu = []; //限制不显示的内容
  6. $main_lang = get_main_lang();
  7. $admin_lang = get_admin_lang();
  8. $globalConfig = tpCache('global');
  9. //其他语言,限制入口
  10. if ($main_lang != $admin_lang) {
  11. $other_rele_menu = [1004,2004008,2004009,2004010,2004013,2004001,2004002,2004007,2004004,2004015,2004003,2004019,2004017,2004021,2008,2008001
  12. ,2008002,2008003,2008008,2008004,2008005,2003,2004016,2003001,2003002,2005,2006];
  13. }
  14. //非静态模式下,不显示 2004016 HTML生成
  15. $seo_pseudo = empty($globalConfig['seo_pseudo']) ? 0 : $globalConfig['seo_pseudo'];
  16. if (empty($seo_pseudo) || $seo_pseudo != 2){
  17. $other_rele_menu[] = 2004016;
  18. }
  19. //关闭回收站,不显示回收站入口
  20. $web_recycle_switch = empty($globalConfig['web_recycle_switch']) ? 0 : $globalConfig['web_recycle_switch'];
  21. if (!empty($web_recycle_switch) && $web_recycle_switch == 1){
  22. $other_rele_menu[] = 2004006;
  23. }
  24. //关闭插件功能,全部插件入口屏蔽
  25. $web_weapp_switch = empty($globalConfig['web_weapp_switch']) ? 0 : $globalConfig['web_weapp_switch'];
  26. $module_rele_menu_web_weapp_switch = [2005];
  27. if (1 != $web_weapp_switch){
  28. $menu_id_arr = M("admin_menu")->where(['controller_name'=>'Weapp'])->getField("menu_id",true);
  29. if (!empty($menu_id_arr)){
  30. $module_rele_menu_web_weapp_switch = array_merge($module_rele_menu_web_weapp_switch,$menu_id_arr);
  31. }
  32. }
  33. //2006004 - 文章订单 -- 会员中心与开启文章付费都开启才出来
  34. //$channeltype_list = M("channeltype")->where(['id'=>['in',[1,5]]])->getField("id,data,status");
  35. //if (!empty($channeltype_list[1]['data'])){
  36. // $data = json_decode($channeltype_list[1]['data'], true);
  37. // if (empty($data['is_article_pay'])){
  38. // $other_rele_menu[] = 2006004;
  39. // }
  40. //}else{
  41. // $other_rele_menu[] = 2006004;
  42. //}
  43. //"视频订单" 2006002 会员中心与视频模型启用才出来
  44. //if (empty($channeltype_list[5]['status'])){
  45. // $other_rele_menu[] = 2006002;
  46. //}
  47. // 商城中心关联
  48. $shop_open_com = [2008,2008001,2008004,2008003,2008002,2008005,2008006,2008008];
  49. return array(
  50. 'module_rele_menu' => [ //模块开关控制入口导航,模块开启后,里面关联的开关才会打开
  51. 'web_users_switch' => [2006], //会员中心
  52. // 'level_member_upgrade' => [], //会员升级
  53. 'shop_open' => array_merge($shop_open_com, [2004021]), //开启商城中心
  54. 'shop_open-close' => $shop_open_com, //关闭商城中心
  55. 'web_weapp_switch' => $module_rele_menu_web_weapp_switch, //插件应用
  56. 'pay_open' => [2004021], //支付功能
  57. 'web_citysite_open' => [2004019], //多城市站点
  58. ],
  59. 'other_rele_menu' => $other_rele_menu, //其他因素影响入口导航
  60. 'module_default_menu' => [ //模块默认关联入口(打开模块,无论原来的入口是否打开,都需要进入到打开状态)
  61. 'web_users_switch' => [2006], //会员中心
  62. 'shop_open' => [2008], //[2008001,2008002,2008003,2008004,2008005,2008008], //商城中心
  63. 'web_weapp_switch' => [2005], //插件应用
  64. 'pay_open' => [2004021], //支付功能
  65. ],
  66. 'module_reverse_menu' => [ //模块开关控制入口导航,模块关闭时,里面关联的开关才会打开(与module_rele_menu相反)
  67. 'web_citysite_open' => [2004016], //多城市站点
  68. ]
  69. );