快捷登录跨域问题处理

master
Chopper 2021-06-03 11:43:19 +08:00
parent 1de0990265
commit bd6db202ab
1 changed files with 5 additions and 8 deletions

View File

@ -18,6 +18,7 @@ import { webConnect, openIdLogin } from "@/api/connect.js";
import { whetherNavigate } from "@/utils/Foundation"; // import { whetherNavigate } from "@/utils/Foundation"; //
import { getUserInfo } from "@/api/members"; import { getUserInfo } from "@/api/members";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
import api from "@/config/api.js";
export default { export default {
data() { data() {
@ -148,12 +149,8 @@ export default {
// #ifdef H5 // #ifdef H5
let code = connectLogin.code; let code = connectLogin.code;
webConnect(code).then((res) => { let buyer = api.buyer;
let data = res.data; window.open(buyer+`/connect/login/web/`+code, "_self");
if (data.success) {
window.location = data.result;
}
});
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.nonH5OpenId(connectLogin); this.nonH5OpenId(connectLogin);