|
@@ -9,6 +9,7 @@ import {StudentInfoView} from "../../../viewmodel/user/studentInfo";
|
|
import {StudentView} from "../../../viewmodel/user/studentView";
|
|
import {StudentView} from "../../../viewmodel/user/studentView";
|
|
import {DictionaryItemView} from "../../../viewmodel/common/dictionaryItemView";
|
|
import {DictionaryItemView} from "../../../viewmodel/common/dictionaryItemView";
|
|
import {RegistView} from "../../../viewmodel/user/registView";
|
|
import {RegistView} from "../../../viewmodel/user/registView";
|
|
|
|
+import {ChangePassView} from "../../../viewmodel/user/changePassView";
|
|
|
|
|
|
@Injectable()
|
|
@Injectable()
|
|
export class UserService {
|
|
export class UserService {
|
|
@@ -52,6 +53,7 @@ export class UserService {
|
|
UserID: student.UserID,
|
|
UserID: student.UserID,
|
|
LoginID: loginID,
|
|
LoginID: loginID,
|
|
UserName: student.UserName,
|
|
UserName: student.UserName,
|
|
|
|
+ IDNumber: student.IDNumber,
|
|
classmajorID: student.ClassMajorID,
|
|
classmajorID: student.ClassMajorID,
|
|
classmajorName: student.ClassMajorName
|
|
classmajorName: student.ClassMajorName
|
|
}
|
|
}
|
|
@@ -232,6 +234,23 @@ export class UserService {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ changePass(changePassView: ChangePassView): Promise<ResultMessage>{
|
|
|
|
+ let url: string = AppConfig.getServiceUrl();
|
|
|
|
+ url += "UserServices/ChangePassword";
|
|
|
|
+ let openID: string = localStorage.openID;
|
|
|
|
+ if (!openID) openID = null;
|
|
|
|
+ return this.http.post(url, JSON.stringify({ changePasswordView: changePassView, userID: localStorage.userID }), {headers: ServiceCommon.getHeader()})
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then(res => {
|
|
|
|
+ let resMessage = res.json();
|
|
|
|
+ return{
|
|
|
|
+ isSuccess: resMessage.IsSuccess,
|
|
|
|
+ message: resMessage.Message,
|
|
|
|
+ data: resMessage.Data
|
|
|
|
+ } as ResultMessage;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
unbind(): Promise<ResultMessage> {
|
|
unbind(): Promise<ResultMessage> {
|
|
let url: string = AppConfig.getServiceUrl();
|
|
let url: string = AppConfig.getServiceUrl();
|
|
url += "UserServices/UnBind";
|
|
url += "UserServices/UnBind";
|