diff --git a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue index 67decb0d7..54c7537f4 100644 --- a/stdiet-ui/src/components/RecipesPlanDrawer/index.vue +++ b/stdiet-ui/src/components/RecipesPlanDrawer/index.vue @@ -44,7 +44,7 @@ v-if="fansChannel === 1" @click="createOneDay" > - 生成1天体验计划 + 生成7天体验计划 @@ -140,6 +140,7 @@ import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan"; import { addRecipesPlan } from "@/api/custom/recipesPlan"; import PlanPauseDrawer from "./PlanPauseDrawer"; import VueQr from "vue-qr"; +import dayjs from "dayjs"; const logo = require("@/assets/logo/logo_b.png"); export default { name: "RecipesPlanDrawer", @@ -167,7 +168,7 @@ export default { }, fanPickerOptions: { disabledDate(time) { - return time.getTime() < Date.now(); + return time.getTime() < Date.now() - 24 * 60 * 60 * 1000; }, }, }; @@ -240,9 +241,9 @@ export default { addRecipesPlan({ cusId: id, startNumDay: 1, - endNumDay: 1, + endNumDay: 7, startDate: this.form.startDate, - endDate: this.form.startDate, + endDate: dayjs(this.form.startDate).add(6, "day").format("YYYY-MM-DD"), }) .then((res) => { if (res.code === 200) {