AttachmentController.class.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 AttachmentController 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. // dump($data);die;
  25. $tmp = trim($data['qiniu_url']);
  26. $len = strlen($tmp)-1;
  27. if ($tmp[$len] != '/' ){
  28. $data['qiniu_url'] = $tmp.'/';
  29. }
  30. $tmp = trim($data['alioss_url']);
  31. $len = strlen($tmp)-1;
  32. if ($tmp[$len] != '/' ){
  33. $data['alioss_url'] = $tmp.'/';
  34. }
  35. $tmp = trim($data['tx_url']);
  36. $len = strlen($tmp)-1;
  37. if ($tmp[$len] != '/' ){
  38. $data['tx_url'] = $tmp.'/';
  39. }
  40. D('Seller/Config')->update($data);
  41. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  42. }
  43. $data = D('Seller/Config')->get_all_config();
  44. $this->data = $data;
  45. $this->display();
  46. }
  47. }
  48. ?>