<template>
  <i-frame :src="url" />
</template>
<script lang="ts" setup name="wf-start">
  import iFrame from '/@/components/iFrame/index.vue';
  import { ref } from 'vue';
  import { useUserStoreWithOut } from '/@/store/modules/user';
  const user = useUserStoreWithOut();
  // const url = ref(
  //   `${import.meta.env.VITE_APP_JFLOW_CORE_ADDR}/#/FEForward?action=GL_CC&Token=${
  //     user.getJflowToken
  //   }`,
  //);

  function getQueryParam(paramName) {
    const urlParams = new URLSearchParams(window.location.search);
    return urlParams.get(paramName);
  }

  let queryParamSta = getQueryParam('sta')
  // const url = ref(
  //   `${import.meta.env.VITE_APP_JFLOW_CORE_ADDR}/#/Middle/GenerList?EnName=GL_CC&Sta=${queryParamSta}&Token=${
  //     user.getJflowToken
  //   }`
  // );
console.log(user.getJflowToken);

  const url = ref(
    `${import.meta.env.VITE_APP_JFLOW_CORE_ADDR}/#/WF/Port?DoWhat=CCList&WorkID=001&Sta=${queryParamSta}&Token=${
      user.getJflowToken
    }`
  );
</script>
