From d7a786f4314cb937a7e0639e937eeeee1684ad3c Mon Sep 17 00:00:00 2001 From: Ching Date: Thu, 7 Oct 2021 13:52:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(week=20recipe=20page=20):=20[A]=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0=E6=AF=8F=E6=97=A5=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [A] 增加刷新每日菜单功能 Signed-off-by: Ching --- .../src/components/daily_recipe_detail.vue | 6 +- .../components/recipe-mobile/week-recipe.vue | 212 +++++++++++------- 2 files changed, 132 insertions(+), 86 deletions(-) diff --git a/frontend/src/components/daily_recipe_detail.vue b/frontend/src/components/daily_recipe_detail.vue index bac9cd3..24dd98a 100644 --- a/frontend/src/components/daily_recipe_detail.vue +++ b/frontend/src/components/daily_recipe_detail.vue @@ -97,7 +97,7 @@ export default { }; }, mounted() { - this.getDailyRecipy(), + this.getDailyRecipe(), axios .get( config.publicPath + '/recipe/recipe/?recipe_type=meat&page_size=500' @@ -119,7 +119,7 @@ export default { .post( config.publicPath + '/recipe/daily-recipe/' + this.$route.params.id ) - .then((response) => (response, this.getDailyRecipy())); + .then((response) => (response, this.getDailyRecipe())); }, submitRecipe() { axios.put( @@ -136,7 +136,7 @@ export default { console.log(this.meat, this.vegetable, this.soup); this.disable_submit = false; }, - getDailyRecipy() { + getDailyRecipe() { axios .get( config.publicPath + '/recipe/daily-recipe/' + this.$route.params.id diff --git a/frontend/src/components/recipe-mobile/week-recipe.vue b/frontend/src/components/recipe-mobile/week-recipe.vue index abb5820..b6b75ee 100644 --- a/frontend/src/components/recipe-mobile/week-recipe.vue +++ b/frontend/src/components/recipe-mobile/week-recipe.vue @@ -5,107 +5,132 @@ pulling-text="下拉重新生成每周菜谱" loosing-text="可以松手了..." > - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +