修改成7天体验

This commit is contained in:
huangdeliang 2021-03-12 09:33:04 +08:00
parent c6a3a9da2e
commit 9b3e474023

View File

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