|
@@ -12,6 +12,7 @@ import { AuthService } from '../../../services/auth.service';
|
|
|
import { ionicStandaloneModules } from '../../ionic-standalone.modules';
|
|
|
import { province } from '../../../services/address';
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
+import { AccountService } from '../../../services/account.service';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-setting',
|
|
@@ -35,6 +36,7 @@ export class SettingComponent implements OnInit {
|
|
|
sex: '',
|
|
|
age: '',
|
|
|
remark: '',
|
|
|
+ auditing:false
|
|
|
};
|
|
|
mobile: string = '';
|
|
|
loading: any;
|
|
@@ -101,11 +103,13 @@ export class SettingComponent implements OnInit {
|
|
|
get getTag(){
|
|
|
return this.tags.filter(item=>item.check);
|
|
|
}
|
|
|
+ vip:any
|
|
|
constructor(
|
|
|
private alertController: AlertController,
|
|
|
public loadingCtrl: LoadingController,
|
|
|
public toastController: ToastController,
|
|
|
private authServ: AuthService,
|
|
|
+ private accServ: AccountService,
|
|
|
// private router: Router
|
|
|
) {}
|
|
|
|
|
@@ -133,6 +137,7 @@ export class SettingComponent implements OnInit {
|
|
|
this.formData.name = this.profile?.get('name') || '';
|
|
|
this.formData.age = this.profile?.get('birthdate') || '';
|
|
|
this.formData.remark = this.profile?.get('remark') || '';
|
|
|
+ this.formData.auditing = this.profile?.get('auditing');
|
|
|
this.loading.dismiss();
|
|
|
if (user?.get('city') && user?.get('province')) {
|
|
|
this.address = user?.get('province') + '-' + user?.get('city');
|
|
@@ -142,6 +147,7 @@ export class SettingComponent implements OnInit {
|
|
|
this.tags.map(item=>{
|
|
|
item.check = this.profile?.get('tags')?.includes(item.val) || false;
|
|
|
})
|
|
|
+ this.vip = this.accServ.userVip;
|
|
|
}
|
|
|
onChange(e: any, type: string) {
|
|
|
this.formData[type] = e.detail.value;
|
|
@@ -198,6 +204,7 @@ export class SettingComponent implements OnInit {
|
|
|
this.profile?.set('sex', this.formData.sex);
|
|
|
this.profile?.set('birthdate', this.formData.age);
|
|
|
this.profile?.set('remark', this.formData.remark);
|
|
|
+ this.profile?.set('auditing', this.formData.auditing);
|
|
|
this.profile?.set('address', this.address);
|
|
|
let t = this.tags.filter((x) => x.check)?.map(item=> item.val)
|
|
|
this.profile?.set('tag', t);
|