fix country params
This commit is contained in:
parent
4ece2cf30c
commit
09d71ac61e
13 changed files with 299 additions and 242 deletions
|
|
@ -96,12 +96,16 @@ export class RecipeService {
|
|||
}
|
||||
|
||||
async getRecipeDetail(productCode: string): Promise<Observable<RecipeDetail>> {
|
||||
|
||||
let asyncCountry = await this.getCurrentCountry(this.department!);
|
||||
console.log('get detail by asyncCountry', asyncCountry);
|
||||
|
||||
return this._httpClient.get<RecipeDetail>(
|
||||
environment.api + '/recipes/' + productCode,
|
||||
{
|
||||
params: {
|
||||
filename: this.getCurrentFile(),
|
||||
country: await this.getCurrentCountry(this.department!),
|
||||
country: asyncCountry,
|
||||
},
|
||||
withCredentials: true,
|
||||
responseType: 'json',
|
||||
|
|
@ -112,12 +116,15 @@ export class RecipeService {
|
|||
async getRecipeDetailMat(
|
||||
productCode: string
|
||||
): Promise<Observable<{ result: RecipeDetailMat[]; }>> {
|
||||
|
||||
let asyncCountry = await this.getCurrentCountry(this.department!);
|
||||
|
||||
return this._httpClient.get<{ result: RecipeDetailMat[] }>(
|
||||
environment.api + '/recipes/' + productCode + '/mat',
|
||||
{
|
||||
params: {
|
||||
filename: this.getCurrentFile(),
|
||||
country: await this.getCurrentCountry(this.department!),
|
||||
country: asyncCountry,
|
||||
},
|
||||
withCredentials: true,
|
||||
responseType: 'json',
|
||||
|
|
@ -251,6 +258,7 @@ export class RecipeService {
|
|||
}
|
||||
|
||||
getSubMenus(country: string, filename: string, productCode: string) {
|
||||
console.log('getSubMenus', country, filename, productCode);
|
||||
return this._httpClient.get<Recipe01[]>(
|
||||
environment.api +
|
||||
'/recipes/' +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue