dyjh 6 lat temu
rodzic
commit
7907219c19

+ 1 - 0
app/Http/Controllers/Admin/Album/ManufacturerController.php

xqd
@@ -208,6 +208,7 @@ class ManufacturerController extends Controller
      */
     private function _updateSave() {
         $data = (array) request('data');
+       // dd($data);
         $saveData = AlbumManufacturerModel::where('store_id', $this->getStoreId())->first();
         if (!empty($data['avatar'])) {
             $data['avatar'] = $this->formatImgUrl($data['avatar']);

+ 66 - 1
app/Http/Controllers/Api/V1/AlbumPosterController.php

xqd xqd
@@ -98,6 +98,71 @@ class AlbumPosterController extends Controller
         return $this->api(compact('info'));
     }
 
+    /**
+     * @api {post} /api/album_post/download 生成海报(download)
+     * @apiDescription 生成海报(download)
+     * @apiGroup Album_Post
+     * @apiPermission 需要登录
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id
+     * @apiParam {int}    [poster_id]  海报id
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": []
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function posterDownload(Request $request)
+    {
+        $userAuth = Auth('api')->user();
+
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+            'image' => 'required',
+        ], [
+            'store_id.required' => '店铺信息未知',
+            'image' => '缺少图片链接'
+        ]);
+        if ($validator->fails()) {
+            return $this->validatorError($validator->messages()->all(), ErrorCode::CLIENT_WRONG_PARAMS, '');
+        }
+
+        $data = $request->input();
+
+        if ($userAuth->up_agent_id != 0) {
+            $add_record['agent_id'] = $userAuth->up_agent_id;
+            $add_record['open_id'] = $userAuth->open_id;
+            $add_record['action'] = 9;
+            $add_record['store_id'] = $data['store_id'];
+            $add_record['detail'] = '保存了图片';
+            $user_agent = AlbumAgentModel::where('id', $userAuth->up_agent_id)->first();
+            $user_agent->share_times++;
+            $user_agent->save();
+
+
+
+            AlbumWatchRecord::create($add_record);
+        }
+
+        AlbumPosterModel::where([['id', $data['poster_id']],['store_id', $data['store_id']]])->increment('downloadNum');
+
+        return $this->api([]);
+    }
+
+
     private function getQrCode($appId, $appSecret, $store_id)
     {
         $access = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appId&secret=$appSecret";
@@ -218,7 +283,7 @@ class AlbumPosterController extends Controller
     }
 
     /**
-     * @api {post} /api/album_post/del 删除海报(del)
+     * @api {post} /api/album_post/del 删除海报(del) 已废弃
      * @apiDescription 删除海报(del)
      * @apiGroup Album_Post
      * @apiPermission 需要登录

+ 1 - 1
app/Http/Controllers/Api/V1/Controller.php

xqd
@@ -22,7 +22,7 @@ class Controller extends BaseController
         $this->middleware('auth:api', [
             'except' => [
                 'upload', 'getCode', 'reset', 'login', 'get', 'register', 'alipayNotify', 'wechatpayNotify', 'get', 'area', 'get_province', 'get_city', 'get_county', 'albumStyle', 'test', 'index', 'companyInfo', 'shop2', 'cardIndex', 'cardUserInfo', 'cardUserProgress', 'cardUserHonor', 'cardUserProject', 'CardUserTrend', 'projectDetail', 'trendDetail', 'albumSetting', 'albumXyxLogin', 'albumCat', 'albumchecklogin', 'albumGoods', 'albumGoodsDetail', 'albumSetPrice', 'albumXcxLogin', 'albumContentList', 'albumSearchGoods','albumContentDetail','albumFavoriteList','albumAddFavorite','albumFavoriteDel','getAttr','getOrder','getProgress','getReviewCount', 'furnitureNewsDetail','furnitureSetting','furnitureXcxLogin','furnitureGoodsList','serviceLogin','getFurnitureAds','getPhoneNumber','getQrcode','orderCount','searchList','printOrder','saveFormId','furnitureNewsList','getMoreComments','addToLike','albumSavePhone','albumGetStatistical','test',
-                'albumGetWatchRecord','albumSetWatch','albumGetCartOfWatch','albumSaveFormId','albumAddAgent','albumGetBanner','albumGetDataGoods','newgoods_list','newgoods_index','albumGetAgentAdress','albumSetCustomer','albumGetCustomer','albumGetDataCat','albumCustomerGoods','albumCustomerGoodsDetail','albumGetDataCatSingle','albumGetCountOfFavorite','albumGetUserInfo','albumStatistical','posterInfo','createPoster','posterDel','albumAgentPriceSet', 'getTop', 'agentCustomer'
+                'albumGetWatchRecord','albumSetWatch','albumGetCartOfWatch','albumSaveFormId','albumAddAgent','albumGetBanner','albumGetDataGoods','newgoods_list','newgoods_index','albumGetAgentAdress','albumSetCustomer','albumGetCustomer','albumGetDataCat','albumCustomerGoods','albumCustomerGoodsDetail','albumGetDataCatSingle','albumGetCountOfFavorite','albumGetUserInfo','albumStatistical','posterInfo','posterDownload','albumAgentPriceSet', 'getTop', 'agentCustomer'
                 , 'agentStatistical', 'albumOverviewActive', 'albumOverviewLeft', 'albumOverviewFavorite', 'albumOverviewNew', 'agentAnalysis', 'albumOverviewFunnel', 'albumOverviewCall', 'BossInteractive'
             ]
         ]);

+ 1 - 0
app/Models/AlbumPosterModel.php

xqd
@@ -36,6 +36,7 @@ class AlbumPosterModel extends BaseModel
                            'words',
                            'video_url',
                            'share_type',
+                           'downloadNum',
                            'name'
                           ];
 

+ 68 - 75
public/apidoc/api_data.js

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -603,13 +603,6 @@ define({ "api": [
             "field": "keywords",
             "description": "<p>关键词.</p>"
           },
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "status",
-            "description": "<p>状态  1 只选择热销 2 只选择最新上市 3只选择一个风格 4 同时选择热销和最新上市 5同时选择热销和风格 6同时选择最新上市和风格 7全选 0全不选</p>"
-          },
           {
             "group": "Parameter",
             "type": "int",
@@ -1686,9 +1679,9 @@ define({ "api": [
   },
   {
     "type": "post",
-    "url": "/api/album_post/create",
-    "title": "生成海报(create)",
-    "description": "<p>生成海报(create)</p>",
+    "url": "/api/album_post/del",
+    "title": "删除海报(del) 已废弃",
+    "description": "<p>删除海报(del)</p>",
     "group": "Album_Post",
     "permission": [
       {
@@ -1699,18 +1692,11 @@ define({ "api": [
     "parameter": {
       "fields": {
         "Parameter": [
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "store_id",
-            "description": "<p>商户id</p>"
-          },
           {
             "group": "Parameter",
             "type": "string",
             "optional": true,
-            "field": "image",
+            "field": "url",
             "description": "<p>图片</p>"
           }
         ]
@@ -1720,7 +1706,7 @@ define({ "api": [
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n          'real_url':'asdawd',  //海报\n     ]\n}",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n}",
           "type": "json"
         }
       ]
@@ -1736,13 +1722,13 @@ define({ "api": [
     },
     "filename": "app/Http/Controllers/Api/V1/AlbumPosterController.php",
     "groupTitle": "Album_Post",
-    "name": "PostApiAlbum_postCreate"
+    "name": "PostApiAlbum_postDel"
   },
   {
     "type": "post",
-    "url": "/api/album_post/del",
-    "title": "删除海报(del)",
-    "description": "<p>删除海报(del)</p>",
+    "url": "/api/album_post/download",
+    "title": "生成海报(download)",
+    "description": "<p>生成海报(download)</p>",
     "group": "Album_Post",
     "permission": [
       {
@@ -1755,10 +1741,17 @@ define({ "api": [
         "Parameter": [
           {
             "group": "Parameter",
-            "type": "string",
+            "type": "int",
             "optional": true,
-            "field": "url",
-            "description": "<p>图片</p>"
+            "field": "store_id",
+            "description": "<p>商户id</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "poster_id",
+            "description": "<p>海报id</p>"
           }
         ]
       }
@@ -1767,7 +1760,7 @@ define({ "api": [
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n}",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": []\n}",
           "type": "json"
         }
       ]
@@ -1783,7 +1776,7 @@ define({ "api": [
     },
     "filename": "app/Http/Controllers/Api/V1/AlbumPosterController.php",
     "groupTitle": "Album_Post",
-    "name": "PostApiAlbum_postDel"
+    "name": "PostApiAlbum_postDownload"
   },
   {
     "type": "post",
@@ -2048,6 +2041,53 @@ define({ "api": [
     "groupTitle": "Auth",
     "name": "PostApiAuthLogin"
   },
+  {
+    "type": "get",
+    "url": "/api/album_boss/boss_interactive",
+    "title": "经销商互动排名(boss_interactive)",
+    "description": "<p>经销商互动排名(boss_interactive)</p>",
+    "group": "Boss",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id</p>"
+          }
+        ]
+      }
+    },
+    "success": {
+      "examples": [
+        {
+          "title": "Success-Response:",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n        {\n            \"realname\" : 释迦摩尼,\n            \"interactive\" : 111\n            \"avatar\" : 111\n        }\n    ]\n}",
+          "type": "json"
+        }
+      ]
+    },
+    "error": {
+      "examples": [
+        {
+          "title": "Error-Response:",
+          "content": "HTTP/1.1 400 Bad Request\n{\n    \"state\": false,\n    \"code\": 1000,\n    \"message\": \"传入参数不正确\",\n    \"data\": null or []\n}\n可能出现的错误代码:\n   1000    CLIENT_WRONG_PARAMS             传入参数不正确",
+          "type": "json"
+        }
+      ]
+    },
+    "filename": "app/Http/Controllers/Api/V1/AlbumBossController.php",
+    "groupTitle": "Boss",
+    "name": "GetApiAlbum_bossBoss_interactive"
+  },
   {
     "type": "get",
     "url": "/api/album_boss/get_top",
@@ -2602,53 +2642,6 @@ define({ "api": [
     "groupTitle": "Boss",
     "name": "PostApiAlbum_bossAgent_statistical"
   },
-  {
-    "type": "post",
-    "url": "/api/album_boss/boss_interactive",
-    "title": "经销商互动排名(boss_interactive)",
-    "description": "<p>经销商互动排名(boss_interactive)</p>",
-    "group": "Boss",
-    "permission": [
-      {
-        "name": "none"
-      }
-    ],
-    "version": "0.1.0",
-    "parameter": {
-      "fields": {
-        "Parameter": [
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "store_id",
-            "description": "<p>商户id</p>"
-          }
-        ]
-      }
-    },
-    "success": {
-      "examples": [
-        {
-          "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n        {\n            \"realname\" : 释迦摩尼,\n            \"interactive\" : 111\n            \"avatar\" : 111\n        }\n    ]\n}",
-          "type": "json"
-        }
-      ]
-    },
-    "error": {
-      "examples": [
-        {
-          "title": "Error-Response:",
-          "content": "HTTP/1.1 400 Bad Request\n{\n    \"state\": false,\n    \"code\": 1000,\n    \"message\": \"传入参数不正确\",\n    \"data\": null or []\n}\n可能出现的错误代码:\n   1000    CLIENT_WRONG_PARAMS             传入参数不正确",
-          "type": "json"
-        }
-      ]
-    },
-    "filename": "app/Http/Controllers/Api/V1/AlbumBossController.php",
-    "groupTitle": "Boss",
-    "name": "PostApiAlbum_bossBoss_interactive"
-  },
   {
     "type": "get",
     "url": "/api/car/delete",

+ 68 - 75
public/apidoc/api_data.json

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -603,13 +603,6 @@
             "field": "keywords",
             "description": "<p>关键词.</p>"
           },
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "status",
-            "description": "<p>状态  1 只选择热销 2 只选择最新上市 3只选择一个风格 4 同时选择热销和最新上市 5同时选择热销和风格 6同时选择最新上市和风格 7全选 0全不选</p>"
-          },
           {
             "group": "Parameter",
             "type": "int",
@@ -1686,9 +1679,9 @@
   },
   {
     "type": "post",
-    "url": "/api/album_post/create",
-    "title": "生成海报(create)",
-    "description": "<p>生成海报(create)</p>",
+    "url": "/api/album_post/del",
+    "title": "删除海报(del) 已废弃",
+    "description": "<p>删除海报(del)</p>",
     "group": "Album_Post",
     "permission": [
       {
@@ -1699,18 +1692,11 @@
     "parameter": {
       "fields": {
         "Parameter": [
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "store_id",
-            "description": "<p>商户id</p>"
-          },
           {
             "group": "Parameter",
             "type": "string",
             "optional": true,
-            "field": "image",
+            "field": "url",
             "description": "<p>图片</p>"
           }
         ]
@@ -1720,7 +1706,7 @@
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n          'real_url':'asdawd',  //海报\n     ]\n}",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n}",
           "type": "json"
         }
       ]
@@ -1736,13 +1722,13 @@
     },
     "filename": "app/Http/Controllers/Api/V1/AlbumPosterController.php",
     "groupTitle": "Album_Post",
-    "name": "PostApiAlbum_postCreate"
+    "name": "PostApiAlbum_postDel"
   },
   {
     "type": "post",
-    "url": "/api/album_post/del",
-    "title": "删除海报(del)",
-    "description": "<p>删除海报(del)</p>",
+    "url": "/api/album_post/download",
+    "title": "生成海报(download)",
+    "description": "<p>生成海报(download)</p>",
     "group": "Album_Post",
     "permission": [
       {
@@ -1755,10 +1741,17 @@
         "Parameter": [
           {
             "group": "Parameter",
-            "type": "string",
+            "type": "int",
             "optional": true,
-            "field": "url",
-            "description": "<p>图片</p>"
+            "field": "store_id",
+            "description": "<p>商户id</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "poster_id",
+            "description": "<p>海报id</p>"
           }
         ]
       }
@@ -1767,7 +1760,7 @@
       "examples": [
         {
           "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n}",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": []\n}",
           "type": "json"
         }
       ]
@@ -1783,7 +1776,7 @@
     },
     "filename": "app/Http/Controllers/Api/V1/AlbumPosterController.php",
     "groupTitle": "Album_Post",
-    "name": "PostApiAlbum_postDel"
+    "name": "PostApiAlbum_postDownload"
   },
   {
     "type": "post",
@@ -2048,6 +2041,53 @@
     "groupTitle": "Auth",
     "name": "PostApiAuthLogin"
   },
+  {
+    "type": "get",
+    "url": "/api/album_boss/boss_interactive",
+    "title": "经销商互动排名(boss_interactive)",
+    "description": "<p>经销商互动排名(boss_interactive)</p>",
+    "group": "Boss",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id</p>"
+          }
+        ]
+      }
+    },
+    "success": {
+      "examples": [
+        {
+          "title": "Success-Response:",
+          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n        {\n            \"realname\" : 释迦摩尼,\n            \"interactive\" : 111\n            \"avatar\" : 111\n        }\n    ]\n}",
+          "type": "json"
+        }
+      ]
+    },
+    "error": {
+      "examples": [
+        {
+          "title": "Error-Response:",
+          "content": "HTTP/1.1 400 Bad Request\n{\n    \"state\": false,\n    \"code\": 1000,\n    \"message\": \"传入参数不正确\",\n    \"data\": null or []\n}\n可能出现的错误代码:\n   1000    CLIENT_WRONG_PARAMS             传入参数不正确",
+          "type": "json"
+        }
+      ]
+    },
+    "filename": "app/Http/Controllers/Api/V1/AlbumBossController.php",
+    "groupTitle": "Boss",
+    "name": "GetApiAlbum_bossBoss_interactive"
+  },
   {
     "type": "get",
     "url": "/api/album_boss/get_top",
@@ -2602,53 +2642,6 @@
     "groupTitle": "Boss",
     "name": "PostApiAlbum_bossAgent_statistical"
   },
-  {
-    "type": "post",
-    "url": "/api/album_boss/boss_interactive",
-    "title": "经销商互动排名(boss_interactive)",
-    "description": "<p>经销商互动排名(boss_interactive)</p>",
-    "group": "Boss",
-    "permission": [
-      {
-        "name": "none"
-      }
-    ],
-    "version": "0.1.0",
-    "parameter": {
-      "fields": {
-        "Parameter": [
-          {
-            "group": "Parameter",
-            "type": "int",
-            "optional": true,
-            "field": "store_id",
-            "description": "<p>商户id</p>"
-          }
-        ]
-      }
-    },
-    "success": {
-      "examples": [
-        {
-          "title": "Success-Response:",
-          "content": "HTTP/1.1 200 OK\n{\n    \"status\": true,\n    \"status_code\": 0,\n    \"message\": \"\",\n    \"data\": [\n        {\n            \"realname\" : 释迦摩尼,\n            \"interactive\" : 111\n            \"avatar\" : 111\n        }\n    ]\n}",
-          "type": "json"
-        }
-      ]
-    },
-    "error": {
-      "examples": [
-        {
-          "title": "Error-Response:",
-          "content": "HTTP/1.1 400 Bad Request\n{\n    \"state\": false,\n    \"code\": 1000,\n    \"message\": \"传入参数不正确\",\n    \"data\": null or []\n}\n可能出现的错误代码:\n   1000    CLIENT_WRONG_PARAMS             传入参数不正确",
-          "type": "json"
-        }
-      ]
-    },
-    "filename": "app/Http/Controllers/Api/V1/AlbumBossController.php",
-    "groupTitle": "Boss",
-    "name": "PostApiAlbum_bossBoss_interactive"
-  },
   {
     "type": "get",
     "url": "/api/car/delete",

+ 1 - 1
public/apidoc/api_project.js

xqd
@@ -9,7 +9,7 @@ define({
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2019-04-18T12:10:04.855Z",
+    "time": "2019-05-30T08:33:02.131Z",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
   }

+ 1 - 1
public/apidoc/api_project.json

xqd
@@ -9,7 +9,7 @@
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2019-04-18T12:10:04.855Z",
+    "time": "2019-05-30T08:33:02.131Z",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
   }

+ 2 - 0
resources/views/admin/album/manufacturer/album-edit.blade.php

xqd
@@ -110,6 +110,8 @@
 
                                     </div>
 
+
+
                                     <div class="form-group">
 
                                         <label class="control-label col-sm-3">是否获取手机号</label>

+ 28 - 0
resources/views/admin/album/manufacturer/edit-all.blade.php

xqd
@@ -250,6 +250,34 @@
                                             </label>
                                         </div>
 
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">分享画面(1080*1080)</label>
+                                        <div class="col-sm-9">
+                                            {{--{!!  widget('Tools.ImgUpload')->single2('/upload/cover_pic','cover_pic',"cover_pic",  isset($data['cover_pic'])? $data['cover_pic'] : '',array("sizex"=>662,"sizey"=>510)) !!}--}}
+                                            {!!  widget('Tools.ImgUpload')->single2('/upload/share_image','share_image',"share_image",  isset($data['share_image'])? $data['share_image'] : '',array("sizex"=>1080,"sizey"=>1080)) !!}
+                                            <button type="button" onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Manufacturer/viewShare')}}'});"  class="btn btn-primary col-sm-offset-3">查看示例</button>
+                                        </div>
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">分享标题</label>
+
+                                        <div class="col-sm-9">
+                                            <input id="data_introduce" name="data[share_title]" class="form-control" value="{{ $data['share_title'] or ''}}" required="" aria-required="true"  placeholder="">
+                                        </div>
+
+                                    </div>
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">厂家头像</label>
+
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single('avatar',"data[avatar]", isset($data['avatar'])? $data['avatar'] : "") !!}
+
+                                        </div>
+
                                     </div>
                                     <div class="form-group">
 

+ 11 - 0
resources/views/admin/album/manufacturer/edit.blade.php

xqd
@@ -228,6 +228,17 @@
                                             {!!  widget('Tools.ImgUpload')->multi2('/upload/banner','banner',"data[banner]", isset($data['banner'])? $data['banner'] : '',[]) !!}
                                         </div>
                                     </div>
+
+                                    <div class="form-group">
+
+                                        <label class="control-label col-sm-3">厂家头像</label>
+
+                                        <div class="col-sm-9">
+                                            {!!  widget('Tools.ImgUpload')->single('avatar',"data[avatar]", isset($data['avatar'])? $data['avatar'] : "") !!}
+
+                                        </div>
+
+                                    </div>
                                     <div class="form-group">
                                         <label class="control-label col-sm-3">经销商画报</label>
                                         <div class="col-sm-9">

+ 3 - 7
routes/api.php

xqd
@@ -121,13 +121,9 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($a
             'as' => 'album_post.info',
             'uses' => 'AlbumPosterController@posterInfo',
         ]);
-        $api->post('album_post/create', [
-            'as' => 'album_post.create',
-            'uses' => 'AlbumPosterController@createPoster',
-        ]);
-        $api->post('album_post/del', [
-            'as' => 'album_post.del',
-            'uses' => 'AlbumPosterController@posterDel',
+        $api->post('album_post/download', [
+            'as' => 'album_post.download',
+            'uses' => 'AlbumPosterController@posterDownload',
         ]);
 
         $api->get('album/get-customer', [