You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
835 B
36 lines
835 B
4 years ago
|
import { Injectable } from '@angular/core';
|
||
|
import {environment} from '../../environments/environment';
|
||
|
import {HttpClient} from '@angular/common/http';
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: 'root'
|
||
|
})
|
||
|
export class UserService {
|
||
|
|
||
|
constructor(private http: HttpClient) { }
|
||
|
|
||
|
/**
|
||
|
* 校验是否填写过密码
|
||
|
*
|
||
|
* @param userId 用户id
|
||
|
* @param callBack 返回参数
|
||
|
*/
|
||
|
public passwordIsEmpty(userId: number, callBack) {
|
||
|
this.http.get(environment.baseUrl + 'bsUser/passwordIsEmpty?userId=' + userId).subscribe(data => {
|
||
|
callBack(data);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 修改密码
|
||
|
* @param param 参数
|
||
|
* @param callBack 返回参数
|
||
|
*/
|
||
|
public editPassword(param: object, callBack) {
|
||
|
this.http.post(environment.baseUrl + 'bsUser/editPassword', param).subscribe(data => {
|
||
|
callBack(data);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
}
|