|
@@ -103,6 +103,7 @@ const actions = {
|
|
const fullURL = window.location.href;
|
|
const fullURL = window.location.href;
|
|
// 使用正则表达式提取code参数的值
|
|
// 使用正则表达式提取code参数的值
|
|
const codeMatch = fullURL.match(/[\?&]access=([^&]+)/);
|
|
const codeMatch = fullURL.match(/[\?&]access=([^&]+)/);
|
|
|
|
+ console.log('codeMatch===>',codeMatch)
|
|
if (codeMatch) {
|
|
if (codeMatch) {
|
|
// 如果匹配成功,将code的值存储在组件的data中
|
|
// 如果匹配成功,将code的值存储在组件的data中
|
|
var code = codeMatch[1];
|
|
var code = codeMatch[1];
|
|
@@ -247,11 +248,11 @@ const actions = {
|
|
removeToken()
|
|
removeToken()
|
|
resetRouter()
|
|
resetRouter()
|
|
resolve()
|
|
resolve()
|
|
- const externalURL = "https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri=http://tmrwatch.cn:8082/api/v1/oauth2/token";
|
|
|
|
|
|
+ const externalURL = "https://id.xiandaimuye.com/api/v1/logout?redirect_url=http://tmrwatch.cn:8082&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I";
|
|
// 使用 $router.push 进行页面跳转
|
|
// 使用 $router.push 进行页面跳转
|
|
// 注意: 这里的跳转是在当前窗口进行的,如果需要在新标签页打开,可以使用 window.open(externalURL)
|
|
// 注意: 这里的跳转是在当前窗口进行的,如果需要在新标签页打开,可以使用 window.open(externalURL)
|
|
window.open(externalURL, "_self");
|
|
window.open(externalURL, "_self");
|
|
- location.reload()
|
|
|
|
|
|
+ // location.reload()
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
reject(error)
|
|
reject(error)
|
|
})
|
|
})
|