Explorar el Código

快捷登录跨域问题处理

Chopper hace 5 años
padre
commit
bd6db202ab
Se han modificado 1 ficheros con 5 adiciones y 8 borrados
  1. 5 8
      pages/passport/onClickLogin.vue

+ 5 - 8
pages/passport/onClickLogin.vue

@@ -17,7 +17,8 @@
 import { webConnect, openIdLogin } from "@/api/connect.js";
 import { whetherNavigate } from "@/utils/Foundation"; //登录跳转
 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 {
   data() {
@@ -147,13 +148,9 @@ export default {
       }
 
       // #ifdef H5
-      let code = connectLogin.code;
-      webConnect(code).then((res) => {
-        let data = res.data;
-        if (data.success) {
-          window.location = data.result;
-        }
-      });
+      let code = connectLogin.code;
+	  let buyer = api.buyer;
+      window.open(buyer+`/connect/login/web/`+code, "_self");
       // #endif
       // #ifdef APP-PLUS
       this.nonH5OpenId(connectLogin);