ConfigpayController.class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. * ==========================================================================
  6. * @link http://www.liofis.com/
  7. * @copyright Copyright (c) 2015 liofis.com.
  8. * @license http://www.liofis.com/license.html License
  9. * ==========================================================================
  10. *
  11. * @author fish
  12. *
  13. */
  14. namespace Seller\Controller;
  15. class ConfigpayController extends CommonController{
  16. protected function _initialize(){
  17. parent::_initialize();
  18. //'pinjie' => '拼团介绍',
  19. }
  20. public function index()
  21. {
  22. if (IS_POST) {
  23. $data = I('request.parameter');
  24. $param = array();
  25. if(trim($data['wechat_apiclient_cert_pem'])) $param['wechat_apiclient_cert_pem'] = trim($data['wechat_apiclient_cert_pem']);
  26. if(trim($data['wechat_apiclient_key_pem'])) $param['wechat_apiclient_key_pem'] = trim($data['wechat_apiclient_key_pem']);
  27. if(trim($data['wechat_rootca_pem'])) $param['wechat_rootca_pem'] = trim($data['wechat_rootca_pem']);
  28. if(trim($data['weapp_apiclient_cert_pem'])) $param['weapp_apiclient_cert_pem'] = trim($data['weapp_apiclient_cert_pem']);
  29. if(trim($data['weapp_apiclient_key_pem'])) $param['weapp_apiclient_key_pem'] = trim($data['weapp_apiclient_key_pem']);
  30. if(trim($data['weapp_rootca_pem'])) $param['weapp_rootca_pem'] = trim($data['weapp_rootca_pem']);
  31. if(trim($data['app_apiclient_cert_pem'])) $param['app_apiclient_cert_pem'] = trim($data['app_apiclient_cert_pem']);
  32. if(trim($data['app_apiclient_key_pem'])) $param['app_apiclient_key_pem'] = trim($data['app_apiclient_key_pem']);
  33. if(trim($data['app_rootca_pem'])) $param['app_rootca_pem'] = trim($data['app_rootca_pem']);
  34. D('Seller/Config')->update($param);
  35. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  36. }
  37. $data = D('Seller/Config')->get_all_config();
  38. $this->data = $data;
  39. $this->display();
  40. }
  41. }
  42. ?>