|
@@ -73,21 +73,24 @@ class WelcomeController extends BaseController
|
|
|
* @apiHeader {String} [Authorization] token
|
|
|
* @apiGroup User
|
|
|
* @apiName customer_img
|
|
|
+ * @apiSuccess {String} name 名称.
|
|
|
+ * @apiSuccess {String} url 图片地址.
|
|
|
* @apiSuccessExample {json} Success-Response:
|
|
|
*
|
|
|
* {
|
|
|
* "code": 0,
|
|
|
* "msg": "",
|
|
|
- * "data": "https://cdn-novel.iycdm.com/static/img/kefu20190319.jpg"
|
|
|
+ * "data": {}
|
|
|
*/
|
|
|
public function getCustomerServiceImg()
|
|
|
{
|
|
|
- $setting = CustomMsgService::customerImgUrlByChannelId($this->distribution_channel_id);
|
|
|
- if ($setting && $setting->customer_img_url) {
|
|
|
- $customer_service = $setting->customer_img_url;
|
|
|
+ $link = CustomMsgService::customerImgUrlByChannelId($this->distribution_channel_id);
|
|
|
+ $name = 'zhenzhenyd';
|
|
|
+ if ($link && $link->customer_img_url) {
|
|
|
+ $url = $link->customer_img_url;
|
|
|
} else {
|
|
|
- $customer_service = env('KE_FU_QRCODE', 'https://cdn-novel.iycdm.com/static/img/kefu20190319.jpg');
|
|
|
+ $url = env('KE_FU_QRCODE', 'https://cdn-novel.iycdm.com/static/img/kefu20190319.jpg');
|
|
|
}
|
|
|
- return response()->success($customer_service);
|
|
|
+ return response()->success(compact('url', 'name'));
|
|
|
}
|
|
|
}
|