12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace App\Http\Controllers\Wap\OfficialAccount;
- use App\Http\Controllers\Wap\BaseController;
- use App\Modules\OfficialAccount\Services\CustomMsgService;
- use App\Http\Controllers\Wap\OfficialAccount\Transformers\CustomMsgControllerTransformer;
- use Illuminate\Http\Request;
- use GuzzleHttp\Client;
- use App\Libs\OSS;
- class CustomMsgController extends BaseController
- {
- /**
- * @apiDefine OfficialAccount 公众号
- */
- /**
- * @apiVersion 1.0.0
- * @api {GET} OfficialAccount/customerImgUrlByChannelId 获取渠道下的二维码图片
- * @apiGroup OfficialAccount
- * @apiName customerImgUrlByChannelId
- * @apiParam {String} distribution_channel_id 分销渠道ID.
- * @apiSuccess {String} customer_img_url 客服图片.
- * @apiSuccessExample {json} Success-Response:
- *
- * {
- * "code": 0,
- * "msg": "",
- * "data": []
- * }
- */
- function customerImgUrlByChannelId(Request $request) {
- $distribution_channel_id = $request->has('distribution_channel_id') ? $request->input('distribution_channel_id') : '';
- if(empty($distribution_channel_id)) {
- return response()->error("PARAM_EMPTY");
- }
- $distributionChannelSetting = CustomMsgService::customerImgUrlByChannelId($distribution_channel_id);
- if (!empty($distributionChannelSetting)) {
- # code...
- return response()->item(new CustomMsgControllerTransformer(), $wechatTemplateMsgService);
- }else{
- return response()->success();
- }
-
- }
-
- }
|