提交 d75e1475 编写于 作者: guofeng.chen's avatar guofeng.chen

测试登录

上级 fee2f419
...@@ -71,7 +71,7 @@ function fliterRoute(query, path) { ...@@ -71,7 +71,7 @@ function fliterRoute(query, path) {
} }
// 商品详情页去掉code // 商品详情页去掉code
if (path === '/goods-detail' && query.code) { if (path === '/goods-detail' && query.code) {
store.dispatch('getWxUserInfo', search.code); store.dispatch('getWxUserInfo', query.code);
delete query.code; delete query.code;
let goodsDetailParams = sessionStorage.getItem('goodsDetailParams'); let goodsDetailParams = sessionStorage.getItem('goodsDetailParams');
goodsDetailParams = goodsDetailParams ? JSON.parse(goodsDetailParams) : {}; goodsDetailParams = goodsDetailParams ? JSON.parse(goodsDetailParams) : {};
......
...@@ -209,7 +209,7 @@ export function isWeiXin() { ...@@ -209,7 +209,7 @@ export function isWeiXin() {
export const wxOauth = () => { export const wxOauth = () => {
let url = location.href, redirectUrl; let url = location.href, redirectUrl;
let appId = getAPPID(); let appId = getAPPID();
// url = url.split('?')[0]; url = url.split('?')[0];
redirectUrl = encodeURIComponent(url); redirectUrl = encodeURIComponent(url);
console.log('wxOauth redirectUrl => ', redirectUrl); console.log('wxOauth redirectUrl => ', redirectUrl);
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`; window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册