gaoluyang
2 天以前 0f34d97b5c0c559b3d132bf1171de43a5ea9a596
src/pages/equipmentManagement/upkeep/add.vue
@@ -301,19 +301,20 @@
// 返回上一页
const goBack = () => {
   // 清除存储的id
   uni.removeStorageSync('repairId');
   uni.navigateBack();
};
// 获取页面参数
const getPageParams = () => {
   const pages = getCurrentPages();
   const currentPage = pages[pages.length - 1];
   const options = currentPage.options;
   // 从本地存储获取id
   const id = uni.getStorageSync('repairId');
   
   // 根据是否有id参数来判断是新增还是编辑
   if (options.id) {
   if (id) {
      // 编辑模式,获取详情
      loadForm(options.id);
      loadForm(id);
   } else {
      // 新增模式
      loadForm();
@@ -322,10 +323,8 @@
// 获取页面ID
const getPageId = () => {
   const pages = getCurrentPages();
   const currentPage = pages[pages.length - 1];
   const options = currentPage.options;
   return options.id;
   // 从本地存储获取id
   return uni.getStorageSync('repairId');
};
</script>