dev #14607 Море. Правки по сайту:
change agree info; remove add to apple wallet notification; fix apple wallet generation;
This commit is contained in:
parent
7fe4b6de52
commit
9fd031f423
@ -59,7 +59,9 @@ export class NavbarComponent implements OnInit {
|
||||
}
|
||||
|
||||
addToWallet = () => {
|
||||
this.appleWalletService.addCardToWallet();
|
||||
if (this.authService.userInfo) {
|
||||
this.appleWalletService.addCardToWallet(this.authService.userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
deleteToken = (): void => {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
||||
import { ExitComponent } from 'src/app/components/exit/exit.component';
|
||||
@ -34,8 +35,6 @@ export class GuestCardComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.negativeBalance = !Array.isArray(this.authService.userInfo?.walletBalances);
|
||||
this.showBack = getTypeDevice() === DeviceType.android;
|
||||
|
||||
this.requestPermission();
|
||||
}
|
||||
|
||||
requestPermission() {
|
||||
|
||||
@ -30,13 +30,13 @@
|
||||
</ngx-mat-intl-tel-input>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<p class="agree-info">
|
||||
Используя приложение, вы принимаете
|
||||
условия и соглашаетесь на получение
|
||||
рекламно-информационных сообщений
|
||||
</p>
|
||||
<button mat-raised-button color="primary">Принять участие</button>
|
||||
</form>
|
||||
<p class="agree-info">
|
||||
Используя приложение, вы принимаете условия
|
||||
соглашения и соглашаетесь на получение рекламно-информационных
|
||||
сообщений
|
||||
</p>
|
||||
</div>
|
||||
<ng-template #smsCode>
|
||||
<div class="wrapper">
|
||||
|
||||
@ -17,8 +17,9 @@
|
||||
.agree-info {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
margin-top: 40px;
|
||||
max-width: 80%;
|
||||
font-size: 12px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.logo {
|
||||
text-align: center;
|
||||
|
||||
@ -5,6 +5,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { CookiesService } from './cookies.service';
|
||||
import { RpcService, JsonrpcService } from 'src/app/services/jsonrpc.service';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { UserInfo } from 'src/app/interface/data';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -41,9 +42,24 @@ export class AppleWalletService {
|
||||
}
|
||||
|
||||
|
||||
async addCardToWallet() {
|
||||
async addCardToWallet(userInfo: UserInfo) {
|
||||
const token = this.cookiesService.getItem('token');
|
||||
|
||||
try {
|
||||
this.jsonrpc.rpc(
|
||||
{
|
||||
method: 'updateAdditionalInfo',
|
||||
params: [
|
||||
{
|
||||
first_name: userInfo.name,
|
||||
birth_day: '01.01.1999'
|
||||
},
|
||||
],
|
||||
},
|
||||
RpcService.authService,
|
||||
true
|
||||
).subscribe({
|
||||
next: async () => {
|
||||
const accountData = (
|
||||
await lastValueFrom(
|
||||
this.jsonrpc.rpc(
|
||||
@ -67,9 +83,9 @@ export class AppleWalletService {
|
||||
},
|
||||
});
|
||||
}
|
||||
}});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,8 +179,8 @@ export class AuthService {
|
||||
|
||||
await this.getUserInfo();
|
||||
|
||||
if(getTypeDevice() === DeviceType.ios) {
|
||||
this.appleWalletService.addCardToWallet();
|
||||
if (getTypeDevice() === DeviceType.ios) {
|
||||
this.appleWalletService.addCardToWallet(this.userInfo!);
|
||||
}
|
||||
} else if (result.code === 230) {
|
||||
this.messageService.clear();
|
||||
@ -279,8 +279,8 @@ export class AuthService {
|
||||
next: async () => {
|
||||
this.router.navigate(['/']);
|
||||
await this.getUserInfo();
|
||||
if(getTypeDevice() === DeviceType.ios) {
|
||||
this.appleWalletService.addCardToWallet();
|
||||
if (getTypeDevice() === DeviceType.ios) {
|
||||
this.appleWalletService.addCardToWallet(this.userInfo!);
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user