fly 5 년 전
부모
커밋
dc1488f40e
5개의 변경된 파일49개의 추가작업 그리고 10개의 파일을 삭제
  1. 9 6
      app/Http/Controllers/QuickApp/WelcomeController.php
  2. 19 1
      public/kyydoc/api_data.js
  3. 19 1
      public/kyydoc/api_data.json
  4. 1 1
      public/kyydoc/api_project.js
  5. 1 1
      public/kyydoc/api_project.json

+ 9 - 6
app/Http/Controllers/QuickApp/WelcomeController.php

@@ -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'));
     }
 }

+ 19 - 1
public/kyydoc/api_data.js

@@ -3646,10 +3646,28 @@ define({ "api": [
     "group": "User",
     "name": "customer_img",
     "success": {
+      "fields": {
+        "Success 200": [
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "name",
+            "description": "<p>名称.</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "url",
+            "description": "<p>图片地址.</p>"
+          }
+        ]
+      },
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "\n{\n    \"code\": 0,\n    \"msg\": \"\",\n    \"data\": \"https://cdn-novel.iycdm.com/static/img/kefu20190319.jpg\"",
+          "content": "\n{\n    \"code\": 0,\n    \"msg\": \"\",\n    \"data\": {}",
           "type": "json"
         }
       ]

+ 19 - 1
public/kyydoc/api_data.json

@@ -3646,10 +3646,28 @@
     "group": "User",
     "name": "customer_img",
     "success": {
+      "fields": {
+        "Success 200": [
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "name",
+            "description": "<p>名称.</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "url",
+            "description": "<p>图片地址.</p>"
+          }
+        ]
+      },
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "\n{\n    \"code\": 0,\n    \"msg\": \"\",\n    \"data\": \"https://cdn-novel.iycdm.com/static/img/kefu20190319.jpg\"",
+          "content": "\n{\n    \"code\": 0,\n    \"msg\": \"\",\n    \"data\": {}",
           "type": "json"
         }
       ]

+ 1 - 1
public/kyydoc/api_project.js

@@ -17,7 +17,7 @@ define({
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2019-11-04T03:16:18.890Z",
+    "time": "2019-11-04T03:52:24.162Z",
     "url": "http://apidocjs.com",
     "version": "0.17.7"
   }

+ 1 - 1
public/kyydoc/api_project.json

@@ -17,7 +17,7 @@
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2019-11-04T03:16:18.890Z",
+    "time": "2019-11-04T03:52:24.162Z",
     "url": "http://apidocjs.com",
     "version": "0.17.7"
   }