// +---------------------------------------------------------------------- namespace app\controller\api\v1\work; use app\Request; use crmeb\services\wechat\Work; /** * 企业微信 * Class WorkController * @package app\controller\api\v1\work */ class WorkController { /** * 获取企业微信配置 * @param Request $request * @return mixed * @throws \Psr\SimpleCache\InvalidArgumentException */ public function config(Request $request) { return response(['status' => 200, 'msg' => 'ok', 'data' => Work::getJsSDK($request->get('url', ''))], 200, [], 'json'); } /** * 获取应用配置 * @param Request $request * @return \think\Response * @throws \Psr\SimpleCache\InvalidArgumentException */ public function agentConfig(Request $request) { return response(['status' => 200, 'msg' => 'ok', 'data' => Work::getAgentConfig($request->get('url', ''))], 200, [], 'json'); } }