feat: 🚀 nav迭代(产品推荐和商场入口)
This commit is contained in:
22
src/views/webManagement/commodity/utils/edit/reset.ts
Normal file
22
src/views/webManagement/commodity/utils/edit/reset.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { getProductDetailsApi } from "@/api/modules/productList";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { messageBox } from "@/utils/messageBox";
|
||||
// import { cloneDeep } from "lodash-es";
|
||||
import { initDetailParams } from "./initDetailParams";
|
||||
//详情(重置,重新获取一下详情)
|
||||
const getProductDetails = async (dataStore: any, editorRef: any) => {
|
||||
const { id } = dataStore.basicInfoRuleForm;
|
||||
const result = await getProductDetailsApi(id);
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
|
||||
initDetailParams(dataStore, data, editorRef);
|
||||
useMsg("success", "重置成功 !");
|
||||
}
|
||||
};
|
||||
|
||||
export const handleReset = (dataStore: any, editorRef?: any) => {
|
||||
messageBox("该操作会将数据重置为初始状态", () => {
|
||||
getProductDetails(dataStore, editorRef);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user