瀏覽代碼

用户足迹

dyjh 6 年之前
父節點
當前提交
d34ee9e9e9

+ 168 - 4
app/Http/Controllers/Api/V1/AlbumController.php

@@ -16,6 +16,7 @@ use App\Models\AlbumProductModel;
 use App\Models\AlbumProductPriceModel;
 use App\Models\AlbumProductPriceModel;
 use App\Models\AlbumProductStyleModel;
 use App\Models\AlbumProductStyleModel;
 use App\Models\AlbumUserModel;
 use App\Models\AlbumUserModel;
+use App\Models\AlbumWatchRecord;
 use App\Models\AlbumXyxUserModel;
 use App\Models\AlbumXyxUserModel;
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\DB;
@@ -240,7 +241,7 @@ class AlbumController extends Controller
                 $add['store_id'] = $datas['store_id'];
                 $add['store_id'] = $datas['store_id'];
                 $res = AlbumUserModel::create($add);
                 $res = AlbumUserModel::create($add);
                 if($res){
                 if($res){
-                    $check = AlbumUserModel::where('wechat_open_id',$res['openid'])->first();
+                    $check = AlbumUserModel::where([['wechat_open_id',$res['openid']],['store_id',$datas['store_id']]])->first();
                     $user = [
                     $user = [
                         'user_id'=>$check['id'],
                         'user_id'=>$check['id'],
                         //'avatar'=>$check['avatar'],
                         //'avatar'=>$check['avatar'],
@@ -279,8 +280,14 @@ class AlbumController extends Controller
             }
             }
         if (Auth::loginUsingId($check->id)) {
         if (Auth::loginUsingId($check->id)) {
             $userAuth = Auth::user();
             $userAuth = Auth::user();
-            if($check->is_agent ==1){
+            if($check->is_dealer ==0){
                 $save['up_agent_id'] = $request->input('agent_id');
                 $save['up_agent_id'] = $request->input('agent_id');
+                $add_record['agent_id'] = $request->input('agent_id');
+                $add_record['open_id'] = $check->wechat_open_id;
+                $add_record['action'] = 4;
+                $add_record['store_id'] = $datas['store_id'];
+                $add_record['detail'] = null;
+                AlbumWatchRecord::create($add_record);
             }else{
             }else{
                 $save['up_agent_id'] = 0;
                 $save['up_agent_id'] = 0;
             }
             }
@@ -389,6 +396,15 @@ class AlbumController extends Controller
         $store_id = request('store_id');
         $store_id = request('store_id');
         $status = request('status');
         $status = request('status');
         $style = request('style');
         $style = request('style');
+        $select_info = ['cat_id'=>$cat_id,'style'=>$style];
+        if($userAuth->up_agent_id!=0){
+            $add_record['agent_id'] = $userAuth->up_agent_id;
+            $add_record['open_id'] = $userAuth->wechat_open_id;
+            $add_record['action'] = 2;
+            $add_record['store_id'] = $store_id;
+            $add_record['detail'] = json_encode($select_info);
+            AlbumWatchRecord::create($add_record);
+        }
         if(isset($data['keywords'])&&!empty($data['keywords'])) {
         if(isset($data['keywords'])&&!empty($data['keywords'])) {
             $keywords = '%'.$data['keywords'].'%';
             $keywords = '%'.$data['keywords'].'%';
             $goods = AlbumProductModel::where([['name','like',$keywords],['store_id',$data['store_id']]]);
             $goods = AlbumProductModel::where([['name','like',$keywords],['store_id',$data['store_id']]]);
@@ -492,6 +508,15 @@ class AlbumController extends Controller
         }
         }
         $goods_id = request('goods_id');
         $goods_id = request('goods_id');
         $store_id = request('store_id');
         $store_id = request('store_id');
+        $select_info = ['goods_id'=>$goods_id];
+        if($userAuth->up_agent_id!=0){
+            $add_record['agent_id'] = $userAuth->up_agent_id;
+            $add_record['open_id'] = $userAuth->wechat_open_id;
+            $add_record['action'] = 2;
+            $add_record['store_id'] = $store_id;
+            $add_record['detail'] = json_encode($select_info);
+            AlbumWatchRecord::create($add_record);
+        }
         $goods = AlbumProductModel::where([['id',$goods_id],['store_id',$store_id]])->first();
         $goods = AlbumProductModel::where([['id',$goods_id],['store_id',$store_id]])->first();
         if(!empty($goods) && $userAuth->up_agent_id != 0){
         if(!empty($goods) && $userAuth->up_agent_id != 0){
             $price = DB::table('album_product_price')->where([['agent_id',$userAuth->up_agent_id],['store_id',$store_id],['product_id',$goods['id']]])->first();
             $price = DB::table('album_product_price')->where([['agent_id',$userAuth->up_agent_id],['store_id',$store_id],['product_id',$goods['id']]])->first();
@@ -594,6 +619,86 @@ class AlbumController extends Controller
         return $this->api($favorite);
         return $this->api($favorite);
     }
     }
 
 
+    /**
+     * @api {post} /api/album/get-watch-recored 查看客户浏览情况(get-watch-recored)
+     * @apiDescription 查看客户浏览情况(get-watch-recored)
+     * @apiGroup Album
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id 模拟值为0
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data": [
+     *          {
+     *              "time": 2018-1-1 10:10:12,
+     *              "action": '做了什么什么都做',
+     *              "user": [
+     *                  "username":"王小贱",
+     *                  "avatar":"awdawdawdawdawdawd",头像
+     *                  "phone":"1123123123123"
+     *              ]
+     *          }
+     *      ]
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+
+    public function albumGetWatchRecord(Request $request)
+    {
+        $userAuth = Auth('api')->user();
+        if(!$userAuth) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '未登录!');
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+        ],[
+            'store_id.required'=>'缺少商户参数',
+        ]);
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+        $store_id = $request->input('store_id');
+        if($userAuth->is_dealer!=1) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户不是经销商!', $validator->messages());
+        $user_agent = AlbumAgentModel::where('user_id',$userAuth->id)->first();
+        $res = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]])->get();
+        foreach($res as $key=>$val){
+            if($val->action==4){
+                $action = '进入我的画册';
+            }elseif($val->action == 1||$val->action ==3){
+                $goods_data = json_decode($val->detail,true);
+                $goods_id = $goods_data['goods_id'];
+                $goods = AlbumProductModel::find($goods_id);
+                $cat = AlbumCatModel::find($goods->cat_id);
+                $style = AlbumProductStyleModel::find($goods->style);
+                $val->action == 1? $act = '收藏':$act = '查看';
+                $action = $act.'了您的'.$cat->name.'分类下的'.$style->name.'风格的商品 '.$goods->name;
+            }elseif($val->action == 2){
+                $cat_data = json_decode($val->detail,true);
+                $cat = AlbumCatModel::find($cat_data['cat_id']);
+                $style = AlbumProductStyleModel::find($cat_data['style']);
+                $action = '浏览了您的 '.$cat->name.'分类下的 '.$style->name.'风格的商品列表';
+            }
+            $user = AlbumUserModel::where([['wechat_open_id',$val->open_id],['store_id',$val->store_id]])->select(['username','avatar','phone'])->first();
+            $data_res[] = [
+                'time'=>$val->created_at,
+                'action'=>$action,
+                'user'=>$user
+            ];
+        }
+        return $this->api(compact('data_res'));
+    }
+
     /**
     /**
      * @api {get} /api/album/checklogin 登陆应用(checklogin)
      * @api {get} /api/album/checklogin 登陆应用(checklogin)
      * @apiDescription 登陆应用(checklogin)
      * @apiDescription 登陆应用(checklogin)
@@ -746,10 +851,20 @@ class AlbumController extends Controller
             'store_id.required'=>'缺少商户参数',
             'store_id.required'=>'缺少商户参数',
             'product_id.required'=>'缺少商品参数',
             'product_id.required'=>'缺少商品参数',
         ]);
         ]);
+
         if ($validator->fails()) {
         if ($validator->fails()) {
             return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
             return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
         }
         }
         $data = $request->input();
         $data = $request->input();
+        $select_info = ['goods_id'=>$data['product_id']];
+        if($userAuth->up_agent_id!=0){
+            $add_record['agent_id'] = $userAuth->up_agent_id;
+            $add_record['open_id'] = $userAuth->wechat_open_id;
+            $add_record['action'] = 1;
+            $add_record['store_id'] = $data['store_id'];
+            $add_record['detail'] = json_encode($select_info);
+            AlbumWatchRecord::create($add_record);
+        }
         $check_user = AlbumXyxUserModel::find($userAuth->id);
         $check_user = AlbumXyxUserModel::find($userAuth->id);
         $check_f = AlbumFavoriteModel::where([['user_id',$userAuth->id],['product_id',$data['product_id']]])->first();
         $check_f = AlbumFavoriteModel::where([['user_id',$userAuth->id],['product_id',$data['product_id']]])->first();
         if(!$check_user||$check_f){
         if(!$check_user||$check_f){
@@ -973,8 +1088,57 @@ class AlbumController extends Controller
         return $this->api($return);
         return $this->api($return);
     }
     }
 
 
-
-
+    /**
+     * @api {post} /api/album/set-phone 获取用户号码(set-phone)
+     * @apiDescription 获取用户号码(set-phone)
+     * @apiGroup Album
+     * @apiPermission none
+     * @apiVersion 0.1.0
+     * @apiParam {int}    [store_id]  商户id 模拟值为0
+     * @apiParam {string}    [phone]  电话号码
+     * @apiSuccessExample {json} Success-Response:
+     * HTTP/1.1 200 OK
+     * {
+     *     "status": true,
+     *     "status_code": 0,
+     *     "message": "",
+     *     "data":[
+     *          "msg":返回信息,
+     *      ]
+     * }
+     * @apiErrorExample {json} Error-Response:
+     * HTTP/1.1 400 Bad Request
+     * {
+     *     "state": false,
+     *     "code": 1000,
+     *     "message": "传入参数不正确",
+     *     "data": null or []
+     * }
+     * 可能出现的错误代码:
+     *    1000    CLIENT_WRONG_PARAMS             传入参数不正确
+     */
+    public function albumSavePhone(Request $request)
+    {
+        $userAuth = Auth('api')->user();
+        if(!$userAuth) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '未登录!');
+        $validator = Validator::make($request->all(), [
+            'store_id' => 'required',
+            'phone' => 'required',
+        ],[
+            'store_id.required'=>'缺少商户参数',
+            'phone.required'=>'缺少号码参数',
+        ]);
+        if ($validator->fails()) {
+            return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '传入参数不正确!', $validator->messages());
+        }
+        $update['phone'] = $request->input('phone');
+        $res = $userAuth->save($update);
+        if($res){
+            return $this->api(['msg'=>'success']);
+        }else{
+            return $this->api(['msg'=>'error']);
+        }
+    }
 
 
 
 
 
 

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

@@ -21,7 +21,8 @@ class Controller extends BaseController
 
 
         $this->middleware('auth:api', [
         $this->middleware('auth:api', [
             'except' => [
             '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'
+                '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',
+                'albumGetWatchRecord'
             ]
             ]
         ]);
         ]);
 
 

+ 40 - 0
app/Models/AlbumWatchRecord.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 思维定制
+ * Date: 2018/11/9
+ * Time: 15:24
+ */
+
+namespace App\Models;
+
+
+class AlbumWatchRecord extends BaseModel
+{
+    /**
+     * 数据表名
+     *
+     * @var string
+     *
+     */
+    protected $table = 'album_watch_record';
+    /**
+     * 主键
+     */
+    protected $primaryKey = 'id';
+
+    //分页
+    protected $perPage = PAGE_NUMS;
+
+    /**
+     * 可以被集体附值的表的字段
+     *
+     * @var string
+     */
+    protected $fillable = [
+        'agent_id',
+        'open_id',
+        'action',
+        'detail'
+    ];
+}

+ 35 - 0
database/migrations/2018_11_09_145439_created_wactch_record.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatedWactchRecord extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('album_watch_record', function (Blueprint $table) {
+            $table->increments('id');
+            $table->unsignedInteger('agent_id')->comment('经销商id');
+            $table->string('openid_id',100)->comment('客户openid');
+            $table->unsignedInteger('action')->comment('1 收藏  2查看类目 3查看商品 4登陆');
+            $table->string('detail')->nullable()->default(null)->comment('详细');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('album_watch_record');
+    }
+}

+ 33 - 0
database/migrations/2018_11_09_154453_add_column_to_wactch_record.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddColumnToWactchRecord extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('album_watch_record', function (Blueprint $table) {
+            //
+            $table->unsignedInteger('store_id')->comment('storeid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('album_watch_record', function (Blueprint $table) {
+            //
+        });
+    }
+}

+ 101 - 0
public/apidoc/api_data.js

@@ -547,6 +547,53 @@ define({ "api": [
     "groupTitle": "Album",
     "groupTitle": "Album",
     "name": "GetApiAlbumStyle"
     "name": "GetApiAlbumStyle"
   },
   },
+  {
+    "type": "post",
+    "url": "/api/album/get-watch-recored",
+    "title": "查看客户浏览情况(get-watch-recored)",
+    "description": "<p>查看客户浏览情况(get-watch-recored)</p>",
+    "group": "Album",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id 模拟值为0</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             \"time\": 2018-1-1 10:10:12,\n             \"action\": '做了什么什么都做',\n             \"user\": [\n                 \"username\":\"王小贱\",\n                 \"avatar\":\"awdawdawdawdawdawd\",头像\n                 \"phone\":\"1123123123123\"\n             ]\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/AlbumController.php",
+    "groupTitle": "Album",
+    "name": "PostApiAlbumGetWatchRecored"
+  },
   {
   {
     "type": "post",
     "type": "post",
     "url": "/api/album/login",
     "url": "/api/album/login",
@@ -608,6 +655,60 @@ define({ "api": [
     "groupTitle": "Album",
     "groupTitle": "Album",
     "name": "PostApiAlbumLogin"
     "name": "PostApiAlbumLogin"
   },
   },
+  {
+    "type": "post",
+    "url": "/api/album/set-phone",
+    "title": "获取用户号码(set-phone)",
+    "description": "<p>获取用户号码(set-phone)</p>",
+    "group": "Album",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id 模拟值为0</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "string",
+            "optional": true,
+            "field": "phone",
+            "description": "<p>电话号码</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         \"msg\":返回信息,\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/AlbumController.php",
+    "groupTitle": "Album",
+    "name": "PostApiAlbumSetPhone"
+  },
   {
   {
     "type": "post",
     "type": "post",
     "url": "/api/album/xyx_login",
     "url": "/api/album/xyx_login",

+ 101 - 0
public/apidoc/api_data.json

@@ -547,6 +547,53 @@
     "groupTitle": "Album",
     "groupTitle": "Album",
     "name": "GetApiAlbumStyle"
     "name": "GetApiAlbumStyle"
   },
   },
+  {
+    "type": "post",
+    "url": "/api/album/get-watch-recored",
+    "title": "查看客户浏览情况(get-watch-recored)",
+    "description": "<p>查看客户浏览情况(get-watch-recored)</p>",
+    "group": "Album",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id 模拟值为0</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             \"time\": 2018-1-1 10:10:12,\n             \"action\": '做了什么什么都做',\n             \"user\": [\n                 \"username\":\"王小贱\",\n                 \"avatar\":\"awdawdawdawdawdawd\",头像\n                 \"phone\":\"1123123123123\"\n             ]\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/AlbumController.php",
+    "groupTitle": "Album",
+    "name": "PostApiAlbumGetWatchRecored"
+  },
   {
   {
     "type": "post",
     "type": "post",
     "url": "/api/album/login",
     "url": "/api/album/login",
@@ -608,6 +655,60 @@
     "groupTitle": "Album",
     "groupTitle": "Album",
     "name": "PostApiAlbumLogin"
     "name": "PostApiAlbumLogin"
   },
   },
+  {
+    "type": "post",
+    "url": "/api/album/set-phone",
+    "title": "获取用户号码(set-phone)",
+    "description": "<p>获取用户号码(set-phone)</p>",
+    "group": "Album",
+    "permission": [
+      {
+        "name": "none"
+      }
+    ],
+    "version": "0.1.0",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "int",
+            "optional": true,
+            "field": "store_id",
+            "description": "<p>商户id 模拟值为0</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "string",
+            "optional": true,
+            "field": "phone",
+            "description": "<p>电话号码</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         \"msg\":返回信息,\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/AlbumController.php",
+    "groupTitle": "Album",
+    "name": "PostApiAlbumSetPhone"
+  },
   {
   {
     "type": "post",
     "type": "post",
     "url": "/api/album/xyx_login",
     "url": "/api/album/xyx_login",

+ 1 - 1
public/apidoc/api_project.js

@@ -9,7 +9,7 @@ define({
   "apidoc": "0.3.0",
   "apidoc": "0.3.0",
   "generator": {
   "generator": {
     "name": "apidoc",
     "name": "apidoc",
-    "time": "2018-10-29T08:12:30.437Z",
+    "time": "2018-11-09T08:43:29.551Z",
     "url": "http://apidocjs.com",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
     "version": "0.17.6"
   }
   }

+ 1 - 1
public/apidoc/api_project.json

@@ -9,7 +9,7 @@
   "apidoc": "0.3.0",
   "apidoc": "0.3.0",
   "generator": {
   "generator": {
     "name": "apidoc",
     "name": "apidoc",
-    "time": "2018-10-29T08:12:30.437Z",
+    "time": "2018-11-09T08:43:29.551Z",
     "url": "http://apidocjs.com",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
     "version": "0.17.6"
   }
   }

+ 10 - 0
routes/api.php

@@ -240,6 +240,16 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($a
         'uses' => 'AlbumController@albumStyle',
         'uses' => 'AlbumController@albumStyle',
     ]);
     ]);
 
 
+    $api->post('album/set-phone', [
+        'as' => 'album.savePhone',
+        'uses' => 'AlbumController@albumSavePhone',
+    ]);
+
+    $api->post('album/get-watch-recored', [
+        'as' => 'album.GetWatchRecord',
+        'uses' => 'AlbumController@albumGetWatchRecord',
+    ]);
+
     $api->get('album/search_goods', [
     $api->get('album/search_goods', [
         'as' => 'album.search_goods',
         'as' => 'album.search_goods',
         'uses' => 'AlbumController@albumSearchGoods',
         'uses' => 'AlbumController@albumSearchGoods',