关于登录报错问题
来源:7-2 用户注册页面与 API 结合的开发
爱拉舞imooc
2018-01-22
感谢老师!
找到原因了,低级错误
逻辑代码没有问题,API 写错了!登录API 写成了注册的!汗
----------------------------------------------------------------------
1.成功注册后,登录报错截图:

2.传参代码如下(与老师相同):
register(mobile, nickname, password): Observable<string[]> {
return this.getUrlReturn(this.apiUrlRegister + "?mobile=" + mobile + "&nickname=" + nickname + "&password=" + password)}
login(mobile, password): Observable<string[]> {
return this.getUrlReturn(this.apiUrlLogin + "?mobile=" + mobile + "&password=" + password);
}
getUserInfo(userId): Observable<string[]> {
return this.getUrlReturn(this.apiUrlUserInfo + "?userid=" + userId);}
updateNickName(userId,nickname):Observable<string[]>{
return this.getUrlReturn(this.apiUrlUpdateNickName + "?userid=" + userId + "&nickname=" + nickname);
}
1回答
-
爱拉舞imooc
提问者
2018-01-22
逻辑代码没有问题,API 写错了!
登录 写成了注册的地址!
感谢各位!
10
相似问题