Browse Source

修改微信重新授权的问题

master
Gao xiaosong 4 years ago
parent
commit
9065ef44ba
  1. 12
      libs/wechat.js

12
libs/wechat.js

@ -124,7 +124,7 @@ export function clearAuthStatus() {
export function oAuth() {
console.log('处理微信授权')
console.log('处理微信授权cookie',cookie.get("spread"))
console.log('处理微信授权cookie', cookie.get("spread"))
console.log(store)
console.log(store.state)
return new Promise((resolve, reject) => {
@ -167,9 +167,9 @@ export function auth(code) {
}
export function toAuth() {
// wechat().then(wx => {
location.href = getAuthUrl("wxc061dee8806ff712");
// });
wechat().then(wx => {
location.href = getAuthUrl(appId);
});
}
function getAuthUrl(appId) {
@ -177,8 +177,8 @@ function getAuthUrl(appId) {
// const redirect_uri = encodeURIComponent(window.location.href);
// const redirect_uri = encodeURIComponent(`${location.origin}/pages/Loading/index`);
// #ifdef H5
// #endif
// #ifdef H5
// #endif
const redirect_uri = encodeURIComponent(`${location.origin}/pages/Loading/index?path=${encodeURIComponent(window.location.href)}`);

Loading…
Cancel
Save