yyb
2026-04-29 7509df62180e7e4b08bf41bf3a181b23910d7c6c
src/pages/index.vue
@@ -249,9 +249,13 @@
        console.log("扫码结果:", res);
        // 解析扫码结果并跳转到生产报工页面
        try {
          const scanResult = JSON.parse(res.result);
          const scanRaw = res.result;
          const scanResult =
            typeof scanRaw === "string" ? JSON.parse(scanRaw) : scanRaw;
          console.log("scanResult", scanResult);
          uni.navigateTo({
            url: `/pages/productionManagement/productionReport/index?orderRow=${encodeURIComponent(JSON.stringify(scanResult))}`
            // 传递整个 orderRow 对象(扫码对象)给报工页
            url: `/pages/productionManagement/productionReport/index?orderRow=${encodeURIComponent(JSON.stringify(scanResult))}`,
          });
        } catch (e) {
          console.error("扫码结果解析失败:", e);
@@ -260,7 +264,7 @@
      },
      fail: (err) => {
        console.error("扫码失败:", err);
      }
      }
    });
    return;
  }