添加绑定邀请码
This commit is contained in:
parent
829a250047
commit
c769fbbd37
@ -1649,4 +1649,10 @@ class UserRepository extends BaseRepository
|
|||||||
{
|
{
|
||||||
return app()->make(UserInfoRepository::class)->getSearch(['is_used' => 1])->order(['sort', 'create_time' => 'ASC'])->select()->toArray();
|
return app()->make(UserInfoRepository::class)->getSearch(['is_used' => 1])->order(['sort', 'create_time' => 'ASC'])->select()->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bindPromotionCode($promotionCode, $uid)
|
||||||
|
{
|
||||||
|
return $this->dao->update($uid, ['promotion_code' => $promotionCode, 'promoter_time' => date('Y-m-d H:i:s')]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -589,4 +589,11 @@ class User extends BaseController
|
|||||||
return app('json')->success(['url' => $data]);
|
return app('json')->success(['url' => $data]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bindPromotionCode()
|
||||||
|
{
|
||||||
|
$promotionCode = $this->request->param('promotion_code');
|
||||||
|
$this->repository->bindPromotionCode($promotionCode, $this->request->uid());
|
||||||
|
return app('json')->success('修改成功');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,7 @@ Route::group('api/', function () {
|
|||||||
Route::post('change/phone', 'User/changePhone');
|
Route::post('change/phone', 'User/changePhone');
|
||||||
Route::post('change/info', 'User/updateBaseInfo');
|
Route::post('change/info', 'User/updateBaseInfo');
|
||||||
Route::post('change/password', 'User/changePassword');
|
Route::post('change/password', 'User/changePassword');
|
||||||
|
Route::post('change/bind_promotion_code', 'User/bindPromotionCode');
|
||||||
//收藏
|
//收藏
|
||||||
Route::get('/relation/product/lst', 'UserRelation/productList');
|
Route::get('/relation/product/lst', 'UserRelation/productList');
|
||||||
Route::get('/relation/merchant/lst', 'UserRelation/merchantList');
|
Route::get('/relation/merchant/lst', 'UserRelation/merchantList');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user