Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(signin): 修复微信登陆不能的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Oct 26, 2018
1 parent 72ceb03 commit 58733ad
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/util/wechat.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import http from "@/api/api.js";
import api from "@/api/api";

export const signinByWechat = () => {
const redirectUrl = window.location.origin + process.env.BASE_URL + "wechat/";
http
.post("socialite/getOriginUrl", {
redirectUrl,
validateStatus: s => s === 200
})
api
.post(
"socialite/getOriginUrl",
{ redirectUrl },
{ validateStatus: s => s === 200 }
)
.then(({ data: { url = "" } = {} }) => {
window.location.href = url;
});
Expand Down

0 comments on commit 58733ad

Please sign in to comment.