Commit d9cb1f13 by Adarsh K

fix bugs

parent 0173e664
...@@ -341,6 +341,7 @@ export class CartPage implements OnInit { ...@@ -341,6 +341,7 @@ export class CartPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const regex = '%uFFFD';
return unescape(text.replace(/%uFFFD/g, ''));
} }
} }
<div class="nav_header"> <div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()"></button> <button class="nav_btn nav_back floatLeft" (click)="goBack()"></button>
<div class="nav_title floatLeft"> <div class="nav_title floatLeft">
<input <input class="search_bar" placeholder="Search here.. eg:shirts, retailers etc..." (click)="clickSearch()" />
class="search_bar"
placeholder="Search here.. eg:shirts, retailers etc..."
(click)="clickSearch()"
/>
</div> </div>
<button class="nav_btn nav_search floatRight" *ngIf="!searchShow"></button> <button class="nav_btn nav_search floatRight" *ngIf="!searchShow"></button>
<button <button class="nav_btn nav_close floatRight" *ngIf="searchShow" (click)="searchClose()"></button>
class="nav_btn nav_close floatRight"
*ngIf="searchShow"
(click)="searchClose()"
></button>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<ion-content> <ion-content>
...@@ -21,20 +13,11 @@ ...@@ -21,20 +13,11 @@
Featured Stores Featured Stores
</div> </div>
<div class="featured_slider"> <div class="featured_slider">
<ion-slides <ion-slides pager="false" [options]="slideOpts"
pager="false" *ngIf="shopperService.activeshoppers && shopperService.activeshoppers.length > 0">
[options]="slideOpts"
*ngIf="shopperService.activeshoppers && shopperService.activeshoppers.length > 0"
>
<ion-slide *ngFor="let shopper of shopperService.activeshoppers"> <ion-slide *ngFor="let shopper of shopperService.activeshoppers">
<div <div class="feature_product" (click)="goToPage('productlist', shopper)">
class="feature_product" <img [src]="shopper.featuredImage" onerror="this.src='./../../assets/getmi_malls/featured/featured1.png'" />
(click)="goToPage('productlist', shopper)"
>
<img
[src]="shopper.featuredImage"
onerror="this.src='./../../assets/getmi_malls/featured/featured1.png'"
/>
<div class="feature_overlay"> <div class="feature_overlay">
<h5>{{shopper.name}}</h5> <h5>{{shopper.name}}</h5>
<p>{{shopper.caption}}</p> <p>{{shopper.caption}}</p>
...@@ -48,21 +31,14 @@ ...@@ -48,21 +31,14 @@
</div> </div>
<div class="nearby_shop_list"> <div class="nearby_shop_list">
<ul *ngIf="shopperService.shoppers && shopperService.shoppers.length > 0"> <ul *ngIf="shopperService.shoppers && shopperService.shoppers.length > 0">
<li <li *ngFor="let shopper of shopperService.shoppers" (click)="goToPage('productlist', shopper)">
*ngFor="let shopper of shopperService.shoppers"
(click)="goToPage('productlist', shopper)"
>
<div class="nearby_image"> <div class="nearby_image">
<img <img [src]="shopper.profilePhoto" onerror="this.src='./../../assets/getmi_malls/store298/stores1.png'" />
[src]="shopper.profilePic"
onerror="this.src='./../../assets/getmi_malls/store298/stores1.png'"
/>
</div> </div>
<div class="nearby_detail"> <div class="nearby_detail">
<h5> <h5>
<span class="floatLeft">{{shopper.name}}</span> <span class="floatLeft">{{shopper.name}}</span>
<span class="floatRight" <span class="floatRight">0
>0
<img src="../assets/Path61_2.png" /> <img src="../assets/Path61_2.png" />
</span> </span>
<div class="clear"></div> <div class="clear"></div>
...@@ -72,10 +48,7 @@ ...@@ -72,10 +48,7 @@
<div class="clear"></div> <div class="clear"></div>
</li> </li>
</ul> </ul>
<div <div class="no-result-wrapper" *ngIf="shopperService.shoppers.length === 0">
class="no-result-wrapper"
*ngIf="shopperService.shoppers.length === 0"
>
<img src="../../assets/basket.png" /> <img src="../../assets/basket.png" />
<h1>No result found</h1> <h1>No result found</h1>
<button (click)="goToPage('home')">home</button> <button (click)="goToPage('home')">home</button>
......
...@@ -22,13 +22,13 @@ export class FirstpagePage implements OnInit { ...@@ -22,13 +22,13 @@ export class FirstpagePage implements OnInit {
console.log(user); console.log(user);
if (user) { if (user) {
this.subjectService.sendLoginData(false); this.subjectService.sendLoginData(false);
this.goToPage('home'); this.goToPage('home', { replaceUrl: true });
} else { } else {
this.subjectService.sendLoginData(true); this.subjectService.sendLoginData(true);
this.goToPage('login'); this.goToPage('login', { replaceUrl: true });
} }
} else { } else {
this.goToPage('landing'); this.goToPage('landing', { replaceUrl: true });
} }
this.loader = false; this.loader = false;
}); });
......
...@@ -116,7 +116,8 @@ export class MyorderPage implements OnInit { ...@@ -116,7 +116,8 @@ export class MyorderPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const regex = '%uFFFD';
return unescape(text.replace(/%uFFFD/g, ''));
} }
} }
...@@ -42,7 +42,8 @@ export class OrderplacedPage implements OnInit { ...@@ -42,7 +42,8 @@ export class OrderplacedPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const regex = '%uFFFD';
return unescape(text.replace(/%uFFFD/g, ''));
} }
getDeliveryTime(timeStamp) { getDeliveryTime(timeStamp) {
......
...@@ -75,7 +75,8 @@ export class ProductdetailPage implements OnInit { ...@@ -75,7 +75,8 @@ export class ProductdetailPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const regex = '%uFFFD';
return unescape(text.replace(/%uFFFD/g, ''));
} }
getProd(params) { getProd(params) {
......
...@@ -90,7 +90,8 @@ export class ProductlistPage implements OnInit { ...@@ -90,7 +90,8 @@ export class ProductlistPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const regex = '%uFFFD';
return unescape(text.replace(/%uFFFD/g, ''));
} }
gridToggle() { gridToggle() {
......
...@@ -70,7 +70,8 @@ export class SearchmodalPage implements OnInit { ...@@ -70,7 +70,8 @@ export class SearchmodalPage implements OnInit {
} }
unEscape(text: string) { unEscape(text: string) {
return unescape(text); const respVal = unescape(text);
return respVal.replace('�', '');
} }
......
...@@ -40,7 +40,7 @@ export class AuthService { ...@@ -40,7 +40,7 @@ export class AuthService {
this.SetUserData(user); this.SetUserData(user);
this.loader = false; this.loader = false;
if (this.type === 1) { if (this.type === 1) {
this.router.navigateByUrl('home'); this.router.navigateByUrl('home', { replaceUrl: true });
} else { } else {
this.router.navigateByUrl('verification'); this.router.navigateByUrl('verification');
} }
...@@ -325,7 +325,7 @@ export class AuthService { ...@@ -325,7 +325,7 @@ export class AuthService {
.then(() => { .then(() => {
console.log('Address add Successfully'); console.log('Address add Successfully');
this.service.set('user', JSON.stringify(this.userData)); this.service.set('user', JSON.stringify(this.userData));
this.router.navigateByUrl('home'); this.router.navigateByUrl('home', { replaceUrl: true });
document.body.scrollTop = document.documentElement.scrollTop = 0; document.body.scrollTop = document.documentElement.scrollTop = 0;
}) })
.catch(err => { .catch(err => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment