|
@@ -30,11 +30,12 @@ class UserController
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取用户信息
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /userinfo 获取用户信息
|
|
|
|
|
+ * @apiName GetUserinfo
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
- public function userInfo(Request $request)
|
|
|
|
|
|
|
+ public function userinfo(Request $request)
|
|
|
{
|
|
{
|
|
|
$info = $request->user()->toArray();
|
|
$info = $request->user()->toArray();
|
|
|
$broken_time = intval(sys_config('extract_time'));
|
|
$broken_time = intval(sys_config('extract_time'));
|
|
@@ -59,21 +60,22 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 用户资金统计
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
- * @throws \think\Exception
|
|
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
|
|
- * @throws \think\exception\DbException
|
|
|
|
|
|
|
+ * @api {get} /user/balance 用户资金统计
|
|
|
|
|
+ * @apiName GetUserBalance
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function balance(Request $request)
|
|
public function balance(Request $request)
|
|
|
{
|
|
{
|
|
|
$uid = $request->uid();
|
|
$uid = $request->uid();
|
|
|
|
|
|
|
|
- $user['now_money'] = User::getUserInfo($uid, 'now_money')['now_money'];//当前总资金
|
|
|
|
|
- $user['recharge'] = UserBill::getRecharge($uid);//累计充值
|
|
|
|
|
- $user['orderStatusSum'] = StoreOrder::getOrderStatusSum($uid);//累计消费
|
|
|
|
|
|
|
+ $user['now_money'] = User::getUserInfo($uid, 'now_money')['now_money']; //当前总资金
|
|
|
|
|
+ $user['recharge'] = UserBill::getRecharge($uid); //累计充值
|
|
|
|
|
+ $user['orderStatusSum'] = StoreOrder::getOrderStatusSum($uid); //累计消费
|
|
|
$coins = UserCoin::alias('uc')
|
|
$coins = UserCoin::alias('uc')
|
|
|
->join('dict_coin dc', 'uc.symbol=dc.symbol')->field('uc.symbol, dc.icon, uc.addr, uc.balance as total')
|
|
->join('dict_coin dc', 'uc.symbol=dc.symbol')->field('uc.symbol, dc.icon, uc.addr, uc.balance as total')
|
|
|
->where('uid', $uid)->select();
|
|
->where('uid', $uid)->select();
|
|
@@ -83,9 +85,15 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 个人中心
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /user 个人中心
|
|
|
|
|
+ * @apiName GetUser
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiParam none None
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function user(Request $request)
|
|
public function user(Request $request)
|
|
|
{
|
|
{
|
|
@@ -95,11 +103,11 @@ class UserController
|
|
|
$user['like'] = StoreProductRelation::getUserIdCollect($user['uid']);
|
|
$user['like'] = StoreProductRelation::getUserIdCollect($user['uid']);
|
|
|
$user['orderStatusNum'] = StoreOrder::getOrderData($user['uid']);
|
|
$user['orderStatusNum'] = StoreOrder::getOrderData($user['uid']);
|
|
|
$user['notice'] = UserNotice::getNotice($user['uid']);
|
|
$user['notice'] = UserNotice::getNotice($user['uid']);
|
|
|
-// $user['brokerage'] = UserBill::getBrokerage($user['uid']);//获取总佣金
|
|
|
|
|
- $user['recharge'] = UserBill::getRecharge($user['uid']);//累计充值
|
|
|
|
|
- $user['orderStatusSum'] = StoreOrder::getOrderStatusSum($user['uid']);//累计消费
|
|
|
|
|
- $user['extractTotalPrice'] = UserExtract::userExtractTotalPrice($user['uid']);//累计提现
|
|
|
|
|
- $user['extractPrice'] = $user['brokerage_price'];//可提现
|
|
|
|
|
|
|
+ // $user['brokerage'] = UserBill::getBrokerage($user['uid']);//获取总佣金
|
|
|
|
|
+ $user['recharge'] = UserBill::getRecharge($user['uid']); //累计充值
|
|
|
|
|
+ $user['orderStatusSum'] = StoreOrder::getOrderStatusSum($user['uid']); //累计消费
|
|
|
|
|
+ $user['extractTotalPrice'] = UserExtract::userExtractTotalPrice($user['uid']); //累计提现
|
|
|
|
|
+ $user['extractPrice'] = $user['brokerage_price']; //可提现
|
|
|
$user['statu'] = (int)sys_config('store_brokerage_statu');
|
|
$user['statu'] = (int)sys_config('store_brokerage_statu');
|
|
|
$broken_time = intval(sys_config('extract_time'));
|
|
$broken_time = intval(sys_config('extract_time'));
|
|
|
$search_time = time() - 86400 * $broken_time;
|
|
$search_time = time() - 86400 * $broken_time;
|
|
@@ -147,8 +155,8 @@ class UserController
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$user['yesterDay'] = UserBill::yesterdayCommissionSum($user['uid']);
|
|
$user['yesterDay'] = UserBill::yesterdayCommissionSum($user['uid']);
|
|
|
- $user['recharge_switch'] = (int)sys_config('recharge_switch');//充值开关
|
|
|
|
|
- $user['adminid'] = (boolean)\app\models\store\StoreService::orderServiceStatus($user['uid']);
|
|
|
|
|
|
|
+ $user['recharge_switch'] = (int)sys_config('recharge_switch'); //充值开关
|
|
|
|
|
+ $user['adminid'] = (bool)\app\models\store\StoreService::orderServiceStatus($user['uid']);
|
|
|
if ($user['phone'] && $user['user_type'] != 'h5') {
|
|
if ($user['phone'] && $user['user_type'] != 'h5') {
|
|
|
$user['switchUserInfo'][] = $request->user();
|
|
$user['switchUserInfo'][] = $request->user();
|
|
|
if ($h5UserInfo = User::where('account', $user['phone'])->where('user_type', 'h5')->find()) {
|
|
if ($h5UserInfo = User::where('account', $user['phone'])->where('user_type', 'h5')->find()) {
|
|
@@ -170,13 +178,15 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 地址 获取单个
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @param $id
|
|
|
|
|
- * @return mixed
|
|
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
|
|
- * @throws \think\exception\DbException
|
|
|
|
|
|
|
+ * @api {get} /address/detail/:id 地址获取单个
|
|
|
|
|
+ * @apiName GetAddress
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiParam {int} id address_id
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address(Request $request, $id)
|
|
public function address(Request $request, $id)
|
|
|
{
|
|
{
|
|
@@ -188,11 +198,17 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 地址列表
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @param $page
|
|
|
|
|
- * @param $limit
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /address/list 地址列表
|
|
|
|
|
+ * @apiName GetAddressList
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiQuery {int} page
|
|
|
|
|
+ * @apiQuery {int} limit
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address_list(Request $request)
|
|
public function address_list(Request $request)
|
|
|
{
|
|
{
|
|
@@ -202,10 +218,19 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 设置默认地址
|
|
|
|
|
- *
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /address/default/set 设置默认地址
|
|
|
|
|
+ * @apiName PostAddressDefaultSet
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiQuery {int} id address_id
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address_default_set(Request $request)
|
|
public function address_default_set(Request $request)
|
|
|
{
|
|
{
|
|
@@ -221,9 +246,16 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取默认地址
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /address/default 获取默认地址
|
|
|
|
|
+ * @apiName GetAddressDefault
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address_default(Request $request)
|
|
public function address_default(Request $request)
|
|
|
{
|
|
{
|
|
@@ -236,9 +268,18 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 修改 添加地址
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /address/edit 修改添加地址
|
|
|
|
|
+ * @apiName PostAddressEdit
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiBody none None
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address_edit(Request $request)
|
|
public function address_edit(Request $request)
|
|
|
{
|
|
{
|
|
@@ -307,10 +348,16 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 删除地址
|
|
|
|
|
- *
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /address/del 删除地址
|
|
|
|
|
+ * @apiName PostAddressDel
|
|
|
|
|
+ * @apiGroup User.Address
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function address_del(Request $request)
|
|
public function address_del(Request $request)
|
|
|
{
|
|
{
|
|
@@ -326,10 +373,16 @@ class UserController
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取收藏产品
|
|
|
|
|
- *
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /collect/user 获取收藏产品
|
|
|
|
|
+ * @apiName GetCollectUser
|
|
|
|
|
+ * @apiGroup User.Collect
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function collect_user(Request $request)
|
|
public function collect_user(Request $request)
|
|
|
{
|
|
{
|
|
@@ -343,11 +396,16 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 添加收藏
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @param $id
|
|
|
|
|
- * @param $category
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /collect/add 添加收藏
|
|
|
|
|
+ * @apiName PostCollectAdd
|
|
|
|
|
+ * @apiGroup User.Collect
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function collect_add(Request $request)
|
|
public function collect_add(Request $request)
|
|
|
{
|
|
{
|
|
@@ -359,10 +417,16 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 取消收藏
|
|
|
|
|
- *
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /collect/del 取消收藏
|
|
|
|
|
+ * @apiName PostCollectDel
|
|
|
|
|
+ * @apiGroup User.Collect
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function collect_del(Request $request)
|
|
public function collect_del(Request $request)
|
|
|
{
|
|
{
|
|
@@ -374,9 +438,16 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 批量收藏
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /collect/all 批量收藏
|
|
|
|
|
+ * @apiName PostCollectAll
|
|
|
|
|
+ * @apiGroup User.Collect
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
|
|
+ * @apiErrorExample Failed
|
|
|
|
|
+ * {
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function collect_all(Request $request)
|
|
public function collect_all(Request $request)
|
|
|
{
|
|
{
|
|
@@ -397,14 +468,14 @@ class UserController
|
|
|
* @param Request $request
|
|
* @param Request $request
|
|
|
* @return mixed
|
|
* @return mixed
|
|
|
*/
|
|
*/
|
|
|
-// public function like_add(Request $request)
|
|
|
|
|
-// {
|
|
|
|
|
-// list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
|
|
|
|
|
-// if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
|
|
|
|
|
-// $res = StoreProductRelation::productRelation($id,$request->uid(),'like',$category);
|
|
|
|
|
-// if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
|
|
|
|
|
-// else return app('json')->successful();
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ // public function like_add(Request $request)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
|
|
|
|
|
+ // if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
|
|
|
|
|
+ // $res = StoreProductRelation::productRelation($id,$request->uid(),'like',$category);
|
|
|
|
|
+ // if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
|
|
|
|
|
+ // else return app('json')->successful();
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 取消点赞
|
|
* 取消点赞
|
|
@@ -412,21 +483,24 @@ class UserController
|
|
|
* @param Request $request
|
|
* @param Request $request
|
|
|
* @return mixed
|
|
* @return mixed
|
|
|
*/
|
|
*/
|
|
|
-// public function like_del(Request $request)
|
|
|
|
|
-// {
|
|
|
|
|
-// list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
|
|
|
|
|
-// if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
|
|
|
|
|
-// $res = StoreProductRelation::unProductRelation($id, $request->uid(),'like',$category);
|
|
|
|
|
-// if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
|
|
|
|
|
-// else return app('json')->successful();
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ // public function like_del(Request $request)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
|
|
|
|
|
+ // if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
|
|
|
|
|
+ // $res = StoreProductRelation::unProductRelation($id, $request->uid(),'like',$category);
|
|
|
|
|
+ // if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
|
|
|
|
|
+ // else return app('json')->successful();
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 签到 配置
|
|
|
|
|
- * @return mixed
|
|
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
|
|
- * @throws \think\exception\DbException
|
|
|
|
|
|
|
+ * @api {get} /sign/config 签到配置
|
|
|
|
|
+ * @apiName GetSignConfig
|
|
|
|
|
+ * @apiGroup User.Sign
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function sign_config()
|
|
public function sign_config()
|
|
|
{
|
|
{
|
|
@@ -435,11 +509,14 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 签到 列表
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @param $page
|
|
|
|
|
- * @param $limit
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /sign/list 签到列表
|
|
|
|
|
+ * @apiName GetSignList
|
|
|
|
|
+ * @apiGroup User.Sign
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function sign_list(Request $request)
|
|
public function sign_list(Request $request)
|
|
|
{
|
|
{
|
|
@@ -454,9 +531,10 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 签到
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /sign/integral 签到
|
|
|
|
|
+ * @apiName PostSignIntegral
|
|
|
|
|
+ * @apiGroup User.Sign
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function sign_integral(Request $request)
|
|
public function sign_integral(Request $request)
|
|
|
{
|
|
{
|
|
@@ -468,9 +546,10 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 签到用户信息
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /sign/user 签到用户信息
|
|
|
|
|
+ * @apiName PostSignUser
|
|
|
|
|
+ * @apiGroup User.Sign
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function sign_user(Request $request)
|
|
public function sign_user(Request $request)
|
|
|
{
|
|
{
|
|
@@ -508,10 +587,10 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 签到列表(年月)
|
|
|
|
|
- *
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /sign/month 签到列表(年月)
|
|
|
|
|
+ * @apiName GetSignMonth
|
|
|
|
|
+ * @apiGroup User.Sign
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function sign_month(Request $request)
|
|
public function sign_month(Request $request)
|
|
|
{
|
|
{
|
|
@@ -525,8 +604,10 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取活动状态
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /user/activity 获取活动状态
|
|
|
|
|
+ * @apiName GetUserActivity
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function activity()
|
|
public function activity()
|
|
|
{
|
|
{
|
|
@@ -537,9 +618,17 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 用户修改信息
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {post} /user/edit 用户修改信息
|
|
|
|
|
+ * @apiName PostUserEdit
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiBody {string} avatar 头像
|
|
|
|
|
+ * @apiBody {string} nickname 昵称
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function edit(Request $request)
|
|
public function edit(Request $request)
|
|
|
{
|
|
{
|
|
@@ -552,12 +641,11 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 推广人排行
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
|
|
- * @throws \think\exception\DbException
|
|
|
|
|
|
|
+ * @api {get} /rank 推广人排行
|
|
|
|
|
+ * @apiName GetRank
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function rank(Request $request)
|
|
public function rank(Request $request)
|
|
|
{
|
|
{
|
|
@@ -571,9 +659,17 @@ class UserController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 佣金排行
|
|
|
|
|
- * @param Request $request
|
|
|
|
|
- * @return mixed
|
|
|
|
|
|
|
+ * @api {get} /brokerage_rank 佣金排行
|
|
|
|
|
+ * @apiName GetBrokerage_rank
|
|
|
|
|
+ * @apiGroup User
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiBody {string} avatar 头像
|
|
|
|
|
+ * @apiBody {string} nickname 昵称
|
|
|
|
|
+ *
|
|
|
|
|
+ * @apiSuccessExample Succeed
|
|
|
|
|
+ * {
|
|
|
|
|
+ *
|
|
|
|
|
+ * }
|
|
|
*/
|
|
*/
|
|
|
public function brokerage_rank(Request $request)
|
|
public function brokerage_rank(Request $request)
|
|
|
{
|
|
{
|
|
@@ -604,7 +700,5 @@ class UserController
|
|
|
'rank' => $users,
|
|
'rank' => $users,
|
|
|
'position' => $position
|
|
'position' => $position
|
|
|
]);
|
|
]);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-}
|
|
|
|
|
|
|
+}
|