MarketApi.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace app\admin\controller\market;
  3. use app\admin\controller\BaseController;
  4. use support\Request;
  5. use support\Db;
  6. /**
  7. * 市场营销客户支撑系统
  8. * Class Users
  9. * @package app\api\controller\market
  10. */
  11. class MarketApi extends BaseController
  12. {
  13. /**
  14. * Notes:报文接口
  15. * @return \support\Response
  16. * User: szd
  17. * Date: 2023/11/19
  18. */
  19. public function funcMarketApi()
  20. {
  21. include_once(__DIR__ . "/marketapi/config.php");
  22. include_once(__DIR__ . "/marketapi/functions.php");
  23. global $configs;
  24. global $connDB;
  25. funcComAutoLoad(array('path' => __DIR__ . '/marketapi/configs/extension/', 'method' => 'include_once'));
  26. funcComAutoLoad(array('path' => __DIR__ . '/marketapi/applications/', 'method' => 'include_once'));
  27. funcComAutoLoad(array('path' => __DIR__ . '/marketapi/configs/database/conf' . $configs['system']['database'] . '.php', 'method' => 'include_once'));
  28. $connDB = connectDB();
  29. $post = array();
  30. list($post['application'], $post['handle']) = explode(".", $this->request->post('func'));
  31. $returns = $post['handle']($this->request->post('data'));
  32. if($returns['success']){
  33. return json_success($returns['data'], $returns['page']);
  34. }else{
  35. throw new \Exception(json_encode($returns));
  36. }
  37. }
  38. }