add 用户绑定邀请码
This commit is contained in:
parent
1014b70b74
commit
d84f5d4413
@ -1472,4 +1472,9 @@ class UserRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bindPromotionCode($promotionCode, $uid)
|
||||||
|
{
|
||||||
|
return $this->dao->update($uid, ['promotion_code' => $promotionCode, 'promoter_time' => date('Y-m-d H:i:s')]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -528,4 +528,11 @@ class User extends BaseController
|
|||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bindPromotionCode()
|
||||||
|
{
|
||||||
|
$promotionCode = $this->request->param('promotion_code');
|
||||||
|
$this->repository->bindPromotionCode($promotionCode, $this->request->uid());
|
||||||
|
return app('json')->success('修改成功');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,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