123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace App\Http\Controllers;
- use App\Http\Logic\WechatLogic;
- class WechatController extends BaseController
- {
- /**
- * 校验微信服务器
- */
- public function checkServer($code)
- {
- $data = WechatLogic::checkServerlogic($code);
- return $data;
- }
- /**
- * 设置公众号菜单
- * @return \Illuminate\Http\JsonResponse
- */
- public function setMenu()
- {
- $data = WechatLogic::setMenuLogic();
- return $this->success($data);
- }
- /**
- * 公众号授权回调
- */
- public function accountCallback()
- {
- $url = WechatLogic::accountCallbackLogic();
- return redirect($url);
- }
- /**
- * @SWG\Post(
- * path="/wechat/account/config",
- * tags={"公众号"},
- * summary="获取公众号配置接口",
- * description="获取公众号配置接口",
- * produces={"application/json"},
- * @SWG\Parameter(
- * name="url",
- * in="query",
- * description="当前页面地址",
- * type="string"
- * ),
- * @SWG\Parameter(
- * name="wechat_app_code",
- * in="query",
- * description="应用编号",
- * type="string"
- * ),
- * @SWG\Response(
- * response="200",
- * description="success",
- * @SWG\Schema(
- * @SWG\Property(
- * property="appId",
- * type="string",
- * description="appId"
- * ),
- * @SWG\Property(
- * property="timestamp",
- * type="string",
- * description="timestamp"
- * ),
- * @SWG\Property(
- * property="nonceStr",
- * type="string",
- * description="nonceStr"
- * ),
- * @SWG\Property(
- * property="signature",
- * type="string",
- * description="signature"
- * ),
- * )
- * ),
- * @SWG\Response(
- * response="403",
- * description="fail",
- * @SWG\Schema(ref="#/definitions/ErrorBean")
- * )
- * )
- */
- public function accountConfig()
- {
- $data = WechatLogic::accountConfigLogic();
- return $this->success($data);
- }
- }
|