import { ref} from 'vue'; 
import { defHttp } from '/@/utils/http/axios';  

  let url = window.location.href;
  let intNumber = url.indexOf("Token=");
  intNumber=intNumber+6;
  let cctoken=url.substring(intNumber);
  const getUserTokeyUrl = "/api/jflow/getUserTokey"
  const userTokey = ref();
 
 
  export async function getUserTokey() {
    
   
      //userTokey.value  =  defHttp.get({url: getUserTokeyUrl, params:{Token:cctoken}});

      await  defHttp.get({url: getUserTokeyUrl, params:{Token:cctoken}}).then((res) => {
      
        console.log("----------- 22222222222222flow ",res); 
        userTokey.value=res;
        /**
        if (res.success) {
          resolve(true);
        } else {
          createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
          reject();
        }
        */
      });
  

    return userTokey.value;
  }


  

