修复错误
This commit is contained in:
@ -75,15 +75,9 @@ const mutations = {
|
||||
|
||||
const actions = {
|
||||
async init({ commit, dispatch }, payload) {
|
||||
const orderResult = await getOrder(payload.cusId);
|
||||
if (!orderResult.data.cusId) {
|
||||
throw new Error("未找到用户id");
|
||||
}
|
||||
|
||||
commit("updateStateData", {
|
||||
...payload,
|
||||
cusId: orderResult.data.cusId
|
||||
});
|
||||
// console.log(payload);
|
||||
//
|
||||
commit("updateStateData", payload);
|
||||
//
|
||||
getDicts("cus_cus_unit").then(response => {
|
||||
commit("updateStateData", { cusUnitOptions: response.data });
|
||||
@ -99,8 +93,8 @@ const actions = {
|
||||
});
|
||||
|
||||
//
|
||||
if (orderResult.data.cusId) {
|
||||
dispatch("getHealthyData", { cusId: orderResult.data.cusId });
|
||||
if (payload.cusId) {
|
||||
dispatch("getHealthyData", payload);
|
||||
}
|
||||
|
||||
// 食谱数据
|
||||
|
@ -242,7 +242,7 @@ export default {
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
console.log(mData);
|
||||
// console.log(mData);
|
||||
return mData;
|
||||
},
|
||||
...mapGetters(["typeDict"]),
|
||||
@ -277,7 +277,7 @@ export default {
|
||||
this.deleteDishes({ num: this.num - 1, id: data.id });
|
||||
},
|
||||
handleOnWeightChange(data, weight) {
|
||||
console.log({ data, weight });
|
||||
// console.log({ data, weight });
|
||||
this.updateDishes({
|
||||
num: this.num - 1,
|
||||
dishesId: data.dishesId,
|
||||
@ -286,7 +286,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleOnCustomUnitChange(data, { cusWeight, cusUnit }) {
|
||||
console.log({ data, cusWeight, cusUnit });
|
||||
// console.log({ data, cusWeight, cusUnit });
|
||||
this.updateDishes({
|
||||
num: this.num - 1,
|
||||
dishesId: data.dishesId,
|
||||
|
@ -607,7 +607,7 @@ export default {
|
||||
},
|
||||
handleBuild(data) {
|
||||
// console.log(data);
|
||||
const { startDate, endDate, id, orderId, recipesId } = data;
|
||||
const { startDate, endDate, id, cusId, recipesId } = data;
|
||||
|
||||
// const params = { id: data.id, cusId: data.orderId };
|
||||
// const path = `/recipes/build/${orderId}/${id}/${recipesId || 0}`;
|
||||
@ -617,7 +617,7 @@ export default {
|
||||
// });
|
||||
const queryParam = {
|
||||
planId: id,
|
||||
cusId: orderId,
|
||||
cusId,
|
||||
};
|
||||
if (!recipesId) {
|
||||
queryParam.startDate = startDate;
|
||||
|
Reference in New Issue
Block a user