提交 c1c64a04 authored 作者: huang's avatar huang

后台开发

上级 764891ea
...@@ -15,3 +15,13 @@ export function getRecipeByWeek(week) { ...@@ -15,3 +15,13 @@ export function getRecipeByWeek(week) {
method: 'get', method: 'get',
}) })
} }
//根据星期获取菜谱
export function updateRecipeWeek(week,data) {
console.log(week)
console.log(data)
return request({
url: '/recipeWeek/updateRecipeWeek/'+week,
method: 'post',
data:data
})
}
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</div> </div>
</template> </template>
<script> <script>
import {getRecipeType,getRecipeByWeek } from "@/api/recipe/recipeSetting"; import {getRecipeType,getRecipeByWeek,updateRecipeWeek} from "@/api/recipe/recipeSetting";
export default { export default {
//页签缓存页面的name要和路由中的那么要相同,才能缓存, //页签缓存页面的name要和路由中的那么要相同,才能缓存,
//如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才model能页签缓存 //如果是自定义菜单,则页面的name和菜单管理中路由地址要相同,才model能页签缓存
...@@ -199,18 +199,17 @@ ...@@ -199,18 +199,17 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm(formName) { submitForm(formName) {
console.log(this.breakfastForm)
console.log(this.lunchForm) let data={
console.log(this.supperForm) breakfastForm:this.breakfastForm,
return lunchForm:this.lunchForm,
this.$refs[formName].validate((valid) => { supperForm:this.supperForm
if (valid) { }
alert('submit!'); updateRecipeWeek(this.currentWeek,data).then(response=>{
} else { if (response.code==200){
console.log('error submit!!'); this.open = false;
return false;
} }
}); })
}, },
/**删除早餐列表*/ /**删除早餐列表*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论