跳转测试

This commit is contained in:
tcubic 2022-08-08 13:09:56 +08:00
parent 8c0fd1d4f1
commit ddc22a042d
3 changed files with 4 additions and 6 deletions

View File

@ -232,10 +232,6 @@ const getCode = () => {
service service
.post( .post(
process.env.VUE_APP_API + "/cms-activity/cms88/zsApi/xfhdAuthorize", process.env.VUE_APP_API + "/cms-activity/cms88/zsApi/xfhdAuthorize",
// qs.stringify({
// redirect_uri: redirect_uri
// })
{ {
redirect_uri: redirect_uri, redirect_uri: redirect_uri,
} }
@ -244,7 +240,8 @@ const getCode = () => {
let code = res.data.data; let code = res.data.data;
console.log("get code结果3", res); console.log("get code结果3", res);
authCode.value = res.data.data; authCode.value = res.data.data;
window.location.href = res.data.data; // window.location.href = res.data.data;
location.href = res.data.data;
// window.open(res.data.data) // window.open(res.data.data)
}); });
}; };

0
src/page/Home/Login.vue Normal file
View File

View File

@ -3,7 +3,8 @@ import { createRouter, createWebHashHistory } from 'vue-router';
const router = createRouter({ const router = createRouter({
history: createWebHashHistory(), history: createWebHashHistory(),
routes: [ routes: [
{ path: '/', component: () => import('@/views/Home.vue') } { path: '/', component: () => import('@/views/Home/Home.vue') },
{ path: '/login', component: () => import('@/views/Home/Login.vue') }
] ]
}); });