AttachmentController.class.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. *
  6. * @author fish
  7. *
  8. */
  9. namespace Seller\Controller;
  10. class AttachmentController extends CommonController{
  11. protected function _initialize(){
  12. parent::_initialize();
  13. //'pinjie' => '拼团介绍',
  14. }
  15. public function index()
  16. {
  17. if (IS_POST) {
  18. $data = I('request.parameter');
  19. // dump($data);die;
  20. $tmp = trim($data['qiniu_url']);
  21. $len = strlen($tmp)-1;
  22. if ($tmp[$len] != '/' ){
  23. $data['qiniu_url'] = $tmp.'/';
  24. }
  25. $tmp = trim($data['alioss_url']);
  26. $len = strlen($tmp)-1;
  27. if ($tmp[$len] != '/' ){
  28. $data['alioss_url'] = $tmp.'/';
  29. }
  30. $tmp = trim($data['tx_url']);
  31. $len = strlen($tmp)-1;
  32. if ($tmp[$len] != '/' ){
  33. $data['tx_url'] = $tmp.'/';
  34. }
  35. D('Seller/Config')->update($data);
  36. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  37. }
  38. $data = D('Seller/Config')->get_all_config();
  39. $this->data = $data;
  40. $this->display();
  41. }
  42. }
  43. ?>