transfer.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. let location_search = [],
  2. url_from = '',
  3. url_to = '',
  4. token = '';
  5. var hours = 'h8'
  6. // if(location.search.includes('token')) {
  7. // location_search = location.search.split('&');
  8. // for(let i in location_search) {
  9. // if(location_search[i].includes('token')) {
  10. // let t_index = location_search[i].indexOf('=');
  11. // token = location_search[i].substring(t_index+1);
  12. // } else if(location_search[i].includes('url_from')) {
  13. // let f_index = location_search[i].indexOf('=');
  14. // url_from = location_search[i].substring(f_index+1);
  15. // } else if(location_search[i].includes('url_to')) {
  16. // let o_index = location_search[i].indexOf('=');
  17. // url_to = decodeURIComponent(location_search[i].substring(o_index+1));
  18. // }
  19. // }
  20. // if(token != '') {
  21. // const requestURL = gobalData.login + '/user/main/detail';
  22. // $.ajax({
  23. // url: requestURL,
  24. // async: false,
  25. // type: "POST",
  26. // timeout: 30000,
  27. // dataType: 'json',
  28. // data: {
  29. // client:'web',
  30. // token: token
  31. // },
  32. // success:(res) =>{
  33. // if(res.code == '1') {
  34. // localStorage.setItem('userInfo', JSON.stringify(res.data));
  35. // setCookienew('overtime', 'overtime', hours);
  36. // setCookie(cookieskey,token);
  37. // setTimeout(()=>{
  38. // location.href = url_to;
  39. // },500)
  40. //
  41. // }
  42. // }
  43. // });
  44. // }
  45. // } else {
  46. // window.location.href = './index.html';
  47. // }
  48. new Vue({
  49. el:'#transfer',
  50. data() {
  51. return {
  52. link:''
  53. }
  54. },
  55. methods:{
  56. },
  57. mounted() {
  58. this.link = location.href;
  59. }
  60. })