LiveSetting.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * 商品管理
  4. */
  5. namespace app\admin\controller;
  6. use think\facade\View;
  7. use think\facade\Lang;
  8. /**
  9. * ============================================================================
  10. * DSKMS多用户商城
  11. * ============================================================================
  12. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  13. * 网站地址: https://www.valimart.net/
  14. * ----------------------------------------------------------------------------
  15. *
  16. * ============================================================================
  17. * 控制器
  18. */
  19. class LiveSetting extends AdminControl {
  20. public function initialize() {
  21. parent::initialize();
  22. Lang::load(base_path() . 'admin/lang/' . config('lang.default_lang') . '/live_setting.lang.php');
  23. }
  24. public function index() {
  25. $config_model = model('config');
  26. if (!request()->isPost()) {
  27. $list_config = rkcache('config', true);
  28. View::assign('list_config', $list_config);
  29. $this->setAdminCurItem('index');
  30. return View::fetch();
  31. } else {
  32. $update_array=array();
  33. $update_array['live_type'] = input('post.live_type');
  34. $update_array['vod_tencent_play_key'] = input('post.vod_tencent_play_key');
  35. $update_array['vod_tencent_appid'] = input('post.vod_tencent_appid');
  36. $update_array['vod_tencent_play_domain'] = input('post.vod_tencent_play_domain');
  37. $update_array['vod_tencent_secret_id'] = input('post.vod_tencent_secret_id');
  38. $update_array['vod_tencent_secret_key'] = input('post.vod_tencent_secret_key');
  39. $update_array['live_push_domain'] = input('param.live_push_domain');
  40. $update_array['live_push_key'] = input('param.live_push_key');
  41. $update_array['live_play_domain'] = input('param.live_play_domain');
  42. $update_array['video_type'] = input('param.video_type');
  43. $update_array['aliyun_user_id'] = input('param.aliyun_user_id');
  44. $update_array['aliyun_access_key_id'] = input('param.aliyun_access_key_id');
  45. $update_array['aliyun_access_key_secret'] = input('param.aliyun_access_key_secret');
  46. $update_array['aliyun_live_push_domain'] = input('post.aliyun_live_push_domain');
  47. $update_array['aliyun_live_push_key'] = input('post.aliyun_live_push_key');
  48. $update_array['aliyun_live_play_domain'] = input('post.aliyun_live_play_domain');
  49. $update_array['aliyun_live_play_key'] = input('post.aliyun_live_play_key');
  50. $result = $config_model->editConfig($update_array);
  51. if ($result) {
  52. dkcache('config');
  53. $this->log(lang('ds_edit') . lang('live_setting'), 1);
  54. $this->success(lang('ds_common_save_succ'));
  55. } else {
  56. $this->log(lang('ds_edit') . lang('live_setting'), 0);
  57. }
  58. }
  59. }
  60. /**
  61. * 获取卖家栏目列表,针对控制器下的栏目
  62. */
  63. protected function getAdminItemList() {
  64. $menu_array = array(
  65. array(
  66. 'name' => 'index',
  67. 'text' => lang('ds_setting'),
  68. 'url' => url('live_setting/index')
  69. ),
  70. );
  71. return $menu_array;
  72. }
  73. }
  74. ?>