fix bug
This commit is contained in:
@ -76,12 +76,10 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">{{ infoData.phone }}</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
<span *ngIf="infoData.phone; else elsePhone"
|
||||
><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'" style="color: #52c41a"></i> 已绑定</span
|
||||
>
|
||||
<ng-template #elsePhone
|
||||
><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'" style="color: #ccc"></i> 未绑定</ng-template
|
||||
>
|
||||
<span *ngIf="infoData.phone; else elsePhone"><i nz-icon [nzType]="'check-circle'" [nzTheme]="'fill'"
|
||||
style="color: #52c41a"></i> 已绑定</span>
|
||||
<ng-template #elsePhone><i nz-icon [nzType]="'question-circle'" [nzTheme]="'fill'"
|
||||
style="color: #ccc"></i> 未绑定</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</nz-list-item-meta-title>
|
||||
@ -110,22 +108,6 @@
|
||||
<div class="item-btn"><a (click)="edit('password')">修改</a></div>
|
||||
</nz-list-item>
|
||||
</nz-list>
|
||||
<!-- <div class="info">
|
||||
<nz-card style="width: 100%; margin-top: 16px" [nzBordered]="false">
|
||||
<nz-card-meta [nzAvatar]="avatarTemplate" [nzTitle]="infoData.nickName" [nzDescription]="content"></nz-card-meta>
|
||||
<ng-template #avatarTemplate>
|
||||
<nz-avatar
|
||||
style="width: 80px; height: 80px; border: 1px solid #979797; border-radius: 100%"
|
||||
[nzSrc]="infoData.avatar"
|
||||
></nz-avatar>
|
||||
</ng-template>
|
||||
<ng-template #content>
|
||||
<div>用户名:{{ infoData.name }} | 手机号:{{ infoData.phone }}</div>
|
||||
<div>性别:{{ infoData.sexName }} | 生日:{{ infoData.birthday }}</div>
|
||||
<div>真实姓名:{{ infoData.realName }} | 身份证号码:{{ infoData.certificateNumber }}</div>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<a (click)="edit('info')" class="info-btn">修改</a>
|
||||
</div> -->
|
||||
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
@ -134,23 +134,21 @@ export class AccountComponentsCenterComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
getInfo() {
|
||||
const params = {
|
||||
// id: this.i.id,
|
||||
};
|
||||
// this.service.http.post(this.service.$api_getUserInfo, params).subscribe((res) => {
|
||||
// this.infoData = res.data;
|
||||
// this.infoData.avatar = [
|
||||
// {
|
||||
// uid: -1,
|
||||
// name: 'LOGO',
|
||||
// status: 'done',
|
||||
// url: res.data.avatar,
|
||||
// response: {
|
||||
// url: res.data.avatar,
|
||||
// },
|
||||
// },
|
||||
// ];
|
||||
// });
|
||||
this.service.http.post(this.service.$api_get_current_user_info).subscribe((res) => {
|
||||
console.log(res)
|
||||
this.infoData = res.data;
|
||||
// this.infoData.avatar = [
|
||||
// {
|
||||
// uid: -1,
|
||||
// name: 'LOGO',
|
||||
// status: 'done',
|
||||
// url: res.data.avatar,
|
||||
// response: {
|
||||
// url: res.data.avatar,
|
||||
// },
|
||||
// },
|
||||
// ];
|
||||
});
|
||||
}
|
||||
|
||||
edit(tpye: string) {
|
||||
@ -200,7 +198,7 @@ export class AccountComponentsCenterComponent implements OnInit {
|
||||
|
||||
formSubmit(value: any): void {
|
||||
const params = { ...value };
|
||||
this.service.request(`${this.service.$api_updateUserInfo}`, params).subscribe((res) => {
|
||||
this.service.request(`${this.service.$api_get_current_user_info}`, params).subscribe((res) => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('保存成功');
|
||||
this.getInfo();
|
||||
|
||||
@ -105,7 +105,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
||||
const params = {
|
||||
// phoneNumber: phone
|
||||
};
|
||||
this.service.request(this.service.$api_get_msg_code, params, 'POST', true, 'FORM').subscribe((res) => {
|
||||
this.service.request(this.service.$api_get_current_user_info, params, 'POST', true, 'FORM').subscribe((res) => {
|
||||
console.log(res);
|
||||
// code==503046 弹出网易盾
|
||||
if (res && res.code === '1') {
|
||||
@ -138,7 +138,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
||||
const params = {
|
||||
// id: this.i.id,
|
||||
};
|
||||
this.service.http.post(this.service.$api_get_current_user_detail, params).subscribe((res) => {
|
||||
this.service.http.post(this.service.$api_get_current_user_info, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// this.getCaptcha(res.data.phone);
|
||||
// }
|
||||
@ -204,7 +204,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit
|
||||
const params = {
|
||||
...this.sf.value,
|
||||
};
|
||||
this.service.http.post(this.service.$api_updateUserName, params).subscribe((res) => {
|
||||
this.service.http.post(this.service.$api_get_current_user_info, params).subscribe((res) => {
|
||||
console.log(res, 'submitForm');
|
||||
if (res.success) {
|
||||
this.service.msgSrv.success(res.msg);
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-11-02 11:12:21
|
||||
* @LastEditTime: 2021-11-05 10:04:26
|
||||
* @LastEditors: your name
|
||||
* @LastEditTime: 2021-12-13 17:43:32
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \scm-ows-ui\src\app\routes\account\services\account.service.ts
|
||||
*/
|
||||
@ -17,44 +17,9 @@ import { EAFileUtil } from 'src/app/shared/utils/file.util';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AccountService extends BaseService {
|
||||
public $api_add_one!: string;
|
||||
public $api_add_many!: string;
|
||||
public $api_edit_one!: string;
|
||||
public $api_edit_many!: string;
|
||||
public $api_del_one!: string;
|
||||
public $api_del_many!: string;
|
||||
public $api_get_many!: string;
|
||||
public $api_get_one!: string;
|
||||
public $api_get_page!: string;
|
||||
public $api_export!: string;
|
||||
public $api_import!: string;
|
||||
public $api_import_download_tpl!: string;
|
||||
// 获取当前登录用户详情
|
||||
$api_get_current_user_detail = `/cuc/user/getUserInfo`;
|
||||
// 获取当前登录用户基本信息
|
||||
$api_getUserInfo = `/cuc/user/getUserInfo`;
|
||||
// 修改用户信息
|
||||
$api_updateUserInfo = `/cuc/userBasicInfo/updateUserInfo`;
|
||||
// 凭证修改手机号
|
||||
$api_voucherUpdatePhone = '/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone';
|
||||
// 凭证修改密码
|
||||
$api_voucherUpdatePassword = '/cuc/userBasicInfo/forgetPassword/voucherUpdatePassword';
|
||||
// 根据当前登录用户绑定的手机号码获取短信验证码
|
||||
public $api_get_msg_code = `/cuc/userBasicInfo/getLoginUserSMVerificationCode`;
|
||||
// 验证手机号
|
||||
$api_verifyPhone = '/cuc/userBasicInfo/forgetPassword/verifyPhone';
|
||||
|
||||
// 获取当前登录用户详情
|
||||
$api_get_current_user_info = `/cuc/user/getUserInfo`;
|
||||
|
||||
// 修改用户名
|
||||
$api_updateUserName = `/cuc/userBasicInfo/updateUserName`;
|
||||
// 验证用户名是否已被使用
|
||||
$api_checkUserName = `/cuc/userBasicInfo/checkUserName`;
|
||||
|
||||
// constructor(http: _HttpClient, msgSrv: NzMessageService, fileExt: EAFileUtil) {
|
||||
// super(http, msgSrv, fileExt);
|
||||
// }
|
||||
$api_get_current_user_info = `/api/mdc/cuc/user/getUserInfo`;
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user