登录接口实现

This commit is contained in:
Taric Xin
2021-12-07 15:35:48 +08:00
parent 9167bb35f4
commit 4e0c3a3d03
14 changed files with 425 additions and 248 deletions

View File

@ -25,7 +25,7 @@ export class EAUserService extends BaseService {
/**
* 账号密码登录
*/
$api_login_by_account = `/scce/cuc/cuc/user/login?_allow_anonymous=true`;
$api_login_by_account = `/cuc/user/login?_allow_anonymous=true`;
/**
* 手机号登录
*/
@ -112,7 +112,7 @@ export class EAUserService extends BaseService {
* @param account 账号
* @param password 密码
*/
loginByAccount(account: string, password: string, sc: string) {
loginByAccount(account: string, password: string, sc?: string) {
this.request(this.$api_login_by_account, { username: account, password, sc }, 'POST', true, 'FORM').subscribe((res: any) => {
if (res?.token) {
this.tokenSrv.set({ token: res.token });