1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- let ticket = '';
- if (location.search.includes('ticket')) {
- ticket = location.search.substring(8);
- const requestURL = 'https://tyyxopenapi.txhlwxx.com/openapi/oauth/zlb/checkticket.php';
- $.ajax({
- url: requestURL,
- async: false,
- type: "POST",
- timeout: 30000,
- dataType: 'json',
- data: {
- type:'login',
- ticket: ticket
- },
- success: (res) => {
- if (res.code == '1') {
- localStorage.setItem('userInfo', JSON.stringify(res.data));
- setTimeout(() => {
- location.href = './index.html';
- }, 500)
- } else {
- window.alert(res.msg);
- }
- }
- });
- }
- // if(location.search.includes('token')) {
- // location_search = location.search.split('&');
- // for(let i in location_search) {
- // if(location_search[i].includes('token')) {
- // let t_index = location_search[i].indexOf('=');
- // token = location_search[i].substring(t_index+1);
- // } else if(location_search[i].includes('url_from')) {
- // let f_index = location_search[i].indexOf('=');
- // url_from = location_search[i].substring(f_index+1);
- // } else if(location_search[i].includes('url_to')) {
- // let o_index = location_search[i].indexOf('=');
- // url_to = decodeURIComponent(location_search[i].substring(o_index+1));
- // }
- // }
- // if(token != '') {
- // const requestURL = gobalData.login + '/user/main/detail';
- // $.ajax({
- // url: requestURL,
- // async: false,
- // type: "POST",
- // timeout: 30000,
- // dataType: 'json',
- // data: {
- // client:'web',
- // token: token
- // },
- // success:(res) =>{
- // if(res.code == '1') {
- // localStorage.setItem('userInfo', JSON.stringify(res.data));
- // setCookienew('overtime', 'overtime', hours);
- // setCookie(cookieskey,token);
- // setTimeout(()=>{
- // location.href = url_to;
- // },500)
- //
- // }
- // }
- // });
- // }
- // } else {
- // window.location.href = './index.html';
- // }
- // new Vue({
- // el: '#transfer',
- // data() {
- // return {
- // link: ''
- // }
- // },
- // methods: {},
- // mounted() {
- // this.link = location.href;
- // }
- // })
|