截流自动化的商城平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Wechat.php 708B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\basics\Api;
  4. use app\api\logic\WechatLogic;
  5. use app\common\server\JsonServer;
  6. class Wechat extends Api
  7. {
  8. public $like_not_need_login = ['jsconfig', 'index'];
  9. /**
  10. * 微信公众号接口回调
  11. */
  12. public function index()
  13. {
  14. $params = $this->request->get('');
  15. WechatLogic::index($params);
  16. }
  17. public function jsConfig()
  18. {
  19. $url = $this->request->get('url');
  20. $result = WeChatLogic::jsConfig($url);
  21. if ($result['code'] != 1) {
  22. return JsonServer::error($result['msg'] ?? '',[$result]);
  23. }
  24. return JsonServer::success('', ['config' => $result['data']]);
  25. }
  26. }