Explorar el Código

refactor(groupPackageManagement): 清理无用代码和优化导入- 移除未使用的 getUserByPhone 和 getStoreDetail API 导入
- 删除 localSet 工具函数的导入
- 移除组件挂载时的注释代码块- 简化初始化逻辑,移除冗余判断条件- 保留核心业务流程相关代码

congxuesong hace 1 mes
padre
commit
156e614eb6
Se han modificado 1 ficheros con 2 adiciones y 35 borrados
  1. 2 35
      src/views/groupPackageManagement/newGroup.vue

+ 2 - 35
src/views/groupPackageManagement/newGroup.vue

@@ -463,18 +463,10 @@
 import { ref, reactive, onMounted, watch, nextTick, computed } from "vue";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { Plus, Delete, ArrowDown, ArrowUp, Picture } from "@element-plus/icons-vue";
-import {
-  saveDraft,
-  getStoreDetail,
-  getHolidayList,
-  getUserByPhone,
-  getMenuByStoreId,
-  getThaliById,
-  saveThali
-} from "@/api/modules/groupPackageManagement";
+import { saveDraft, getHolidayList, getMenuByStoreId, getThaliById, saveThali } from "@/api/modules/groupPackageManagement";
 import { useRouter, useRoute } from "vue-router";
 import type { UploadProps, FormInstance, UploadInstance, UploadFile } from "element-plus";
-import { localGet, localSet } from "@/utils";
+import { localGet } from "@/utils";
 
 // ==================== 响应式数据定义 ====================
 
@@ -1056,31 +1048,6 @@ watch(
 onMounted(async () => {
   id.value = (route.query.id as string) || "";
   type.value = (route.query.type as string) || "";
-  // 不要删除-开始
-  // let param = {
-  //   // phone: localGet("iphone")
-  //   phone: "18641153170"
-  // };
-  // const resP: any = await getUserByPhone(param);
-  // if (resP.data && resP.data.storeId) {
-  //   localSet("createdId", resP.data.storeId);
-  //   const resD: any = await getDetail({
-  //     id: localGet("createdId")
-  //   });
-  //   if (resD.data && resD.data.commissionRate) {
-  //     localSet("commissionRate", resD.data.commissionRate);
-  //   }
-  //   if (resD.data && resD.data.businessSection) {
-  //     localSet("businessSection", resD.data.businessSection);
-  //   }
-  // } else {
-  //   ElMessage.warning("请完成商家入驻后再进行新建团购");
-  // }
-  // if (!getGroupCombination()) {
-  //   ElMessage.warning("请完成商家入驻后重新登录再进行新建团购");
-  //   return;
-  // }
-  // 不要删除-结束
   let params = {
     year: new Date().getFullYear(),
     page: 1,