吉安感知网项目-前端
张含笑
2026-02-26 0e1fbcb15385dc135726ae0828bea752495f4f06
feat:去掉无用代码
2 files modified
38 ■■■■■ changed files
uniapps/work-app/src/pages/map/index.vue 37 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/subPackages/voiceCallDetail/index.vue 1 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/pages/map/index.vue
@@ -23,9 +23,6 @@
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}';
const updateKey = ref(0);
// const viewUrl = computed(() => {
//   return `https://192.168.1.157:5176/mobile-web-view/#/webViewWrapper/defaultMap?params=${encodeURIComponent(userParams)}&isWeb=${envParam}&updateKey=${updateKey.value}`;
// });
const viewUrl = computed(() => {
  return getWebViewUrl("/defaultMap", {
    isWeb: envParam,
@@ -34,40 +31,6 @@
});
const onPostMessage = (data) => {
  // #ifdef MP-WEIXIN
  if (data.type === "scanCode") {
  } else if (data.type === "jumpAddWork") {
  } else if (data.type === "jumpMapNav") {
    //事件导航
  } else if (data.type === "workid") {
    //事件详情
  }
  // #endif
  // #ifndef MP-WEIXIN
  if (data.type === "scanCode") {
    uni.navigateTo({
      url: "/subPackages/qrCode/index",
    });
  } else if (data.type === "jumpAddWork") {
    //新建任务
    const encodedData = encodeURIComponent(JSON.stringify(data.rowItem));
    uni.setStorageSync("webview_params", encodedData);
    uni.navigateTo({
      url: `/subPackages/taskDetail/addTask/index`,
    });
  } else if (data.type === "jumpMapNav") {
    //事件导航
    uni.navigateTo({
      url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
    });
  } else if (data.type === "workid") {
    //事件详情
    uni.navigateTo({
      url: `/subPackages/workDetail/index?eventNum=${data.eventNum}`,
    });
  }
  // #endif
};
onShow(() => {
uniapps/work-app/src/subPackages/voiceCallDetail/index.vue
@@ -74,7 +74,6 @@
  const contact = options.contact ? JSON.parse(decodeURIComponent(options.contact)) : null;
  // 构建viewUrl,将contact参数拼接到URL中
  const contactParam = contact ? encodeURIComponent(JSON.stringify(contact)) : '';
  // viewUrl.value = `https://192.168.1.157:5176/mobile-web-view/#/webViewWrapper/voiceCallDetail?params=${encodeURIComponent(userParams)}&contact=${contactParam}`;
  viewUrl.value = getWebViewUrl("/voiceCallDetail", { contact: options.contact ,voiceparams: options.voiceparams});
});