feat:测试
This commit is contained in:
@@ -17,20 +17,17 @@ watch(
|
|||||||
() => code.value,
|
() => code.value,
|
||||||
async (val) => {
|
async (val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
console.log("val", val);
|
||||||
// 使用正则表达式提取路由参数
|
// 使用正则表达式提取路由参数
|
||||||
const regex = /\/auth\/([\w-]+)[?]?/;
|
const regex = /\/auth\/([\w-]+)[?]?/;
|
||||||
const result = regex.exec(route.fullPath);
|
const result = regex.exec(route.fullPath);
|
||||||
const authParam = result != null ? result[1].toUpperCase() : null;
|
const authParam = result != null ? result[1].toUpperCase() : null;
|
||||||
if (type.value === 0) {
|
if (type.value === 0) {
|
||||||
const res = await authOtherLogin({ code: val }, authParam);
|
const res = await authOtherLogin({ code: val }, authParam);
|
||||||
message.value = res;
|
|
||||||
console.log(res, "type.value === 0");
|
|
||||||
} else if (type.value === 1) {
|
} else if (type.value === 1) {
|
||||||
const res = await authOtherBind({ code: val }, authParam);
|
const res = await authOtherBind({ code: val }, authParam);
|
||||||
message.value = res;
|
|
||||||
console.log(res, "type.value === 1");
|
|
||||||
}
|
}
|
||||||
// message.value = "授权成功";
|
message.value = "授权成功";
|
||||||
// window.close();
|
// window.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user